Commit graph

12057 commits

Author SHA1 Message Date
Govindraj Raja
17d07a552b refactor(bl31): use elx_panic for sysreg_handler64
When we reach sysreg_handler64 from any trap handling we are entering
this path from lower EL and thus we should be calling lower_el_panic
reporting mechanism to print panic report.

Make report_elx_panic available through assembly func elx_panic which
could be used for reporting any lower_el_panic.

Change-Id: Ieb260cf20ea327a59db84198b2c6a6bfc9ca9537
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-02-22 17:24:17 +00:00
Govindraj Raja
bd62ce98d2 refactor(aarch64): rename do_panic and el3_panic
Current panic call invokes do_panic which calls el3_panic, but now panic
handles only panic from EL3 anid clear separation to use lower_el_panic()
which handles panic from lower ELs.

So now we can remove do_panic and just call el3_panic for all panics.

Change-Id: I739c69271b9fb15c1176050877a9b0c0394dc739
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-02-21 17:26:01 +00:00
Govindraj Raja
f300ef6628 refactor(aarch64): remove weak links to el3_panic
Cleanup weak links to el3_panic and restrict crash_reporting usage
to bl31.

Crash reporting is not used with bl1, bl2 and weak linkage to el3_panic
is used, this can cause ambiguity in understanding the code so remove
this weak linkage and introduce funcs that should be used when we have
crash reporting for el3 panics.

Change-Id: Ic5c711143ba36898ef9574a078b8fa02effceb12
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-02-21 17:26:01 +00:00
Govindraj Raja
7e619ecc89 refactor(aarch64): refactor usage of elx_panic
Currently we call el3_panic for panics from EL3 and elx_panic for
panics from lower ELs.

When we boot into a rich OS environment and interact with BL31 using
SMC/ABI calls and we can also decide to handle any lower EL panics in
EL3. Panic can occur in lower EL from rich OS or during SMC/ABI calls
after context switch to EL3.

But after booting into any rich OS we may land in panic either from
rich OS or while servicing any SMC call, here the logic to use
el3_panic or elx_panic is flawed as spsr_el3[3:0] is always EL3h
and end up in elx_panic even if panic occurred from EL3 during
SMC handling.

We try to decouple the elx_panic usage for its intended purpose,
introduce lower_el_panic which would call elx_panic, currently
lower_el_panic is called from default platform_ea_handle which
would be called due to panic from any of the lower ELs.

Also remove the weak linkage for elx_panic and rename it to
report_elx_panic which could be used with lower_el_panic.

Change-Id: I268bca89c01c60520d127ef6c7ba851460edc747
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-02-21 17:26:01 +00:00
Govindraj Raja
f4be868be9 refactor(aarch64): cleanup HANDLE_EA_EL3_FIRST_NS usage
Remove usage of HANDLE_EA_EL3_FIRST_NS in plat_default_ea_handler

Change-Id: I2bf4788960d20a090d66cf39c7bbbdea1d3243ca
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-02-21 17:26:01 +00:00
Manish V Badarkhe
33b4df9c1f Merge "feat(morello): add GPU DT node" into integration 2023-02-20 17:06:20 +01:00
Patrik Berglund
cd94c3d6ad feat(morello): add GPU DT node
Signed-off-by: Patrik Berglund <patrik.berglund@arm.com>
Change-Id: Ie82158aeaaf9e4bc68bc4bb91e3a9cc572b40d23
2023-02-20 11:52:39 +00:00
Sandrine Bailleux
d2d71e2e58 Merge "fix(docs): add few missed links for Security Advisories" into integration 2023-02-20 09:50:54 +01:00
Joanna Farley
e6af3c7154 Merge changes from topic "zynqmp-smc" into integration
* changes:
  fix(zynqmp): check smc_fid 23:16 bits
  fix(zynqmp): separate EM from PM SMCs
2023-02-18 17:35:44 +01:00
Olivier Deprez
fda255c36d Merge "feat(spmd): introduce FFA_PARTITION_INFO_GET_REGS" into integration 2023-02-17 19:49:04 +01:00
Joanna Farley
9c571fb0d2 Merge "feat(zynqmp): add support for custom sip service" into integration 2023-02-17 17:49:29 +01:00
Joanna Farley
a6bdf778e0 Merge "fix(versal): check smc_fid 23:16 bits" into integration 2023-02-17 13:13:24 +01:00
Joanna Farley
aa3169a8de Merge "docs(xilinx): correct function description" into integration 2023-02-17 13:10:23 +01:00
Joanna Farley
9c692f91a2 Merge "fix(zynqmp): update the conflicting EEMI API IDs" into integration 2023-02-17 00:52:10 +01:00
Joanna Farley
bd1ec38adc Merge changes from topic "xlnx_zynqmp_debug" into integration
* changes:
  fix(zynqmp): with DEBUG=1 move bl31 to DDR range
  fix(zynqmp): update MAX_XLAT_TABLES for DDR memory range
2023-02-17 00:50:39 +01:00
Joanna Farley
8c56a6bad6 Merge changes from topic "versal-ipi" into integration
* changes:
  fix(versal): fix incorrect regbase for PMC IPI
  fix(versal): sync location based on IPI_ID macros
  fix(xilinx): remove unused mailbox macros
2023-02-17 00:44:42 +01:00
Joanna Farley
c5a840ad56 Merge "fix(zynqmp): fix bl31_zynqmp_setup.c coding style" into integration 2023-02-17 00:43:11 +01:00
Manish V Badarkhe
43f3a9c4d6 fix(docs): add few missed links for Security Advisories
Added few missed links for Security Advisories.

Change-Id: I9cab72b70a518273cbb1a291142f452198427127
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-02-16 18:17:10 +00:00
Manish V Badarkhe
a84636ad12 Merge "fix(docs): python version must be string" into integration 2023-02-16 16:46:40 +01:00
Boyan Karatotev
3aa919eb27 fix(docs): python version must be string
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: If5886f8adb391edf3771112cd8e20957a454eae0
2023-02-16 15:29:52 +00:00
Manish V Badarkhe
26b22e6d2a Merge "fix(docs): specify python version to 3.10" into integration 2023-02-16 16:26:06 +01:00
Amit Nagal
496d708154 feat(zynqmp): add support for custom sip service
Add support for custom sip service.
Bare minimum implementation for custom_smc_handler is provided
by platform. Actual definition for custom_smc_handler will be provided
by custom pkg.

This feature is going to be used by external libraries. For example
for checking it's status.

The similar approach is also used by qti/{sc7180,sc7280} platforms
by providing a way to select QTISECLIB_PATH.

This code is providing a generic way how to wire any code
via custom $(CUSTOM_PKG_PATH)/custom_pkg.mk makefile with also an
option to wire custom SMC. SMC functionality depends on "package".

Change-Id: Icedffd582f76f89fc399b0bb2e05cdaee9b743a0
Signed-off-by: Amit Nagal <amit.nagal@amd.com>
2023-02-16 20:53:22 +05:30
Boyan Karatotev
a7773c590d fix(docs): specify python version to 3.10
The docs say 3 is valid, but it is not. Jammy uses 3.10 so pin it to
that.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I73530750065294eb511d88318ba86a6c50c8aa7d
2023-02-16 15:15:54 +00:00
Manish V Badarkhe
84ce7a83e3 Merge "fix(docs): add a build.tools.python entry" into integration 2023-02-16 16:10:50 +01:00
Boyan Karatotev
4052d9583c fix(docs): add a build.tools.python entry
Specifying build.tools is mandatory. We use python, so use the latest
one available. For ubuntu 22.04 that should be 3.10 or thereabouts.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ifd184b9f3b2d8e91182ccb73c47b148e4aeaff05
2023-02-16 15:00:39 +00:00
Manish V Badarkhe
2b8c608e13 Merge "fix(docs): add readthedocs configuration file" into integration 2023-02-16 15:35:33 +01:00
Boyan Karatotev
8a84776340 fix(docs): add readthedocs configuration file
Readthedocs uses weird defaults and the web interface gives limited
configuration options. Add the config file to allow them to be changed.

Bump build os image to Ubuntu 22.04 to be in line with the CI.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I1a620b15ab3924244f305056096024fe117c63dd
2023-02-16 13:57:05 +00:00
Michal Simek
4a50363aae fix(versal): check smc_fid 23:16 bits
23:16 bits when they gets to SMC handler should be all zeros but be
inside SIP Service Calls range which is defined as 0x82000000-0x8200ffff
or 0xc2000000-0xc200ffff. That's why make sure that code won't handle
any SMCs in SIP range out of predefined range.

Also fix MASK values to check the same range for PM/IPI calls to make
sure that masking covers all required bits including 23:16. Bits 15:12
are used for different class of requests.

Change-Id: I9d3e91aa521d6bb90f6b15b71ff1e89fa77ee379
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-02-16 13:55:38 +01:00
Michal Simek
09b342a9d3 fix(zynqmp): check smc_fid 23:16 bits
23:16 bits when they gets to SMC handler should be all zeros but be
inside SIP Service Calls range which is defined as 0x82000000-0x8200ffff
or 0xc2000000-0xc200ffff. That's why make sure that code won't handle
any SMCs in SIP range out of predefined range. Because EM SMC is out of
this range already on this SOC check it after it (EMC SMC will be
handled separately).
Also fix MASK values to check the same range for PM/IPI/EM calls to make
sure that masking covers all required bits including 23:16. Bits 15:12
are used for different class of requests.

Change-Id: If23ac769c91d206e47758aeaa1f14e8b9c3dc7bb
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-02-16 13:53:46 +01:00
Michal Simek
a9113966c3 fix(zynqmp): separate EM from PM SMCs
There is no reason to use else and concatenate EM SMCs with PM SMCs via
if/else pair. Also synchronize comment location.

Change-Id: I147f9d193574c2417c9d92d41a675e35ba282c9f
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-02-16 12:58:03 +01:00
Michal Simek
26ef5c29c6 fix(zynqmp): fix bl31_zynqmp_setup.c coding style
Fix trivial coding style violations.

Change-Id: I6bbabd58da641a3b823a3b43adc7921b923ecdcb
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-02-16 12:54:12 +01:00
Joanna Farley
0069933a68 Merge "feat(zynqmp): bump up version of query_data API" into integration 2023-02-16 12:25:17 +01:00
Naman Patel
b96065a04b docs(xilinx): correct function description
Inside pm_ipi.c file, corrected the function description of
pm_ipi_buff_read_callb() and removed the return type as this is a void
function.

Signed-off-by: Naman Patel <naman.patel@amd.com>
Change-Id: I6257894337ef64497afb3e80d70af91a20357d5f
2023-02-16 14:53:14 +05:30
Nava kishore Manne
bcc1348b6b fix(zynqmp): update the conflicting EEMI API IDs
In the ZynqMP, 0x36 EEMI API ID is used for PM_FPGA_GET_VERSION and 0x37
is used for PM_FPGA_GET_FEATURE_LIST. The same ID numbers in the Versal
are used for PM_ADD_SUBSYSTEM and PM_DESTROY_SUBSYSTEM and it leads to
the EEMI API ID conflict between the platforms. To fix this issue this
patch updates the PM_FPGA_GET_VERSION and PM_FPGA_GET_FEATURE_LIST EEMI
API ID's to 0x48 and 0x49.

In linux zynqmp_pm_fpga_get_version() and
zynqmp_pm_fpga_get_feature_list() API's are uses PM_FPGA_GET_VERSION
and PM_FPGA_GET_FEATURE_LIST to get the xilfpga version and
xilfpga-supported feature list info. These API's are called only in
zynqmp-fpga.c as part of the probe. In case of this caller API's are
failed it will fall to the default feature list and this default
feature list is same as latest xilfpga-supported feature list (No new
feature was added in the xilfpga after adding these APIs). So, these
updated IDs will not cause any functional issues between Linux, TF-A,
and firmware components.

Signed-off-by: Nava kishore Manne <nava.kishore.manne@amd.com>
Change-Id: I14d974dd44651681ecbf726ad8b6940e1850cbec
2023-02-16 14:34:13 +05:30
Michal Simek
c4185d5103 fix(versal): fix incorrect regbase for PMC IPI
PMC ipi register base can't be the same as is for IPI_ID_APU that's why
that address is not correct and needs to be fixed.

Change-Id: I7ff2c9c0dd5995487e41f6b1060e4c9880c009fa
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-02-15 18:05:29 +01:00
Michal Simek
92a43bdf36 fix(versal): sync location based on IPI_ID macros
IPI_ID_* macros available at include/plat_ipi.h are using PMC/APU/RPU0..
order which is not how versal_ipi_table array is composed. That's why
swap APU and PMC to follow the same order as is described by macros.

Change-Id: Ieaa3a967650e298e7cff45fafde0df96294c09fe
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-02-15 18:05:19 +01:00
Michal Simek
15f49cb49d fix(xilinx): remove unused mailbox macros
All these macro are unused that's why remove them.

Change-Id: I843cc7c1a592c47376a01c52f45b6d59da80772b
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-02-15 18:05:10 +01:00
Joanna Farley
97936d895b Merge "fix(zynqmp): fix DT reserved allocated size" into integration 2023-02-15 17:59:07 +01:00
Akshay Belsare
2537f0725e fix(zynqmp): with DEBUG=1 move bl31 to DDR range
Due to size constraints in OCM memory range keeping the bl31 with
DEBUG=1 overlaps with the memory range from other Firmware thus
affecting the bootflow on target.
bl31 binary can not be placed in OCM memory range when built with
DEBUG=1.
With DEBUG=1, by default bl31 is moved to DDR memory range
0x1000-0x7FFFF.
The user can provide a custom DDR memory range during build time using
the build parameters ZYNQMP_ATF_MEM_BASE and ZYNQMP_ATF_MEM_SIZE.

Change-Id: I167d5eadbae7c6d3ec9b32f494b0b1a819bea5b0
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-02-15 21:12:31 +05:30
Akshay Belsare
12446ce89e fix(zynqmp): update MAX_XLAT_TABLES for DDR memory range
An assert is observed when the bl31 is placed in DDR memory range and
DEBUG is also enabled. To resolve this, increase the size of
MAX_XLAT_TABLES to 8 when bl31 is placed in DDR memory range.

Change-Id: I7d35cba01cd5c8cfc8aae987719b8fc39fcf76b0
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-02-15 21:10:57 +05:30
Manish V Badarkhe
5a77fd3ba1 Merge "docs(qemu): delineate flash based boot method" into integration 2023-02-15 15:53:46 +01:00
Ronak Jain
aaf5ce77fb feat(zynqmp): bump up version of query_data API
As per the current code base, the version of the PM_QUERY_DATA EEMI
API is 2 in the Versal but in ZynqMP it returns the base version.

Since this EEMI API ID support similar functionality for Versal and
ZynqMP, hence there should not be any difference in the versioning
as well.

In version 2, the feature check API supports the bitmask functionality
of the QUERY_DATA API, so the user can query the supported QUERY_DATA
ID first and if the ID is supported then the user can perform the
actual functionality of the same.

Hence, bump up the version of PM_QUERY_DATA API Id to 2.

Signed-off-by: Ronak Jain <ronak.jain@amd.com>
Change-Id: I3ed7b090f486dca591352131ca286018bbb1c4be
2023-02-15 03:39:36 -08:00
Manish Pandey
be2a050583 Merge "fix(build): allow warnings when using lld" into integration 2023-02-14 17:09:35 +01:00
Manish V Badarkhe
23af5965e9 Merge changes from topic "bk/python_dependencies" into integration
* changes:
  build(docs): update Python dependencies
  fix(docs): make required compiler version == rather than >=
  fix(deps): add missing aeabi_memset.S
2023-02-14 16:14:06 +01:00
Manish V Badarkhe
9d1a325b2d Merge "docs: fix broken Juno links" into integration 2023-02-14 12:45:35 +01:00
Harrison Mutai
0cbcccc028 docs: fix broken Juno links
Certain links to Juno documentation point to a location that were
removed at some point, or are unused. Fix links to point to the latest
available version on Arm's public documentation site, and remove those
that are no longer being used.

Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: I59202767db8834e9c302b2826f3faee47d3a5edd
2023-02-14 10:15:12 +00:00
Joanna Farley
2616f4b476 Merge "fix(zynqmp): enable A53 workaround(errata 1530924)" into integration 2023-02-14 10:17:43 +01:00
Joanna Farley
fb9d95e325 Merge "feat(zynqmp): add SMCCC_ARCH_SOC_ID support" into integration 2023-02-14 10:16:59 +01:00
Raghu Krishnamurthy
eaaf517cd1 feat(spmd): introduce FFA_PARTITION_INFO_GET_REGS
Add code in SPMD to forward calls to FFA_PARTITION_INFO_GET_REGS. This
is a new ABI that allows getting partition information without the need
for rx/tx buffer, that helps in situations where having an rx/tx buffer
mapped and available is difficult (ex. uefi runtime services).
Currently, the spmc at el3 does not support this new ABI.
The new ABI uses registers x8-x17 to return partition information so
changes are made to ensure those registers are passed through to the
SPMC and restored on the return path.

Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I1fe5956763e054e4f8d62292fc1247e7120bb5a4
2023-02-13 08:47:41 -08:00
Boyan Karatotev
b7c37e4a80 build(docs): update Python dependencies
Update the python dependencies for building the project's Sphinx
documentation. Sphinx plugins are updated to the latest version, while
Sphinx itself is only updated to 5.3.0 (latest 5.x.x revision) due to
sphinx-rtd-theme not supporting any higher (both require incompatible
versions of docutils). Myst-parser is also updated to the latest version
to prevent a docutils clash as well.

The effect of this is to bump certifi to version 2022.12.7 and wheel to
0.38.4 as suggested by dependabot.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I0ced5b127494255ce01aa7f51665bfcba161d135
2023-02-13 15:57:36 +00:00