Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbppc/walnut Use the only documented method to get...



details:   https://anonhg.NetBSD.org/src/rev/1dd2478dc7d0
branches:  trunk
changeset: 550719:1dd2478dc7d0
user:      eeh <eeh%NetBSD.org@localhost>
date:      Mon Aug 18 21:30:51 2003 +0000

description:
Use the only documented method to get the board data from the firmware.

diffstat:

 sys/arch/evbppc/walnut/walnut_start.S |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 0c6408c5a549 -r 1dd2478dc7d0 sys/arch/evbppc/walnut/walnut_start.S
--- a/sys/arch/evbppc/walnut/walnut_start.S     Mon Aug 18 20:34:18 2003 +0000
+++ b/sys/arch/evbppc/walnut/walnut_start.S     Mon Aug 18 21:30:51 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: walnut_start.S,v 1.9 2003/08/03 23:28:45 eeh Exp $     */
+/*     $NetBSD: walnut_start.S,v 1.10 2003/08/18 21:30:51 eeh Exp $    */
 /*     $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $       */
 
 /*
@@ -90,6 +90,9 @@
 #include <powerpc/ibm4xx/dcr405gp.h>
 #include <powerpc/ibm4xx/pmap.h>
 
+/* Function pointer for requesting board_config_data from openbios*/
+#define BOARD_CFG_FP       0xFFFE0B50
+
 /*
  * Some instructions gas doesn't understand (yet?)
  */
@@ -148,7 +151,14 @@
        nop
 
 1:
-       mflr    %r31                    /* Save address of PROM info_block */
+       /* Get the board_config_data from openbios */
+       lis     %r3,BOARD_CFG_FP@h
+       ori     %r3,%r3,BOARD_CFG_FP@l
+       lwz     %r0,0x0(%r3)
+       mtctr   %r0
+       bctrl                           /* call the xcoff function */
+       mr      %r31,%r3                /* Save value in r31 */
+
        li      %r0,0
        mtmsr   %r0                     /* Disable FPU/MMU/exceptions */
        isync



Home | Main Index | Thread Index | Old Index