Author: blueswirl
Date: Sat Oct 9 12:16:29 2010
New Revision: 893
URL: http://tracker.coreboot.org/trac/openbios/changeset/893
Log:
Improve getprop mem dump
Currently the whole buffer supplied by the client is traced.
AIX uses buffer sizes such as 64, 256, 1024 on properties that might
not exist or contain 1 or 8 bytes.
Limit the output to the amount of data actually written into the buffer.
Signed-off-by: Andreas Färber <andreas.faerber(a)web.de>
Signed-off-by: Blue Swirl <blauwirbel(a)gmail.com>
Modified:
trunk/openbios-devel/libopenbios/client.c
Modified: trunk/openbios-devel/libopenbios/client.c
==============================================================================
--- trunk/openbios-devel/libopenbios/client.c Sat Oct 9 12:16:26 2010 (r892)
+++ trunk/openbios-devel/libopenbios/client.c Sat Oct 9 12:16:29 2010 (r893)
@@ -171,7 +171,8 @@
printk("0x%08lx\n", pb->args[pb->nargs]);
} else if (strcmp(pb->service, "getprop") == 0) {
printk("%ld\n", pb->args[pb->nargs]);
- memdump((char*)pb->args[2], pb->args[3]);
+ if ((long)pb->args[pb->nargs] != -1)
+ memdump((char*)pb->args[2], MIN(pb->args[3], pb->args[pb->nargs]));
} else if (strcmp(pb->service, "nextprop") == 0) {
printk("%ld\n", pb->args[pb->nargs]);
memdump((char*)pb->args[2], pb->args[pb->nargs]);
Author: blueswirl
Date: Sat Oct 9 12:16:26 2010
New Revision: 892
URL: http://tracker.coreboot.org/trac/openbios/changeset/892
Log:
ppc: Fix typos in comment
Signed-off-by: Andreas Färber <andreas.faerber(a)web.de>
Signed-off-by: Blue Swirl <blauwirbel(a)gmail.com>
Modified:
trunk/openbios-devel/arch/ppc/qemu/start.S
Modified: trunk/openbios-devel/arch/ppc/qemu/start.S
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/start.S Sat Oct 9 12:16:23 2010 (r891)
+++ trunk/openbios-devel/arch/ppc/qemu/start.S Sat Oct 9 12:16:26 2010 (r892)
@@ -351,9 +351,9 @@
*
* MSR = FP, ME + (DR|IR)
* r1 = stack (32 K + 32 bytes link area above)
- * r5 = clint interface handler
+ * r5 = client interface handler
* r6 = address of client program arguments (unused)
- * r7 = length of client program arguments (unsed)
+ * r7 = length of client program arguments (unused)
*
* Yaboot and Linux use r3 and r4 for initrd address and size
*/
Author: mcayland
Date: Tue Oct 5 10:52:49 2010
New Revision: 887
URL: http://tracker.coreboot.org/trac/openbios/changeset/887
Log:
Fix the MMU TLB miss handlers so that they no longer crash when building SPARC64 with -O0.
This patch allocates an extra 192 bytes of stack space required by unoptimised gcc builds for saving arguments to the stack. As
suggested by Igor previously (see http://lists.openbios.org/pipermail/openbios/2009-July/003762.html and SVN r508).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)siriusit.co.uk>
Modified:
trunk/openbios-devel/arch/sparc64/vectors.S
Modified: trunk/openbios-devel/arch/sparc64/vectors.S
==============================================================================
--- trunk/openbios-devel/arch/sparc64/vectors.S Sun Oct 3 22:28:27 2010 (r886)
+++ trunk/openbios-devel/arch/sparc64/vectors.S Tue Oct 5 10:52:49 2010 (r887)
@@ -557,8 +557,9 @@
SAVE_CPU_STATE(dtlb)
- /* Switch to TLB locked stack space */
- add %g1, -STACK_BIAS, %sp
+ /* Switch to TLB locked stack space (note we add an additional 192 bytes required for
+ gcc to save its arguments when building with -O0) */
+ add %g1, -STACK_BIAS - 192, %sp
/* Enable interrupts for window spill/fill traps */
rdpr %pstate, %g7
@@ -581,8 +582,9 @@
SAVE_CPU_STATE(itlb)
- /* Switch to TLB locked stack space */
- add %g1, -STACK_BIAS, %sp
+ /* Switch to TLB locked stack space (note we add an additional 192 bytes required for
+ gcc to save its arguments when building with -O0) */
+ add %g1, -STACK_BIAS - 192, %sp
/* Enable interrupts for window spill/fill traps */
rdpr %pstate, %g7
Author: mcayland
Date: Sun Oct 3 22:28:27 2010
New Revision: 886
URL: http://tracker.coreboot.org/trac/openbios/changeset/886
Log:
Implement va>tte-data defer word for the MMU TLB miss handlers.
As used by OpenSolaris. This enables OpenSolaris boot to proceed further by allowing the kernel to correctly manage its own TLB
misses.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)siriusit.co.uk>
Modified:
trunk/openbios-devel/arch/sparc64/init.fs
trunk/openbios-devel/arch/sparc64/lib.c
Modified: trunk/openbios-devel/arch/sparc64/init.fs
==============================================================================
--- trunk/openbios-devel/arch/sparc64/init.fs Sun Oct 3 21:18:28 2010 (r885)
+++ trunk/openbios-devel/arch/sparc64/init.fs Sun Oct 3 22:28:27 2010 (r886)
@@ -1,3 +1,10 @@
+\ va>tte-data defer MMU virtual to physical address hook for Solaris
+\ We need to make sure this is in the global wordlist
+active-package 0 active-package!
+defer va>tte-data
+0 to va>tte-data
+active-package!
+
:noname
." Type 'help' for detailed information" cr
\ ." boot secondary slave cdrom: " cr
Modified: trunk/openbios-devel/arch/sparc64/lib.c
==============================================================================
--- trunk/openbios-devel/arch/sparc64/lib.c Sun Oct 3 21:18:28 2010 (r885)
+++ trunk/openbios-devel/arch/sparc64/lib.c Sun Oct 3 22:28:27 2010 (r886)
@@ -16,6 +16,8 @@
#include "ofmem_sparc64.h"
+static ucell *va2ttedata = 0;
+
/* Format a string and print it on the screen, just like the libc
* function printf.
*/
@@ -228,10 +230,28 @@
faultva >>= 13;
faultva <<= 13;
- /* Search the ofmem linked list for this virtual address */
- PUSH(faultva);
- pgmap_fetch();
- tte_data = POP();
+ /* If a valid va>tte-data routine has been set, invoke that Forth xt instead */
+ if (va2ttedata && *va2ttedata != 0) {
+
+ /* va>tte-data ( addr cnum -- false | tte-data true ) */
+ PUSH(faultva);
+ PUSH(0);
+ enterforth(*va2ttedata);
+
+ /* Check the result first... */
+ tte_data = POP();
+ if (!tte_data) {
+ bug();
+ } else {
+ /* Grab the real data */
+ tte_data = POP();
+ }
+ } else {
+ /* Search the ofmem linked list for this virtual address */
+ PUSH(faultva);
+ pgmap_fetch();
+ tte_data = POP();
+ }
if (tte_data) {
/* Update MMU */
@@ -240,6 +260,7 @@
/* If we got here, there was no translation so fail */
bug();
}
+
}
static void
@@ -298,10 +319,28 @@
faultva >>= 13;
faultva <<= 13;
- /* Search the ofmem linked list for this virtual address */
- PUSH(faultva);
- pgmap_fetch();
- tte_data = POP();
+ /* If a valid va>tte-data routine has been set, invoke that Forth xt instead */
+ if (va2ttedata && *va2ttedata != 0) {
+
+ /* va>tte-data ( addr cnum -- false | tte-data true ) */
+ PUSH(faultva);
+ PUSH(0);
+ enterforth(*va2ttedata);
+
+ /* Check the result first... */
+ tte_data = POP();
+ if (!tte_data) {
+ bug();
+ } else {
+ /* Grab the real data */
+ tte_data = POP();
+ }
+ } else {
+ /* Search the ofmem linked list for this virtual address */
+ PUSH(faultva);
+ pgmap_fetch();
+ tte_data = POP();
+ }
if (tte_data) {
/* Update MMU */
@@ -617,4 +656,8 @@
PUSH(0);
fword("active-package!");
bind_func("pgmap@", pgmap_fetch);
+
+ /* Find address of va2ttedata defer word contents for MMU miss handlers */
+ va2ttedata = (ucell *)findword("va>tte-data");
+ va2ttedata++;
}