Skip to content
Snippets Groups Projects
  1. Dec 15, 2019
    • Simon Glass's avatar
      x86: timer: Reduce timer code size in TPL on Intel CPUs · 642e8487
      Simon Glass authored
      
      Most of the timer-calibration methods are not needed on recent Intel CPUs
      and just increase code size. Add an option to use the known-good way to
      get the clock frequency in TPL. Size reduction is about 700 bytes.
      
      Note that version 1 of this commit caused bootstage to crash since the CPU
      was not identified. This is corrected by changes previously applied to
      make sure that the CPU is identified before spl_init() is called, such as
      
         39146a2e0b x86: Move CPU init to before spl_init()
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      642e8487
    • Simon Glass's avatar
      x86: timer: use a timer base of 0 · 77dd7c68
      Simon Glass authored
      
      On x86 platforms the timer is reset to 0 when the SoC is reset. Having
      this as the timer base is useful since it provides an indication of how
      long it takes before U-Boot is running.
      
      When U-Boot sets the timer base to something else, time is lost and we
      no-longer have an accurate account of the time since reset. This
      particularly affects bootstage.
      
      Change the default to not read the timer base, leaving it at 0. Add an
      option for when U-Boot is the secondary bootloader.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      77dd7c68
  2. Dec 02, 2019
  3. Nov 02, 2019
  4. Feb 12, 2019
  5. Nov 14, 2018
    • Bin Meng's avatar
      timer: Remove DM_FLAG_PRE_RELOC flag in various drivers · d7a184d4
      Bin Meng authored
      
      When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be
      bound before relocation. However due to a bug in the DM core,
      the flag only takes effect when devices are statically declared
      via U_BOOT_DEVICE(). This bug has been fixed recently by commit
      "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in
      lists_bind_fdt()", but with the fix, it has a side effect that
      all existing drivers that declared DM_FLAG_PRE_RELOC flag will
      be bound before relocation now. This may expose potential boot
      failure on some boards due to insufficient memory during the
      pre-relocation stage.
      
      To mitigate this potential impact, the following changes are
      implemented:
      
      - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver
        only supports configuration from device tree (OF_CONTROL)
      - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device
        is statically declared via U_BOOT_DEVICE()
      - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for
        drivers that support both statically declared devices and
        configuration from device tree
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      d7a184d4
  6. Oct 22, 2018
    • Bin Meng's avatar
      x86: tsc: Introduce config option for early timer frequency · 6ce38364
      Bin Meng authored
      
      So far the TSC timer driver supports trying hardware calibration first
      and using device tree as last resort for its running frequency as the
      normal timer.
      
      However when it is used as the early timer, it only supports hardware
      calibration and if it fails, the driver just panics. This introduces
      a new config option to specify the early timer frequency in MHz and
      it should be equal to the value described in the device tree.
      
      Without this patch, the travis-ci testing on QEMU x86_64 target fails
      each time after it finishes the 'bootefi selftest' as the test.py see
      an error was emitted on the console like this:
      
        TSC frequency is ZERO
        resetting ...
        ### ERROR ### Please RESET the board ###
      
      It's strange that this error is consistently seen on the travis-ci
      machine, but only occasionally seen on my local machine (maybe 1 out
      of 10). Since QEMU x86_64 target enables BOOTSTAGE support which uses
      early timer, with this fix it should work without any failure.
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      6ce38364
  7. Aug 20, 2018
    • Bin Meng's avatar
      x86: tsc: Try hardware calibration first · 165db7c4
      Bin Meng authored
      
      At present if TSC frequency is provided in the device tree, it takes
      precedence over hardware calibration result. This swaps the order to
      try hardware calibration first and uses device tree as last resort.
      
      This can be helpful when a generic dts (eg: coreboot/efi payload) is
      supposed to work on as many hardware as possible, including emulators
      like QEMU where TSC hardware calibration sometimes fails.
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
      165db7c4
  8. Jul 02, 2018
  9. Jun 13, 2018
  10. 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
  11. Sep 16, 2017
  12. Aug 01, 2017
  13. Dec 09, 2015
  14. Dec 01, 2015
  15. Nov 13, 2015
  16. Aug 05, 2015
  17. Jan 13, 2015
  18. Nov 21, 2014
  19. Jul 24, 2013
  20. Jun 26, 2013
  21. May 13, 2013
Loading