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 …
[View More]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 >
Does anyone know what the tod modules does? Is it Time Of Day (i.e. we
are missing some kind of hardware clock emulation?)
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
[View Less]
Hello,
I've gotten AIX 6/7 to instantiate RTAS (patches upcoming) and would
like to trace what it's trying to do. I probably need to implement the
display-character token.
The RTAS code in arch/ppc/qemu/start.S currently looks like this:
GLOBL(of_rtas_start):
blr
GLOBL(of_rtas_end):
...and I would like to branch to C code from there.
Is there a way to have code from, say, rtas.c go between the blr and
of_rtas_end symbol?
Or do I need to move the symbols to the ldscript and place the …
[View More]code in
a special section? If yes, how?
Those symbols are being used for code size calculation and relocation
in arch/ppc/qemu/methods.c.
Thanks,
Andreas
[View Less]
Hi folks,
So I thought it may be interesting over the weekend to take a look and
see how Solaris on SPARC32 is looking at the moment, and found that I
was getting about as far as Artyom was, i.e. ufsboot dies after emitting
this cryptic Forth statement with missing parameters:
['] find-device catch if 2drop true else current-device device-end then
swap l!
With gdb primed with a breakpoint set at obp_fortheval_v2() I was able
to poke around and see what was happening at the time the call …
[View More]into
OpenBIOS was being made. Nothing interesting there. But jumping back a
frame showed some extra information being set in the o registers:
(gdb) bt
#0 obp_fortheval_v2 (str=0x1190d0 " ['] find-device catch if 2drop true
else current-device device-end then swap l!")
at ../arch/sparc32/romvec.c:424
#1 0x00113dd4 in ?? ()
#2 0x00113dd4 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) frame 1
#1 0x00113dd4 in ?? ()
(gdb) info regi
...
o0 0x1190d0 1151184
o1 0x49 73
o2 0x1335c0 1258944
o3 0x130794 1247124
o4 0x0 0
o5 0x0 0
...
Okay; so let's take a look at what's in these o registers:
(gdb) x/1s 0x1190d0
0x1190d0: " ['] find-device catch if 2drop true else
current-device device-end then swap l!"
(gdb) x/1s 0x1335c0
0x1335c0:
"/iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@2,0:d"
(gdb) x/4xb 0x130794
0x130794: 0xff 0xff 0xff 0xff
(gdb)
Bingo! The missing parameters! Stepping back to just before where the
code is invoked, I see this:
0x00113dac: sethi %hi(0x118c00), %g2
0x00113db0: mov %i0, %o0
0x00113db4: ld [ %g2 + 0xa0 ], %g2
0x00113db8: mov %l2, %o1
0x00113dbc: mov %l1, %o2
0x00113dc0: mov %i2, %o3
0x00113dc4: mov %i4, %o4
0x00113dc8: ld [ %g2 + 0x7c ], %l0
0x00113dcc: call %l0
0x00113dd0: mov %i5, %o5
So this makes it appear as if %o0 to %o5 are all set in preparation for
the romvec call. Now minus the actual Forth string (actually a cstr), if
the other values were pushed onto the stack in reverse order then it
appears that this code would it is supposed to.
There is one Forth call in the traces that only takes 1 parameter, but
there doesn't seem to be a way of passing the number of arguments into
the romvec call. However, based on looking at the traces, starting with
the first non-zero value in the highest o register and then pushing all
the lower o register values onto the Forth stack before execution should
give the correct result.
On the basis of this, I'd like to suggest the following proposal:
1) Change the signature of obp_fortheval_v2() from:
static void obp_fortheval_v2(char *str)
to:
static void obp_fortheval_v2(char *str, int arg0, int arg1, int arg2,
int arg3, int arg4)
2) Add code to obp_fortheval_v2 that starting from arg4 and working down
to arg0, finds the first non-zero value and then pushes all remaining
values argN down to arg0 onto the Forth stack before executing the Forth
string.
Does this sound reasonable? I'm surprised that one else has realised
that the obp_fortheval_v2 function signature was wrong, but I guess it
probably hardly gets used for anything these days.
As a separate hack, the equivalent of the OpenBOOT current-device word
in OpenBIOS is active-package. So we should probably create an OpenBIOS
variable called current-device too, and set its value to -1 when the
function is entered. Then after all Forth has been evaluated, if it's
value has changed from before the Forth call was made then set
active-package to the new value before exit.
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
[View Less]
Author: afaerber
Date: Sun Oct 31 17:54:58 2010
New Revision: 940
URL: http://tracker.coreboot.org/trac/openbios/changeset/940
Log:
Consolidate cell format defines
When cross-compiling ppc64 from ppc (native larger than host),
%llx cell format leads to warnings.
The cell format depends solely on the cell type definition,
not on pointer sizes. Under the present assumption that native
smaller than host bitwidth occurs when cross-compiling a 32-bit
target from 64-bit host, we can reuse the …
[View More]definitions from the
equality path for all bitwidths.
Signed-off-by: Andreas Färber <andreas.faerber(a)web.de>
Modified:
trunk/openbios-devel/kernel/cross.h
Modified: trunk/openbios-devel/kernel/cross.h
==============================================================================
--- trunk/openbios-devel/kernel/cross.h Sun Oct 31 17:37:33 2010 (r939)
+++ trunk/openbios-devel/kernel/cross.h Sun Oct 31 17:54:58 2010 (r940)
@@ -102,7 +102,6 @@
/* bit width handling */
-#ifdef NATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH
#if BITS==32
#define FMT_CELL_x "x"
#define FMT_CELL_d "d"
@@ -110,21 +109,16 @@
#define FMT_CELL_x "llx"
#define FMT_CELL_d "lld"
#endif
-#endif
#ifdef NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH
extern unsigned long base_address;
#define pointer2cell(x) ((ucell)(((unsigned long)(x))-base_address))
#define cell2pointer(x) ((u8 *)(((unsigned long)(x))+base_address))
-#define FMT_CELL_x "x"
-#define FMT_CELL_d "d"
#endif
#ifdef NATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH
#define pointer2cell(x) ((ucell)(unsigned long)(x))
#define cell2pointer(x) ((u8 *)((unsigned long)(x)&0xFFFFFFFFUL))
-#define FMT_CELL_x "llx"
-#define FMT_CELL_d "lld"
#endif
#endif
[View Less]
Author: afaerber
Date: Sun Oct 31 10:59:12 2010
New Revision: 935
URL: http://tracker.coreboot.org/trac/openbios/changeset/935
Log:
ppc: Typo fix
It's Old World vs. New World Macs.
Signed-off-by: Andreas Färber <andreas.faerber(a)web.de>
Modified:
trunk/openbios-devel/arch/ppc/qemu/init.c
Modified: trunk/openbios-devel/arch/ppc/qemu/init.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/init.c Sun Oct 31 00:49:…
[View More]20 2010 (r934)
+++ trunk/openbios-devel/arch/ppc/qemu/init.c Sun Oct 31 10:59:12 2010 (r935)
@@ -646,7 +646,7 @@
fword("find-device");
switch(machine_id) {
- case ARCH_HEATHROW: /* OldWord */
+ case ARCH_HEATHROW: /* OldWorld */
/* model */
[View Less]