1. 31 8月, 2019 7 次提交
    • H
      siemens: avoid out of bound access · 3c7166db
      Heinrich Schuchardt 提交于
      char num[1];
      	sprintf(num, "%d", i);
      
      leads to a buffer overrun.
      
      Simplify the overly complex coding.
      Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      Acked-by: NHeiko Schocher <hs@denx.de>
      3c7166db
    • S
      arm: omap2: am43xx: Enable CONFIG_DM_USB · 40a13173
      Suniel Mahesh 提交于
      Enable CONFIG_DM_USB to remove compile warning for
      am43xx based targets:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_USB. Please update
      the board to use CONFIG_DM_USB before the v2019.07 release.
      Failure to update by the deadline may result in board removal.
      See doc/driver-model/MIGRATION.txt for more info.
      ====================================================
      Signed-off-by: NSuniel Mahesh <sunil.m@techveda.org>
      40a13173
    • S
      Makefile: clean build generated SPL binary for TI AM65x · 27351ca8
      Suniel Mahesh 提交于
      TI AM65x platforms (evm and HS) generate an SPL image
      'tispl.bin*' and there is no rule for cleanup.
      Added entry for cleanup in clean target.
      Signed-off-by: NSuniel Mahesh <sunil.m@techveda.org>
      27351ca8
    • W
      configs: enable CONFIG_BLOCK_CACHE for mt7623n_bpir2 · 940dd143
      Weijie Gao 提交于
      This patch enables CONFIG_BLOCK_CACHE for mt7623n_bpir2.
      Signed-off-by: NWeijie Gao <weijie.gao@mediatek.com>
      940dd143
    • W
      mmc: invalidate block cache after hwpart switched successfully · 47b7fa30
      Weijie Gao 提交于
      eMMC device has multiple hw partitions both address from zero. However the
      mmc driver lacks block cache invalidation for switch hwpart. This causes a
      problem that data of current hw partition is cached before switching to
      another hw partition. And the following read operation of the latter hw
      partition will get wrong data when reading from the addresses that have
      been cached previously.
      
      To solve this problem, invalidate block cache after a successful
      mmc_switch_part() operation.
      Signed-off-by: NWeijie Gao <weijie.gao@mediatek.com>
      Tested-by: NFelix Brack <fb@ltec.ch>
      47b7fa30
    • W
      Revert "blk: Invalidate block cache when switching hwpart" · 1ce88479
      Weijie Gao 提交于
      This reverts commit 0ebe112d.
      
      Most block devices have only one hwpart. Multiple hwparts only found used
      by eMMC devices in u-boot. The mmc driver do blk_dselect_hwpart() at the
      beginning of mmc_bread() which causes block cache being invalidated too
      frequently and makes block cache useless.
      
      So it's not a good idea to put blkcache_invalidate() in the common
      functions. It should be called inside mmc_select_hwpart().
      Signed-off-by: NWeijie Gao <weijie.gao@mediatek.com>
      Tested-by: NFelix Brack <fb@ltec.ch>
      1ce88479
    • S
      board_f: fix noncached reservation calculation · 5e0404ff
      Stephen Warren 提交于
      The current code in reserve_noncached() has two issues:
      
      1) The first update of gd->start_addr_sp always rounds down to a section
      start. However, the equivalent calculation in cache.c:noncached_init()
      always first rounds up to a section start, then subtracts a section size.
      These two calculations differ if the initial value is already rounded to
      section alignment.
      
      2) The second update of gd->start_addr_sp subtracts exactly
      CONFIG_SYS_NONCACHED_MEMORY, whereas the equivalent calculation in
      cache.c:noncached_init() rounds the noncached size up to section
      alignment before subtracting it. The two calculations differ if the
      noncached region size is not a multiple of the MMU section size.
      
      In practice, one/both of those issues causes a practical problem on
      Jetson TX1; U-Boot triggers a synchronous abort during initialization,
      likely due to overlapping use of some memory region.
      
      This change fixes both these issues by duplicating the exact calculations
      from noncached_init() into reserve_noncached().
      
      However, this fix assumes that gd->start_addr_sp on entry to
      reserve_noncached() exactly matches mem_malloc_start on entry to
      noncached_init(). I haven't traced the code to see whether it absolutely
      guarantees this in all (or indeed any!) cases. Consequently, I added some
      comments in the hope that this condition will continue to be true.
      
      Fixes: 5f7adb5b ("board_f: reserve noncached space below malloc area")
      Cc: Vikas Manocha <vikas.manocha@st.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      5e0404ff
  2. 29 8月, 2019 5 次提交
  3. 28 8月, 2019 28 次提交