Skip to content

fel: add FEL protocol and soc_info_t struct documentation#241

Open
apritzel wants to merge 1 commit into
linux-sunxi:masterfrom
apritzel:fel_readme
Open

fel: add FEL protocol and soc_info_t struct documentation#241
apritzel wants to merge 1 commit into
linux-sunxi:masterfrom
apritzel:fel_readme

Conversation

@apritzel

Copy link
Copy Markdown
Contributor

Add a markdown document describing the basics of the FEL protocol, to give some idea about the expectations and limitations of the protocol.

Also add a description for each member of the soc_info_t struct, and explain how their values should be determined for a new SoC.

Add a markdown document describing the basics of the FEL protocol, to
give some idea about the expectations and limitations of the protocol.

Also add a description for each member of the soc_info_t struct, and
explain how their values should be determined for a new SoC.

Signed-off-by: Andre Przywara <osp@andrep.de>

@dlan17 dlan17 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doc is really excellent for people to get overview of soc_info structure, so I realize it's not really necessary to get into too many details which takes extra more efforts, or even we can just leave to improve them later.

Comment thread README.FEL.md
- `name`: A string with the short name of the SoC, like `"A133"` or `"T527"`.
- `spl_addr`: This is the address where the BootROM(BROM) will load an eGON
wrapped payload to. Often this is the start of the first SRAM block (SRAM A1),
though newer SoCs tend to deviate here. This must be the same value where the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for "must be the same value", it would be great to emphasis this choice is taken by sunxi-tools's policy for easing maintenance, not restricted by lowlevel BROM protocol, which I mean it's totally ok to download code to any valid address and execute..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not OK to load the U-Boot's SPL to a wrong address because it's not position independent.

Comment thread README.FEL.md
SPL binary to work with any load method.
The SRAM address(es) should be mentioned in the memory map of the manual, but
it's best to confirm this by loading a small code snippet from SD card and
printing the load address.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any public repo available for that small code which able to print the address? or docs recorded for this
(I remember you shared that when I add fel support for A733..)

Comment thread README.FEL.md
out (set to `false`) for every other SoC.
- `mmu_tt_addr`: Address of some memory area to hold the page tables during
the FEL operation. Only needed on older SoCs that enable and require the
MMU during FEL operation. Can be left out (set to 0) for newer SoCs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not needed on old SoCs either. But it provided significantly faster data transfer speed. See the detailed explanations in the following commit messages:
e4b3da2, a275b24, c32eeb8. And also the table at https://linux-sunxi.org/FEL/USBBoot#SoC_support_status
The difference between ~180KB/s and ~900KB/s, observed on H3 was gigantic from the practical point of view, considering the typical sizes of the linux kernel images.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have a H3 you should maybe see if DMA works on it. I get nearly a 100x speed increase with that on H616 and ported the optimizations based on BROM dump analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants