-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config: add MMIO layout #339
base: main
Are you sure you want to change the base?
Conversation
d72b805
to
e82de11
Compare
Can we add additional check for overlap between MMIO and physical RAM? Just panic!() if this happens. |
dadcedd
to
f0b6e32
Compare
} | ||
|
||
// Ensure that the MMIO64 range does not overlap with the MMIO32 space. | ||
if config.mmio64_start > config.mmio32_start as u64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just simply make sure mmio64 > 4GB?
The rule is:
- mmio32 < 4GB
- mmio64 > 4GB
- PCIe should not overlap with them
src/devices/pci/src/mmio.rs
Outdated
u32::MAX as u64 + 1 | ||
}; | ||
if (end_of_ram > MMIO32_START as u64 && end_of_ram < (MMIO32_START + MMIO32_SIZE) as u64) | ||
|| end_of_ram > MMIO64_START |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need 2 end_of_ram value.
- top of low usable memory (< 4GB memory), not overlap with mmio32 range.
- top of up usable memory (> 4GB memory), not overlap with mmio64 range.
The new configuration file contains the address and size of MMIO space and PCIE config space. Signed-off-by: Jiaqi Gao <[email protected]>
f0b6e32
to
0b1da35
Compare
The new configuration file contains the address and size of MMIO space and PCIE config space.
Closes #115