soc/amd/common: Add comments about bootblock

Since the boot flow is different on AMD compared to other x86
platforms document what is done and where.

Explain that AMDCOMPRESS does more than compressing the input.
It also parses the input as an ELF and extracts the first PT_LOAD marked
area from it and discards all other information from the ELF.

Explain bootblock.bin generation and that it has not much to do
with bootblock.elf, unlike on other platforms.
While on it also fix a whitespace in the following line.

Change-Id: Ida763f879c133be54ea1ca2abd3059db0d2c1ef7
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87316
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
This commit is contained in:
Patrick Rudolph 2025-04-14 08:09:53 +02:00 committed by Maximilian Brune
commit b6425a9a78
8 changed files with 59 additions and 3 deletions

View file

@ -382,8 +382,18 @@ The BIOS Directory table structure is slightly different from the PSP Directory:
`cbfstool/amdcompress` is a helper for creating the BIOS Reset Image (BIOS
Directory Table type 0x62). This is the code the PSP uncompresses into DRAM
at the location where the x86 begins execution when released from reset.
Typical usage is for amdcompress to convert an ELF files program section
into a zlib compressed image.
To tool expects an ELF as input (the bootblock.elf) and extracts the **first**
`PT_LOAD` area out of it. Since only `PT_LOAD` contains what's needed, everything
else can be discarded from the input ELF when the following points are valid:
* The binary is loaded at the address it is linked for
This is done by the PSP at boot time.
* The BSS segment is cleared
This is not done by PSP, but by bootblock assembly code.
* The data segment is initialized
Done automatically when it's part of `PT_LOAD` area or done by bootblock assembly code
when `ENV_SEPARATE_DATA_AND_BSS` is set
Amdcompress finally compresses the ELF files `PT_LOAD` section into a zlib compressed image.
### amdfwtool