Skip to content

Commit

Permalink
tbs: drop "acpi" memory.
Browse files Browse the repository at this point in the history
Just adjust the RAM portion.

Signed-off-by: Babis Chalios <bchalios@amazon.es>
  • Loading branch information
bchalios committed Jul 18, 2024
1 parent 153851a commit 8539059
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/vmm/src/arch/aarch64/fdt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,13 @@ fn create_memory_node(fdt: &mut FdtWriter, guest_mem: &GuestMemoryMmap) -> Resul
// for an explanation of this.

// On ARM we reserve some memory so that it can be utilized for devices like VMGenID to send
// data to kernel drivers. Linux does not allow remapping system memory. However, without
// remap, kernel module cannot get virtual addresses to read data from device memory.
// Reserving a memory region allows Linux kernel modules to remap and thus read this region.
let mem_reg_prop = &[
super::layout::DRAM_MEM_START,
super::layout::SYSTEM_MEM_SIZE,
];
let mem = fdt.begin_node("memory@device")?;
fdt.property_array_u64("reg", mem_reg_prop)?;
fdt.end_node(mem)?;

// data to kernel drivers. The range of this memory is:
//
// [layout::DRAM_MEM_START, layout::DRAM_MEM_START + layout::SYSTEM_MEM_SIZE)
//
// The reason we do this is that Linux does not allow remapping system memory. However, without
// remap, kernel drivers cannot get virtual addresses to read data from device memory. Leaving
// this memory region out allows Linux kernel modules to remap and thus read this region.
let mem_size = guest_mem.last_addr().raw_value()
- super::layout::DRAM_MEM_START
- super::layout::SYSTEM_MEM_SIZE
Expand Down

0 comments on commit 8539059

Please sign in to comment.