[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 67/99] RISC-V: Minimal QEMU 2.12 fix for sifive_u ma
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 67/99] RISC-V: Minimal QEMU 2.12 fix for sifive_u machine |
Date: |
Mon, 23 Jul 2018 15:17:16 -0500 |
From: Michael Clark <address@hidden>
The 'sifive_u' board has a bug where the ROM is
created as RAM at the wrong address and marked
readonly. The bug renders the board unusable.
This is a minimal fix and allows booting Linux.
5aec3247c190f10654250203a1742490ae7343a2
"RISC-V: Mark ROM read-only after copying in code"
contains a comprehensive fix using the ROM APIs
memory_region_init_rom and rom_add_blob_fixed_as
which could be backported.
Cc: Sagar Karandikar <address@hidden>
Cc: Bastian Koppelmann <address@hidden>
Cc: Palmer Dabbelt <address@hidden>
Cc: Alistair Francis <address@hidden>
Cc: address@hidden
Signed-off-by: Michael Clark <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
---
hw/riscv/sifive_u.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
index 1c2deefa6c..19b034449c 100644
--- a/hw/riscv/sifive_u.c
+++ b/hw/riscv/sifive_u.c
@@ -250,9 +250,9 @@ static void riscv_sifive_u_init(MachineState *machine)
/* boot rom */
memory_region_init_ram(boot_rom, NULL, "riscv.sifive.u.mrom",
- memmap[SIFIVE_U_MROM].base, &error_fatal);
- memory_region_set_readonly(boot_rom, true);
- memory_region_add_subregion(sys_memory, 0x0, boot_rom);
+ memmap[SIFIVE_U_MROM].size, &error_fatal);
+ memory_region_add_subregion(sys_memory, memmap[SIFIVE_U_MROM].base,
+ boot_rom);
if (machine->kernel_filename) {
load_kernel(machine->kernel_filename);
@@ -282,6 +282,7 @@ static void riscv_sifive_u_init(MachineState *machine)
qemu_fdt_dumpdtb(s->fdt, s->fdt_size);
cpu_physical_memory_write(memmap[SIFIVE_U_MROM].base +
sizeof(reset_vec), s->fdt, s->fdt_size);
+ memory_region_set_readonly(boot_rom, true);
/* MMIO */
s->plic = sifive_plic_create(memmap[SIFIVE_U_PLIC].base,
--
2.17.1
- [Qemu-devel] [PATCH 58/99] block/mirror: Make cancel always cancel pre-READY, (continued)
- [Qemu-devel] [PATCH 58/99] block/mirror: Make cancel always cancel pre-READY, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 59/99] iotests: Add test for cancelling a mirror job, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 60/99] riscv: spike: allow base == 0, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 61/99] riscv: htif: increase the priority of the htif subregion, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 05/99] s390-ccw: force diag 308 subcode to unsigned long, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 62/99] riscv: requires libfdt, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 63/99] nbd/client: Relax handling of large NBD_CMD_BLOCK_STATUS reply, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 64/99] tcg/i386: Fix dup_vec in non-AVX2 codepath, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 65/99] softfloat: Handle default NaN mode after pickNaNMulAdd, not before, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 66/99] tcg: Limit the number of ops in a TB, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 67/99] RISC-V: Minimal QEMU 2.12 fix for sifive_u machine,
Michael Roth <=
- [Qemu-devel] [PATCH 68/99] blockjob: expose error string via query, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 69/99] target/arm: Fix fp_status_f16 tininess before rounding, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 70/99] fpu/softfloat: Don't set Invalid for float-to-int(MAXINT), Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 06/99] tcg/arm: Fix memory barrier encoding, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 72/99] target/arm: Implement vector shifted FCVT for fp16, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 71/99] target/arm: Implement vector shifted SCVF/UCVF for fp16, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 73/99] target/arm: Fix float16 to/from int16, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 74/99] target/arm: Clear SVE high bits for FMOV, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 76/99] target/arm: Implement FMOV (general) for fp16, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 77/99] target/arm: Implement FCVT (scalar, integer) for fp16, Michael Roth, 2018/07/23