[U-Boot] [PATCH 4/4] x86: Remove 16-bit reset code

Simon Glass sjg at chromium.org
Thu Feb 14 14:42:16 CET 2013


Hi Graeme,

On Sun, Feb 10, 2013 at 2:20 PM, Graeme Russ <graeme.russ at gmail.com> wrote:
> Hi Simon,
>
> On Sat, Feb 9, 2013 at 3:42 AM, Simon Glass <sjg at chromium.org> wrote:
>> This code is not needed now, since we boot U-Boot from Coreboot on x86.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> ---
>>  Makefile                   |   4 --
>>  README                     |   4 --
>>  arch/x86/cpu/Makefile      |   1 -
>>  arch/x86/cpu/resetvec.S    |  38 ------------
>>  arch/x86/cpu/start16.S     | 146 ---------------------------------------------
>>  include/configs/coreboot.h |   1 -
>>  6 files changed, 194 deletions(-)
>>  delete mode 100644 arch/x86/cpu/resetvec.S
>>  delete mode 100644 arch/x86/cpu/start16.S
>
> As mentioned in reply to the previous patch, I would like to see this code stay

Do you mean I should just drop these last two patches? Sorry, I'm not
quite sure what to do here.

>
>> diff --git a/Makefile b/Makefile
>> index 51bd918..1924d4b 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -230,10 +230,6 @@ endif
>>  # U-Boot objects....order is important (i.e. start must be first)
>>
>>  OBJS  = $(CPUDIR)/start.o
>> -ifeq ($(CPU),x86)
>> -RESET_OBJS-$(CONFIG_X86_NO_RESET_VECTOR) += $(CPUDIR)/start16.o
>> -RESET_OBJS-$(CONFIG_X86_NO_RESET_VECTOR) += $(CPUDIR)/resetvec.o
>> -endif
>
> Hmm, odd - the logic here seems to be inverted - the reset vector code
> appears to be included if CONFIG_X86_NO_RESET_VECTOR is defined...

Actually see where RESET_OBJS is used below - it is inverted there.

>
> Oh, and as discussed before, this can actually be moved out of the
> main Makefile and into arch/x86/cpu/Makefile. Hmm, that's odd, it
> looks like it already is:

Yes it is in the library, and it seems like the link script should
take care of putting things in the right place. However I'm not able
to test a change like this. Still, perhaps this problem doesn't apply
with the other boards removed.

>
> START-y = start.o
> RESET_OBJS-$(CONFIG_X86_NO_RESET_VECTOR) += resetvec.o start16.o
> COBJS   = interrupts.o cpu.o timer.o
>
> SRCS    := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
> OBJS    := $(addprefix $(obj),$(SOBJS) $(COBJS))
> START   := $(addprefix $(obj),$(START-y) $(RESET_OBJS-))
>
> But again, the logic seems to be inverted...

See above.

>
>> diff --git a/README b/README
>> index 103036f..061898c 100644
>> --- a/README
>> +++ b/README
>> @@ -3816,10 +3816,6 @@ Low Level (hardware related) configuration options:
>>                 be used if available. These functions may be faster under some
>>                 conditions but may increase the binary size.
>>
>> -- CONFIG_X86_NO_RESET_VECTOR
>> -               If defined, the x86 reset vector code is excluded. You will need
>> -               to do this when U-Boot is running from Coreboot.
>> -
>
> Maybe we could just change this to CONFIG_X86_RESET_VECTOR and make
> exclusion of the 16-bit reset vector and protected mode switch the
> default case

OK I can create a patch for that.

Regards,
Simon

>
> Regards,
>
> Graeme


More information about the U-Boot mailing list