Skip to contentSkip to conversation

arch: arm: dts: socfpga: Update L4_SYS Security Control Register size

PATCH Superseded Boon Khai Ng 2 participants 6 messages Feb 25 – Jul 9 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arch: arm: dts: socfpga: Update L4_SYS Security Control Register size

From: Alif Zakuan Yuslaimi <[email protected]>

noc_fw_tcu_tcu_scr register has a base address of 0xFFD21400 and an end address of 0xFFD214FF for Agilex7/7M and Stratix10, which makes the size of the register a total of 256 bytes.

---
 arch/arm/dts/socfpga_soc64_u-boot.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/socfpga_soc64_u-boot.dtsi +1 -1
index ce5b37ef547..a6e0b615717 100644
@@ -132,7 +132,7 @@
 
 			/* TCU */
 			noc_fw_tcu_tcu_scr@ffd21400 {
-				reg = <0xffd21400 0x00000004>;
+				reg = <0xffd21400 0x00000100>;
 				intel,offset-settings =
 					<0x00000000 0x01010001 0x01010001>;
 				bootph-all;
Signature · 1 line
2.43.7
#1 lore raw

PATCH 2/2 arch: arm: dts: socfpga: Update system manager core registers masking bits

From: Alif Zakuan Yuslaimi <[email protected]>

Using wide masks may modify unintended bits, which could break the system.

Updating the mask values to only modify intended bits set by the value to fix this.

---
 arch/arm/dts/socfpga_soc64_u-boot.dtsi | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/dts/socfpga_soc64_u-boot.dtsi +7 -7
index a6e0b615717..1506ff15447 100644
@@ -143,19 +143,19 @@
 				reg = <0xffd12000 0x00000500>;
 				intel,offset-settings =
 					/* i_sys_mgr_core_emac0 */
-					<0x00000044 0x0a000000 0xffff0103>,
+					<0x00000044 0x0a000000 0x0a000000>,
 					/* i_sys_mgr_core_emac1 */
-					<0x00000048 0x0a000000 0xffff0103>,
+					<0x00000048 0x0a000000 0x0a000000>,
 					/* i_sys_mgr_core_emac2 */
-					<0x0000004c 0x0a000000 0xffff0103>,
+					<0x0000004c 0x0a000000 0x0a000000>,
 					/* i_sys_mgr_core_nand_l3master */
-					<0x00000034 0x00220000 0x007733ff>,
+					<0x00000034 0x00220000 0x00220000>,
 					/* i_sys_mgr_core_sdmmc_l3master */
-					<0x0000002c 0x00000020 0x03ff03ff>,
+					<0x0000002c 0x00000020 0x00000020>,
 					/* i_sys_mgr_core_usb0_l3master */
-					<0x00000038 0x00000200 0x03ff30ff>,
+					<0x00000038 0x00000200 0x00000200>,
 					/* i_sys_mgr_core_usb1_l3master */
-					<0x0000003c 0x00000200 0x03ff30ff>;
+					<0x0000003c 0x00000200 0x00000200>;
 				bootph-all;
 			};
 		};
Signature · 1 line
2.43.7
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH v1 2/2] arch: arm: dts: socfpga: Update system manager core registers masking bits

Quoted 47 lines

From: Ng, Boon Khai <[email protected]>
Sent: Wednesday, February 25, 2026 11:21 AM
To: U-boot Openlist <[email protected]>
Cc: Yuslaimi, Alif Zakuan <[email protected]>; Ng, Boon Khai <[email protected]>; Marek Vasut <[email protected]>; Simon Goldschmidt <[email protected]>; Chee, Tien Fong <[email protected]>; Tingting Meng <[email protected]>; Tom Rini <[email protected]>; Maniyam, Dinesh <[email protected]>; Lok, Chen Huei <[email protected]>; Hea, Kok Kiang <[email protected]>
Subject: [PATCH v1 2/2] arch: arm: dts: socfpga: Update system manager core registers masking bits
From: Alif Zakuan Yuslaimi <[email protected]> Using wide masks may modify unintended bits, which could break the system. Updating the mask values to only modify intended bits set by the value to fix this.

---
 arch/arm/dts/socfpga_soc64_u-boot.dtsi | 14 +++++++-------

 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/dts/socfpga_soc64_u-boot.dtsi +0 -0
index a6e0b615717..1506ff15447 100644
@@ -143,19 +143,19 @@
                                  reg = <0xffd12000 0x00000500>;

                                 intel,offset-settings =
                                         /* i_sys_mgr_core_emac0 */ -                                       <0x00000044 0x0a000000 0xffff0103>, +                                       <0x00000044 0x0a000000 0x0a000000>, /* i_sys_mgr_core_emac1 */ -                                       <0x00000048 0x0a000000 0xffff0103>, +                                       <0x00000048 0x0a000000 0x0a000000>, /* i_sys_mgr_core_emac2 */ -                                       <0x0000004c 0x0a000000 0xffff0103>, +                                       <0x0000004c 0x0a000000 0x0a000000>, /* i_sys_mgr_core_nand_l3master */ -                                       <0x00000034 0x00220000 0x007733ff>, +                                       <0x00000034 0x00220000 0x00220000>, /* i_sys_mgr_core_sdmmc_l3master */ -                                       <0x0000002c 0x00000020 0x03ff03ff>, +                                       <0x0000002c 0x00000020 0x00000020>, /* i_sys_mgr_core_usb0_l3master */ -                                       <0x00000038 0x00000200 0x03ff30ff>, +                                       <0x00000038 0x00000200 0x00000200>,

Quoted 8 lines

                                         /* i_sys_mgr_core_usb1_l3master */ -                                       <0x0000003c 0x00000200 0x03ff30ff>; +                                       <0x0000003c 0x00000200 0x00000200>; bootph-all;
                         };
                 };
--
2.43.7

Best regards,
Tien Fong

#3 lore raw
In reply to Boon Khai Ng

Hi Boon Khai,

Quoted 27 lines

From: Ng, Boon Khai <[email protected]>
Sent: Wednesday, February 25, 2026 11:21 AM
To: U-boot Openlist <[email protected]>
Cc: Yuslaimi, Alif Zakuan <[email protected]>; Ng, Boon Khai <[email protected]>; Marek Vasut <[email protected]>; Simon Goldschmidt <[email protected]>; Chee, Tien Fong <[email protected]>; Tingting Meng <[email protected]>; Tom Rini <[email protected]>; Maniyam, Dinesh <[email protected]>; Lok, Chen Huei <[email protected]>; Hea, Kok Kiang <[email protected]>
Subject: [PATCH v1 1/2] arch: arm: dts: socfpga: Update L4_SYS Security Control Register size
From: Alif Zakuan Yuslaimi <[email protected]> noc_fw_tcu_tcu_scr register has a base address of 0xFFD21400 and an end address of 0xFFD214FF for Agilex7/7M and Stratix10, which makes the size of the register a total of 256 bytes.

---
 arch/arm/dts/socfpga_soc64_u-boot.dtsi | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/socfpga_soc64_u-boot.dtsi +0 -0
index ce5b37ef547..a6e0b615717 100644

arch/arm/dts/socfpga_soc64_u-boot.dtsi line 134

Quoted 4 lines
arch/arm/dts/socfpga_soc64_u-boot.dtsi +1 -1
@@ -132,7 +132,7 @@
                          /* TCU */
                          noc_fw_tcu_tcu_scr@ffd21400 {
-                               reg = <0xffd21400 0x00000004>;
+                               reg = <0xffd21400 0x00000100>;

Instance decodes 0x100; reserved offsets are RAZ/WI” (or equivalent wording). If TRM does not guarantee benign behavior for reserved offsets, I’d NAK 0x100 and request to keep 0x4 until there’s a concrete need to program additional offsets. Please check if only 0xFFD21400 is valid and accessing other offsets may bus fault / return unpredictable / hit other logic?

Quoted 5 lines

                                 intel,offset-settings = <0x00000000 0x01010001 0x01010001>; bootph-all;
--
2.43.7

Best regards,
Tien Fong

#4 lore raw

Hi Tien Fong,

Quoted 6 lines

Instance decodes 0x100; reserved offsets are RAZ/WI” (or equivalent wording). If TRM does not guarantee benign behavior for reserved offsets, I’d NAK 0x100 and request to keep 0x4 until there’s a concrete need to program additional offsets.  Please check if only 0xFFD21400 is valid and accessing other offsets may bus fault / return unpredictable / hit other logic?

The 0x100 comes directly from the documentation here:
https://www.intel.com/content/www/us/en/programmable/hps/
stratix-10/index.html#miv1505407144600.html

0xFFD21400–0xFFD214FF (256 B) owned entirely by this one firewall instance (next block is at 0xFFD22000), so reg size 0x100 matches the hardware decode window.

On the safety concern: the intel,socfpga-dtreg driver never accesses reserved offsets. reg[1] is used only as a bounds check (blk_sz < offset + 4); the driver only reads/writes offsets listed in intel,offset-settings here just offset 0x0. So 0x4 vs 0x100 makes no behavioral difference for this node; nothing
in 0x004–0x0FF is ever touched.

Regards,
Boon Khai

#5 lore raw
In reply to Boon Khai Ng

Hi Boon Khai,

Quoted 17 lines · Boon Khai Ng

From: Alif Zakuan Yuslaimi <[email protected]>

noc_fw_tcu_tcu_scr register has a base address of 0xFFD21400 and an end address of 0xFFD214FF for Agilex7/7M and Stratix10, which makes the size of the register a total of 256 bytes.

---
  arch/arm/dts/socfpga_soc64_u-boot.dtsi | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/socfpga_soc64_u-boot.dtsi +0 -0
index ce5b37ef547..a6e0b615717 100644

arch/arm/dts/socfpga_soc64_u-boot.dtsi line 138

Quoted 8 lines
arch/arm/dts/socfpga_soc64_u-boot.dtsi +1 -1
@@ -132,7 +132,7 @@
 
  			/* TCU */
  			noc_fw_tcu_tcu_scr@ffd21400 {
-				reg = <0xffd21400 0x00000004>;
+				reg = <0xffd21400 0x00000100>;
  				intel,offset-settings =
  					<0x00000000 0x01010001 0x01010001>;
  				bootph-all;

The patch updates noc_fw_tcu_tcu_scr@ffd21400 under socfpga_smmu_secure_config (line 134) but leaves the duplicate under socfpga_l3interconnect_firewall (line 111) at reg = <0xffd21400 0x00000004>.

Both nodes program the same physical register at offset 0 today, so runtime is unchanged. DT is inconsistent; a future offset-settings entry in the l3 block would hit the driver's blk_sz overflow check.

Fix: In patch 1/2, also set line 112 to <0xffd21400 0x00000100>

Best regards,
Tien Fong