Skip to contentSkip to conversation

hw/arm: bugfixes for Arm SSE-300 and AN547 models

PATCH In review Simon Xu 2 participants 10 messages Aug 5 – Aug 11 Arm/versatile express platform

lore
Share & tools
lore

Simon Xu

author
#0 lore raw

cover hw/arm: bugfixes for Arm SSE-300 and AN547 models

This patch series fixes bugs found in another patch series and more:
SSE-300 SLOWCLK Secure Watchdog address was in non-secure region SSE-300 PPU addresses were copied from SSE-200 and not correct AN547 MPC ports were not correct
AN547 was missing the DMA ports on AHB PPC EXP1

https://patchew.org/QEMU/[email protected]/

Simon Xu (4):
hw/arm/armsse.c: fix SSE-300 s32kwatchdog address hw/arm/armsse.c: fix SSE-300 PPU addresses hw/arm/mps2-tz.c: fix AN547 APB PPC EXP0 MPC ports hw/arm/mps2-tz.c: add AN547 AHB PPC EXP1 DMA ports

 hw/arm/armsse.c  |  8 ++++----
 hw/arm/mps2-tz.c | 21 +++++++++++++++++++++
 2 files changed, 25 insertions(+), 4 deletions(-)
Signature · 1 line
2.53.0
author
#1 lore raw

PATCH 1/4 hw/arm/armsse.c: fix SSE-300 s32kwatchdog address

The SSE-300 SLOWCLK Secure Watchdog Timer is only defined at address 0x5802e000 in the secure region.
Page 45 of the SSE-300 TRM specifies that "the watchdog is Secure access only".

SSE-300 TRM: https://support.arm.com/documentation/101773/latest/

Fixes 8901bb414a24 ("hw/arm/armsse: Add SSE-300 support")
---
 hw/arm/armsse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/armsse.c +1 -1
index ddb210c895..e99b491bd9 100644
@@ -409,7 +409,7 @@ static const ARMSSEDeviceInfo sse300_devices[] = {
         .name = "s32kwatchdog",
         .type = TYPE_CMSDK_APB_WATCHDOG,
         .index = 0,
-        .addr = 0x4802e000,
+        .addr = 0x5802e000,
         .ppc = NO_PPC,
         .irq = NMI_0,
         .slowclk = true,
Signature · 1 line
2.53.0
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] hw/arm/armsse.c: fix SSE-300 s32kwatchdog address

Quoted 6 lines · Simon Xu

The SSE-300 SLOWCLK Secure Watchdog Timer is only defined at address 0x5802e000 in the secure region.
Page 45 of the SSE-300 TRM specifies that "the watchdog is Secure access only".

Quoted 8 lines

SSE-300 TRM: https://support.arm.com/documentation/101773/latest/

Fixes 8901bb414a24 ("hw/arm/armsse: Add SSE-300 support")
---
 hw/arm/armsse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

thanks
-- PMM

author
#3 lore raw

PATCH 2/4 hw/arm/armsse.c: fix SSE-300 PPU addresses

In reply to Simon Xu

The SSE-300 CPU0_PPU, MGMT_PPU, DEBUG_PPU had the wrong addresses that were the same as the SSE-200 addresses.
Page 146 of the SSE-300 TRM defines the addresses of the PPUs.

SSE-300 TRM: https://support.arm.com/documentation/101773/latest/

Fixes 8901bb414a24 ("hw/arm/armsse: Add SSE-300 support")
---
 hw/arm/armsse.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/arm/armsse.c +3 -3
index e99b491bd9..55fbc2c290 100644
@@ -452,7 +452,7 @@ static const ARMSSEDeviceInfo sse300_devices[] = {
         .name = "CPU0CORE_PPU",
         .type = TYPE_UNIMPLEMENTED_DEVICE,
         .index = 2,
-        .addr = 0x50023000,
+        .addr = 0x58023000,
         .size = 0x1000,
         .ppc = NO_PPC,
         .irq = NO_IRQ,
@@ -461,7 +461,7 @@ static const ARMSSEDeviceInfo sse300_devices[] = {
         .name = "MGMT_PPU",
         .type = TYPE_UNIMPLEMENTED_DEVICE,
         .index = 3,
-        .addr = 0x50028000,
+        .addr = 0x58028000,
         .size = 0x1000,
         .ppc = NO_PPC,
         .irq = NO_IRQ,
@@ -470,7 +470,7 @@ static const ARMSSEDeviceInfo sse300_devices[] = {
         .name = "DEBUG_PPU",
         .type = TYPE_UNIMPLEMENTED_DEVICE,
         .index = 4,
-        .addr = 0x50029000,
+        .addr = 0x58029000,
         .size = 0x1000,
         .ppc = NO_PPC,
         .irq = NO_IRQ,
Signature · 1 line
2.53.0
Reviewed-by on v1 2/4
#4 lore raw

Re: [PATCH 2/4] hw/arm/armsse.c: fix SSE-300 PPU addresses

Quoted 9 lines · Simon Xu

The SSE-300 CPU0_PPU, MGMT_PPU, DEBUG_PPU had the wrong addresses that were the same as the SSE-200 addresses.
Page 146 of the SSE-300 TRM defines the addresses of the PPUs.

SSE-300 TRM: https://support.arm.com/documentation/101773/latest/

Fixes 8901bb414a24 ("hw/arm/armsse: Add SSE-300 support")

I got the SYS_PPU address right, at least :-)

thanks
-- PMM

author
#5 lore raw

PATCH 3/4 hw/arm/mps2-tz.c: fix AN547 APB PPC EXP0 MPC ports

In reply to Simon Xu

The AN547 TRM defines them to be on ports [15:13], not [2:0].

AN547 TRM: https://developer.arm.com/documentation/dai0547/latest/

Fixes eb09d533d87f ("hw/arm/mps2-tz: Add new mps3-an547 board")
---
 hw/arm/mps2-tz.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
hw/arm/mps2-tz.c +13 -0
index f101c1b7c3..81e64a91de 100644
@@ -1048,6 +1048,19 @@ static void mps2tz_common_init(MachineState *machine)
     const PPCInfo an547_ppcs[] = { {
             .name = "apb_ppcexp0",
             .ports = {
+                { /* port 0 USER MEM APB0 */ },
+                { /* port 1 USER MEM APB0 */ },
+                { /* port 2 reserved */ },
+                { /* port 3 reserved */ },
+                { /* port 4 NPU APB0 */ },
+                { /* port 5 NPU APB1 */ },
+                { /* port 6 reserved */ },
+                { /* port 7 reserved */ },
+                { /* port 8 reserved */ },
+                { /* port 9 reserved */ },
+                { /* port 10 reserved */ },
+                { /* port 11 reserved */ },
+                { /* port 12 reserved */ },
                 { "ssram-mpc", make_mpc, &mms->mpc[0], 0x57000000, 0x1000 },
                 { "qspi-mpc", make_mpc, &mms->mpc[1], 0x57001000, 0x1000 },
                 { "ddr-mpc", make_mpc, &mms->mpc[2], 0x57002000, 0x1000 },
Signature · 1 line
2.53.0
Reviewed-by on v1 3/4
#6 lore raw

Re: [PATCH 3/4] hw/arm/mps2-tz.c: fix AN547 APB PPC EXP0 MPC ports

Quoted 9 lines · Simon Xu

The AN547 TRM defines them to be on ports [15:13], not [2:0].

AN547 TRM: https://developer.arm.com/documentation/dai0547/latest/

Fixes eb09d533d87f ("hw/arm/mps2-tz: Add new mps3-an547 board")

---

thanks
-- PMM

author
#7 lore raw

PATCH 4/4 hw/arm/mps2-tz.c: add AN547 AHB PPC EXP1 DMA ports

In reply to Simon Xu

Page 42 of the AN547 TRM defines the AHB PPC EXP1 ports with DMA 1-3

AN547 TRM: https://developer.arm.com/documentation/dai0547/latest/

---
 hw/arm/mps2-tz.c | 8 ++++++++
 1 file changed, 8 insertions(+)
hw/arm/mps2-tz.c +8 -0
index 81e64a91de..d6d178642b 100644
@@ -1113,6 +1113,14 @@ static void mps2tz_common_init(MachineState *machine)
                 { /* port 7 USER AHB interface 3 */ },
                 { "eth-usb", make_eth_usb, NULL, 0x41400000, 0x200000, { 49 } },
             },
+        }, {
+            .name = "ahb_ppcexp1",
+            .ports = {
+                { /* port 0 reserved */ },
+                { "dma1", make_dma, &mms->dma[1], 0x41201000, 0x1000, { 62, 60, 61 } },
+                { "dma2", make_dma, &mms->dma[2], 0x41202000, 0x1000, { 65, 63, 64 } },
+                { "dma3", make_dma, &mms->dma[3], 0x41203000, 0x1000, { 68, 66, 67 } },
+            },
         },
     };
 
Signature · 1 line
2.53.0
Reviewed-by on v1 4/4
#8 lore raw

Re: [PATCH 4/4] hw/arm/mps2-tz.c: add AN547 AHB PPC EXP1 DMA ports

Quoted 19 lines · Simon Xu

Page 42 of the AN547 TRM defines the AHB PPC EXP1 ports with DMA 1-3

AN547 TRM: https://developer.arm.com/documentation/dai0547/latest/

---
 hw/arm/mps2-tz.c | 8 ++++++++
 1 file changed, 8 insertions(+)
hw/arm/mps2-tz.c +0 -0
index 81e64a91de..d6d178642b 100644
@@ -1113,6 +1113,14 @@ static void mps2tz_common_init(MachineState *machine)
                 { /* port 7 USER AHB interface 3 */ },
                 { "eth-usb", make_eth_usb, NULL, 0x41400000, 0x200000, { 49 } },
             },

hw/arm/mps2-tz.c static void mps2tz_common_init(MachineState *machine) · line 1125

Quoted 10 lines
hw/arm/mps2-tz.c +8 -0
+        }, {
+            .name = "ahb_ppcexp1",
+            .ports = {
+                { /* port 0 reserved */ },
+                { "dma1", make_dma, &mms->dma[1], 0x41201000, 0x1000, { 62, 60, 61 } },
+                { "dma2", make_dma, &mms->dma[2], 0x41202000, 0x1000, { 65, 63, 64 } },
+                { "dma3", make_dma, &mms->dma[3], 0x41203000, 0x1000, { 68, 66, 67 } },
+            },
         },
     };

thanks
-- PMM

#9 lore raw
In reply to Simon Xu
Quoted 10 lines · Simon Xu

This patch series fixes bugs found in another patch series and more:
SSE-300 SLOWCLK Secure Watchdog address was in non-secure region SSE-300 PPU addresses were copied from SSE-200 and not correct AN547 MPC ports were not correct
AN547 was missing the DMA ports on AHB PPC EXP1

https://patchew.org/QEMU/[email protected]/

Thanks for putting these fixes together -- I've applied them to target-arm.next, ready for when the tree reopens after the 11.1 release.

-- PMM