1. 05 8月, 2020 4 次提交
    • Y
      psci: put psci_method in .data section if EFI_LOADER is not enabled · 5cc7df7e
      Yann Gautier 提交于
      Move the variable psci_method in .data section when EFI is not
      activated and the psci driver safely access it before relocation.
      
      Without this patch the variable is located in .bss section
      and the psci probe requested before relocation corrupts the device
      tree (probe is requested by board_f.c::print_resetinfo()).
      
      When EFI_LOADER is activated, this variable in already located in the
      .data.efi_runtime section by __efi_runtime_data.
      Signed-off-by: NYann Gautier <yann.gautier@st.com>
      Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
      5cc7df7e
    • D
      Fix corner case in bad block table handling. · 06fc4573
      Doyle, Patrick 提交于
      In the unlikely event that both blocks 10 and 11 are marked as bad (on a
      32 bit machine), then the process of marking block 10 as bad stomps on
      cached entry for block 11.  There are (of course) other examples.
      Signed-off-by: NPatrick Doyle <pdoyle@irobot.com>
      Reviewed-by: NRichard Weinberger <richard@nod.at>
      06fc4573
    • J
      cmd: add clone command · 4a4830cf
      John Chau 提交于
      This patch adds a feature for block device cloning similar to dd
      command, this should be useful for boot-strapping a device where
      usb gadget or networking is not available. For instance one can
      clone a factory image into a blank emmc from an external sd card.
      Signed-off-by: NJohn Chau <john@harmon.hk>
      4a4830cf
    • J
      fs/fat/fat.c: Do not perform zero block reads if there are no blocks left · 5b3ddb17
      Jason Wessel 提交于
      While using u-boot with qemu's virtio driver I stumbled across a
      problem reading files less than sector size.  On the real hardware the
      block reader seems ok with reading zero blocks, and while we could fix
      the virtio host side of qemu to deal with a zero block read instead of
      crashing, the u-boot fat driver should not be doing zero block reads
      in the first place.  If you ask hardware to read zero blocks you are
      just going to get zero data.  There may also be other hardware that
      responds similarly to the virtio interface so this is worth fixing.
      
      Without the patch I get the following and have to restart qemu because
      it dies.
      ---------------------------------
      => fatls virtio 0:1
             30   cmdline.txt
      => fatload virtio 0:1 ${loadaddr} cmdline.txt
      qemu-system-aarch64: virtio: zero sized buffers are not allowed
      ---------------------------------
      
      With the patch I get the expected results.
      ---------------------------------
      => fatls virtio 0:1
             30   cmdline.txt
      => fatload virtio 0:1 ${loadaddr} cmdline.txt
      30 bytes read in 11 ms (2 KiB/s)
      => md.b ${loadaddr} 0x1E
      40080000: 64 77 63 5f 6f 74 67 2e 6c 70 6d 5f 65 6e 61 62    dwc_otg.lpm_enab
      40080010: 6c 65 3d 30 20 72 6f 6f 74 77 61 69 74 0a          le=0 rootwait.
      
      ---------------------------------
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      5b3ddb17
  2. 04 8月, 2020 36 次提交