arch: do not hardcode MMIO region length in MmioDeviceInfo

Add a field for its length and fix up users.

Things work just because all hardcoded values agree with each other.
This is prone to breakage.

No functional change.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2021-11-28 02:52:15 +00:00
committed by Xin Wang
parent 288a1c2dd1
commit 4cf22e4ec7
3 changed files with 12 additions and 2 deletions

View File

@@ -1527,6 +1527,7 @@ impl DeviceManager {
(DeviceType::Rtc, "rtc".to_string()),
MmioDeviceInfo {
addr: addr.0,
len: MMIO_LEN,
irq: rtc_irq,
},
);
@@ -1568,6 +1569,7 @@ impl DeviceManager {
(DeviceType::Gpio, "gpio".to_string()),
MmioDeviceInfo {
addr: addr.0,
len: MMIO_LEN,
irq: gpio_irq,
},
);
@@ -1671,6 +1673,7 @@ impl DeviceManager {
(DeviceType::Serial, DeviceType::Serial.to_string()),
MmioDeviceInfo {
addr: addr.0,
len: MMIO_LEN,
irq: serial_irq,
},
);