Hi Simon, On Sun, Nov 20, 2016 at 4:25 AM, Simon Glass <[email protected]> wrote: > At present all 16/32-bit init is controlled by CONFIG_X86_RESET_VECTOR. If > this is enabled, then U-Boot is the 'first' boot loader and handles execution > from the reset vector through to U-Boot's command prompt. If it is not > enabled then U-Boot starts at the 32-bit entry and skips most of its init, > assuming that the previous boot loader has done this already. > > With the move to suport 64-bit operation, we have more cases to consider. > The 16-bit and 32-bit init may be in SPL rather than in U-Boot proper. > > Add Kconfig options which control the location of the 16-bit and the 32-bit > init. These are not intended to be user-setting except for experimentation. > Their values should be determined by whether 64-bit U-Boot is used. > > Signed-off-by: Simon Glass <[email protected]> > --- > > Changes in v2: None > > arch/x86/Kconfig | 39 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 39 insertions(+) > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 5db8f13..e57362e 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -135,6 +135,45 @@ config X86_RESET_VECTOR > bool > default n > > +# The following options control where the 16-bit and 32-bit init lies > +# If SPL is enabled then it normally holds this init code, and U-Boot proper > +# is normally a 64-bit build. > +# > +# The 16-bit init refers to the reset vector and the small amount of code to > +# get the processor into 32-bit mode. It may be in SPL or in U-Boot proper, > +# or missing altogether if U-Boot is started from EFI or coreboot. > +# > +# The 32-bit init refers to processor init, running binary blobs including > +# FSP, setting up interrupts and anything else that needs to be done in > +# 32-bit code. It is normally in the same place as 32-bit init.
in the same place as "16-bit" init? > +config X86_16BIT_INIT > + bool > + depends on X86_RESET_VECTOR > + default y if X86_RESET_VECTOR && !SPL > + help > + This is enabled when 16-bit init is in U-Boot proper > + > +config SPL_X86_16BIT_INIT > + bool > + depends on X86_RESET_VECTOR > + default y if X86_RESET_VECTOR && SPL > + help > + This is enabled when 16-bit init is in SPL > + > +config X86_32BIT_INIT > + bool > + depends on X86_RESET_VECTOR > + default y if X86_RESET_VECTOR && !SPL > + help > + This is enabled when 32-bit init is in U-Boot proper > + > +config SPL_X86_32BIT_INIT > + bool > + depends on X86_RESET_VECTOR > + default y if X86_RESET_VECTOR && SPL > + help > + This is enabled when 32-bit init is in SPL > + > config RESET_SEG_START > hex > depends on X86_RESET_VECTOR > -- Reviewed-by: Bin Meng <[email protected]> Regards, Bin _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

