Skip to content
Snippets Groups Projects
  1. Mar 05, 2020
  2. Feb 03, 2020
  3. Oct 08, 2019
  4. Aug 18, 2019
  5. Aug 09, 2019
    • Park, Aiden's avatar
      x86: Add new slimbootloader CPU type · 544293f8
      Park, Aiden authored
      This slimbootloader CPU type is to enable U-Boot as a payload which
      runs on top of Slim Bootloader (https://github.com/slimbootloader).
      The Slim Bootloader is designed with multi-stage architecture for
      the execution from reset vector to OS booting, and supports QEMU,
      Apollolake, Whiskeylake and Coffeelake platforms consuming Intel
      FSP (https://github.com/IntelFsp
      
      ) for silicon initialization
      including CAR and memory initialization.
      The Slim Bootloader generates new HOB (Hand Off Block) which are
      serial port info, memory map info, performance data info and so on,
      and passes it to a Payload. U-Boot as a payload will use these HOB
      information for basic initialization such as serial console.
      
      As an initial commit,
      - Add CONFIG_SYS_SLIMBOOTLOADER to enable slimbootloader CPU type
      - Add new arch/x86/cpu/slimbootloader directory with minimum codes
      - Get hob_list pointer from Slim Bootloader
      
      Signed-off-by: default avatarAiden Park <aiden.park@intel.com>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
      544293f8
  6. May 08, 2019
  7. Oct 28, 2018
    • Bin Meng's avatar
      x86: Fix car_uninit weak symbol definition · 3d2be800
      Bin Meng authored
      
      Since commit 80df194f ("x86: detect unsupported relocation types"),
      an error message is seen on QEMU x86 target during boot:
      
      do_elf_reloc_fixups32: unsupported relocation type 0x1 at fff841f0, offset = 0xfff00087
      do_elf_reloc_fixups32: unsupported relocation type 0x2 at fff841f8, offset = 0xfff00091
      
      Check offset 0xfff00087 and 0xfff00091 in the u-boot ELF image,
      
      fff00087  000df401 R_386_32          00000000   car_uninit
      fff00091  000df402 R_386_PC32        00000000   car_uninit
      
      we see R_386_32 and R_386_PC32 relocation type is generated for
      symbol car_uninit, which is declared as a weak symbol in start.S.
      
      However the actual weak symbol implementation ends up nowhere. As
      we can see below, it's *UND*.
      
      $ objdump -t u-boot | grep car_uninit
      00000000  w      *UND*  00000000 car_uninit
      
      With this fix, it is normal now.
      
      $ objdump -t u-boot | grep car_uninit
      fff00094  w    F .text.start    00000001 car_uninit
      
      Reported-by: default avatarHannes Schmelzer <hannes@schmelzer.or.at>
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Tested-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Reviewed-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Tested-by: default avatarHannes Schmelzer <oe5hpm@oevsv.at>
      3d2be800
  8. Jul 25, 2018
    • Alexander Graf's avatar
      efi_loader: Rename sections to allow for implicit data · 7e21fbca
      Alexander Graf authored
      
      Some times gcc may generate data that is then used within code that may
      be part of an efi runtime section. That data could be jump tables,
      constants or strings.
      
      In order to make sure we catch these, we need to ensure that gcc emits
      them into a section that we can relocate together with all the other
      efi runtime bits. This only works if the -ffunction-sections and
      -fdata-sections flags are passed and the efi runtime functions are
      in a section that starts with ".text".
      
      Up to now we had all efi runtime bits in sections that did not
      interfere with the normal section naming scheme, but this forces
      us to do so. Hence we need to move the efi_loader text/data/rodata
      sections before the global *(.text*) catch-all section.
      
      With this patch in place, we should hopefully have an easier time
      to extend the efi runtime functionality in the future.
      
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
      [agraf: Fix x86_64 breakage]
      7e21fbca
  9. May 07, 2018
    • Tom Rini's avatar
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini authored
      
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      83d290c5
  10. Feb 07, 2017
  11. Mar 17, 2016
    • Simon Glass's avatar
      x86: Support a chained-boot development flow · e5aa8a9b
      Simon Glass authored
      
      Sometimes it is useful to jump into U-Boot directly from coreboot or UEFI
      without any 16-bit init. This can help during development by allowing U-Boot
      to avoid doing all the init required by the platform.
      
      U-Boot expects its GDT to be set up correctly by its 16-bit code. If
      coreboot doesn't do this (because it hasn't run the payload setup code yet)
      then this won't happen.
      
      In this case we cannot rely on the GDT settings. U-Boot will hang or crash
      if these are wrong. Provide a development-only option to set up the GDT
      correctly. This is just a hack so you can jump to U-Boot from any stage of
      coreboot, not just at the end.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      e5aa8a9b
  12. Jan 14, 2016
  13. Oct 21, 2015
  14. Aug 26, 2015
  15. Aug 14, 2015
  16. Aug 06, 2015
    • Simon Glass's avatar
      x86: Enable debug UART for Minnowmax · bbbe55f6
      Simon Glass authored
      
      Enable the debug UART and emit a single 'a' early in the init sequence to
      show that it is working.
      
      Unfortunately the debug UART implementation needs a stack to work. I cannot
      seem to remove this limitation as the absolute 'jmp %eax' instruction goes
      off into the weeds.
      
      So this means that the character output cannot be any earlier than
      car_init_ret, where memory is available for a stack.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      bbbe55f6
  17. Aug 05, 2015
  18. Jul 15, 2015
    • Bin Meng's avatar
      x86: fsp: Move FspInitEntry call to board_init_f() · aefaff8e
      Bin Meng authored
      
      The call to FspInitEntry is done in arch/x86/lib/fsp/fsp_car.S so far.
      It worked pretty well but looks not that good. Apart from doing too
      much work than just enabling CAR, it cannot read the configuration
      data from device tree at that time. Now we want to move it a little
      bit later as part of init_sequence_f[] being called by board_init_f().
      This way it looks and works better in the U-Boot initialization path.
      
      Due to FSP's design, after calling FspInitEntry it will not return to
      its caller, instead it jumps to a continuation function which is given
      by bootloader with a new stack in system memory. The original stack in
      the CAR is gone, but its content is perserved by FSP and described by
      a bootloader temporary memory HOB. Technically we can recover anything
      we had before in the previous stack, but that is way too complicated.
      To make life much easier, in the FSP continuation routine we just
      simply call fsp_init_done() and jump back to car_init_ret() to redo
      the whole board_init_f() initialization, but this time with a non-zero
      HOB list pointer saved in U-Boot's global data so that we can bypass
      the FspInitEntry for the second time.
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarAndrew Bradford <andrew.bradford@kodakalaris.com>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      aefaff8e
  19. Mar 24, 2015
    • Rob Herring's avatar
      remove unnecessary version.h includes · 7682a998
      Rob Herring authored
      
      Various files are needlessly rebuilt every time due to the version and
      build time changing. As version.h is not actually needed, remove the
      include.
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Minkyu Kang <mk7.kang@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Tom Warren <twarren@nvidia.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Macpaul Lin <macpaul@andestech.com>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: York Sun <yorksun@freescale.com>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Philippe Reynes <tremyfr@yahoo.fr>
      Cc: Eric Jarrige <eric.jarrige@armadeus.org>
      Cc: "David Müller" <d.mueller@elsoft.ch>
      Cc: Phil Edworthy <phil.edworthy@renesas.com>
      Cc: Robert Baldyga <r.baldyga@samsung.com>
      Cc: Torsten Koschorrek <koschorrek@synertronixx.de>
      Cc: Anatolij Gustschin <agust@denx.de>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: default avatarŁukasz Majewski <l.majewski@samsung.com>
      7682a998
  20. Jan 13, 2015
  21. Dec 14, 2014
    • Bin Meng's avatar
      x86: Support Intel FSP initialization path in start.S · bceb9f0f
      Bin Meng authored
      
      Per Intel FSP architecture specification, FSP provides 3 routines
      for bootloader to call. The first one is the TempRamInit (aka
      Cache-As-Ram initialization) and the second one is the FspInit
      which does the memory bring up (like MRC for other x86 targets)
      and chipset initialization. Those two routines have to be called
      before U-Boot jumping to board_init_f in start.S.
      
      The FspInit() will return several memory blocks called Hand Off
      Blocks (HOBs) whose format is described in Platform Initialization
      (PI) specification (part of the UEFI specication) to the bootloader.
      Save this HOB address to the U-Boot global data for later use.
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      bceb9f0f
    • Bin Meng's avatar
      x86: Clean up asm-offsets · fe0c33a5
      Bin Meng authored
      
      Move GD_BIST from lib/asm-offsets.c to arch/x86/lib/asm-offsets.c
      as it is x86 arch specific stuff. Also remove GENERATED_GD_RELOC_OFF
      which is not referenced anymore.
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      fe0c33a5
  22. Nov 21, 2014
    • Simon Glass's avatar
      x86: ivybridge: Implement SDRAM init · 65dd74a6
      Simon Glass authored
      
      Implement SDRAM init using the Memory Reference Code (mrc.bin) provided in
      the board directory and the SDRAM SPD information in the device tree. This
      also needs the Intel Management Engine (me.bin) to work. Binary blobs
      everywhere: so far we have MRC, ME and microcode.
      
      SDRAM init works by setting up various parameters and calling the MRC. This
      in turn does some sort of magic to work out how much memory there is and
      the timing parameters to use. It also sets up the DRAM controllers. When
      the MRC returns, we use the information it provides to map out the
      available memory in U-Boot.
      
      U-Boot normally moves itself to the top of RAM. On x86 the RAM is not
      generally contiguous, and anyway some RAM may be above 4GB which doesn't
      work in 32-bit mode. So we relocate to the top of the largest block of
      RAM we can find below 4GB. Memory above 4GB is accessible with special
      functions (see physmem).
      
      It would be possible to build U-Boot in 64-bit mode but this wouldn't
      necessarily provide any more memory, since the largest block is often below
      4GB. Anyway U-Boot doesn't need huge amounts of memory - even a very large
      ramdisk seldom exceeds 100-200MB. U-Boot has support for booting 64-bit
      kernels directly so this does not pose a limitation in that area. Also there
      are probably parts of U-Boot that will not work correctly in 64-bit mode.
      The MRC is one.
      
      There is some work remaining in this area. Since memory init is very slow
      (over 500ms) it is possible to save the parameters in SPI flash to speed it
      up next time. Suspend/resume support is not fully implemented, or at least
      it is not efficient.
      
      With this patch, link boots to a prompt.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      65dd74a6
    • Simon Glass's avatar
      x86: Emit post codes in startup code for Chromebooks · d1cd0459
      Simon Glass authored
      
      On x86 it is common to use 'post codes' which are 8-bit hex values emitted
      from the code and visible to the user. Traditionally two 7-segment displays
      were made available on the motherboard to show the last post code that was
      emitted. This allows diagnosis of a boot problem since it is possible to
      see where the code got to before it died.
      
      On modern hardware these codes are not normally visible. On Chromebooks
      they are displayed by the Embedded Controller (EC), so it is useful to emit
      them. We must enable this feature for the EC to see the codes, so add an
      option for this.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      d1cd0459
    • Simon Glass's avatar
      x86: Save the BIST value on reset · f67cd51e
      Simon Glass authored
      
      The built in self test value is available in register eax on start-up. Save
      it so that it can be accessed later. Unfortunately we must wait until the
      global_data is available before we can do this, so there is a little bit of
      shuffling to keep it around.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      f67cd51e
    • Simon Glass's avatar
      x86: Tidy up global descriptor table setup · 76f90f30
      Simon Glass authored
      
      This code is a little muddled, so tidy it up. Make sure that we put the
      GDT in the right place and set it up properly.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      76f90f30
  23. Oct 24, 2014
  24. Jul 24, 2013
  25. Feb 01, 2013
  26. Dec 06, 2012
    • Gabe Black's avatar
      x86: Add back cold- and warm-boot flags · 91d82a29
      Gabe Black authored
      
      These were removed, but actually are useful.
      
      Cold means that we started from a reset/power on.
      Warm means that we started from another U-Boot.
      
      We determine whether u-boot on x86 was warm or cold booted (really if
      it started at the beginning of the text segment or at the ELF entry point).
      We plumb the result through to the global data structure.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      91d82a29
  27. Nov 28, 2012
  28. Jan 04, 2012
    • Graeme Russ's avatar
      x86: Use fs for global data · 9e6c572f
      Graeme Russ authored
      Use the base address of the 'F' segment as a pointer to the global data
      structure. By adding the linear address (i.e. the 'D' segment address) as
      the first word of the global data structure, the address of the global data
      relative to the 'D' segment can be found simply, for example, by:
      
      	fs movl 0, %eax
      
      This makes the gd 'pointer' writable prior to relocation (by reloading the
      Global Desctriptor Table) which brings x86 into line with all other arches
      
      NOTE: Writing to the gd 'pointer' is expensive (but we only do it
      twice) but using it to access global data members (read and write) is
      still fairly cheap
      
      --
      Changes for v2:
       - Rebased against changes made to patch #3
       - Removed extra indent
       - Tweaked commit message
      9e6c572f
    • Graeme Russ's avatar
      x86: Simplify Flash-to-RAM code execution transition · f48dd6fc
      Graeme Russ authored
      Move the relocation offset calculation out of assembler and into C. This
      also paves the way for the upcoming init sequence simplification by adding
      the board_init_f_r flash to RAM transitional function
      
      --
      Changes for v2:
       - Added commit message
       - Minor adjustment to new stack address comment
      f48dd6fc
    • Graeme Russ's avatar
      x86: Remove GDR related magic numbers · 109ad143
      Graeme Russ authored
      --
      Changes for v2:
       - Use an enum
       - Add defined for GDT size (previously added in patch 7)
       - Use X86_ namespace (as per Linux headers)
      109ad143
  29. Nov 29, 2011
Loading