1. 30 3月, 2021 15 次提交
  2. 29 3月, 2021 1 次提交
  3. 27 3月, 2021 24 次提交
    • H
      sandbox: define __dyn_sym_start, dyn_sym_end · e5021221
      Heinrich Schuchardt 提交于
      On RISC-V the symbols __dyn_sym_start, dyn_sym_end are referenced in
      efi_runtime_relocate().
      Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      e5021221
    • T
      spi: spi-uclass: Add support to manually relocate spi memory ops · 346df7d4
      T Karthik Reddy 提交于
      Add spi memory operations to relocate manually when
      CONFIG_NEEDS_MANUAL_RELOC is enabled.
      Signed-off-by: NT Karthik Reddy <t.karthik.reddy@xilinx.com>
      Acked-by: NAshok Reddy Soma <ashok.reddy.soma@xilinx.com>
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: NPratyush Yadav <p.yadav@ti.com>
      346df7d4
    • S
      dtoc: Add new check that offsets are correct · 5d1bec30
      Simon Glass 提交于
      Add a few more internal checks to make sure offsets are correct, before
      updating the dtb.
      
      To make this easier, update the functions which add a property to return
      that property,.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      5d1bec30
    • S
      dtoc: Support adding subnodes alongside existing ones · f6176651
      Simon Glass 提交于
      So far we have only needed to add subnodes to empty notds, so have not
      had to deal with ordering. However this feature is needed for binman's
      expanded nodes, since there may be another node in the same section.
      
      While libfdt adds new properties after existing properties, it adds new
      subnodes before existing subnodes. This means that we must reorder the
      nodes in the cached version, so that the ordering remains consistent.
      
      Update the sync implementation to sync existing subnodes first, then
      add new ones, then tidy up the ordering in the cached version. Update the
      test to cover this behaviour.
      
      Also improve the comment about property syncing while we are here.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      f6176651
    • S
      dtoc: Add a subnode test for multiple nodes · 76677dd2
      Simon Glass 提交于
      Add a new test that adds a subnode alongside an existing one, as well as
      adding properties to a subnode. This will expand to adding multiple
      subnodes in future patches. Put a node after the one we are adding to so
      we can check that things sync correctly.
      
      The testAddNode() test should be in the TestNode class since it is a node
      test, so move it.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      76677dd2
    • S
      dtoc: Tweak ordering of fdt-offsets refreshing · 71719e15
      Simon Glass 提交于
      Once the tree has been synced, thus potentially moving things around in the
      fdt, we set _cached_offsets to False so that a refresh will happen next
      time a property is accessed.
      
      This 'lazy' refresh doesn't really save much time, since refresh is a very
      fast operation, just a single walk of the tree. Also, having the refresh
      happen in the bowels of property access it makes it harder to figure out
      what is going on.
      
      Simplify the code by always doing a refresh before and after a sync. Set
      _cached_offsets to True immediately after this, in the Refresh() function,
      since this makes more sense than doing it in the caller.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      71719e15
    • S
      dtoc: Tidy up property-offset handling · 37ba9844
      Simon Glass 提交于
      If a property does not yet have an offset, then that means it exists in
      the cache'd fdt but has not yet been synced back to the flat tree. Use
      the dirty flag for this so we don't need to check the offset too. Improve
      the comments for Prop and Node to make it clear what an offset of None
      means.
      
      Also clear the dirty flag after the property is synced.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      37ba9844
    • S
      dtoc: Improve internal error for Refresh() · acd98611
      Simon Glass 提交于
      Add the node name too so it is easy to see which node failed.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      acd98611
    • S
      binman: Support default alignment for sections · 5ff9fedc
      Simon Glass 提交于
      Sometimes it is useful to specify the default alignment for all entries
      in a section, such as when word-alignment is necessary, for example. It
      is tedious and error-prone to specify this individually for each section.
      
      Add a property to control this for a section.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      5ff9fedc
    • S
      binman: Support obtaining section contents immediately · 631f752d
      Simon Glass 提交于
      Generally the content of sections is not built until the final assembly
      of the image. This is partly to avoid wasting time, since the entries
      within sections may change multiple times as binman works through its
      various stages. This works quite well since sections exist in a strict
      hierarchy, so they can be processed in a depth-first manner.
      
      However the 'collection' entry type does not have this luxury. If it
      contains a section within its 'content' list, then it must produce the
      section contents, if available. That section is typically a sibling
      node, i.e. not part oc the collection's hierarchy.
      
      Add a new 'required' argument to section.GetData() to support this. When
      required is True, any referenced sections are immediately built. If this
      is not possible (because one of the subentries does not have its data yet)
      then an error is produced.
      
      The test for this uses a 'collection' entry type, referencing a section as
      its first member. This forces a call to _BuildSectionData() with required
      set to False, at first, then True later, when the image is assembled.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      631f752d
    • S
      binman: Add support for a collection of entries · 189f2919
      Simon Glass 提交于
      The vblock entry type includes code to collect the data from a number of
      other entries (not necessarily subentries) and concatenating it. This is
      a useful feature for other entry types.
      
      Make it a base class, so that vblock can use it, along with other entry
      types.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      189f2919
    • S
      binman: Allow disabling expanding an entry · 3d433382
      Simon Glass 提交于
      At present there is a command-line flag to disable substitution of expanded
      entries. Add an option to the entry node as well, so it can be controlled
      at the node level.
      
      Add a test to cover this. Fix up the comment to the checkSymbols() function
      it uses, while we are here.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      3d433382
    • S
      binman: Use a unique number for the symbols test file · e9e0db88
      Simon Glass 提交于
      Two test devicetree files currently have 192 as their unique number. Fix
      this by separating them out.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      e9e0db88
    • S
      x86: coral: Show memory config and SKU ID on startup · 80a4570c
      Simon Glass 提交于
      Provide the model information through sysinfo so that it shows up on
      boot. For memconfig 4 pins are provided, for 16 combinations. For SKU
      ID there are two options:
      
         - two pins provided in a ternary arrangement, for 9 combinations.
         - reading from the EC
      
      Add a binding doc and drop the unused #defines as well.
      
      Example:
      
         U-Boot 2021.01-rc5
      
         CPU:   Intel(R) Celeron(R) CPU N3450 @ 1.10GHz
         DRAM:  3.9 GiB
         MMC:   sdmmc@1b,0: 1, emmc@1c,0: 2
         Video: 1024x768x32 @ b0000000
         Model: Google Coral (memconfig 5, SKU 3)
      
      This depends on the GPIO series:
      
         http://patchwork.ozlabs.org/project/uboot/list/?series=228126Signed-off-by: NSimon Glass <sjg@chromium.org>
      Acked-by: NBin Meng <bmeng.cn@gmail.com>
      80a4570c
    • S
      sysinfo: Allow showing model info from sysinfo · 96dedb0d
      Simon Glass 提交于
      Some boards may want to show the SKU ID or other information obtained at
      runtime. Allow this to come from sysinfo. The board can then provide a
      sysinfo driver to provide it.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      96dedb0d
    • S
      sandbox: Correct uninit conflict · c119528a
      Simon Glass 提交于
      It is not possible to remove the state before driver model is uninited,
      since the devices are allocated in the memory buffer. Also it is not
      possible to uninit driver model afterwards, since the RAM has been
      freed.
      
      Drop the uninit altogether, since it is not actually necessary.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      c119528a
    • S
      bootm: Skip command-line substitution if !CONFIG_CMDLINE · a8d69627
      Simon Glass 提交于
      When there is no command line, we cannot enable this feature. Add a check
      to avoid a build error.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      a8d69627
    • S
      bloblist: Make BLOBLIST_TABLES depend on BLOBLIST · f2c1442e
      Simon Glass 提交于
      Add an extra condition here since we cannot put x86 tables in a bloblist
      when bloblists are not supported.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      f2c1442e
    • S
      command: Fix operation of !CONFIG_CMDLINE · 45cd2e55
      Simon Glass 提交于
      The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE
      is not enabled. Fix this by updating the macro to provide the 'repeatable'
      arugment in this case.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      45cd2e55
    • S
      doc: Convert Chromium OS docs to rst · 2d0423af
      Simon Glass 提交于
      Move this documentation over to reST. Move the example files into a files/
      directory so they are still separate.
      
      Do a few minor updates while we are here:
      - Tidy up sandbox build instructions
      - Update my github account name
      - Add some talks and links
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      2d0423af
    • S
      malloc: Export malloc_simple_info() · c197f6e2
      Simon Glass 提交于
      Export this function always so it can be used behind IS_ENABLED() instead
      of requiring an #ifdef.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      c197f6e2
    • S
      cpu: Rename SPL_CPU_SUPPORT to SPL_CPU · 529d5f96
      Simon Glass 提交于
      The _SUPPORT suffix is from an earlier time and interferes with use of
      the CONFIG_IS_ENABLED() macro. Rename the option to drop the suffix.
      
      Tidy up the TODO that prompted this.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      529d5f96
    • S
      sf: Support querying write-protect · b3b60f59
      Simon Glass 提交于
      This feature was dropped from U-Boot some time ago:
      
         f12f96cf (sf: Drop spl_flash_get_sw_write_prot")
      
      However, we do need a way to see if a flash device is write-protected,
      since if it is, it may not be possible to write to do (i.e. failing to
      write is expected).
      
      I am not sure of the correct layer to implement this, so this patch is a
      stab at it. If spi-flash makes sense then I will add to the 'sf' also.
      
      Re the points mentioned in the removal commit:
      
          1) This kind of requirement can be achieved using existing
             flash operations and flash locking API calls instead of
             making a separate flash API.
      
      Which uclass is this?
      
          2) Technically there is no real hardware user for this API to
             use in the source tree.
      
      I do want coral (at least) to support this.
      
          3) Having a flash operations API for simple register read bits
             also make difficult to extend the flash operations.
      
      This new patch only mentions write-protect being on or off, rather than
      the actual mechanism.
      
          4) Instead of touching generic code, it is possible to have
             this functionality inside spinor operations in the form of
             flash hooks or fixups for associated flash chips.
      
      That sounds to me like what drivers are for. But we still need some sort
      of API for it to be accessible.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      b3b60f59
    • S
      bootstage: Warning if space is exhausted · eb26d88d
      Simon Glass 提交于
      At present bootstage silently ignores new records if it runs out of
      space. It is sometimes obvious by looking at the report, but the IDs are
      not contiguous, so it is easy to miss.
      
      Aad a message so that action can be taken.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      eb26d88d