hw/loongarch: Load FDT table into dram memory space

Load FDT table into dram memory space, and the addr is 2 MiB.
Since lowmem region starts from 0, FDT base address is located
at 2 MiB to avoid NULL pointer access.

Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
Acked-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20221028014007.2718352-2-yangxiaojuan@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
This commit is contained in:
Xiaojuan Yang 2022-10-28 09:40:05 +08:00 committed by Song Gao
parent a649fffcc9
commit 021836936e
No known key found for this signature in database
GPG key ID: 40A2FFF239263EDF
2 changed files with 11 additions and 10 deletions

View file

@ -28,9 +28,6 @@
#define VIRT_GED_MEM_ADDR (VIRT_GED_EVT_ADDR + ACPI_GED_EVT_SEL_LEN)
#define VIRT_GED_REG_ADDR (VIRT_GED_MEM_ADDR + MEMORY_HOTPLUG_IO_LEN)
#define VIRT_FDT_BASE 0x1c400000
#define VIRT_FDT_SIZE 0x100000
struct LoongArchMachineState {
/*< private >*/
MachineState parent_obj;