Commit graph

365 commits

Author SHA1 Message Date
Sieu Mun Tang
09330a4937 fix(intel): update CCU configuration for Agilex5 platform
Update CCU configuration for DSU, FPGA2SOC, GIC_M, SMMU, PSS NOC, DCE0,
DCE1,DMI0, DMI1, L4 peripheral firewall, L4 system firewall, LWSOC2FPGA,
SOCFPGA and TCU.

Change-Id: Id416d58b0115098b99a8dfdccb28a7d6f6747f75
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-09-25 21:45:17 +02:00
Tanmay Kathpalia
3c640c124e fix(intel): add cache invalidation during BL31 initialization
During warm boot, the data cache is invalidated before
enabling them in u-boot proper, this cache
invalidation (+ cleaning) leads to the sync-up of stale
values in the cache to be synced with the main memory.
So, before the cache cleaning is done in u-boot proper,
it is invalidated in BL31 so that the cache data gets in
sync with u-boot proper memory address space and when
u-boot proper does its initialization which in turn clears
its BSS and heap section.

Change-Id: Ic8d8672f1e371868be7f54f5a1fae9229ab15164
Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-09-23 20:11:21 +02:00
Jit Loon Lim
9a402d2f0f fix(intel): bridge ack timing issue causing fpga config hung
Increase the timeout of waiting for bridge ack to solve the
fpga config hung.

Change-Id: I967af02b336c296206b4947be718953ff8ca30cf
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-09-23 17:21:46 +02:00
Mark Dykes
97d48be016 Merge "fix(intel): update memcpy to memcpy_s" into integration 2024-08-30 20:09:24 +02:00
Olivier Deprez
8f20266a79 Merge "fix(intel): software workaround for bridge timeout" into integration 2024-08-28 08:37:23 +02:00
Sieu Mun Tang
e264b55739 fix(intel): update memcpy to memcpy_s
memcpy does not check the dst_size which may
create vulnerable issue as it can overflow the buffer.
Using memcpy_s which check the dst_size will help to
reduce the risk. Also, this memcpy is always 4 bytes
each time.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I413e6ae2ee9330501703c4cd63b7943c6f55b4c7
2024-08-26 07:59:10 +08:00
Jit Loon Lim
4683946015 fix(intel): add in missing ECC register
This patch is to add in missing ECC register (INITSTAT)

Change-Id: Iecf03dc9597ec2884901c132fb9cef7e90ab06a0
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-08-23 13:41:25 +02:00
Mark Dykes
44c5f8e582 Merge changes I23bdbbe1,Ic22ab741 into integration
* changes:
  feat(intel): enable VAB support for Intel products
  feat(intel): add in SHA384 authentication
2024-08-22 17:15:53 +02:00
Sieu Mun Tang
3eb5640a7d feat(intel): enable VAB support for Intel products
This patch is to implement Vendor Authorize Bootloader
support for Intel Agilex, Agilex5 and N5X.

Change-Id: I23bdbbe15b3732775cea028665e2efcbd04b3aff
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-07-21 10:35:17 +08:00
Jit Loon Lim
cab83c3487 feat(intel): add in SHA384 authentication
Add VAB SHA384 authentication implementation.

Change-Id: Ic22ab7416ffd0c514328d2815b136aa71ba96a84
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-07-20 00:53:18 +08:00
Jit Loon Lim
7c72dfac96 fix(intel): update sip smc config addr for agilex5
Agilex5 DDR base address started from 0x8000 0000.
Thus the SIP_SMC_FPGA_CONFIG_ADDR shall be offset to
0x8040 0000.

Change-Id: I33a840cb8ebbe02bc7ff9b1f5d452641af11e576
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-07-20 00:01:04 +08:00
Jit Loon Lim
e08039d0e2 fix(intel): software workaround for bridge timeout
Hardware hdskack register does not return a correct value after
fence and drain of the bridge is done. Thus creates software
workaround.

Change-Id: I78d8ee0596c3e7bd4883bfd6e92c883b8e369c10
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-07-19 15:54:00 +02:00
Manish Pandey
63d6331ebb Merge "fix(intel): f2sdram bridge quick write thru failed" into integration 2024-07-19 15:53:17 +02:00
Manish Pandey
0cdf5199fa Merge "feat(intel): add QSPI get devinfo mailbox cmd" into integration 2024-07-19 15:51:01 +02:00
Sieu Mun Tang
6704cba25d fix(intel): add in watchdog for QSPI driver
ATF->Linux boot with QSPI boot source need to enable watchdog
so that it will not hang.

Change-Id: Id2a9ceebb1c89f711992a424f4394265efc6b388
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-04-29 15:14:28 +08:00
Kah Jing Lee
8fb1b484ac feat(intel): add QSPI get devinfo mailbox cmd
Linux RSU receive QSPI device info from SDM and report to user about
the device info.

Change-Id: Ib41692c9c4888c745a48a0609396aef0ca7fe25b
Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-04-16 22:17:00 +08:00
Jit Loon Lim
64cf9deb77 fix(intel): f2sdram bridge quick write thru failed
This patch is to fix the f2sdram bridge quick write thru failing by
removing the clear bit for sidebandmgr flagout register.

Change-Id: Ib03498fbb2d91e9fd85f6315091ff72cbe3f394d
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-04-15 13:32:01 +08:00
Harrison Mutai
998da640fa refactor: fix common misspelling of init*
Change-Id: I3fc95e8e53ef487fd5a559cda739aaea33d765a9
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2024-03-20 11:44:00 +00:00
Girisha Dengi
a773f4121b fix(intel): update nand driver to match GHRD design
Update nand driver to match GHRD design, fix row
address calculation method and other misc updates.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I1cb3dda43e767ba243fbe89bfa18818db321c5c2
2024-01-23 00:05:11 +08:00
Sandrine Bailleux
51ff56e447 Merge "feat(intel): enable SDMMC frontdoor load for ATF->Linux" into integration 2024-01-19 11:08:14 +01:00
Mahesh Rao
6cbe2c5d19 feat(intel): enable query of fip offset on RSU
Enable query of fip offset from QSPI on RSU boot for
Intel agilex and intel agilex5 platform

Change-Id: Iaa189c54723a8656b9691da5849fd86b9986cfa1
Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2024-01-16 13:26:35 +08:00
Mahesh Rao
62be2a1ae3 feat(intel): support query of fip offset using RSU
Query the fip binary from SPT table on RSU boot on Intel Agilex series.

Change-Id: I8856b49539f33272625d4c0a8c26b81b5864c4eb
Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2024-01-16 13:26:21 +08:00
Sandrine Bailleux
07edc5cfc7 Merge "feat(intel): support wipe DDR after calibration" into integration 2024-01-10 14:49:27 +01:00
Sandrine Bailleux
3bfda6b588 Merge "fix(intel): update from INFO to VERBOSE when print debug message" into integration 2024-01-10 14:45:59 +01:00
Sandrine Bailleux
9c653440f6 Merge changes Id85b2541,I4d253e2f into integration
* changes:
  fix(intel): update system counter back to 400MHz
  fix(intel): revert back to use L4 clock
2024-01-10 13:54:11 +01:00
Sandrine Bailleux
bb31fbcef1 Merge "fix(intel): update fcs crypto init code to check for mode" into integration 2024-01-10 13:41:44 +01:00
Sandrine Bailleux (on vacation)
5551264910 Merge changes I548e3034,I65c7fd1b,I1cdacc0f,If9ac35af into integration
* changes:
  feat(intel): support QSPI ECC Linux for Agilex
  feat(intel): support QSPI ECC Linux for N5X
  feat(intel): support QSPI ECC Linux for Stratix10
  feat(intel): add in QSPI ECC for Linux
2023-12-27 11:21:09 +01:00
Sieu Mun Tang
56c8d022b0 fix(intel): update from INFO to VERBOSE when print debug message
Update from INFO to VERBOSE when print out debug message.

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: Iefdbd44e711c0fd589bef454b42754cf9e3cd391
2023-12-22 19:16:35 +08:00
Jit Loon Lim
68bb3e836e feat(intel): support wipe DDR after calibration
After a calibration we cannot trust the DDR content. Let's explicitly
clear the DDR content using the built-in scrubber in this case.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I6f429623f76a21f61f85efbb660cf65d99c04f56
2023-12-22 18:56:01 +08:00
Sieu Mun Tang
a72f86ac42 fix(intel): update system counter back to 400MHz
Due to design issue, updated system counter back to hardcoded 400MHz

Change-Id: Id85b2541880fac88b2a9a0a46b27b0a0da0eed6d
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-12-22 11:40:07 +08:00
Sieu Mun Tang
d0e400b3c6 fix(intel): revert back to use L4 clock
Using mpu_peri as the clock source will caused the system
timer vary. System timer shall get from a static clock
source.

L4 and L3 clock are both the same at the moment.
There shall be a hardware update to differentiate the clock pll.
To keep this as dormant function for now.

Change-Id: I4d253e2f24a74cbec59bfcbf0e8547abbe3643a8
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-12-22 11:39:50 +08:00
Sieu Mun Tang
d6ae69c8c6 feat(intel): support QSPI ECC Linux for Agilex
Add QSPI ECC new opcodes for Linux to access to SDM register

Change-Id: I548e30340320ae2c2c9d60d20b218ee844516d64
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-12-22 00:44:35 +08:00
Jit Loon Lim
6cf16b3682 feat(intel): support QSPI ECC Linux for N5X
Add QSPI ECC new opcodes for Linux to access to SDM register

Change-Id: I65c7fd1bfc21baa6c45d9f8a0ee9618e6061e8d7
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-22 00:39:55 +08:00
Jit Loon Lim
8be16e44cf feat(intel): support QSPI ECC Linux for Stratix10
Add QSPI ECC new opcodes for Linux to access to SDM register

Change-Id: I1cdacc0f10dfa2a969f0bc5086277fd9081d02e2
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-22 00:39:55 +08:00
Jit Loon Lim
4d122e5f19 feat(intel): add in QSPI ECC for Linux
Add QSPI ECC new opcodes for Linux to access to SDM register

Change-Id: If9ac35afdddb91db6bad6b474060cd001f6d89e6
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-22 00:39:55 +08:00
Sieu Mun Tang
b727664e0d fix(intel): add HPS remapper to remap base address for SDM
Remap base address for SDM to access DRAM.

Change-Id: If064bd1ff4571d3217b136d9b5ebbfdecb68231e
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-12-22 00:26:42 +08:00
Sandrine Bailleux
9118bdf401 Merge "fix(intel): fix hardcoded mpu frequency ticks" into integration 2023-12-19 16:12:59 +01:00
Sandrine Bailleux
92f8e8986f Merge "fix(intel): bl31 overwrite OCRAM configuration" into integration 2023-12-19 16:07:22 +01:00
Sandrine Bailleux
108a1c1d9d Merge "fix(intel): update DDR range checking for Agilex5" into integration 2023-12-19 15:32:06 +01:00
Sandrine Bailleux
4cae77d206 Merge "fix(intel): update fcs functions to check ddr range" into integration 2023-12-19 14:26:28 +01:00
Manish Pandey
afa1da7506 Merge "feat(intel): support SDM mailbox safe inject seu error for Linux" into integration 2023-12-18 18:39:10 +01:00
Jit Loon Lim
32a87d4400 feat(intel): enable SDMMC frontdoor load for ATF->Linux
SDMMC is 1 of the boot source for Agilex5 and legacy products.
By enabling this, ATF is able to read out the DTB binary and
loaded it to DDR for Linux boot.

Change-Id: Ida303fb43ea63013a08083ce65952c5ad4e28f93
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-12-18 11:05:23 +08:00
Jit Loon Lim
150d2be0d2 fix(intel): fix hardcoded mpu frequency ticks
This patch is used to update the hardcoded mpu freq ticks
to obtain the freqq from the hardware setting itself.

Change-Id: I7b9eb49f2512b85fb477110f06ae86ef289aee58
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-12-18 10:12:29 +08:00
Jit Loon Lim
fffcb25c3c feat(intel): support SDM mailbox safe inject seu error for Linux
Linux RAS shall handle the SEU error received from SDM and report
an error message to user

Change-Id: I89181a388063ce9bd6f56b45b1851ccb08582437
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-15 13:58:29 +08:00
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