mrnuke has quit [Read error: Connection reset by peer]
mrnuke has joined #u-boot
sobkas has quit [Quit: sobkas]
qschulz has quit [Read error: Connection reset by peer]
qschulz has joined #u-boot
apritzel has quit [Ping timeout: 248 seconds]
mmu_man has quit [Ping timeout: 248 seconds]
<crb>
god in heaven, trying to figure out make files makes me want to poke my eyes with a fork
<hanetzer>
heh
darkapex has quit [Ping timeout: 246 seconds]
darkapex has joined #u-boot
thopiekar has quit [Ping timeout: 260 seconds]
thopiekar has joined #u-boot
thopiekar has quit [Ping timeout: 260 seconds]
vagrantc has quit [Quit: leaving]
thopiekar has joined #u-boot
<xypron>
crb: you should read the align value at run time in your EFI code. Some non-U-Boot EFI implementations have been reported to be setting too small a value on the GRUB mailing list. The last patch version for GRUB therefore uses a 512 minimum.
<crb>
xypron sorry I'm a bit confused u-boot seems to be enforcing an alignment requirement and I think the code u-boot is loading (freebsd efi boot loader) is, I think aligning to 512 bytes but this fails which leads me to believe that u-boot is imposing more than 512 byte alignment. So I'm trying to find out what u-boot is requiring. Is there and efi way to query u-boot for the alignment it requires?
<xypron>
crb: the align field is exposed in the block io protocol. U-Boot sets this value to the sector size.
<crb>
xypron, that's what I thought it should be but since it's loading from a microSD card I think that should be 512 bytes
<xypron>
crb: OpenBSD uses AllocatePages. So their buffer is always 4096 aligned.
<crb>
xypron, looking at the freebsd code I see: static char ufs_buffer[BSD_LABEL_BUFFER] __aligned(512);
<crb>
xypron, so I think they're allocating an 8k buffer that's 512 aligned. but the boot fails unless I comment out the alignment check in u-boot
<xypron>
crb: some EDK2 platforms require higher alignment then 512. You should do the alignment according to the align field at runtimr and not compile in a fixed value.
<xypron>
Which platform fails?
<crb>
xypron, I would agree, but they're statically allocating the buffer and forcing alignment. I'll have to look into how I can allocate a buffer instead of statically allocating it. I'm not sure there is a malloc in this limited environment
<crb>
xypron, Xilinx Zynq 700 FreeBSD 13.0
<xypron>
crb: use the EFI API for allocation.
<crb>
xypron, ok, I'll have to look into querring and allocating via EFI, it's all kind new to see
<crb>
xypron, thank you!
<xypron>
crb: In the UEFI specification look for AllocatePages, AllicatePool, FreePages, FreePool. LOADER_DATA should be the right memory type.
<crb>
xypron, I'm looking at AllocatePages now,
<crb>
xypron, also searching for how to query the alignment requirement from the block IO protocol
<xypron>
crb: it is just a structure field of thr protocol.
<crb>
xypron, yep I think I'm seeing that, it just takes make a bit to troll through the standard, it's all very new to me
<crb>
s/make/me
<crb>
and it looks like my ssd has died .... .sad face
<hanetzer>
sadge.
sobkas has joined #u-boot
bq has quit [Quit: Floating point exception (core dumped)]
phillid has joined #u-boot
phillid is now known as bq
redbrain has quit [Read error: Connection reset by peer]