Skip to content

Commit 8f7aa77

Browse files
FlyGoattsbogend
authored andcommitted
MIPS: Loongson64: Reserve vgabios memory on boot
vgabios is passed from firmware to kernel on Loongson64 systems. Sane firmware will keep this pointer in reserved memory space passed from the firmware but insane firmware keeps it in low memory before kernel entry that is not reserved. Previously kernel won't try to allocate memory from low memory before kernel entry on boot, but after converting to memblock it will do that. Fix by resversing those memory on early boot. Cc: [email protected] Fixes: a94e4f2 ("MIPS: init: Drop boot_mem_map") Signed-off-by: Jiaxun Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 55702ec commit 8f7aa77

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/mips/loongson64/init.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ void __init szmem(unsigned int node)
8888
break;
8989
}
9090
}
91+
92+
/* Reserve vgabios if it comes from firmware */
93+
if (loongson_sysconf.vgabios_addr)
94+
memblock_reserve(virt_to_phys((void *)loongson_sysconf.vgabios_addr),
95+
SZ_256K);
9196
}
9297

9398
#ifndef CONFIG_NUMA

0 commit comments

Comments
 (0)