[OpenBIOS] Haiku/ppc progress - ofmem_claim misbehavior?
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Mon May 24 19:02:27 CEST 2010
Andreas Färber wrote:
> I've dropped the above patch in favor of a more readable ppc-only one:
>
> diff --git a/arch/ppc/qemu/ofmem.c b/arch/ppc/qemu/ofmem.c
> index 7631a1c..2a5eca2 100644
> --- a/arch/ppc/qemu/ofmem.c
> +++ b/arch/ppc/qemu/ofmem.c
> @@ -431,4 +431,5 @@ ofmem_init( void )
>
> ofmem_map( 0, 0, get_ram_bottom(), 0 );
> ofmem_map( get_ram_top(), get_ram_top(), ofmem->ramsize -
> get_ram_top(), 0);
> + ofmem_claim(get_ram_top(), ofmem->ramsize - get_ram_top(), 0);
> }
>
> ofmem_common.c:is_free considers 0x07f00000 free because it only sees
> one range in ofmem->phys_range, 0x80000000 size 962560. Thus, I simply
> claim the reserved part of RAM - no idea what side effects this may have...
>
> On sparc64, instead of ofmem_map, opmem_map_page_range is called, but no
> ofmem_claim either.
On SPARC64 I think ofmem_walk_boot_map/ofmem_map_page_range are used to
set up the translations to cover the regions of memory used to hold
OpenBIOS and beyond. According to the spec, a standard claim should NOT
automatically generate a mapping IIRC as I had to fix this to get
SPARC64 to boot further under OpenSolaris.
> Either way Haiku then hangs while trying to set the first segment
> register (mtsrin):
> http://dev.haiku-os.org/browser/haiku/trunk/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp?rev=36886#L1005
Interesting. It's great to see you making progress with this :)
ATB,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
More information about the OpenBIOS
mailing list