Skip to content
Snippets Groups Projects
  1. Jul 23, 2013
  2. Jul 17, 2013
    • Simon Glass's avatar
      bootm: Move fixup_silent_linux() earlier in the bootm stages · 576aacdb
      Simon Glass authored
      
      Before the bootm refactor, fixup_silent_linux() was done only in the
      monolithic bootm case, not in the subcommand case. With the refactor, it
      is done always, which is good. Unfortunately it is done too late, since it
      is the PREP or CMDLINE stages that set up the command line for Linux.
      
      Move fixup_silent_linux() into the LOADOS stage, which is where we find
      out the OS being used, and can thus decide whether to perform this step.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      576aacdb
  3. Jul 16, 2013
  4. Jul 15, 2013
    • Frederic Leroy's avatar
      Fix ext2/ext4 filesystem accesses beyond 2TiB · 04735e9c
      Frederic Leroy authored
      
      With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type,
      which is required to represent block numbers for storage devices that
      exceed 2TiB (the block size usually is 512B), e.g. recent hard drives
      
      We now use lbaint_t for partition offset to reflect the lbaint_t change,
      and access partitions beyond or crossing the 2.1TiB limit.
      This required changes to signature of ext4fs_devread(), and type of all
      variables relatives to block sector.
      
      ext2/ext4 fs uses logical block represented by a 32 bit value. Logical
      block is a multiple of device block sector. To avoid overflow problem
      when calling ext4fs_devread(), we need to cast the sector parameter.
      
      Signed-off-by: default avatarFrédéric Leroy <fredo@starox.org>
      04735e9c
    • Lan Yixun (dlan)'s avatar
      common: remove unaligned access error in bootmenu_getoption() · 0eb33ad2
      Lan Yixun (dlan) authored
      
      Some ARM compilers may emit code that makes unaligned accesses when
      faced with constructs such as:
      
          char name[12] = "bootmenu_";
      
      same fix as commit: 064d55f8
      
      =========================================================
      data abort
      
          MAYBE you should read doc/README.arm-unaligned-accesses
      
      pc : [<3ff4b60c>]          lr : [<3ff4b7b0>]
      sp : 3f346a58  ip : 3ff9c8e6     fp : 02000060
      r10: 00000000  r9 : 3df47fc0     r8 : 3f347f40
      r7 : 00000000  r6 : 00000000     r5 : 00000003  r4 : 3f759140
      r3 : 000003f0  r2 : 00000000     r1 : 000003f1  r0 : 00000000
      Flags: nzCv  IRQs on  FIQs off  Mode SVC_32
      Resetting CPU ...
      ======================================================
      
      Signed-off-by: default avatarLan Yixun (dlan) <dennis.yxun@gmail.com>
      0eb33ad2
    • Simon Glass's avatar
      scsi: Correct types of scsi_read/write() · 4f6aa346
      Simon Glass authored
      
      The block device expects to see lbaint_t for the blknr parameter. Change
      the SCSI read/write functions to suit.
      
      This fixes the following build warnings for coreboot:
      
      cmd_scsi.c: In function ‘scsi_scan’:
      cmd_scsi.c:119:30: error: assignment from incompatible pointer type [-Werror]
      cmd_scsi.c:120:32: error: assignment from incompatible pointer type [-Werror]
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      4f6aa346
  5. Jul 12, 2013
  6. Jul 10, 2013
  7. Jul 08, 2013
  8. Jul 04, 2013
  9. Jul 01, 2013
  10. Jun 28, 2013
    • Simon Glass's avatar
      bootm: Disable interrupts before loading OS · 5ff0d083
      Simon Glass authored
      
      This restores the ordering of interrupt disable to what it what before
      commit 35fc84fa. It seems that on some archiectures (e.g. PowerPC) the
      OS is loaded into an interrupt region, which can cause problems if
      interrupts are still running.
      
      Tested-by: default avatarStefan Roese <sr@denx.de>
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      5ff0d083
    • Tom Rini's avatar
      cmd_bootm.c: Correct BOOTM_ERR_OVERLAP handling · d366438d
      Tom Rini authored
      
      With 35fc84fa [Refactor the bootm command to reduce code duplication]
      we stopped checking the return value of bootm_load_os (unintentionally!)
      and simply returned if we had a non-zero return value from the function.
      This broke the valid case of a legacy image file of a single kernel
      loaded into an overlapping memory area (the default way of booting
      nearly all TI platforms).
      
      The best way to fix this problem in the new code is to make
      bootm_load_os be the one to see if we have a problem with this, and if
      it's fatal return BOOTM_ERR_RESET and if it's not BOOTM_ERR_OVERLAP, so
      that we can avoid calling lmb_reserve() but continue with booting.  We
      however still need to handle the other BOOTM_ERR values so re-work
      do_bootm_states so that we have an error handler at the bottom we can
      goto for problems from bootm_load_os, or problems from the other callers
      (as the code was before).  Add a comment to do_bootm_states noting the
      existing restriction on negative return values.
      
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      
      ---
      Changes in v2:
      - Rework so that only bootm_load_os and boot_selected_os head down into
        the err case code, and other errors simply return back to the caller.
        Fixes 'spl export'.
      d366438d
  11. Jun 26, 2013
    • Sascha Silbe's avatar
      Fix block device accesses beyond 2TiB · ff8fef56
      Sascha Silbe authored
      
      With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type,
      which is required to represent block numbers for storage devices that
      exceed 2TiB (the block size usually is 512B), e.g. recent hard drives.
      
      For some obscure reason, the current U-Boot code uses lbaint_t for the
      number of blocks to read (a rather optimistic estimation of how RAM
      sizes will evolve), but not for the starting address. Trying to access
      blocks beyond the 2TiB boundary will simply wrap around and read a
      block within the 0..2TiB range.
      
      We now use lbaint_t for block start addresses, too. This required
      changes to all block drivers as the signature of block_read(),
      block_write() and block_erase() in block_dev_desc_t changed.
      
      Signed-off-by: default avatarSascha Silbe <t-uboot@infra-silbe.de>
      ff8fef56
    • Steven Stallion's avatar
      cmd_bootm: Add command line arguments to Plan 9 · eeaef5e4
      Steven Stallion authored
      
      This patch introduces support for command line arguments to Plan 9.
      Plan 9 generally dedicates a small region of kernel memory (known
      as CONFADDR) for runtime configuration.  A new environment variable
      named confaddr was introduced to indicate this location when copying
      arguments.
      
      Signed-off-by: default avatarSteven Stallion <sstallion@gmail.com>
      [trini: Adapt for Simon's changes about correcting argc, no need to bump
      by 2 now]
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      eeaef5e4
    • Simon Glass's avatar
      image: Add support for signing of FIT configurations · 4d098529
      Simon Glass authored
      
      While signing images is useful, it does not provide complete protection
      against several types of attack. For example, it it possible to create a
      FIT with the same signed images, but with the configuration changed such
      that a different one is selected (mix and match attack). It is also possible
      to substitute a signed image from an older FIT version into a newer FIT
      (roll-back attack).
      
      Add support for signing of FIT configurations using the libfdt's region
      support.
      
      Please see doc/uImage.FIT/signature.txt for more information.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      4d098529
    • Simon Glass's avatar
      image: Add RSA support for image signing · 19c402af
      Simon Glass authored
      
      RSA provides a public key encryption facility which is ideal for image
      signing and verification.
      
      Images are signed using a private key by mkimage. Then at run-time, the
      images are verified using a private key.
      
      This implementation uses openssl for the host part (mkimage). To avoid
      bringing large libraries into the U-Boot binary, the RSA public key
      is encoded using a simple numeric representation in the device tree.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      19c402af
    • Simon Glass's avatar
      image: Support signing of images · 56518e71
      Simon Glass authored
      
      Add support for signing images using a new signature node. The process
      is handled by fdt_add_verification_data() which now takes parameters to
      provide the keys and related information.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      56518e71
    • Simon Glass's avatar
      image: Add signing infrastructure · 3e569a6b
      Simon Glass authored
      
      Add a structure to describe an algorithm which can sign and (later) verify
      images.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      3e569a6b
    • Simon Glass's avatar
      Add a 'fake' go command to the bootm command · d0ae31eb
      Simon Glass authored
      
      For tracing it is useful to run as much of U-Boot as possible so as to get
      a complete picture. Quite a bit of work happens in bootm, and we don't want
      to have to stop tracing before bootm starts.
      
      Add a way of doing a 'fake' boot of the OS - which does everything up to
      the point where U-Boot is about to jump to the OS image. This allows
      tracing to record right until the end.
      
      This requires arch support to work.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      d0ae31eb
    • Simon Glass's avatar
      Refactor the bootm command to reduce code duplication · 35fc84fa
      Simon Glass authored
      
      At present the bootm code is mostly duplicated for the plain 'bootm'
      command and its sub-command variant. This makes the code harder to
      maintain and means that changes must be made to several places.
      
      Introduce do_bootm_states() which performs selected portions of the bootm
      work, so that both plain 'bootm' and 'bootm <sub_command>' can use the
      same code.
      
      Additional duplication exists in bootz, so tidy that up as well. This
      is not intended to change behaviour, apart from minor fixes where the
      previously-duplicated code missed some chunks of code.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      35fc84fa
    • Simon Glass's avatar
      Clarify bootm OS arguments · 983c72f4
      Simon Glass authored
      
      At present the arguments to bootm are processed in a somewhat confusing
      way. Sub-functions must know how many arguments their calling functions
      have processed, and the OS boot function must also have this information.
      Also it isn't obvious that 'bootm' and 'bootm start' provide arguments in
      the same way.
      
      Adjust the code so that arguments are removed from the list before calling
      a sub-function. This means that all functions can know that argv[0] is the
      first argument of which they need to take notice.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      983c72f4
    • Simon Glass's avatar
      Add trace support to generic board · 71c52dba
      Simon Glass authored
      
      Add hooks for tracing to generic board, including:
      
      - allow early tracing to start early as possible in U-Boot
      - reserve memory for trace buffer
      - copy early trace buffer to main trace buffer after relocation
      - setup full tracing support after relocation
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      71c52dba
Loading