WIP hal/imx6ull: prepare kernel for secure boot#802
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the i.MX 6ULL initialization code by replacing absolute jumps with relative branches, streamlining DCD configuration with a new macro, and adding 1:1 memory mappings for the HAB ROM API. It also introduces the hab_rvt.h header defining the HAB ROM Vector Table interface. Feedback on these changes highlights a syntax error in the assembly file due to an incorrect # prefix in ldr pseudo-instructions, and recommends defining hab_hdr_t as a structure rather than a single byte to align with the HABv4 specification.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
9dd3a6b to
31259f6
Compare
Change vector table to be PC-relative Remove mapping for vector table at 0xffff0000 (now unused) Explicitly state offset used by SDP scripts as origin YT: MSH-42
This change breaks existing SDP scripts and requires a script to finalize kernel image. Move DDR initialization to DCD script. Reset DDR modules to avoid having to skip part of initialization in case of a warm reset. Move watchdog initialization to kernel. YT: MSH-42
31259f6 to
a8cab5b
Compare
There was a problem hiding this comment.
C/C++test found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
a8cab5b to
cba1eb0
Compare
cba1eb0 to
4a13e5e
Compare
4a13e5e to
fc74efd
Compare
| for (i = 0; i < size; i += SIZE_PAGE) { | ||
| /* TODO: this could be optimized for contiguous blocks of physical memory */ | ||
| pa = pmap_resolve(pmapp, (void *)(srcStart + i)); | ||
| if (pa == 0) { |
Description
Remove the plugin, so that the whole image can be loaded and verified at once by the BootROM.
Fix problem with DCD data so that plugin is no longer necessary for correct initialization of DDR memory.
Add header containing definitions of HAB functions and values.
Map peripherals and memories required by HAB into the address space of the kernel.
TODO: create kernel API for calling HAB functions - it will require:
r9register before the HAB API call and restoring it afterwardsDue to changes in kernel image structure it cannot be booted using existing SDP scripts and requires additional fixup after image creation:
sizefield ofboot_datadcdfield in the IVTMotivation and Context
Allow image to be used with secure boot and allow use of HAB functions within the kernel.
YT: MSH-42
Types of changes
How Has This Been Tested?
Checklist:
Special treatment