Commit graph

221 commits

Author SHA1 Message Date
Maheedhar Bollapalli
435bc14a94 fix(versal): handle invalid entry point in cpu hotplug scenario
Invalid addresses are from 2G-4G and also address where TF-A is.

Change-Id: I3d07808821da3bdd46be819ad829cb284f9d53d3
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-03-26 06:33:21 +00:00
Maheedhar Bollapalli
4c5cf47f98 refactor(xilinx): refactor console to support transfer list
Refactor console to support DTB console in case of transfer list.
Simplify logic where SOC specific macros are moved to platform headers
or makefile where XLNX_DT_CFG macro describe if system is DT driven or not.

Change-Id: Id45c03a950b62e83e91a50e0485eacdb233ba745
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-02-17 06:11:10 +00:00
Maheedhar Bollapalli
890781d10c fix(versal): modify function to have single return
This corrects the MISRA violation C2012-15.5:
A function should have a single point of exit at the end.
Introduced a temporary variable to store the return value to
ensure single return for the function.

Change-Id: Iffbd8770fd4ff2f2176062469d22961cbaa160b4
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-01-22 04:07:35 +00:00
Maheedhar Bollapalli
4b2324042a fix(versal): add unsigned suffix to match data type
This corrects the MISRA violation C2012-7.2:
A “u” or “U” suffix shall be applied to all integer constants that
are represented in an unsigned type.
Appended "U" suffix to integer constant to represent it as
unsigned type.

Change-Id: I76f3c5903ed21ecba4d600e879d93026fc744f6c
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-12-23 09:14:16 +00:00
Maheedhar Bollapalli
8e4d5c6db0 fix(versal): typecast operands to match data type
This corrects the MISRA violation C2012-10.3:
The value of an expression shall not be assigned to an object with a
narrower essential type or of a different essential type category.
The condition is explicitly checked against 0U, appending 'U' and
typecasting for unsigned comparison.

Change-Id: Ie82297e7eb5faa5d45b1a613c59516052e0c5ecb
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-12-20 11:01:46 +00:00
Maheedhar Bollapalli
9b89de5fc4 fix(versal): typecast operands to match data type
This corrects the MISRA violation C2012-10.1:
Operands shall not be of an inappropriate essential type.
The condition is explicitly checked against 0U, appending 'U' and
typecasting for unsigned comparison.

Change-Id: I41b08349fc6023458ffc6e126f58293a9ef37422
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-12-20 11:01:23 +00:00
Maheedhar Bollapalli
b802b2784c fix(versal): typecast expressions to match data type
This corrects the MISRA violation C2012-10.4:
Both operands of an operator in which the usual arithmetic
conversions are performed shall have the same essential type
category.
The condition is explicitly checked against 0U, appending 'U' and
typecasting for unsigned comparison.

Change-Id: Ide520aa8ec900d0e23e80753d7082e34b6897e8f
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-12-20 11:00:57 +00:00
Maheedhar Bollapalli
e452826ad3 fix(versal): variable conflicting with external linkage
This corrects the MISRA violation C2012-5.8:
Identifiers that define objects or functions with
external linkage shall be unique.
Modify the variable name to prevent conflict with
external object linkage.

Change-Id: I118fc302e6c37ba589a2871a7c59a694314910c2
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-11-05 08:16:35 +00:00
Maheedhar Bollapalli
16c611f8a6 fix(versal): add external declaration
This corrects the MISRA violation C2012-8.4:
A compatible declaration shall be visible when an object or
function with external linkage is defined.

Change-Id: I91817596c5de84b259a5dffcc01a7b1106a5b7a4
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-11-05 08:10:17 +00:00
Maheedhar Bollapalli
12475663b5 fix(versal): modify conditions to have boolean type
This corrects the MISRA violation C2012-14.4:
The controlling expression of an if statement and the controlling
expression of an iteration-statement shall have essentially
boolean type.
Updated controlling expression to explicitly compare with zero.

Change-Id: Ice208ea07ce88f571f8868692c1e92cbfcd35cf4
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-10-30 07:05:40 +00:00
Maheedhar Bollapalli
0ed8b4bffc fix(versal): explicitly check operators precedence
This corrects the MISRA violation C2012-12.1:
The precedence of operators within expressions should be
made explicit.
Enclosed the subexpression in parentheses to maintain
the precedence.

Change-Id: I86bbbd4fe86be131a9e9775095d971d76eb956e3
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-10-25 09:00:23 +00:00
Maheedhar Bollapalli
0f9f5575cc fix(versal): add const qualifier
This correct the MISRA violation C2012-8.13:
A pointer should point to a const-qualified type whenever possible.
Added const qualifier to pointer variables and function arguments.

Change-Id: I33cc594816809a118bff369d98d5689a96f6867f
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-10-21 09:45:49 +00:00
Joanna Farley
f1feb9a5cf Merge changes from topic "xlnx_fix_eval_bool" into integration
* changes:
  fix(versal_net): evaluate condition for boolean
  fix(versal): evaluate condition for boolean
  fix(zynqmp): evaluate condition for boolean
  fix(xilinx): rename variable to avoid conflict
2024-10-18 11:35:04 +02:00
Joanna Farley
8ee6534417 Merge changes from topic "xlnx_fix_plat_console_changes" into integration
* changes:
  feat(xilinx): add none console
  feat(versal2): add dtb & runtime console
  feat(versal-net): add DTB console to platform.mk
  feat(versal-net): dedicate console for boot and runtime
  feat(versal): add DTB console to platform.mk
  feat(versal): dedicate console for boot and runtime
  refactor(xilinx): register runtime console directly
  refactor(xilinx): console registration through console holder structure
  feat(zynqmp): add DTB console to platform.mk
  feat(zynqmp): dedicate console for boot and runtime
  fix(xilinx): dcc to support runtime console scope
  refactor(xilinx): create generic function for DT console
  refactor(xilinx): rename setup_runtime_console to generic
  chore(xilinx): rename console variables
  chore(xilinx): rename runtime console to DT console
2024-10-16 15:23:28 +02:00
Michal Simek
6d41398382 feat(xilinx): add none console
None console does not register boot and runtime console.
User will not observe any console logs.

Change-Id: I39877c900f399ae7cffc1bb599b30c7a23888fc8
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-14 08:39:15 +00:00
Prasad Kummari
d629db2476 feat(versal): add DTB console to platform.mk
In the platform.mk file, new console types named dtb
are to be created a macro, VERSAL_CONSOLE_ID_dtb, will
be introduced to check DT console.Users will have the
option to select VERSAL_CONSOLE to dtb, which will run
from the DDR address and OCM. The address XILINX_OF_BOARD_DTB_ADDR
needs to be provided. This configuration will register the
DT console in TF-A.

Change-Id: Iee0ed2d5bb73c833f34809699203622b912cdbd7
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-14 08:35:54 +00:00
Prasad Kummari
d533f58d55 feat(versal): dedicate console for boot and runtime
Introduce a build-time parameter (CONSOLE_RUNTIME) to select
separate runtime console options. For boot-time console, remove
the runtime flag and add a boot/crash flag. Additionally,
introduce an RT_CONSOLE_IS macro to check different UART types.

Implement a common function, console_runtime_init(), to initialize
the runtime console. Ensure that all platforms have access to
this feature.

The current implementation utilizes a single console for boot,
crash, and runtime. Make sure that the dedicated console integrates
into runtime and crash scenarios.

Change-Id: I7b71fb4a8cd36e8e91c98ebee09904ba47222e33
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-14 08:35:54 +00:00
Maheedhar Bollapalli
b39c82e920 fix(versal): evaluate condition for boolean
This corrects the MISRA violation C2012-11.9:
The macro NULL shall be the only permitted form of integer
null pointer constant.
The condition is compared with NULL to get boolean result.

Change-Id: I7c01825c5588207085d327b5b0c7ca2c896da2dc
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-10-08 09:40:09 +05:30
Maheedhar Bollapalli
ab9aab38d1 fix(versal): declare unused parameters as void
This corrects the MISRA violation C2012-2.7:
There should be no unused parameters in functions.
Declared unused function parameters as void.

Change-Id: If3507f812ed4cfa518e6f5c5de977a76713fafd8
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-01 13:54:13 +05:30
Michal Simek
1e2a5e2851 fix(xilinx): fix comment about MEM_BASE/SIZE
Comment is not showing correct macro name that's why fix it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I8bc38534309285af8a27ee43782e03e9d0470267
2024-09-26 14:41:53 +02:00
Olivier Deprez
bfbb1cb973 Merge "fix(xilinx): map PMC_GPIO device node to interrupt for wakeup source" into integration 2024-09-18 12:00:46 +02:00
Joanna Farley
000d80b5a8 Merge "fix(versal): kernel QEMU boot is failing on versal platform" into integration 2024-09-17 11:56:33 +02:00
Akshay Belsare
db827f99a0 feat(versal): add support for QEMU COSIM platform
QEMU COSIM introduces a new platform id for Versal Platform.
QEMU COSIM is equivalent to QEMU with additional COSIM
extensions, so just switching platform_id to QEMU if QEMU COSIM
id is detected.

Change-Id: If81e0bf04301c7101f89d0df13134f7d04e8c257
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2024-09-16 06:35:25 +02:00
Maheedhar Bollapalli
8e5252f3c0 fix(versal): kernel QEMU boot is failing on versal platform
Due to deprecation of VERSAL_PLATFORM build argument,
the board detection is done at runtime due to this the cpu
and uart clock freq was not set as required to silicon values.

Updated Versal QEMU cpu_clock and uart_clock to silicon values.

Change-Id: I7c772f07ba45eb7e0ae095fd670718190e24f0d7
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-09-13 11:56:05 +00:00
Ronak Jain
692d32b573 fix(xilinx): map PMC_GPIO device node to interrupt for wakeup source
Currently, PMC_GPIO device node was not mapped with interrupt number
during the setup of wakeup source while suspending. As a result,
system cannot resume using PMC_GPIO as wakeup source.

To address this issue, add an entry for PMC_GPIO node to map with its
corresponding interrupt number.

Change-Id: Ic681b7b2e7c0b3bd542c8e4664a2129e4b91c459
Signed-off-by: Ronak Jain <ronak.jain@amd.com>
2024-09-11 23:06:08 -07:00
Joanna Farley
2e1db2b4c7 Merge "feat(versal): deprecate build time arg VERSAL_PLATFORM" into integration 2024-08-12 11:49:37 +02:00
Jay Buddhabhatti
c26aa08bee feat(xilinx): update SiP SVC version number
SMC ID is fixed in new SiP SVC call format while it varies according
to PLM header in old Linux. So, enhance SIP_SVC_VERSION number to
support backward compatibility and to use full request and response
buffer from bare-metal or Linux.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: I6764cc92b33b7366640f553827e80c5e97985fcf
2024-07-31 02:44:43 -07:00
Jay Buddhabhatti
03fa6f4250 fix(xilinx): fix logic to read ipi response
Currently, PLM IPI command supports total 8 32-bit payloads. But existing
logic to read IPI response in TF-A is trying to read 9 32-bit payloads
(ret status + 8 ret payloads) in case of IPI_CRC_CHECK enabled which is
incorrect.

So, fix logic to read only 8 32-bit payloads (ret status + 6 ret payloads + CRC)
in case when IPI_CRC_CHECK is enabled and read 7 32-bit payloads
(ret status + 5 ret payloads + CRC) in case when IPI_CRC_CHECK is disabled.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: I0abca2f787cc7a66fdd5522e6bd15a9771029071
2024-07-31 02:44:43 -07:00
Maheedhar Bollapalli
09ac1ca27c feat(versal): deprecate build time arg VERSAL_PLATFORM
Update Versal platform to enable runtime detection of variants instead
of relying on the build argument VERSAL_PLATFORM.
Integrate functionality for identifying the board variant during
runtime, allowing dynamic adjustment of CPU and UART clock values
accordingly.
Print the runtime board information during boot.
This advancement streamlines the build process by eliminating
dependencies on variant-specific builds, enabling the use of a single
binary for multiple variants.
Removing all the platform related constants for versal_virt,SPP,EMU as
they are not used.

Change-Id: I8c1a1d391bd1a8971addc1f56f8309a3fb75aa6d
Signed-off-by: Amey Avinash Raghatate <AmeyAvinash.Raghatate@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-07-26 12:20:50 +05:30
Amit Nagal
4c9ae8ae1f fix(versal): remove check for bl32 load address
With PLM firmware version 2024.1 the bl32 load address is set
correctly in handoff parameters.
Hence the check to initialize bl32 load address when bl32
load address is indicated as 0 in handoff is removed.

Change-Id: I322b8d2fc1137297142704ea1087c185e16177cc
Signed-off-by: Amit Nagal <amit.nagal@amd.com>
2024-06-24 11:52:36 +05:30
Joanna Farley
f1464ceaf9 Merge changes I0e7650c0,I33acead9 into integration
* changes:
  fix(xilinx): follow MISRA-C standards for condition check
  fix(zynqmp): resolve null pointer dereferencing
2024-05-09 09:18:21 +02:00
Salman Nabi
af3e8e63b4 refactor(console): consolidate console runtime switch
Refactor console_flush() and console_switch_state(CONSOLE_FLAG_RUNTIME)
to bl31_main(). This has been done per the recommendation in TF-A
mailing list. These calls need to be the last calls, after any runtime
initialization has been done, before BL31 exits.

All platforms that override the generic implementation of
bl31_plat_runtime_setup() have been refactored. The console_flush()
and console_switch_state() calls have been removed as they become
part of bl31_main() function.

Any platform that don't need to make any change to the generic (weak)
implementation of bl31_plat_runtime_setup() don't need to override it
in their platforms.

Change-Id: I6d04d6daa9353daeaa7e3df9e9adf6f322a917b8
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
48932c3c27 refactor(xilinx): console runtime switch on bl31 exit
Flush the FIFO before switching to runtime. This is so that there are
no lingering chars in the FIFO when we move to the runtime console.

TF-A plans to refactor the console_Switch_state(CONSOLE_FLAG_RUNTIME)
and console_flush() calls and make them the last calls in bl31_main()
(before BL31 exits). Until then they are being left as the last calls
in bl31_plat_runtime_setup() for testing before refactoring.

This patch affects Xilinx SoCs only.

Change-Id: Iea4cf920934bbde4312f40c8c7b3e0f56a316e86
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Ronak Jain
655e62aa5b fix(xilinx): follow MISRA-C standards for condition check
As per the MISRA-C standards, there should be proc == NULL not just
!proc.

Fix the same.

Change-Id: I0e7650c09b045882a0235869d7ef9fca27f96d9a
Signed-off-by: Ronak Jain <ronak.jain@amd.com>
2024-05-08 05:33:46 -07:00
Michal Simek
652c1ab152 fix(xilinx): check proc variable before use
Check return value from pm_get_proc() to make sure that CPU is valid.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: If51b5d42ce87f31fd732ab58ae8fcd0e2db0a2a8
2024-04-19 12:20:09 +02:00
Joanna Farley
1064bc6c8c Merge changes from topic "idling-during-subsystem-restart" into integration
* changes:
  fix(xilinx): add console_flush() before shutdown
  fix(xilinx): fix sending sgi to linux
  feat(xilinx): add new state to identify cpu power down
  feat(xilinx): request cpu power down from reset
  feat(xilinx): power down all cores on receiving cpu pwrdwn req
  feat(xilinx): add handler for power down req sgi irq
  feat(xilinx): add wrapper to handle cpu power down req
  fix(versal-net): use arm common GIC handlers
  fix(xilinx): rename macros to align with ARM
2024-01-22 16:12:02 +01:00
Joanna Farley
b7e85c7cee Merge "feat(versal): extend platform address space sizes" into integration 2024-01-22 16:07:46 +01:00
Akshay Belsare
6a80c20eff fix(xilinx): deprecate SiP service count query
As per SMCCC Section 6.2, the call count query for all the services
has been deprecated from SMCCC v1.2 onwards.

Inline with above change, AMD-Xilinx SiP service count query has
been deprecated and now onwards will return unknown function
identifier error.

Change-Id: I296d119d65549fdb01718d08351d255550e4ead0
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2024-01-16 06:21:58 +01:00
Akshay Belsare
663f024f20 feat(versal): extend platform address space sizes
The AMD-Xilinx Versal platform, currently only supports the OCM and
Low DDR address ranges in both physical and virtual address range.
To locate and execute TF-A from High DDR and HBM address range,
expanding the address scope is necessary.

Depending on the BL31_BASE address both the platform physical and
virtual space sizes are selected.

Change-Id: I49112bff9eda44d924c5f49ea99aed9a8d5e5774
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2024-01-10 14:23:21 +01:00
Jay Buddhabhatti
5949701600 feat(xilinx): add new state to identify cpu power down
Currently there is only 1 state for CPU idle which is used while CPU
power down from Linux CPU idle feature. But CPU power down when firmware
send CPU power down request needs new state in self suspend to
distinguish in firmware for CPU power down from power down request or CPU
power down from Linux CPU idle. So add new state PM_STATE_CPU_OFF to
indicate CPU power down from power down request from firmware.

PM_STATE_CPU_OFF state is supported from self-suspend version 3. So
added feature check which sends new state in case of new firmware and
old state i.e. PM_STATE_CPU_IDLE in case of old firmware.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: I4118e1b813e5f76fca7b7e9ca1cc598715203fb0
2024-01-09 04:17:40 -08:00
Jay Buddhabhatti
88ee0816a7 feat(xilinx): request cpu power down from reset
Send subsystem restart notification to firmware when TF-A receives
system reset PSCI call. On receiving subsystem restart call, firmware
will send CPU idle callback to TF-A for powering down all cores. Wait
for CPU idle callback from firmware and raise power down request to
all cores after it receives CPU idle callback to power down core.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: I50f417ae228017f38b648740dc90b2e8f1872620
2024-01-09 04:17:40 -08:00
Jay Buddhabhatti
ade92a64e4 feat(xilinx): add handler for power down req sgi irq
On receiving CPU power down callback, TF-A raises SGI interrupt to all active
cores to power down each active cores. Add handler for this SGI IRQ.

By default TF-A uses SGI 6 for CPU power down request. This can be
configurable through CPU_PWRDWN_SGI build flag.

e.g., If user wants to use SGI 7 instead of SGI 6 then provide build
flag CPU_PWRDWN_SGI=7

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: Id0df32187d1de3f0af4486eb4d4930cb3ab01dbd
2024-01-09 04:15:27 -08:00
Jay Buddhabhatti
79953190bc fix(xilinx): rename macros to align with ARM
Use generic macro name as per common ARM GIC macro name for Versal
and Versal NET.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: I2987ff2f612993fc80979f0179c04d316259ed1d
2024-01-09 00:38:21 -08:00
Prasad Kummari
cc3374ac63 refactor(xilinx): move plat_get_syscnt_freq2 to common file
The code in the AMD-Xilinx platform for Versal and Versal NET is being
refactored to move the plat_get_syscnt_freq2() function to a common
file. This common function is utilized for obtaining the CPU clock
frequency from the platform.

Change-Id: I7a4c3fa43a2941d51cacd259c57b24e545aea848
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
2024-01-04 15:29:49 +01:00
Prasad Kummari
f000744e0f fix(versal): initialize cntfrq_el0 register
The set_cnt_freq() function is introduced to configure the counter
frequency register.If the counter frequency register is zero, it writes
the output of plat_get_syscnt_freq2() the cpu_clocks to the counter
frequency register.

According to the design specifications provided for Versal, the
lpd_data.cdo file contains a mask_write operation for register
0xFF140020 (base_frequency_ID_register) to set it to 0x5f5e100,
configuring it for a 100MHz clock frequency.

Reading the value of the IOU_SCNTRS_BASE_FREQ register using
mmio_read_32() to determine the counter frequency. If the counter
frequency is zero, the system will set the default CPU clocks constants
in TF-A and displays message. However, if the counter frequency is
non-zero, the program will return the value stored in the
IOU_SCNTRS_BASE_FREQ register.

The issue lies in dcc_status_timeout(),function verifying timeout
status, particularly within timeout_cnt_us2cnt(), converting
microseconds to counter ticks using read_cntfrq_el0(), which returns
zero. timeout_elapsed() then checks if the current counter from
read_cntpct_el0()exceeds the expiration count, denoting timeout.

After the function set_cnt_freq() writes into the counter frequency
register, the function timeout_cnt_us2cnt() is used to obtain the
appropriate counter ticks. Subsequently, the function timeout_elapsed()
checks whether the current counter value read_cntpct_el0() has
exceeded the specified expiration count. If it has, this indicates
that the timeout has lapsed.

Change-Id: I8f2f4d804b5aefa6f92083d831a5ebfade384294
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
2024-01-04 15:29:18 +01:00
Prasad Kummari
d766f994d2 feat(versal): enable errata management feature
The errata ABI feature-specific build flag, the flag enabling CPUs
in the CPU list, and the flags testing non-ARM interconnect-based
errata when enabled from a platform level are added to the AMD-Xilinx
Versal platform makefile to assess the errata ABI feature
implementation.

ERRATA_ABI_SUPPORT : Boolean option to enable support for Errata
management firmware interface for the BL31 image. By default,
its disabled set to zero.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Change-Id: I54cda23d699abc0782f44172c28933f5cbb010b8
2023-12-20 17:25:15 +05:30
Joanna Farley
1684c8d6a1 Merge changes from topic "enable_assertion" into integration
* changes:
  feat(zynqmp): enable assertion
  feat(versal-net): enable assertion
  feat(versal): enable assertion
2023-11-06 17:55:20 +01:00
Joanna Farley
bfb8d8eba6 Merge "feat(xilinx): switch boot console to runtime" into integration 2023-11-06 14:55:07 +01:00
Prasad Kummari
7ff4d4fbe5 feat(versal): add tsp support
Introduces support for the Test Secure Payload (TSP) for AMD-Xilinx
Versal platform. TSP is a component for testing  and validating
secure OS and trusted execution environments.

If a BL32 image is present, then there must be a matching Secure-
EL1 Payload Dispatcher (SPD) service called TSPD, this service
is responsible for Initializing the TSP. During initialization that
service must register a function to carry out initialization of
BL32 once the runtime services are fully initialized. BL31 invokes
such a registered function to initialize BL32 before running BL33.

The GICv3 driver is initialized in EL3 and does not need to be
initialized again in SEL1 GICv3 driver is initialized in EL3
This is because the S-EL1 can use GIC system registers to manage
interrupts and does not need GIC interface base addresses to be
configured.

The secure code load address is initially being pointed to 0x0
in the handoff parameters, which is different from the default
or user-provided load address of 0x60000000. In this case, set up
the PC to the requested BL32_BASE address to ensure that the secure
code is loaded and executed from the correct location.

Change-Id: Ida0fc6467a10bfde8927ff9b3755a83f3e16f068
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
2023-11-02 06:04:56 +01:00
Prasad Kummari
51564354c9 refactor(xilinx): rename platform function to generic name
Refactor two platform specific functions, plat_versal_get_mmap() and
plat_versal_net_get_mmap(), to use a more generic function name
plat_get_mmap(). The function can be used in the common code to
obtain  memory region.

Change-Id: I3eeb24aff217eef30af60a7742cbebe9d3b2edce
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
2023-11-01 21:25:21 +05:30