> Date: Wed, 27 Dec 2017 09:35:38 +0200 > From: Artturi Alm <[email protected]> > > Hi, > > a64pine# eeprom -p > Node 0x48 > name: '' > serial-number: '92c000ba40e5f79b' > interrupt-parent: 00000001 > #address-cells: 00000001 > #size-cells: 00000001 > model: 'Pine64+' > compatible: 'pine64,pine64-plus' + 'allwinner,sun50i-a64' > > Node 0xe8 > name: 'memory' > reg: 40000000.40000000 > device_type: 'memory' > ...OMITTED... > Node 0x2fbc > name: 'chosen' > openbsd,uefi-mmap-desc-ver: 00000001 > openbsd,uefi-mmap-desc-size: 00000028 > openbsd,uefi-mmap-size: 00004218 > openbsd,uefi-mmap-start: 00000000.78d00f90 > openbsd,uefi-system-table: 00000000.7dfbab00 > openbsd,bootduid: d5ad53bf.b04a5b5e > bootargs: 'sd0a:/bsd' > linux,stdout-path: '/soc@01c00000/serial@01c28000:115200' > stdout-path: 'serial0:115200n8' > a64pine# dmesg | head -4 > OpenBSD 6.2-current (GENERIC) #123: Thu Dec 21 14:27:12 MST 2017 > [email protected]:/usr/src/sys/arch/arm64/compile/GENERIC > real mem = 879714304 (838MB) > avail mem = 826183680 (787MB) > > where and why did it loose that much? given "reg: 40000000.40000000", > and there's no framebuffer mapped or anything? full dmesg below.
We use the EFI memory map to determine what memory is safe to use. Currently we are very conservative and only use areas marked as EfiConventionalMemory and ignore chunks smaller than 16 pages. We should be able to relax this a little bit and include areas marked as EfiLoaderCode, EfiLoaderData, EfiBootServicesCode and EfiBootServicesData. However, we have to make sure that the area where the memory where the kernel was loaded isn't included (should be marked as EfiLoaderData) and that we retain any firmware tables (FDT, EFI system table, EFI memory map, EFI configuration tables) that we still need access to after bootstrapping uvm. The early boot code prints out the EFI memory map on the console so you can easily check what's going on here. > OpenBSD 6.2-current (GENERIC) #123: Thu Dec 21 14:27:12 MST 2017 > [email protected]:/usr/src/sys/arch/arm64/compile/GENERIC > real mem = 879714304 (838MB) > avail mem = 826183680 (787MB) > mainbus0 at root: Pine64+ > cpu0 at mainbus0: ARM Cortex-A53 r0p4 > psci0 at mainbus0 > agtimer0 at mainbus0: tick rate 24000 KHz > simplebus0 at mainbus0: "soc" > syscon0 at simplebus0: "syscon" > sxiccmu0 at simplebus0 > sxipio0 at simplebus0: 103 pins > sxirsb0 at simplebus0 > "x-powers,axp803" at sxirsb0 addr 0x3a3 not configured > sximmc0 at simplebus0 > sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma > ehci0 at simplebus0 > 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 > ehci1 at simplebus0 > usb1 at ehci1: USB revision 2.0 > uhub1 at usb1 configuration 1 interface 0 "Generic EHCI root hub" rev > 2.00/1.00 addr 1 > com0 at simplebus0: ns16550, no working fifo > com0: console > sxitwi0 at simplebus0 > iic0 at sxitwi0 > dwxe0 at simplebus0: address 02:ba:40:e5:f7:9b > rgephy0 at dwxe0 phy 1: RTL8169S/8110S/8211 PHY, rev. 5 > ampintc0 at simplebus0 nirq 224, ncpu 4: "interrupt-controller" > sxirtc0 at simplebus0 > gpio0 at sxipio0: 32 pins > gpio1 at sxipio0: 32 pins > gpio2 at sxipio0: 32 pins > gpio3 at sxipio0: 32 pins > gpio4 at sxipio0: 32 pins > gpio5 at sxipio0: 32 pins > gpio6 at sxipio0: 32 pins > gpio7 at sxipio0: 32 pins > scsibus0 at sdmmc0: 2 targets, initiator 0 > sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SU01G, 0080> SCSI2 0/direct removable > sd0: 968MB, 512 bytes/sector, 1984000 sectors > umass0 at uhub1 port 1 configuration 1 interface 0 "vendor 0x18a5 product > 0x0302" rev 2.00/1.07 addr 2 > umass0: using SCSI over Bulk-Only > scsibus1 at umass0: 2 targets, initiator 0 > sd1 at scsibus1 targ 1 lun 0: <Verbatim, , 8.07> SCSI2 0/direct removable > serial.18a50302112158020639 > sd1: 7450MB, 512 bytes/sector, 15257600 sectors > vscsi0 at root > scsibus2 at vscsi0: 256 targets > softraid0 at root > scsibus3 at softraid0: 256 targets > bootfile: sd0a:/bsd > boot device: sd0 > root on sd1a (d5ad53bfb04a5b5e.a) swap on sd1b dump on sd1b
