Starting NetBSD/mips64 kernel up and Userland Questions

"Naruaki.Etomi" <[email protected]>
Newsgroups gmane.os.netbsd.ports.mips.devel
Message-ID <CANkyS8VZZEhpmMBtMPXfDC2rGEF4fcFPMytzBQG5SstF3WBdbg@mail.gmail.com>
Happy New Year!

I succeeded in starting NetBSD/mips64(GENERIC64_IP3x) up on Sgi O2.
https://dmesgd.nycbug.org/index.cgi?do=view&id=5275

Here is the patch.
https://github.com/nullnilaki/NetBSD-mips64/commits/master

I will send formal patch soon.

I have a question about NetBSD/mips64 userland.

I did the following.
# ./build.sh -j 16 -O ../obj.sgimips64 -T  ../tools.sgimips64 -m
sgimips64 -U sets
However, it was a 32 bit userland binary.
# file cat
cat: ELF 32-bit MSB shared object, MIPS, N32 MIPS-III version 1
(SYSV), dynamically linked, interpreter /libexec/ld.elf_so, missing
section headers

How can I make a 64 bit userland binary?

# file ip32boot
ip32boot: ELF 64-bit MSB executable, MIPS, MIPS-III (SYSV), statically
linked, with unknown capability 0x410000000f676e75 = 0x1000000070403,
for NetBSD 9.99.31, not stripped

> bootp()ip32boot
Obtaining ip32boot from server macbook2006
8123408+188240 entry: 0xffffffffa0069000
[   1.0000000] phys segment: 0x5c000 @ 0x4000
[   1.0000000] adding 0x5c000 @ 0x4000 to freelist 0
[   1.0000000] phys segment: 0x7ec000 @ 0x60000
[   1.0000000] adding 0x4000 @ 0x60000 to freelist 0
[   1.0000000] skipping 0x7e8000 @ 0x64000 (kernel)
[   1.0000000] phys segment: 0x500000 @ 0x850000
[   1.0000000] adding 0x500000 @ 0x850000 to freelist 0
[   1.0000000] phys segment: 0xec00000 @ 0x1400000
[   1.0000000] adding 0xec00000 @ 0x1400000 to freelist 0
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
2014, 2015, 2016, 2017,
[   1.0000000]     2018, 2019 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All
rights reserved.

[   1.0000000] NetBSD 9.99.31 (GENERIC64_IP3x) #6: Tue Dec 31 15:05:20 UTC 2019
[   1.0000000] naruaki@:/usr/obj.sgimips64/sys/arch/sgimips/compile/GENERIC64_IP3x
[   1.0000000] total memory = 255 MB
[   1.0000000] (6848 KB reserved for ARCS)
[   1.0000000] avail memory = 239 MB
[   1.0000000] mainbus0 (root): SGI-IP32 [SGI, 5], 1 processor
[   1.0000000] cpu0 at mainbus0: QED RM5200 CPU (0x28a0) Rev. 10.0
with built-in FPU Rev. 10.0
[   1.0000000] cpu0: 48 TLB entries, 1TB (40-bit) VAs, 64GB (36-bit)
PAs, 16MB max page size
[   1.0000000] cpu0: 32KB/32B 2-way set-associative L1 instruction cache
[   1.0000000] cpu0: 32KB/32B 2-way set-associative write-back L1 data cache
[   1.0000000] cpu0: 1024KB/32B direct-mapped write-through L2 unified cache
[   1.0000000] crime0 at mainbus0 addr 0x14000000: rev 1.1 (CRIME_ID: 161)
[   1.0000000] crmfb0 at mainbus0 addr 0x16000000: SGI CRIME Graphics
Display Engine
[   1.0000000] crmfb0: device unusable if not setup by firmware
[   1.0000000] mace0 at mainbus0 addr 0x1f000000
[   1.0000000] lpt0 at mace0 offset 0x380000 intr 4 intrmask 0xf0000
[   1.0000000] com0 at mace0 offset 0x390000 intr 4 intrmask
0x3f00000: ns16550a, working fifo
[   1.0000000] com0: console
[   1.0000000] com1 at mace0 offset 0x398000 intr 4 intrmask
0xfc000000: ns16550a, working fifo
[   1.0000000] macekbc0 at mace0 offset 0x320000 intr 5 intrmask 0x0:
PS2 controller
[   1.0000000] mcclock0 at mace0 offset 0x3a0000 intrmask 0x0
[   1.0000000] mec0 at mace0 offset 0x280000 intr 3 intrmask 0x0:
MAC-110 Ethernet, rev 1
[   1.0000000] mec0: Ethernet address xx:xx:xx:xx:xx:xx
[   1.0000000] nsphy0 at mec0 phy 8: DP83840 10/100 media interface, rev. 1
[   1.0000000] nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
[   1.0000000] mavb0 at mace0 offset 0x300000 intr 6 intrmask 0x0: AD1843 rev 1
[   1.0000000] audio0 at mavb0: playback
[   1.0000000] audio0: slinear_be:16 -> slinear_be:24 2ch 48000Hz, blk
40ms for playback
[   1.0000000] spkr0 at audio0: PC Speaker (synthesized)
[   1.0000000] wsbell at spkr0 not configured
[   1.0000000] macepci0 at mace0 offset 0x80000 intr 7 intrmask 0x0: rev 1
[   1.0000000] pci0 at macepci0 bus 0
[   1.0000000] ahc0 at pci0 dev 1 function 0: Adaptec aic7880 Ultra SCSI adapter
[   1.0000000] ahc0: interrupting at crime interrupt 8
[   1.0000000] ahc0: Using left over BIOS settings
[   1.0000000] ahc0: Host Adapter has no SEEPROM. Using default SCSI
target parameters
[   1.0000000] ahc0: aic7880: Ultra Wide Channel A, SCSI Id=0, 16/253 SCBs
[   1.0000000] scsibus0 at ahc0: 16 targets, 8 luns per target
[   1.0000000] ahc1 at pci0 dev 2 function 0: Adaptec aic7880 Ultra SCSI adapter
[   1.0000000] ahc1: interrupting at crime interrupt 9
[   1.0000000] ahc1: Using left over BIOS settings
[   1.0000000] ahc1: Host Adapter has no SEEPROM. Using default SCSI
target parameters
[   1.0000000] ahc1: aic7880: Ultra Wide Channel A, SCSI Id=0, 16/253 SCBs
[   1.0000000] scsibus1 at ahc1: 16 targets, 8 luns per target
[   1.0099696] scsibus0: waiting 2 seconds for devices to settle...
[   1.0860757] scsibus1: waiting 2 seconds for devices to settle...
[   3.9383406] cd0 at scsibus0 target 4 lun 0: <TOSHIBA, DVD-ROM
SD-M1401, 1F09> cdrom removable
[   4.0419637] cd0: sync (50.00ns offset 15), 8-bit (20.000MB/s) transfers
[  10.9588851] WARNING: 1 error while detecting hardware; check system log.
[  11.0455541] boot device: mec0
[  11.0811551] root on mec0
[  11.1155018] nfs_boot: trying DHCP/BOOTP
[  14.2214672] nfs_boot: BOOTP next-server: xxx.xxx.xxx.xxx
[  14.2888977] nfs_boot: my_name=iris
[  14.3297430] nfs_boot: my_addr=xxx.xxx.xxx.xxx
[  14.3789629] nfs_boot: my_mask=xxx.xxx.xxx.xxx
[  14.4292337] nfs_boot: gateway=xxx.xxx.xxx.xxx
[  32.4832160] nfs_boot: timeout...
[  37.5200960] nfs_boot: timeout...


By the way, porting sgi octane is working.
*Fix early initialize Hardware.
*Fix paging kernel.
*Lot of driver Required...(Xbow,xheart,ioc,etc...)

>> bootp()ip30boot
Obtaining ip30boot from server macbook2006
7368112+203120 entry: 0xa800000020020000
[   1.0000000] Mem block 1: type 0, base 0x00000000, size 0x00000001
[   1.0000000] Mem block 2: type 1, base 0x00000001, size 0x00000001
[   1.0000000] Mem block 3: type 7, base 0x00000002, size 0x00000002
[   1.0000000] Mem block 4: type 3, base 0x00020004, size 0x0000001c
[   1.0000000] Mem block 5: type 5, base 0x00020020, size 0x00000739
[   1.0000000] Mem block 6: type 3, base 0x00020759, size 0x000007a7
[   1.0000000] Mem block 7: type 6, base 0x00020f00, size 0x00000100
[   1.0000000] Mem block 8: type 3, base 0x00021000, size 0x0003f000
[   1.0000000] Mem block 9: type 7, base 0x00060000, size 0x00040000
[   1.0000000] XKPHYS_TO_PHYS = kernstart = 2001c000
[   1.0000000] XKPHYS_TO_PHYS = kernend = 2075c000
[   1.0000000] phys segment: 0x1c000 @ 0x20004000
[   1.0000000] adding 0x18000 @ 0x20004000 to freelist 0
[   1.0000000] skipping 0x4000 @ 0x2001c000 (kernel)
[   1.0000000] phys segment: 0x738000 @ 0x20020000
[   1.0000000] skipping 0x738000 @ 0x20020000 (kernel)
[   1.0000000] phys segment: 0x7a4000 @ 0x2075c000
[   1.0000000] adding 0x7a4000 @ 0x2075c000 to freelist 0
[   1.0000000] phys segment: 0x3f000000 @ 0x21000000
[   1.0000000] adding 0x3f000000 @ 0x21000000 to freelist 0
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
2014, 2015, 2016, 2017,
[   1.0000000]     2018, 2019 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All
rights reserved.

[   1.0000000] NetBSD 8.99.30 (GENERIC64_IP3x) #0: Sat Dec 28 12:38:26 UTC 2019
[   1.0000000] naruaki@:/usr/obj.sgimips64/sys/arch/sgimips/compile/GENERIC64_IP3x
[   1.0000000] total memory = 2047 MB
[   1.0000000] (1025 MB reserved for ARCS)
[   1.0000000] pmap_reference
[   1.0000000] avail memory = 1007 MB
[   1.0000000] mainbus0 (root): SGI-IP30 [SGI, 6913a962], 1 processor
[   1.0000000] cpu0 at mainbus0: MIPS R12000 CPU (0xe35) Rev. 3.5 with
unknown FPC type (0x900) Rev. 0.0
[   1.0000000] cpu0: 64 TLB entries, 16TB (44-bit) VAs, 1TB (40-bit)
PAs, 16MB max page size
[   1.0000000] cpu0: 32KB/64B 2-way set-associative L1 instruction cache
[   1.0000000] cpu0: 32KB/32B 2-way set-associative write-back L1 data cache
[   1.0000000] cpu0: 64KB/1B 2-way set-associative write-back L2 data cache
[   1.0000000] xbow0 at mainbus0panic: target init didn't set bus_reset
[   1.0000000] cpu0: Begin traceback...

-- 
Naruaki Etomi
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.