Commit graph

253 commits

Author SHA1 Message Date
Boyan Karatotev
b62673c645 refactor(cpus): register DSU errata with the errata framework's wrappers
The existing DSU errata workarounds hijack the errata framework's inner
workings to register with it. However, that is undesirable as any change
to the framework may end up missing these workarounds. So convert the
checks and workarounds to macros and have them included with the
standard wrappers.

The only problem with this is the is_scu_present_in_dsu weak function.
Fortunately, it is only needed for 2 of the errata and only on 3 cores.
So drop it, assuming the default behaviour and have the callers handle
the exception.

Change-Id: Iefa36325804ea093e938f867b9a6f49a6984b8ae
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-02-20 17:28:17 +00:00
Olivier Deprez
0035ab76e5 Merge "feat(qemu): add hob support for qemu platforms" into integration 2025-02-18 17:18:23 +01:00
Soby Mathew
e13622312e Merge changes from topic "memory_bank" into integration
* changes:
  fix(qemu): statically allocate bitlocks array
  feat(qemu): update for renamed struct memory_bank
  feat(fvp): increase GPT PPS to 1TB
  feat(gpt): statically allocate bitlocks array
  chore(gpt): define PPS in platform header files
  feat(fvp): allocate L0 GPT at the top of SRAM
  feat(fvp): change size of PCIe memory region 2
  feat(rmm): add PCIe IO info to Boot manifest
  feat(fvp): define single Root region
2025-02-12 10:49:42 +01:00
Jean-Philippe Brucker
a32a77f9c7 fix(qemu): statically allocate bitlocks array
gpt_runtime_init() now takes the bitlock array's address and size as
argument. Rather than reserving space at the end of the L0 GPT for
storing bitlocks, allocate a static array and pass its address to
gpt_runtime_init(). This frees up a little bit of space formerly
reserved for alignment of the GPT.

Change-Id: I48a1a2bc230f64e13e3ed08b18ebdc2d387d77d0
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
2025-02-11 15:12:27 +00:00
Jens Wiklander
991f5360b6 feat(qemu): update for renamed struct memory_bank
The struct ns_dram_bank has been renamed to struct memory_bank, so
update plat/qemu accordingly.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Change-Id: If5ed92edd132c977009a7371ec53eca0ee35ef00
2025-02-11 15:10:49 +00:00
Boyan Karatotev
db5fe4f493 chore(docs): drop the "wfi" from pwr_domain_pwr_down_wfi
To allow for generic handling of a wakeup, this hook is no longer
expected to call wfi itself. Update the name everywhere to reflect this
expectation so that future platform implementers don't get misled.

Change-Id: Ic33f0b6da74592ad6778fd802c2f0b85223af614
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-02-03 14:29:47 +00:00
Kun Qin
648d2d8e2d feat(qemu): add hob support for qemu platforms
This change introduces the hob support for both qemu platforms (virt and
sbsa).

As the hob list feature relies on transfer list, the transfer list
support is promoted to common qemu build configuration. The platforms
specific definitions are updated accordingly.

Change-Id: I473d83388fe95408d34515bf7bcbdd64ce4e777d
Signed-off-by: Kun Qin <kuqin@microsoft.com>
2025-01-31 01:07:06 -08:00
Govindraj Raja
ea7bffdb85 Merge changes from topic "handoff_tpm_event_log" into integration
* changes:
  feat(qemu): hand off TPM event log via TL
  feat(handoff): common API for TPM event log handoff
  feat(handoff): transfer entry ID for TPM event log
  fix(qemu): fix register convention in BL31 for qemu
  fix(handoff): fix register convention in opteed
2025-01-09 20:20:41 +01:00
Jean-Philippe Brucker
d08dca4263 fix(qemu): fix RMM manifest checksum calculation
Commit 71c4443886ff ("fix(lib/rmm_el3_ifc): add console name to checksum
calculation") on TF-RMM updated the checksum calcualtion of the RMM
manifest to include the console names.

Include console names in the QEMU manifest to remain compatible with
RMM, just like commit aa99881d30 ("fix(rme): add console name to
checksum calculation") did for FVP.

Checksum calculation is done by adding together 64-bit values. Add a
helper that does this.

Change-Id: Ica6cab628160593830270bef1acdeb475d1c0c36
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
2025-01-09 14:41:37 +00:00
Olivier Deprez
696ed16877 fix(build): include platform mk earlier
Move platform.mk inclusion in top level Makefile to permit a platform
specifying BRANCH_PROTECTION option.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I1f662f82cd949eedfdbb61b9f66de15c46fb3106
2025-01-07 17:14:18 +01:00
Raymond Mao
cc58f08fe6 feat(qemu): hand off TPM event log via TL
If TRANSFER_LIST is enabled, hand off TPM event log via TL instead
of DT; otherwise fallback to legacy way if TRANSFER_LIST is off or
errors observed.

Moreover, for updating the TL from secure to non-secure
memory before existing EL3, replace memcpy with function
transfer_list_relocate() for more accuracy.

Change-Id: I1d6bcf573f91efe99380bc89195198a8583b1def
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2025-01-07 07:15:30 -08:00
Raymond Mao
7ad6775bde fix(qemu): fix register convention in BL31 for qemu
The commit with Change-Id:Ie417e054a7a4c192024a2679419e99efeded1705
updated the register convention r1/x1 values but missing necessary
changes in BL31.
As a result, a system panic observed during setup for BL32 when
TRANSFER_LIST is enabled due to unexpected arguments.
This patch is to fix this issue for qemu.

Change-Id: I42e581c5026f0f66d3b114204b4dff167a9bc6ae
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2025-01-06 07:10:53 -08:00
Mathieu Poirier
acb09373ba feat(qemu-sbsa): add support for RME on SBSA machine
Add the necessary foundation to support Arm's RME extension on the SBSA
reference architecture.

Change-Id: If5a63ed0015cb33fcae367ff2cded811bbdc1e54
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
fb4edc35bc feat(qemu-sbsa): configure RMM manifest based on system RAM
The RMM manifest needs to reflect the amount of RAM available on the
system.  Since system RAM is based on user input and reflected in the
device tree, get the information from there rather than using hard coded
values.

Change-Id: I63f090c1c04d9addfcd7a349450735728fa88ed0
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
d079d65d42 feat(qemu-sbsa): configure GPT based on system RAM
The amount of memory supported by the SBSA platform is dynamic
and dependent on user input.  Since the configuration of the GPT
needs to reflect the system memory, QEMU_PAS_NS0 needs to be set
based on the information found in the device tree.

Change-Id: I5d1411ac00020b7b38a652ba2904c8a70fa64d18
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
99bc6cf518 feat(qemu-sbsa): adjust DT memory start address when supporting RME
When RME is enabled on SBSA, the RMM is located at the start of the NS
RAM and the device tree after it.  This patch adjust the DT memory start
address so that anyone reading it has an accurate view of the system
configuration.

Change-Id: I32ca63a78d68831faf2c65ad60a45c841b7cbada
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
17af9597e2 feat(qemu-sbsa): relocate DT after the RMM when RME is enabled
When RME is enabled, (1) the RMM is installed at the base of system RAM,
(2) the base of the system RAM is shifted upward, after the RMM and (3)
the device tree is relocated to the new system RAM base.

This patch relocates the device tree to the new system RAM base before
the RMM is installed in RAM.  From there, other accesses to the device
tree are using the new location.

Change-Id: I0cb4e060ca33a11becd78fe48fab4dc76f0b484b
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
26da60e2a0 feat(qemu-sbsa): dissociate QEMU NS start address and NS_DRAM0_BASE
When RME is enabled the RMM is placed at the bottom of the NS RAM,
meaning that NS_DRAM0_BASE has to be located after that.

This patch disscociates the base of the NS RAM as defined by QEMU by
introducing a new define, PLAT_QEMU_DRAM0_BASE.  An offset can be added
to that new define when the software's view of the base memory need to
differ from QEMU.

No change in functionality.

Change-Id: I887f9993d5a61896352cfff17e0d92e2c2b9030a
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
122dbc2c17 feat(qemu-sbsa): increase maximum FIP size
Following what was done for:

f465ac2210 ("fix(qemu): increase max FIP size")

increase the size of the FIP image to take up the remaining
space in FLASH0.  That way the RMM image can also be added
to the FIP.

Change-Id: I89bba36f751468e99241f1c20b51c48fe06d8229
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
ecadac7cd2 refactor(qemu-sbsa): move all DT related functions to sbsa_platform.c
Move all DT related functions to file sbsa_platform_dt.c so that clients
other than SIP SVC can use the funtionality.  At the same time, make all
functions that don't need outside visibility static.

No change in functionality.

Change-Id: I9bce730c8f9e2b827937466f4432ecfa74c35675
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
d564e08456 refactor(qemu-sbsa): create accessor functions for platform info
Creating accessor functions to access information held by struct
qemu_platform_info. That way the code that is relevant to fetching
information from the device tree can be taken out of sbsa_sip_svc.c and
placed in a file where other client can use the information it provides.

No change in functionality.

Change-Id: I989952ee6d15e1436549002dd7c7767c745ea297
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
6d59413b84 refactor(qemu-sbsa): rename function sip_svc_init() to something more meaningful
There is no relation between the name of function sip_svc_init() and
what it does.  As such rename it to something more appropriate and move
it to a header that make sense.

No change in functionality.

Change-Id: I7bd78b1fe70e2930c395ef0a097bfad3b1e55d3a
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
b386c6e61d refactor(qemu-sbsa): move DT related structures to their own header
Move structure declaration related to the DT to their own header.  That
way they can be reused by other files.  At the same time, typedefs are
removed and structure names prepended with "platform_" to avoid clashing
with other structure declarations available in the system.

No change in functionality.

Change-Id: If67a141cc7441b0636af774d7edfe51cf8034a11
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
5ad3c97a5c refactor(qemu-sbsa): rename struct dynamic_platform_info
Rename struct dynamic_platform_info to qemu_platform_info and properly
declare a variable name "dynamic_platform_info".  That way structures
related to the device tree can be moved out of sbsa_sip_svc.c.

No change in functionality.

Change-Id: I1af39047af96ae02f3b8eecda6cb67508f14d37a
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
7b015e12fe refactor(qemu): make L0GPT size configurable
Add a new parameter to make the size of the L0GPT configurable based on
the amount of memory available on a platform. That way platform with a
wider physical address range can be supported.

No change in functionality.

Change-Id: I5b7b4968636d61929ad6ebdc05c389291cf510b1
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Jean-Philippe Brucker
72d47829be refactor(qemu): move GPT setup to BL31
Some platforms such as QEMU-SBSA access the device tree located at the
bottom of the non-secure RAM from BL31.  When GPT checks are enabled at
BL2, that access generates a GPT check fault because the device tree
area is configure as non-secure RAM and the access is made from secure
EL3.

We could change the device tree memory area configuration in a way that
it is accessible from BL31, but that would require another configuration
of the GPT before going to BL33.

Since BL2 and BL31 are both running at EL3, a better solution is simply
move the GPT configuration and enabling to BL31, after the device tree
has been probed.

No change in functionality.

Change-Id: Ifa01c50164268b993d563c32e4e42140259c44e2
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
[Added changelog description]
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Mathieu Poirier
33ac6f99ab fix(qemu-sbsa): fix compilation error when accessing DT functions
When building SBSA, using DT functions from fdt_wrappers.c produces a
linker error.  Adding:

BL2_SOURCES += ${FDT_WRAPPERS_SOURCES}

fixes the problem.  Since the same inclusion would be present in both
qemu/platform.mk and qemu_sbsa/platform.mk, do the changes in
qemu/common/common.mk.

Change-Id: I775b06c1741f6618813c5e1d2c64cdc1888d8519
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-12-06 11:20:43 -07:00
Jens Wiklander
78a91582b0 feat(qemu): increase size of bl31
Increase BL31 size to have room to spare for debugging with EL3 SPMC.

Change-Id: I6e260a284ed2aa5d515b45be90ee2cdeded9c6a9
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2024-11-19 12:50:10 +01:00
Jens Wiklander
eee52dac2c fix(qemu): fix EL3-SPMC data store alignment
With PLAT=qemu, the EL3-SPMC data store is provided as an array of
uint8_t and implicitly with a 1 byte alignment. But the way the data
store is used it must have a larger alignment, so change to double-word
alignment for maximum compatibility.

Change-Id: I4e9b901889078fee4b87f8333257bdc076386572
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2024-11-19 12:50:10 +01:00
Jens Wiklander
1b1b40a941 fix(qemu): fix build error with spmd
Currently when building with PLAT=qemu SPD=spmd SPMC_AT_EL3=1
SPMD_SPM_AT_SEL2=0, there is a build error since
plat_spmd_handle_group0_interrupt() is called irrespective of
SPMC_AT_EL3. Fix this by making plat_spmd_handle_group0_interrupt()
available if SPD_spmd is defined only.

Change-Id: If5f650d2bd3675cbb4b509e9e3743d3865d7c812
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2024-11-19 12:50:10 +01:00
Chris Kay
7a95759f93 fix(build): ensure $(ROT_KEY) depends on correct directory rules
In order for directories to be automatically created when used as a
dependency, they must end with a forward slash (`/`). This is because we
have a pattern rule (`%/`) to create a directory anywhere where a
directory is required as a direct dependency.

Change-Id: Ib632d59da0745f6cadb0a839a62360aeca25c178
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-11-12 12:50:45 +00:00
Soby Mathew
8c99b19e53 Merge "fix(qemu): update rmmd_attest_get_platform_token()" into integration 2024-09-16 11:11:13 +02:00
Jean-Philippe Brucker
9248ee0cc4 fix(qemu): update rmmd_attest_get_platform_token()
Update the parameters to rmmd_attest_get_platform_token(), which can now
handle platform tokens larger than 4kB. Since the QEMU sample token is
smaller than 4kB, our implementation remains the same. Take the
opportunity to clean up the function slightly.

Change-Id: Id5a1d576968ebd160d2b79c1f38392d4ecc89421
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
2024-09-13 16:10:01 +02:00
Tamas Ban
3ba9fca7ed refactor(qemu): use the example CCA platform token from iat-verifier
In [1] and [2], the example CCA platform token has been updated to be
aligned with the new profile(s) defined in draft-ffm-rats-cca-token-00.

This change replaces the static CCA platform token in QEMU.

[1] https://review.trustedfirmware.org/c/TF-M/tf-m-tools/+/30812
[2] https://review.trustedfirmware.org/c/TF-M/tf-m-tools/+/31036

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I9153df1e6c1be81e669d5495dbe8d1a52e86cdff
2024-09-12 15:56:33 +02:00
Soby Mathew
416616567a Merge changes If374b491,I6b63b9c6 into integration
* changes:
  fix(qemu): exclude GPT reserve from BL32_MEM_SIZE
  fix(qemu): fix L0 GPT page table mapping
2024-09-11 12:27:22 +02:00
Jens Wiklander
1f3ca0ef5b chore(qemu): remove duplicate define
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Change-Id: Id18abe80ab56fd51a9c2c1206b22d87f1e3871eb
2024-09-04 10:57:20 +02:00
Jean-Philippe Brucker
7604288577 fix(qemu): exclude GPT reserve from BL32_MEM_SIZE
BL32_MEM_SIZE fails to take into account the space reserved for L0 and
L1 GPTs at the end of secure DRAM, when ENABLE_RME==1.

Fixes: cd75693f5e ("feat(qemu): setup memory map for RME")
Change-Id: If374b491d82be93c195cf501a9d12b9965d85182
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
2024-07-26 10:14:29 +01:00
Jean-Philippe Brucker
147b1a6f06 fix(qemu): fix L0 GPT page table mapping
Page table mappings are missing the bitlock pages introduced by commit
e9bcbd7b2e ("fix(qemu): allocate space for GPT bitlock"). Add them to
the L0 mapping.

Change-Id: I6b63b9c6ea4bf01ab1fac98723340272babe7bf8
Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Fixes: e9bcbd7b2e ("fix(qemu): allocate space for GPT bitlock")
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
2024-07-26 10:10:35 +01:00
Manish Pandey
a3939b1bda Merge "feat(handoff): fix register convention r1/x1 value on transfer list" into integration 2024-07-24 20:04:53 +02:00
levi.yun
7475815f4b feat(handoff): fix register convention r1/x1 value on transfer list
According to recently firmware handsoff spec [1]'s "Register usage at handoff
boundary", Transfer List's signature value was changed from 0x40_b10b
(3 bytes) to 4a0f_b10b (4 bytes).

As updating of TL's signature, register value of x1/r1 should be:

In aarch32's r1 value should be
    R1[23:0]: set to the TL signature (4a0f_b10b -> masked range value: 0f_b10b)
    R1[31:24]: version of the register convention ==  1
and
In aarch64's x1 value should be
    X1[31:0]: set to the TL signature (4a0f_b10b)
    X1[39:32]: version of the register convention ==  1
    X1[63:40]: MBZ
(See the [2] and [3]).

Therefore, it requires to separate mask and shift value for register
convention version field when sets each r1/x1.

This patch fix two problems:
   1. breaking X1 value with updated specification in aarch64
        - change of length of signature field.

   2. previous error value set in R1 in arm32.
        - length of signature should be 24, but it uses 32bit signature.

This change is breaking change. It requires some patch for other
softwares (u-boot[4], optee[5]).

Link: https://github.com/FirmwareHandoff/firmware_handoff [1]
Link: https://github.com/FirmwareHandoff/firmware_handoff/issues/32 [2]
Link: 5aa7aa1d3a [3]
Link: https://lists.denx.de/pipermail/u-boot/2024-July/558628.html [4]
Link: https://github.com/OP-TEE/optee_os/pull/6933 [5]
Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
Change-Id: Ie417e054a7a4c192024a2679419e99efeded1705
2024-07-22 15:54:44 +01:00
Manish Pandey
bb332ed8a0 Merge "fix(qemu): remove validate_ns_entrypoint" into integration 2024-07-09 15:58:14 +02:00
Soby Mathew
5d10069980 Merge "fix(qemu): allocate space for GPT bitlock" into integration 2024-07-03 12:08:10 +02:00
Marcin Juszkiewicz
adc63c99f1 refactor(qemu-sbsa): use fdt_read_uint32_default more
We have fdt_read_uint32_default() function which allows us to use less
temporary variables. Let make use of it where applicable.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Change-Id: I6fc8a87d5aac427703fd3c8b689e153ed58fa8b7
2024-06-27 10:14:27 +02:00
Xiong Yining
c891b4d835 feat(qemu-sbsa): handle the information of CPU topology
We add the support for adding cpus/topology to device tree in sbsaQemu
platform, and we can get this information via SMC calls:

- counting the number of sockets
- counting the number of clusters in one socket
- counting the number of cores in one cluster
- counting the number of threads in one core

Signed-off-by: Xiong Yining <xiongyining1480@phytium.com.cn>
Change-Id: I0059a5c7bb7055aba1aa5ec5bfd0ec78801874f8
2024-06-26 15:53:00 +02:00
Jean-Philippe Brucker
e9bcbd7b2e fix(qemu): allocate space for GPT bitlock
Since commit ec0088bbab ("feat(gpt): add support for large GPT
mappings"), the platform needs to reserve space for the bitlock,
immediately after the L0 GPT table. Add two pages to the L0 GPT reserve.
This could be optimized later by moving the bitlock somewhere else,
because it really only needs (1 << PPS.T) / (512M * 8) = 256 bytes for
the QEMU virt platform.

Fix two more comments in qemu_pas_def.h since we're here.

Change-Id: I2b0b8de38f4b5058735ed16f1cdc50e6b2d52ad9
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
2024-06-17 09:40:04 +01:00
Chris Kay
7c4e1eea61 build: unify verbosity handling
This change introduces a few helper variables for dealing with verbose
and silent build modes: `silent`, `verbose`, `q` and `s`.

The `silent` and `verbose` variables are boolean values determining
whether the build system has been configured to run silently or
verbosely respectively (i.e. with `--silent` or `V=1`).

These two modes cannot be used together - if `silent` is truthy then
`verbose` is always falsy. As such:

    make --silent V=1

... results in a silent build.

In addition to these boolean variables, we also introduce two new
variables - `s` and `q` - for use in rule recipes to conditionally
suppress the output of commands.

When building silently, `s` expands to a value which disables the
command that follows, and `q` expands to a value which supppresses
echoing of the command:

    $(s)echo 'This command is neither echoed nor executed'
    $(q)echo 'This command is executed but not echoed'

When building verbosely, `s` expands to a value which disables the
command that follows, and `q` expands to nothing:

    $(s)echo 'This command is neither echoed nor executed'
    $(q)echo 'This command is executed and echoed'

In all other cases, both `s` and `q` expand to a value which suppresses
echoing of the command that follows:

    $(s)echo 'This command is executed but not echoed'
    $(q)echo 'This command is executed but not echoed'

The `s` variable is predominantly useful for `echo` commands, where you
always want to suppress echoing of the command itself, whilst `q` is
more useful for all other commands.

Change-Id: I8d8ff6ed714d3cb401946c52955887ed7dca602b
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-06-14 15:54:48 +00:00
Jens Wiklander
e5362e29d5 fix(qemu): remove validate_ns_entrypoint
QEMU has dynamic memory configuration based on -m parameter. The
hard-coded values in TF-A are not accurate when starting the model with
this parameter. This is not a problem when loading boot images as the
lower addresses are the same. However, it can be a problem when starting
up the secondary CPUs with a rather high non-secure entry point. So fix
this by removing the plat_psci_ops_t validate_ns_entrypoint assignment
to allow any non-secure entry point.

Change-Id: I95e92b71e0f4fa5f94444ea0cd2cb42e56faa472
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2024-05-29 16:54:41 +02:00
Thomas Fossati
f855434825 refactor(qemu): use the example CCA platform token from iat-verifier
In [1], the example CCA platform token has been updated to fix a small
problem with the description of one of the software components, and to
provide a more realistic breakdown of the expected components in the CCA
TCB.

This change replaces the static CCA platform token in QEMU.

[1] https://review.trustedfirmware.org/c/TF-M/tf-m-tools/+/28493

Change-Id: I8ce49e6ecf83c426dee9024e782a8da457316959
Signed-off-by: Thomas Fossati <thomas.fossati@linaro.org>
2024-05-23 06:10:51 +00:00
Sona Mathew
aaaf2cc313 refactor(cpufeat): add macro to simplify is_feat_xx_present
In this patch, we are trying to introduce the wrapper macro
CREATE_FEATURE_PRESENT to get the following capability and
align it for all the features:

-> is_feat_xx_present(): Does Hardware implement the feature.
-> uniformity in naming the function across multiple features.
-> improved readability

The is_feat_xx_present() is implemented to check if the hardware
implements the feature and does not take into account the
ENABLE_FEAT_XXX flag enabled/disabled in software.

- CREATE_FEATURE_PRESENT(name, idreg, shift, mask, idval)
The wrapper macro reduces the function to a single line and
creates the is_feat_xx_present function that checks the
id register based on the shift and mask values and compares
this against a determined idvalue.

Change-Id: I7b91d2c9c6fbe55f94c693aa1b2c50be54fb9ecc
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-05-02 12:16:16 -05:00
Manish V Badarkhe
a1901c7d0d Merge changes from topic "rss_rse_rename" into integration
* changes:
  refactor(changelog): change all occurrences of RSS to RSE
  refactor(qemu): change all occurrences of RSS to RSE
  refactor(fvp): change all occurrences of RSS to RSE
  refactor(fiptool): change all occurrences of RSS to RSE
  refactor(psa): change all occurrences of RSS to RSE
  refactor(fvp): remove leftovers from rss measured boot support
  refactor(tc): change all occurrences of RSS to RSE
  docs: change all occurrences of RSS to RSE
  refactor(measured-boot): change all occurrences of RSS to RSE
  refactor(rse): change all occurrences of RSS to RSE
  refactor(psa): rename all 'rss' files to 'rse'
  refactor(tc): rename all 'rss' files to 'rse'
  docs: rename all 'rss' files to 'rse'
  refactor(measured-boot): rename all 'rss' files to 'rse'
  refactor(rss): rename all 'rss' files to 'rse'
2024-04-26 16:55:04 +02:00