Port-powerpc archive

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

Re: Alocation of OF_buf?



Assuming this is declared a ``bug'', I'm wondering why space for OF_buf isn't simply 
included in the kernel's .bss like was done for other bits of the OF <-> kernel 
interface code.

The attached ``hack'' illustrates this. It now panics, I guess I call that progress :-)

        Andrew



Index: ofppc/locore.S
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/ofppc/ofppc/locore.S,v
retrieving revision 1.25
diff -p -r1.25 locore.S
*** locore.S    2001/10/23 01:36:32     1.25
--- locore.S    2001/10/27 01:33:46
*************** idle_u:
*** 77,82 ****
--- 77,86 ----
  openfirmware_entry:
        .long   0                       /* openfirmware entry point */
  
+       .section .bss
+ OF_buffer:    
+       .space 0x1000
+ 
  /*
   * This symbol is here for the benefit of kvm_mkdb, and is supposed to
   * mark the start of kernel text.
*************** __start:
*** 146,151 ****
--- 150,158 ----
        li      9,PGOFSET
        add     8,8,9
        andc    8,8,9
+ /*   having worked all this out just ignore it.  */
+       lis     8,OF_buffer@ha
+       addi    8,8,OF_buffer@l
        lis     9,_C_LABEL(OF_buf)@ha
        stw     8,_C_LABEL(OF_buf)@l(9)
        addi    8,8,NBPG
ac131313@nettle$ ./gdb/gdb /usr/src/sys/arch/ofppc/compile/GENERIC/netbsd.gdb 
GNU gdb 2001-10-22-cvs
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-apple-netbsd1.5X"...
(gdb) target sim
Connected to the simulator.
(gdb) load
chirp: note descriptor missing load-base
(gdb) run
Starting program: /usr/src/sys/arch/ofppc/compile/GENERIC/netbsd.gdb 
NetBSD does not yet support the "gpl,clayton".
Using generic OpenFirmware driver support.
 [ no symbols available ]
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.5Y (GENERIC) #1: Fri Oct 26 21:25:04 EDT 2001
    boor@localhost:/usr/src/sys/arch/ofppc/compile/GENERIC
total memory = 4096 KB
avail memory = 1488 KB
using 76 buffers containing 304 KB of memory
mainbus0 (root): gpl,clayton
 at mainbus0 not configured
 at mainbus0 not configured
 at mainbus0 not configured
 at mainbus0 not configured
 at mainbus0 not configured
ofbus0 at mainbus0
cpu@0 at ofbus0 not configured
ofbus1 at mainbus0
ofbus2 at ofbus1 (init)
register at ofbus2 not configured
stack at ofbus2 not configured
data@0x3e7000 at ofbus2 not configured
data@0x3e7004 at ofbus2 not configured
data@0x3e7010 at ofbus2 not configured
data@0x3e7014 at ofbus2 not configured
data@0x3e7020 at ofbus2 not configured
ofbus3 at ofbus2 (htab@0x3f0000)
pte@0x3e8000 at ofbus3 not configured
pte@0x3e7000 at ofbus3 not configured
pte@0xffffffff at ofbus3 not configured
pte@0 at ofbus3 not configured
trace at ofbus1 not configured
options at ofbus1 not configured
ofcons0 at ofbus1 (pal)
 at mainbus0 not configured
panic: unknown timebase
Stopped in pid 0 (swapper) at     0x27d9a8:     lwz     r0, r1, 0x14,
db> ?
?
Bad character
?
db> help
help
break           delete          next            search          trace
c               dmesg           p               set             until
call            dwatch          print           show            w
callout         examine         ps              sifting         watch
continue        kill            reboot          step            write
d               match           s               sync            x
db> ^C
Program received signal SIGINT, Interrupt.
0x80004004 in ?? ()
(gdb) bt
#0  0x80004004 in ?? ()
(gdb) up


Home | Main Index | Thread Index | Old Index