File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -226,17 +226,13 @@ fn create_memory_node(fdt: &mut FdtWriter, guest_mem: &GuestMemoryMmap) -> Resul
226226 // for an explanation of this.
227227
228228 // On ARM we reserve some memory so that it can be utilized for devices like VMGenID to send
229- // data to kernel drivers. Linux does not allow remapping system memory. However, without
230- // remap, kernel module cannot get virtual addresses to read data from device memory.
231- // Reserving a memory region allows Linux kernel modules to remap and thus read this region.
232- let mem_reg_prop = & [
233- super :: layout:: DRAM_MEM_START ,
234- super :: layout:: SYSTEM_MEM_SIZE ,
235- ] ;
236- let mem = fdt. begin_node ( "memory@device" ) ?;
237- fdt. property_array_u64 ( "reg" , mem_reg_prop) ?;
238- fdt. end_node ( mem) ?;
239-
229+ // data to kernel drivers. The range of this memory is:
230+ //
231+ // [layout::DRAM_MEM_START, layout::DRAM_MEM_START + layout::SYSTEM_MEM_SIZE)
232+ //
233+ // The reason we do this is that Linux does not allow remapping system memory. However, without
234+ // remap, kernel drivers cannot get virtual addresses to read data from device memory. Leaving
235+ // this memory region out allows Linux kernel modules to remap and thus read this region.
240236 let mem_size = guest_mem. last_addr ( ) . raw_value ( )
241237 - super :: layout:: DRAM_MEM_START
242238 - super :: layout:: SYSTEM_MEM_SIZE
You can’t perform that action at this time.
0 commit comments