[PATCH v3 0/1] Fix max initrd size limit when put initrd to RAM

Hang Xu posted 1 patch 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230313021826.6898-1-xuhang@eswincomputing.com
Maintainers: Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Weiwei Li <liweiwei@iscas.ac.cn>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
hw/riscv/boot.c            | 19 +++++++++++++------
hw/riscv/microchip_pfsoc.c |  5 ++++-
hw/riscv/opentitan.c       |  2 +-
hw/riscv/sifive_e.c        |  2 +-
hw/riscv/sifive_u.c        |  5 ++++-
hw/riscv/spike.c           |  5 ++++-
hw/riscv/virt.c            |  5 ++++-
include/hw/riscv/boot.h    |  2 ++
8 files changed, 33 insertions(+), 12 deletions(-)
[PATCH v3 0/1] Fix max initrd size limit when put initrd to RAM
Posted by Hang Xu 1 year, 1 month ago
Because the starting address of ram is not necessarily 0,
the remaining free space in ram is
ram_size - (start - ram_base) instead of ram_size-start.

v3:
* Declare 'max_initrd' at the start of the function
* Fix title typo

v2:
* Rebase
* Considering that the ram block may be discontinuous

Hang Xu (1):
  hw/riscv: Fix max size limit when put initrd to RAM

 hw/riscv/boot.c            | 19 +++++++++++++------
 hw/riscv/microchip_pfsoc.c |  5 ++++-
 hw/riscv/opentitan.c       |  2 +-
 hw/riscv/sifive_e.c        |  2 +-
 hw/riscv/sifive_u.c        |  5 ++++-
 hw/riscv/spike.c           |  5 ++++-
 hw/riscv/virt.c            |  5 ++++-
 include/hw/riscv/boot.h    |  2 ++
 8 files changed, 33 insertions(+), 12 deletions(-)

-- 
2.17.1