Commit graph

321 commits

Author SHA1 Message Date
Sieu Mun Tang
f4aaa9fd6e fix(intel): update DDR range checking for Agilex5
Update DDR range checking for Agilex when total max size of
DRAM_BASE and DRAM_SIZE overflow unsigned 64bit.

Change-Id: Iaecfa5daae48da0af46cc1831d10c0e6a79613c2
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-15 11:15:10 +08:00
Jit Loon Lim
e8a3454cb7 fix(intel): update fcs functions to check ddr range
The src addr and dest addr of fcs functions are not checked against
their valid ddr range. Thus adding the ddr range checking to avoid
overlap/overwritten ddr address.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I9b4d4155dd16d9d5d36e0c91e4a2600c17867daf
2023-12-15 01:48:04 +08:00
Jit Loon Lim
b0f447897d fix(intel): update fcs crypto init code to check for mode
The shall code only limit ECB, CBC and CTR mode to flow through the init
function. Anything other than that, the code shall reject to prevent
security vulnerability.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I702ce90e229188830f8936bee2999610e9559b8b
2023-12-15 01:44:29 +08:00
Sandrine Bailleux
02091541d7 Merge "fix(intel): update HPS bridges for Agilex5 SoC FPGA" into integration 2023-12-06 11:36:05 +01:00
Manish Pandey
86a2b7c058 Merge "fix(intel): read QSPI bank buffer data in bytes" into integration 2023-11-28 22:46:29 +01:00
Manish Pandey
ccd35d8d2d Merge "fix(intel): temporarily workaround for Zephyr SMP" into integration 2023-11-28 22:46:04 +01:00
Manish Pandey
091f42a674 Merge "feat(intel): restructure watchdog" into integration 2023-11-28 22:45:38 +01:00
Manish Pandey
3a1dd15287 Merge "fix(intel): update individual return result for hps and fpga bridges" into integration 2023-11-27 16:39:04 +01:00
Manish Pandey
f4bb899810 Merge "feat(intel): increase bl2 size limit" into integration 2023-11-27 16:38:45 +01:00
Manish Pandey
0e5703f101 Merge "fix(intel): update stream id to non-secure for SDM" into integration 2023-11-27 16:38:24 +01:00
Manish Pandey
849c7c154d Merge "fix(intel): revert sys counter to 400MHz" into integration 2023-11-27 16:37:55 +01:00
Girisha Dengi
2f17ac01ad fix(intel): read QSPI bank buffer data in bytes
Read QSPI bank buffer data in bytes to avoid
inter-bank read failures.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Change-Id: If768d7cdd362694df3f3c86c959afad01a523f21
2023-11-10 00:18:54 +08:00
Jit Loon Lim
cfbac59590 fix(intel): bl31 overwrite OCRAM configuration
U-boot is allowed to configure OCRAM access. However
ATF BL31 will overwrite it. Thus removing this function
to allow for proper configuration.

Change-Id: I45173ef8f472c3620486de0cbf6452ba5f78be01
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-11-03 23:45:15 +08:00
Jit Loon Lim
82752c4123 fix(intel): update individual return result for hps and fpga bridges
The code is designed to execute SOC2FPGA and LWSOC2FPGA first
then to F2SOC and both sharing the same result "return".
Thus when F2SOC is executed, the "return" result will overwrite
SOC2FPGA "return" result even though it is not enabled.
Using 2 different "return" result to for each bridges and
return both of them at the end of the function to
avoid being overwritten.

Change-Id: Id9de3f416fe3020db35bc946135b175be2a7dc1e
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-11-03 23:42:18 +08:00
Jit Loon Lim
2d46b2e461 feat(intel): increase bl2 size limit
There are several features included in BL2 causing the size getting
bigger for RELEASE mode. When build with DEBUG mode, the size will
be bigger thus causing BL2 image has exceeded its limits.

Change-Id: I7542f5ea001542450695d48e8126bcca8728d76a
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-11-03 23:39:48 +08:00
Sieu Mun Tang
8fbd3073ca fix(intel): update stream id to non-secure for SDM
Update stream id to non-secure for SDM which is to
bring up FPGA config via SMMU.

Change-Id: Ib8836fa0cf31fe0cfc0261123e051772923bb66b
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-11-03 22:46:19 +08:00
Jit Loon Lim
460692afb5 fix(intel): revert sys counter to 400MHz
For Simics and official release, revert back to 400MHz instead of
80MHz. Sys counter shall get from a static clock.

Change-Id: I9ee3586bc411af8d7381c8bd6404b8449b0c3f69
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-11-03 21:50:54 +08:00
Sieu Mun Tang
2973054d9b fix(intel): update HPS bridges for Agilex5 SoC FPGA
This patch is used to update reset manager support
for Agilex5 Soc FPGA.
	1. Update HPS bridges support for socfpga_bridges_disable
		a. SOC2FPGA
		b. LWSOC2FPGA
		c. F2SDRAM
		d. F2SOC

Change-Id: Ia539ff289e83303ae3b4d78b9ac1d50c9f9558da
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-11-03 21:18:51 +08:00
Sieu Mun Tang
68820f6421 fix(intel): temporarily workaround for Zephyr SMP
Temporarily workaround for Zephyr SMP testing.

Change-Id: I9d2d209e9f384d079f0311b3a8b0b760e0566877
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-11-03 21:16:24 +08:00
Jit Loon Lim
655af4f492 fix(intel): update boot scratch cold register to use cold 8
Boot scratch cold 8 register is fully used by n5x.
Update to use boot scratch cold 8 bit 19 register for cpu0 ON/OFF
indicator.

Change-Id: I45ebfdcc17c47bcce69f5f611e677ac7838ecf52
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-11-03 20:03:45 +08:00
Sieu Mun Tang
47ca43bcb4 feat(intel): restructure watchdog
This patch is to restructure watchdog.
Move platform dependent MACROs to individual platform socfpga_plat_def.
Common watchdog code file and header file will remain for those common
declaration.

Change-Id: Ibb640f08ac313bbad6d9295596cb8ff26e3e626d
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-11-03 19:36:01 +08:00
Michal Simek
13ff6e9dde chore: remove MULTI_CONSOLE_API references
MULTI_CONSOLE_API have been removed long time ago by commit 5b6ebeec9c
("Remove MULTI_CONSOLE_API flag and references to it") that's why remove
references in platform.mk files and also in one rst which is not valid
anymore.

Change-Id: I45f8e7db0a14ce63de62509100d8159b7aca2657
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-09-12 15:28:36 +02:00
Sieu Mun Tang
1af7bf71c0 fix(intel): resolved coverity checking
Coverity checking fix. Resolved unused value, deadcode and uninit.

	1. CID: 395326
	2. CID: 395327
	3. CID: 395328
	4. CID: 395329
	5. CID: 395330

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I86b8af28dc345542b142ce53e1935bb855888238
2023-07-11 00:06:19 +08:00
Jit Loon Lim
7931d3322d feat(intel): platform enablement for Agilex5 SoC FPGA
This patch is used to enable platform enablement for
Agilex5 SoC FPGA.

New feature:
	1. Added ATF->Zephyr boot option
	2. Added xlat_v2 for MMU
	3. Added ATF->Linux boot option
	4. Added SMP support
	5. Added HPS bridges support
	6. Added EMULATOR support
	7. Added DDR support
	8. Added GICv3 Redistirbution init
	9. Added SDMMC/NAND/Combo Phy support
	10. Updated GIC as secure access
	11. Added CCU driver support
	12. Updated product name -> Agilex5
	13. Updated register address based on y22ww52.2 RTL
	14. Updated system counter freq to 400MHz

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Ice82f3e4535527cfd01500d4d528402985f72009
2023-07-05 10:11:22 +08:00
Jit Loon Lim
02df499000 feat(intel): ccu driver for Agilex5 SoC FPGA
This patch is used to implement CCU driver for
Agilex5 SoC FPGA.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Ic5e38499c969486682761c00d9e050e60c883725
2023-07-05 10:11:20 +08:00
Jit Loon Lim
4754925057 feat(intel): vab support for Agilex5 SoC FPGA
This patch is used to implement VAB to support for
Agilex5 SoC FPGA.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I421f11225cd549f35f06e87b8ad2c44b716b2a78
2023-07-05 10:11:18 +08:00
Jit Loon Lim
ddaf02d171 feat(intel): sdmmc/nand/combo-phy/qspi driver for Agilex5 SoC FPGA
This patch is used to implement sdmmc/nand/combo-phy
driver to support Cadence IP for Agilex5 SoC FPGA.
	1. Added SDMMC/NAND/COMBO-PHY support.
	2. Updated product name -> Agilex5
	3. Updated QSPI base address

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I6db689d2b784c9f59a25701ab34517f6f6b0a0e6
2023-07-05 10:11:11 +08:00
Jit Loon Lim
29461e4c88 feat(intel): ddr driver for Agilex5 SoC FPGA
This patch is used to implement ddr driver to
support IO96b for Agilex5 SoC FPGA.
	1. Added DDR support.
	2. Updated product name -> Agilex5

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Ibda053de6dbec4a0f12f011d8feeb6c5890fc7a4
2023-07-05 09:08:50 +08:00
Jit Loon Lim
a8bf898f02 feat(intel): power manager for Agilex5 SoC FPGA
This patch is used to implement power manager data
support for Agilex5 SoC FPGA.
	1. Added power manager support.
	2. Updated product name -> Agilex5

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: If0630c5088a1bc63dff64b1aab225fc70effa6e3
2023-07-05 09:08:47 +08:00
Jit Loon Lim
79626f460f feat(intel): cold/warm reset and smp support for Agilex5 SoC FPGA
This patch is used to implement
	1. Cold/Warm reset and SMP support for
	Agilex5 SoC FPGA
	2. Updated product name -> Agilex5

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I2c0645bcbf3a5907a4c79f35cffe674920b48f9d
2023-07-05 09:08:34 +08:00
Jit Loon Lim
9b8d813cc9 feat(intel): reset manager support for Agilex5 SoC FPGA
This patch is used to enable reset manager support
for Agilex5 SoC FPGA.
	1. Added HPS bridges support
		a. SOC2FPGA
		b. LWSOC2FPGA
		c. F2SDRAM
		d. F2SOC
	2. Added EMULATOR support
	3. Added WDT support
	4. Updated product name -> Agilex5
	5. Added SMP support

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Icab15b25f787fdccce1de75d102604db23beaf11
2023-07-05 09:08:31 +08:00
Jit Loon Lim
8e59b9f423 feat(intel): mailbox and SMC support for Agilex5 SoC FPGA
This patch is used to enable mailbox and SMC support
for Agilex5 SoC FPGA.
	1. Enabled mailbox and SMC support.
	2. Updated product name -> Agilex5
	3. Updated register address based on y22ww52.2 RTL
	4. Updated TSN register base address

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I152bee5668b96ef599ded09945167f27a71f23fe
2023-07-05 09:08:29 +08:00
Jit Loon Lim
7618403110 feat(intel): system manager support for Agilex5 SoC FPGA
This patch is used to implement system manager data
support for Agilex5 SoC FPGA.

	1. Initial SM bring up
	2. Support Candence SDMMC/NAND/COMBO PHY
	3. Updated product name -> Agilex5
	4. Updated register address based on y22ww52.2 RTL

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I12712bddfb67e36a2bf56d2d98ea4ca3037f0a82
2023-07-05 09:08:27 +08:00
Jit Loon Lim
18adb4efa4 feat(intel): memory controller support for Agilex5 SoC FPGA
This patch is used to enable memory controller support
for Agilex5 SoC FPGA.
	1. Added memory controller support.
	2. Updated product name -> Agilex5

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I8381b82eeed939b970a7410a6181a514f2c90caa
2023-07-05 09:08:24 +08:00
Jit Loon Lim
1b1a3eb1ed feat(intel): clock manager support for Agilex5 SoC FPGA
This patch is used to enable clock manager support
for Agilex5 SoC FPGA.
	1. Added clock manager support.
	2. Updated product name -> Agilex5
	3. Updated register address based on y22ww52.2 RTL
	4. Standardized handoff handler.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Ic4c57a1955136ef7d22253c3ca52226e5620751b
2023-07-05 09:08:21 +08:00
Jit Loon Lim
4a577da661 feat(intel): mmc support for Agilex5 SoC FPGA
This patch is used to enable MMC support for
Agilex5 SoC FPGA.
	1. Added MMC support.
	2. Updated product name -> Agilex5
	3. Updated register address based on y22ww52.2 RTL

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I47f5c7f063fc443f29c2af612121abe672ed422b
2023-07-05 09:08:18 +08:00
Jit Loon Lim
34971f816a feat(intel): uart support for Agilex5 SoC FPGA
This patch is used to enable UART & WDT support
for Agilex5 SoC FPGA.

	1. Added watchdog support.
	2. Updated product name -> Agilex5

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I9346cfde6e033026e4c1e612250e9521bc6b0d47
2023-07-05 09:08:16 +08:00
Jit Loon Lim
fcbb5cf7ea feat(intel): pinmux, peripheral and Handoff support for Agilex5 SoC FPGA
This patch is used to enable pinmux, peripheral and handoff support
for Agilex5 SoC FPGA.
	1. Initial handoff bring up
	2. Added power manager handoff implementation
	3. Added sdram handoff implementation
	4. Updated product name -> Agilex5
	5. Updated register address based on y22ww52.2 RTL

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I4b0176bc86c57823127bf41086306015d702577d
2023-07-05 09:08:13 +08:00
Jit Loon Lim
106aa54d92 fix(intel): fix ncore ccu snoop dvm enable bug
Incorrect value stored in Coherent Subsystem ACE DVM Snoop Enable
register (CSADSER0). Set individual bit othervise previous value
is overwritten.

Signed-off-by: Anders Hedlund <anders.hedlund@windriver.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Ib72fed261cbc3076ce385e19c4a5fa8e9e8b9924
2023-07-04 15:52:47 +02:00
Mahesh Rao
e3c3a48c85 feat(intel): add intel_rsu_update() to sip_svc_v2
Add smc function id for intel_rsu_update() in sip_svc_v2. For temporarily
saving the RSU application image address before a cold reset is
issued.

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I43bc7bd5aa5fa9238bceba1d826bf0a34ff87adb
2023-06-13 15:44:26 +08:00
Sandrine Bailleux
2abbb457fa Merge "fix(intel): update checking for memcpy and memset" into integration 2023-05-24 08:31:09 +02:00
Sandrine Bailleux
816c27fbba Merge changes I38545567,I2f52d3ea into integration
* changes:
  feat(intel): restructure sys mgr for S10/N5X
  feat(intel): restructure sys mgr for Agilex
2023-05-23 17:43:00 +02:00
Jit Loon Lim
b653f3caf0 feat(intel): restructure sys mgr for S10/N5X
This patch is to restructure system manager. Move platform dependent
MACROs to individual platform system manager. Common system manager will
remain for those common declaration only.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I385455671413e154d04a879d33fdd774fcfefbd6
2023-05-23 21:14:07 +08:00
Jit Loon Lim
6197dc98fe feat(intel): restructure sys mgr for Agilex
This patch is to restructure system manager. Move platform dependent
MACROs to individual platform system manager. Common system manager will
remain for those common declaration only.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I2f52d3eaf47716f7dfc636bbf1a23d68a04f39cb
2023-05-23 21:13:05 +08:00
Jit Loon Lim
c418064eb5 fix(intel): update checking for memcpy and memset
Add checking on the size of source data does not exceed source size
when using memcpy and memset.

Add checking on the size of source data in FPGA Crypto Service does
not exceed the maximum of expected data size and does not meet the
minimum of expected data size.

Signed-off-by: Phui Kei Wong <phui.kei.wong@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Idb18f05c18d9142fbe703c3f4075341d179d8bad
2023-05-23 21:09:01 +08:00
Jit Loon Lim
91239f2c05 feat(intel): setup SEU ERR read interface for FP8
Enable SEU ERR read interfaces for non-secure world to read out SEU status
for DDR.
SEU ERR SMC opcode updated to 0xC2000099

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I0618dfcdc86a7c1e0c8047b7214d369866dd2281
2023-05-23 11:28:33 +08:00
Elyes Haouas
1b491eead5 fix(tree): correct some typos
found using codespell (https://github.com/codespell-project/codespell).

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I1bfa797e3460adddeefa916bb68e22beddaf6373
2023-05-09 15:57:12 +01:00
Jit Loon Lim
5f06bffa83 fix(intel): fix Agilex and N5X clock manager to main PLL C0
Update Agilex and N5X clock manager to get MPU clock from mainPLL C0
and PeriPLLC0.
1. Updated macro name PLAT_SYS_COUNTER_CONVERT_TO_MHZ to
PLAT_HZ_CONVERT_TO_MHZ.
2. Updated get_cpu_clk to point to get_mpu_clk and added comment.
3. Added get_mpu_clk to get clock from main PLL C0 and Peri PLL C0.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I43a9d83caa832b61eba93a830e2a671fd4dffa19
2023-04-14 09:19:31 +08:00
Sieu Mun Tang
02a9d70c4d feat(intel): implement timer init divider via CPU frequency for N5X
Get CPU frequency and update the timer init div with it.
The timer is vary based on the CPU frequency instead of hardcoded.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Ibfaa47fb7a25176eebf06f4828bf9729d56f12ed
2023-04-14 09:17:33 +08:00
Sandrine Bailleux
49eccae949 Merge "feat(intel): fix bridge disable and reset" into integration 2023-04-12 08:32:56 +02:00