1
From: Alistair Francis <alistair.francis@wdc.com>
1
The following changes since commit d1181d29370a4318a9f11ea92065bea6bb159f83:
2
2
3
The following changes since commit c5fbdd60cf1fb52f01bdfe342b6fa65d5343e1b1:
3
Merge tag 'pull-nbd-2023-07-19' of https://repo.or.cz/qemu/ericb into staging (2023-07-20 09:54:07 +0100)
4
5
Merge tag 'qemu-sparc-20211121' of git://github.com/mcayland/qemu into staging (2021-11-21 14:12:25 +0100)
6
4
7
are available in the Git repository at:
5
are available in the Git repository at:
8
6
9
git@github.com:alistair23/qemu.git tags/pull-riscv-to-apply-20211122
7
https://github.com/alistair23/qemu.git tags/pull-riscv-to-apply-20230723-3
10
8
11
for you to fetch changes up to 526e7443027c71fe7b04c29df529e1f9f425f9e3:
9
for you to fetch changes up to dcaaf2bf9bfd2c664dbeff0069fcab3d75c924d3:
12
10
13
hw/misc/sifive_u_otp: Do not reset OTP content on hardware reset (2021-11-22 10:46:22 +1000)
11
roms/opensbi: Upgrade from v1.3 to v1.3.1 (2023-07-23 19:32:02 +1000)
14
12
15
----------------------------------------------------------------
13
----------------------------------------------------------------
16
Seventh RISC-V PR for QEMU 6.2
14
Fifth RISC-V PR for 8.1
17
15
18
- Deprecate IF_NONE for SiFive OTP
16
* roms/opensbi: Upgrade from v1.3 to v1.3.1
19
- Don't reset SiFive OTP content
20
17
21
----------------------------------------------------------------
18
----------------------------------------------------------------
22
Philippe Mathieu-Daudé (1):
19
Bin Meng (1):
23
hw/misc/sifive_u_otp: Do not reset OTP content on hardware reset
20
roms/opensbi: Upgrade from v1.3 to v1.3.1
24
21
25
Thomas Huth (1):
22
pc-bios/opensbi-riscv32-generic-fw_dynamic.bin | Bin 135344 -> 135376 bytes
26
hw/misc/sifive_u_otp: Use IF_PFLASH for the OTP device instead of IF_NONE
23
pc-bios/opensbi-riscv64-generic-fw_dynamic.bin | Bin 138304 -> 138368 bytes
27
24
roms/opensbi | 2 +-
28
docs/about/deprecated.rst | 6 ++++++
25
3 files changed, 1 insertion(+), 1 deletion(-)
29
hw/misc/sifive_u_otp.c | 22 +++++++++++++---------
30
2 files changed, 19 insertions(+), 9 deletions(-)
31
diff view generated by jsdifflib
Deleted patch
1
From: Thomas Huth <thuth@redhat.com>
2
1
3
Configuring a drive with "if=none" is meant for creation of a backend
4
only, it should not get automatically assigned to a device frontend.
5
Use "if=pflash" for the One-Time-Programmable device instead (like
6
it is e.g. also done for the efuse device in hw/arm/xlnx-zcu102.c).
7
8
Since the old way of configuring the device has already been published
9
with the previous QEMU versions, we cannot remove this immediately, but
10
have to deprecate it and support it for at least two more releases.
11
12
Signed-off-by: Thomas Huth <thuth@redhat.com>
13
Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
14
Reviewed-by: Markus Armbruster <armbru@redhat.com>
15
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
16
Message-id: 20211119102549.217755-1-thuth@redhat.com
17
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
18
---
19
docs/about/deprecated.rst | 6 ++++++
20
hw/misc/sifive_u_otp.c | 9 ++++++++-
21
2 files changed, 14 insertions(+), 1 deletion(-)
22
23
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
24
index XXXXXXX..XXXXXXX 100644
25
--- a/docs/about/deprecated.rst
26
+++ b/docs/about/deprecated.rst
27
@@ -XXX,XX +XXX,XX @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
28
However, short-form booleans are deprecated and full explicit ``arg_name=on``
29
form is preferred.
30
31
+``-drive if=none`` for the sifive_u OTP device (since 6.2)
32
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
33
+
34
+Using ``-drive if=none`` to configure the OTP device of the sifive_u
35
+RISC-V machine is deprecated. Use ``-drive if=pflash`` instead.
36
+
37
38
QEMU Machine Protocol (QMP) commands
39
------------------------------------
40
diff --git a/hw/misc/sifive_u_otp.c b/hw/misc/sifive_u_otp.c
41
index XXXXXXX..XXXXXXX 100644
42
--- a/hw/misc/sifive_u_otp.c
43
+++ b/hw/misc/sifive_u_otp.c
44
@@ -XXX,XX +XXX,XX @@ static void sifive_u_otp_realize(DeviceState *dev, Error **errp)
45
TYPE_SIFIVE_U_OTP, SIFIVE_U_OTP_REG_SIZE);
46
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mmio);
47
48
- dinfo = drive_get_next(IF_NONE);
49
+ dinfo = drive_get_next(IF_PFLASH);
50
+ if (!dinfo) {
51
+ dinfo = drive_get_next(IF_NONE);
52
+ if (dinfo) {
53
+ warn_report("using \"-drive if=none\" for the OTP is deprecated, "
54
+ "use \"-drive if=pflash\" instead.");
55
+ }
56
+ }
57
if (dinfo) {
58
int ret;
59
uint64_t perm;
60
--
61
2.31.1
62
63
diff view generated by jsdifflib
1
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
1
From: Bin Meng <bmeng@tinylab.org>
2
2
3
Once a "One Time Programmable" is programmed, it shouldn't be reset.
3
Upgrade OpenSBI from v1.3 to v1.3.1 and the pre-built bios images
4
which fixes the boot failure seen when using QEMU to do a direct
5
kernel boot with Microchip Icicle Kit board machine.
4
6
5
Do not re-initialize the OTP content in the DeviceReset handler,
7
The v1.3.1 release includes the following commits:
6
initialize it once in the DeviceRealize one.
7
8
8
Fixes: 9fb45c62ae8 ("riscv: sifive: Implement a model for SiFive FU540 OTP")
9
0907de3 lib: sbi: fix comment indent
9
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
10
eb736a5 lib: sbi_pmu: Avoid out of bounds access
11
7828eeb gpio/desginware: add Synopsys DesignWare APB GPIO support
12
c6a3573 lib: utils: Fix sbi_hartid_to_scratch() usage in ACLINT drivers
13
057eb10 lib: utils/gpio: Fix RV32 compile error for designware GPIO driver
14
15
Signed-off-by: Bin Meng <bmeng@tinylab.org>
16
Message-Id: <20230719165817.889465-1-bmeng@tinylab.org>
10
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
17
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
11
Message-Id: <20211119104757.331579-1-f4bug@amsat.org>
18
Tested-by: Conor Dooley <conor.dooley@microchip.com>
12
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
19
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
13
---
20
---
14
hw/misc/sifive_u_otp.c | 13 +++++--------
21
.../opensbi-riscv32-generic-fw_dynamic.bin | Bin 135344 -> 135376 bytes
15
1 file changed, 5 insertions(+), 8 deletions(-)
22
.../opensbi-riscv64-generic-fw_dynamic.bin | Bin 138304 -> 138368 bytes
23
roms/opensbi | 2 +-
24
3 files changed, 1 insertion(+), 1 deletion(-)
16
25
17
diff --git a/hw/misc/sifive_u_otp.c b/hw/misc/sifive_u_otp.c
26
diff --git a/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin b/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin
18
index XXXXXXX..XXXXXXX 100644
27
index XXXXXXX..XXXXXXX 100644
19
--- a/hw/misc/sifive_u_otp.c
28
Binary files a/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin and b/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin differ
20
+++ b/hw/misc/sifive_u_otp.c
29
diff --git a/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin b/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin
21
@@ -XXX,XX +XXX,XX @@ static void sifive_u_otp_realize(DeviceState *dev, Error **errp)
30
index XXXXXXX..XXXXXXX 100644
22
31
Binary files a/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin and b/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin differ
23
if (blk_pread(s->blk, 0, s->fuse, filesize) != filesize) {
32
diff --git a/roms/opensbi b/roms/opensbi
24
error_setg(errp, "failed to read the initial flash content");
33
index XXXXXXX..XXXXXXX 160000
25
+ return;
34
--- a/roms/opensbi
26
}
35
+++ b/roms/opensbi
27
}
36
@@ -1 +1 @@
28
}
37
-Subproject commit 2552799a1df30a3dcd2321a8b75d61d06f5fb9fc
29
-}
38
+Subproject commit 057eb10b6d523540012e6947d5c9f63e95244e94
30
-
31
-static void sifive_u_otp_reset(DeviceState *dev)
32
-{
33
- SiFiveUOTPState *s = SIFIVE_U_OTP(dev);
34
35
/* Initialize all fuses' initial value to 0xFFs */
36
memset(s->fuse, 0xff, sizeof(s->fuse));
37
@@ -XXX,XX +XXX,XX @@ static void sifive_u_otp_reset(DeviceState *dev)
38
serial_data = s->serial;
39
if (blk_pwrite(s->blk, index * SIFIVE_U_OTP_FUSE_WORD,
40
&serial_data, SIFIVE_U_OTP_FUSE_WORD, 0) < 0) {
41
- error_report("write error index<%d>", index);
42
+ error_setg(errp, "failed to write index<%d>", index);
43
+ return;
44
}
45
46
serial_data = ~(s->serial);
47
if (blk_pwrite(s->blk, (index + 1) * SIFIVE_U_OTP_FUSE_WORD,
48
&serial_data, SIFIVE_U_OTP_FUSE_WORD, 0) < 0) {
49
- error_report("write error index<%d>", index + 1);
50
+ error_setg(errp, "failed to write index<%d>", index + 1);
51
+ return;
52
}
53
}
54
55
@@ -XXX,XX +XXX,XX @@ static void sifive_u_otp_class_init(ObjectClass *klass, void *data)
56
57
device_class_set_props(dc, sifive_u_otp_properties);
58
dc->realize = sifive_u_otp_realize;
59
- dc->reset = sifive_u_otp_reset;
60
}
61
62
static const TypeInfo sifive_u_otp_info = {
63
--
39
--
64
2.31.1
40
2.40.1
65
66
diff view generated by jsdifflib