aarch64: Change RAM_START type GuestAddress

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao
2022-03-30 11:52:10 +08:00
committed by Xin Wang
parent ef9f37cd5f
commit a3dbc3b415
4 changed files with 8 additions and 12 deletions
+2 -2
View File
@@ -255,10 +255,10 @@ fn create_memory_node(
}
}
} else {
let mem_size = guest_mem.last_addr().raw_value() - super::layout::RAM_START + 1;
let mem_size = guest_mem.last_addr().raw_value() - super::layout::RAM_START.raw_value() + 1;
// See https://github.com/torvalds/linux/blob/master/Documentation/devicetree/booting-without-of.txt#L960
// for an explanation of this.
let mem_reg_prop = [super::layout::RAM_START as u64, mem_size as u64];
let mem_reg_prop = [super::layout::RAM_START.raw_value() as u64, mem_size as u64];
let memory_node = fdt.begin_node("memory")?;
fdt.property_string("device_type", "memory")?;