Every boot story since BIOS is hot garbage. ARM, UEFI, even RISC-V boot up is dumb as hell

1. Identify the boot storage medium
2. Copy the first sector to RAM
3. Stash any useful information in registers, like the SATA port/device number/etc
4. Jump to the boot sector

How to boot like a normal-ass adult in 4 simple steps

Show thread

"But where should I put my SoC's boot up code to initialize shit and read the boot device?"

In a ROM chip mapped to address 0 and unmapped when jumping to the boot sector, you dumb dumb

Show thread

"But how do I identify the boot up device?"

Use a magic number for bootable devices, provide a UI for the user to select/configure the boot media from, hell, use a dip switch to choose between eMMC and microSD, like I care

Show thread

@sir If you don't mind I am going to formalize this all into a 1-2 page specification.

@sir Okay, took a little longer than expected to get it up on the server. I ended up having to complicate the "stash useful information in registers" step somewhat because there is no universal fixed set of useful values or register names. I made an in-memory data structure for information like host controller addresses and memory maps and "which boot device." Also I gave the boot block a fixed length of 4K so you can fit enough code. Thoughts?

alm.website/misc/specs/xsfi

@alexbuzzbee can you post your draft in the form of an email to ~sircmpwn/public-inbox@lists.sr.ht, for easier reviewing?

Follow

@sir There are tables and stuff that really don't render well in plain text. I've tried my hardest to keep my HTML as simple as possible. Do you want me to send an HTML email or try to bludgeon it into plain?

· brutaldon · 1 · 0 · 0

@alexbuzzbee bludgeon it into plain would be great. It's not a big deal if some of the formatting is lost, it's just a better medium for discussion.

@sir I get that. Working on getting it somewhat readable...

@sir Okay there's a little ragged alignment in the tables but it's pretty much okay.

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.