|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH 5/5] cmd646: move device-specific BMDMA registers to separate memory region |
Date: | Tue, 13 Jun 2023 00:39:08 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 |
On 12/6/23 21:28, Bernhard Beschow wrote:
Am 9. Juni 2023 18:51:19 UTC schrieb Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>:The aim here is to eliminate any device-specific registers from the main BMDMA bar memory region so it can potentially be moved into the shared PCI IDE device. For each BMDMA bus create a new cmd646-bmdma-specific memory region representing the device-specific BMDMA registers and then map them using aliases onto the existing BMDMAState memory region. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> --- hw/ide/cmd646.c | 111 +++++++++++++++++++++++++++++++--------- include/hw/ide/cmd646.h | 4 ++ 2 files changed, 90 insertions(+), 25 deletions(-)
struct CMD646IDEState { PCIIDEState parent_obj; + + MemoryRegion bmdma_mem[2]; + MemoryRegion bmdma_mem_alias[2][2];The added complexity of a two-dimensional alias array seems like a tough call for me. I'm not totally against it but I'm reluctant.
Alternative: struct { MemoryRegion mem; MemoryRegion mem_alias[2]; } bmdma[2];
}; #endif
[Prev in Thread] | Current Thread | [Next in Thread] |