Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4890

Bare metal, Assembly language • GPU start.elf SD read speed

$
0
0
Hi,

I'm currently optimizing the boot process of a Zero2W as best as I can.
The goal is to save power by completing the system boot & work as fast as possible and then turn off again.

By enabling debug logging in the bootcode.bin, I can see that the kernel takes about 1,54s to load:

Code:

MESS:00:00:03.816343:0: Loaded 'kernel8.img' to 0x200000 size 0x8d8bd7MESS:00:00:05.364579:0: Device tree loaded to 0x1b4de900 (size 0x8605)
9.276.375 Bytes => 1,54s load time

At only about 6 MiB/s the read speed from the FAT partition seems to be quite slow.
I'm aware that this is probably very simple code (maybe not using DMA, if the GPU even supports that, etc.) and also has to work on every SD card in existence, which is why the speed is this low.

Hoping for some input from the Pi Foundation folks here maybe:
In a fixed, known-good setup with a high-speed SD card: Is there a way to improve the read speeds?
Is there some primitive to (for example) just set registers manually to try and enable SDR50 accesses to the SD card?

The other option would be to load an external bootloader (u-boot or something custom), set the appropriate registers and then let the ARM code do the kernel load, but I feel like the additional step, setup, SD card detection, FAT read, etc. would waste more time than those 1,54s.

My other objective is to reduce kernel size as much as possible (of course), but I'd really like to get the read time down a bit more.

Any other creative ideas? I need the GPU, so I'll sadly have to live with the big start_x.elf blob.
All the I2C bus scan parameters are already disabled (HDMI EDID, HAT, camera, display, etc.).

Thanks :)

Statistics: Posted by manawyrm — Sun Sep 01, 2024 6:00 pm



Viewing all articles
Browse latest Browse all 4890

Trending Articles