mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
ppc: Fix /memory reg property
Physical address and size were both using two cells instead of one, and their order was wrong. This would happen to work for RAM < 4 GB, since the clear high address bits would happen to match the zero-based memory location. It would indicate a second bank of size zero though. Switch the value order and use encode-phys in preparation for ppc64. This tidies the output of the Haiku boot loader. v2: * Document TODOs for ppc64, requested by Alex. Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <andreas.faerber@web.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@947 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Andreas Färber
parent
21e461a4e7
commit
652ebc448f
@@ -730,17 +730,14 @@ arch_of_init( void )
|
||||
|
||||
/* all memory */
|
||||
|
||||
PUSH(ram_size >> 32);
|
||||
fword("encode-int");
|
||||
/* TODO Adjust this when #address-cells gets increased for ppc64. */
|
||||
PUSH(0);
|
||||
fword("encode-phys");
|
||||
/* This needs adjusting if #size-cells gets increased.
|
||||
Alternatively use multiple (address, size) tuples. */
|
||||
PUSH(ram_size & 0xffffffff);
|
||||
fword("encode-int");
|
||||
fword("encode+");
|
||||
PUSH(0);
|
||||
fword("encode-int");
|
||||
fword("encode+");
|
||||
PUSH(0);
|
||||
fword("encode-int");
|
||||
fword("encode+");
|
||||
push_str("reg");
|
||||
fword("property");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user