[OpenBIOS] [PATCH] RFC: Change ofmem_common.c to set memory translation properties by reference

Artyom Tarasenko atar4qemu at gmail.com
Thu Oct 14 23:01:05 CEST 2010


On Thu, Oct 14, 2010 at 10:46 PM, Artyom Tarasenko <atar4qemu at gmail.com> wrote:
> On Thu, Oct 14, 2010 at 10:32 PM, Mark Cave-Ayland
> <mark.cave-ayland at siriusit.co.uk> wrote:
>> Hi folks,
>>
>> The attached patch changes OFMEM so that instead of allocating new space
>> within the Forth dictionary every time the /memory and /virtual-memory
>> available/translations nodes are updated, we simply change the property to
>> point directly to a static buffer. This has the effect of saving substantial
>> amounts of memory during OpenSolaris 10 boot (in fact the final dictionary
>> size after boot is now < 256K once again).
>>
>> Blue/Andreas: please could you take a look at this patch and make sure it
>> doesn't break anything in your SPARC64/PPC tests?
>>
>> On the plus side, with this patch applied Milax gets to the end of its
>> natural boot without crashing giving the following output:
>>
>>
>> OpenBIOS for Sparc64
>> Configuration device id QEMU version 1 machine id 0
>> kernel cmdline
>> CPUs: 1 x SUNW,UltraSPARC-IIi
>> UUID: 00000000-0000-0000-0000-000000000000
>> Welcome to OpenBIOS v1.0 built on Oct 14 2010 20:18
>>  Type 'help' for detailed information
>> Trying cdrom:f...
>> Not a bootable ELF image
>> Not a bootable a.out image
>>
>> Loading FCode image...
>> Loaded 7084 bytes
>> entry point is 0x4000
>> Ignoring failed claim for va 1000000 memsz bf34e!
>> Ignoring failed claim for va 1402000 memsz 303b3!
>> Ignoring failed claim for va 1800000 memsz 60a30!
>>
>> Jumping to entry point 00000000010071d8 for type 0000000000000001...
>> switching to new context: entry point 0x10071d8 stack 0x00000000ffe06b49
>> warning:interpret: exception -13 caught
>> SunOS Release 5.11 Version MilaX_0.3.2 64-bit
>> Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
>> Use is subject to license terms.
>> spacex@:interpret: exception -13 caught
>> kdbg-words:interpret: exception -13 caught
>> cb-r/w:interpret: exception -13 caught
>> (Can't load tod module) EXIT
>> -1 >
>
> Cool! Congrats!
>
>> Does anyone know what the tod modules does? Is it Time Of Day (i.e. we are
>> missing some kind of hardware clock emulation?)
>
> I think so. Actually m48t59 is emulated in sparc32, but not connected
> in case of sparc64.

The referencing comment in the opensolaris source:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/sun4u/os/fillsysinfo.c#136

* Appropriate tod module will be dynamically selected while booting
* based on finding a device tree node with a "device_type" property value
* of "tod". If such a node describing tod is not found, for backward
* compatibility, a node with a "name" property value of "eeprom" and
* "model" property value of "mk48t59" will be used. Failing to find a
* node matching either of the above criteria will result in no tod module
* being selected; this will cause the boot process to halt

On the real U30 machine:

ok cd /pci at 1f,4000/ebus at 1/eeprom at 14,0
ok .properties
address                  fffa4000
reg                      00000014 00000000 00002000
model                    mk48t59
name                     eeprom
ok

-- 
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/



More information about the OpenBIOS mailing list