> Date: Thu, 17 Apr 2025 17:56:13 -0500
> From: joshua stein <j...@jcs.org>
> 
> On Wed, 16 Apr 2025 at 11:54:57 +0200, Mark Kettenis wrote:
> > You're accessing the UART registers using their physical address.  But
> > as soon as you turn on the MMU you need a virtiual address.  So you'll
> > need to create an appropriate MMU mapping for the UART.
> >
> > Adding an appropriate entry to mmu_init_table in armv7/locore0.S might
> > work.  Make sure this is a device mapping.
> 
> Thanks Mark, that was what I needed.
> 
> I fixed things in U-boot and was able to remove the uart debugging.
> Now it boots but if I don't cap the 207995@0x68008000 memory segment
> to 134953 in initarm, it hangs after printing the copyright during
> the memset in uvm_page_init.

Could be a u-boot bug.  Check that all the free regions in the EFI
memory map are really free?

> Found EFI removable media binary efi/boot/bootarm.efi
> reading efi/boot/bootarm.efi
> 119564 bytes read in 15 ms (7.6 MiB/s)
> ## Starting EFI application at 62008000 ...
> FtlInit fffffffe
> Scanning disk na...@10500000.blk...
> Scanning disk dw...@10214000.blk...
> Scanning disk dw...@1021c000.blk...
> Found 3 disks
> Adding bank: 0x60000000 - 0xa0000000 (size: 0x40000000)
> disks: sd0* sd1 sd2
> >> OpenBSD/armv7 BOOTARM 1.23
> boot>
> cannot open sd0a:/etc/random.seed: No such file or directory
> booting sd0a:/bsd: 4909756+1013220+142444+609912 
> [2789927+360416+184+330342]=0x0
> 
> OpenBSD/armv7 booting ...
> arg0 0xc0cb0b10 arg1 0x0 arg2 0x9ac83000
> Allocating page tables
> IRQ stack: p0x60cdf000 v0xc0cdf000
> ABT stack: p0x60ce0000 v0xc0ce0000
> UND stack: p0x60ce1000 v0xc0ce1000
> SVC stack: p0x60ce2000 v0xc0ce2000
> Creating L1 page table at 0x60cb4000
> Mapping kernel
> Constructing L2 page tables
> undefined page type 0x2 pa 0x60000000 va 0x60000000 pages 0x2000 attr 0x8
> type 0x7 pa 0x62000000 va 0x60000000 pages 0x6000 attr 0x8
> initarm: added 24576 pages at 0x62000000, physmem now 32768
> type 0x4 pa 0x68000000 va 0x68000000 pages 0x7 attr 0x8
> type 0x7 pa 0x68008000 va 0x60000000 pages 0x32c7b attr 0x8
> initarm: added 134953 pages at 0x68008000, physmem now 167721
> type 0x2 pa 0x9ac83000 va 0x9ac83000 pages 0x7 attr 0x8
> type 0x7 pa 0x9ac8a000 va 0x9ac8a000 pages 0x4 attr 0x8
> type 0x7 pa 0x9ac8e000 va 0x9ac8e000 pages 0x2 attr 0x8
> type 0x7 pa 0x9ac90000 va 0x9ac90000 pages 0x1 attr 0x8
> type 0x2 pa 0x9ac91000 va 0x9ac91000 pages 0x100 attr 0x8
> type 0x2 pa 0x9ad91000 va 0x9ad91000 pages 0x1e attr 0x8
> type 0x6 pa 0x9adaf000 va 0x9adaf000 pages 0x1 attr 0x8000000000000008
> type 0x0 pa 0x9adb0000 va 0x9adb0000 pages 0x1 attr 0x8
> type 0x0 pa 0x9adb1000 va 0x9adb1000 pages 0x1 attr 0x8
> type 0x0 pa 0x9adb2000 va 0x9adb2000 pages 0x1 attr 0x8
> type 0x0 pa 0x9adb3000 va 0x9adb3000 pages 0x1 attr 0x8
> type 0x0 pa 0x9adb4000 va 0x9adb4000 pages 0x1 attr 0x8
> type 0x0 pa 0x9adb5000 va 0x9adb5000 pages 0x1 attr 0x8
> type 0x0 pa 0x9adb6000 va 0x9adb6000 pages 0x1 attr 0x8
> type 0x2 pa 0x9adb7000 va 0x9adb7000 pages 0x308c attr 0x8
> type 0x5 pa 0x9de43000 va 0x9de43000 pages 0x1 attr 0x8000000000000008
> type 0x2 pa 0x9de44000 va 0x9adb7000 pages 0x21bc attr 0x8
> pmap [ using 3481644 bytes of bsd ELF symbol table ]
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>       The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2025 OpenBSD. All rights reserved.  https://www.OpenBSD.org
> 
> OpenBSD 7.7 (obj.amd64.armv7) #105: Thu Apr 17 17:49:30 CDT 2025
>     j...@nano.jcs.org:/usr/src/sys/arch/armv7/compile/GENERIC/obj.amd64.armv7
> real mem  = 686985216 (655MB)
> avail mem = 661409792 (630MB)
> random: boothowto does not indicate good seed
> mainbus0 at root: KING JIM Pomera DM250
> cortex0 at mainbus0
> psci0 at mainbus0: PSCI 0.0
> syscon0 at mainbus0: can't map registers
> syscon1 at mainbus0: "syscon"
> ampintc0 at mainbus0 nirq 160, ncpu 4: "interrupt-controller"
> syscon2 at mainbus0: "syscon"
> agtimer0 at mainbus0: 24000 kHz
> agtimer1 at mainbus0: 24000 kHz
> com0 at mainbus0: dw16550, 64 byte fifo
> com0: probed fifo depth: 0 bytes
> com1 at mainbus0: dw16550
> com1: console
> com2 at mainbus0: dw16550
> ehci0 at mainbus0
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 
> 2.00/1.00 addr 1
> ohci0 at mainbus0: version 1.0
> dwmmc0 at mainbus0: 18 MHz base clock
> sdmmc0 at dwmmc0: 4-bit, dma
> dwmmc1 at mainbus0: 25 MHz base clock
> sdmmc1 at dwmmc1: 8-bit, dma
> rkiic0 at mainbus0
> iic0 at rkiic0
> "rockchip,rk818" at iic0 addr 0x1c not configured
> rkiic1 at mainbus0
> iic1 at rkiic1
> pcxrtc0 at iic1 addr 0x51pcxrtc0: pcxrtc_reg_read: failed to read reg0
> pcxrtc0: pcxrtc_reg_write: failed to write reg0
> pcxrtc0: pcxrtc_reg_read: failed to read reg2
> : battery ok
> rkiic2 at mainbus0
> iic2 at rkiic2
> rkiic3 at mainbus0
> iic3 at rkiic3
> usb1 at ohci0: USB revision 1.0
> uhub1 at usb1 configuration 1 interface 0 "Generic OHCI root hub" rev 
> 1.00/1.00 addr 1
> scsibus0 at sdmmc0: 2 targets, initiator 0
> sd0 at scsibus0 targ 1 lun 0: <Sandisk, SL32G, 0080> removable
> sd0: 30436MB, 512 bytes/sector, 62333952 sectors
> scsibus1 at sdmmc1: 2 targets, initiator 0
> sd1 at scsibus1 targ 1 lun 0: <Toshiba, 008GB1, 0000> removable
> sd1: 7456MB, 512 bytes/sector, 15269888 sectors
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> bootfile: sd0a:/bsd
> boot device: sd0
> 
> 
> 

Reply via email to