vm-allocator: Enable vm-allocator for AArch64

Implemented GSI allocator and system allocator for AArch64.
Renamed some layout definitions to align more code between architectures.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao
2020-06-09 12:04:40 +08:00
committed by Rob Bradford
parent 5343b0ac18
commit e9488846f1
7 changed files with 53 additions and 33 deletions

View File

@@ -63,14 +63,14 @@ pub fn arch_memory_regions(size: GuestUsize) -> Vec<(GuestAddress, usize, Region
// 0 ~ 256 MiB: Reserved
regions.push((
GuestAddress(0),
layout::PCI_DEVICES_MAPPED_IO_START as usize,
layout::MEM_32BIT_DEVICES_START.0 as usize,
RegionType::Reserved,
));
// 256 MiB ~ 1 G: MMIO space
regions.push((
GuestAddress(layout::PCI_DEVICES_MAPPED_IO_START),
layout::PCI_DEVICES_MAPPED_IO_SIZE as usize,
layout::MEM_32BIT_DEVICES_START,
layout::MEM_32BIT_DEVICES_SIZE as usize,
RegionType::SubRegion,
));