On Thu, May 28, 2020 at 10:11:28AM +0200, Otto Moerbeek wrote:

> On Thu, May 28, 2020 at 01:21:21AM -0600, Jason A. Donenfeld wrote:
> 
> > On Thu, May 28, 2020 at 1:19 AM Otto Moerbeek <o...@drijf.net> wrote:
> > > Of course.., I was running it from a !wxallowed mount. BTW, qemu is in
> > > packages, no need to build it yourself.
> > 
> > Sure, but now I've been somewhat nerd sniped and am playing with this
> > fcode forth implementation in qemu :-P. I wonder if there's something
> > missing in the 64-bit extensions to IEEE 1275, in table.fs...
> 
> OK, can reproduce. I'll see if I can find out something.
> 
>       -Otto
> 

After running the bootblocks in debug mode (using boot disk -V) and
seeing ofwboot was found and loaded, I added some debug code to the
bootblocks and now it correctly starts ofwboot on qemu????


Trying disk:a...
Not a bootable ELF image
Not a bootable a.out image

Loading FCode image...
Loaded 6936 bytes
entry point is 0x4000
Evaluating FCode...
OpenBSD IEEE 1275 Bootblock 2.0
..free mem
close boot dev
start loaded program
>> OpenBSD BOOT 1.17
Trying bsd...
open /etc/random.seed: No such file or directory
Booting /pci@1fe,0/pci@1,1/ide@3/ide@0/disk@0:a/bsd
4225784@0x1000000+1288@0x1407af8+3249436@0x1c00000+944868@0x1f1951c 
symbols @ 0xfef50340 139 start=0x1000000
console is /pci@1fe,0/pci@1,1/ebus@1/su
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2020 OpenBSD. All rights reserved.  https://www.OpenBSD.org
real mem = 2147483648 (2048MB)
avail mem = 2099232768 (2001MB)
random: boothowto does not indicate good seed
mainbus0 at root: OpenBiosTeam,OpenBIOS
cpu0 at mainbus0: SUNW,UltraSPARC-IIi (rev 9.1) @ 100 MHz
cpu0: physical 256K instruction (64 b/l), 16K data (32 b/l), 256K
external (64 b/l)
psycho0 at mainbus0: SUNW,sabre, impl 0, version 0, ign 7c0
psycho0: bus range 0-2, PCI bus 0
psycho0: dvma map c0000000-dfffffff
pci0 at psycho0
ppb0 at pci0 dev 1 function 1 "Sun Simba" rev 0x11
pci1 at ppb0 bus 1
ebus0 at pci1 dev 1 function 0 "Sun PCIO EBus2" rev 0x01
clock1 at ebus0 addr 2000-3fff: mk48t59
"power" at ebus0 addr 7240-7243 ivec 0x1 not configured
"fdthree" at ebus0 addr 0-ffffffff not configured
com0 at ebus0 addr 3f8-3ff ivec 0x2b: ns16550a, 16 byte fifo
com0: console
pckbc0 at ebus0 addr 60-67 ivec 0x29
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0
"Bochs VGA" rev 0x02 at pci1 dev 2 function 0 not configured
pciide0 at pci1 dev 3 function 0 "CMD Technology PCI0646" rev 0x07:
DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide0: using ivec 0x7e0 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <QEMU HARDDISK>
wd0: 16-sector PIO, LBA48, 3MB, 6400 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.5+> removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
ppb1 at pci0 dev 1 function 0 "Sun Simba" rev 0x11
pci2 at ppb1 bus 2
ne0 at pci2 dev 0 function 0 "Realtek 8029" rev 0x00: ivec 0x7d0,
address 52:54:00:12:34:56
softraid0 at root
scsibus1 at softraid0: 256 targets

It hangs at this point here, but I that's clearly another issue.

Puzzled...

        -Otto

Index: bootblk.fth
===================================================================
RCS file: /cvs/src/sys/arch/sparc64/stand/bootblk/bootblk.fth,v
retrieving revision 1.9
diff -u -p -r1.9 bootblk.fth
--- bootblk.fth 2 Apr 2020 06:06:22 -0000       1.9
+++ bootblk.fth 29 May 2020 11:53:36 -0000
@@ -850,16 +850,22 @@ create cur-blockno -1 l, -1 l,            \ Curren
       " /ofwboot" load-file            ( -- load-base )
    then
 
+   ." free mem" cr
+
    \ Free memory for reading disk blocks
    cur-block 0<> if
       dev-block dev-blocksize free-mem
    then
 
+   ." close boot dev" cr
+
    \ Close boot device
    boot-ihandle dup -1 <> if
       cif-close -1 to boot-ihandle 
    then
    
+   ." start loaded program" cr
+
    dup 0<> if " to load-base init-program" evaluate then
 ;
 

Reply via email to