On Mon, Jul 14, 2025 at 04:02:48PM -0500, Eric Schikschneit wrote: > It was found that on modern versions of GCC the transition from low level > assembly into the C function 'fsp_find_header' was no longer valid. A detailed > step by step analysis with GDB showed that various registers were not being > initialized properly which would result in the hardware to fail to setup the > Cache As Ram (CAR) portion. This failure cascades down into later stages of > initialization because there is no valid stack, or memory for later functions. > > The function 'fsp_find_header' has been rewritten in assembly, which should > no longer be dependant on a specific version of GCC in order to be usable on > actual hardware. > > Testing was done using GCC 11.4.0 on Ubuntu 22.04. > Hardware used for verification: Intel E3845 SoC > > Patch 1 of 2 > > Upstream-Status: Pending > > Signed-off-by: Eric Schikschneit <[email protected]>
Sorry for the delayed response here.
[snip]
> diff --git a/common/board_f.c b/common/board_f.c
> index 442b8349d08..3a9ae741d97 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -860,6 +860,7 @@ __weak int clear_bss(void)
> }
>
> static const init_fnc_t init_sequence_f[] = {
> + arch_fsp_init, // FSP on platforms like baytrail MUST be done
> before memory ops
> setup_mon_len,
> #ifdef CONFIG_OF_CONTROL
> fdtdec_setup,
> diff --git a/include/init.h b/include/init.h
> index 9a1951d10a0..21d9cea30f6 100644
> --- a/include/init.h
> +++ b/include/init.h
> @@ -68,6 +68,15 @@ int mach_cpu_init(void);
> */
> int arch_fsp_init_r(void);
>
> +/**
> + * arch_fsp_init() - perform firmware support package init
> + *
> + * Where U-Boot relies on binary blobs to handle part of the system init,
> this
> + * function can be used to set up the blobs. This is used on some Intel
> + * platforms.
> + */
> +int arch_fsp_init(void);
> +
> int dram_init(void);
>
> /**
Doing it this way will break other architectures. Can we just call the
function needed inside of x86 assembly?
--
Tom
signature.asc
Description: PGP signature

