Commit graph

11291 commits

Author SHA1 Message Date
J-Alves
1a28f290b8 fix(sptool): operators "is/is not" in sp_mk_gen.py
Replace the "is/is not" operator by "==/!=" for literals, to fix the
syntax warnings below:

tools/sptool/sp_mk_generator.py:93: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  return len(sppkg_rule) is not 0

tools/sptool/sp_mk_generator.py:203: SyntaxWarning: "is" with a literal. Did you mean "=="?
  assert(len(uuid_lines) is 1)

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I10800f6b607942542aa2cbaaecac86b854f6b56a
2022-10-07 10:06:08 +01:00
Madhukar Pappireddy
c19116dd61 Merge "refactor(console): move putchar() to console driver" into integration 2022-10-04 17:06:43 +02:00
Manish V Badarkhe
b97b2817ac Merge "fix(versal-net): use api_id directly without FUNCID_MASK" into integration 2022-10-04 11:50:43 +02:00
Manish V Badarkhe
252b2bd8a3 Merge changes I134f125f,Ia4bf45bf into integration
* changes:
  refactor(sgi): rename RD-Edmunds to RD-V2
  refactor(cpu): use the updated IP name for Demeter CPU
2022-10-04 10:45:50 +02:00
Claus Pedersen
e0b6826e44 refactor(console): move putchar() to console driver
Moving putchar() out of libc and adding a weak dummy
implementation in libc.

This is to remove libc's dependencies to the platform
driver.

Signed-off-by: Claus Pedersen <claustbp@google.com>
Change-Id: Ib7fefaec0babb783def614ea23521f482fa4a28a
2022-10-04 09:30:48 +02:00
Manish Pandey
9bd1aed30d Merge "refactor(psci): unify psci_is_last_on_cpu and psci_is_last_on_cpu_safe" into integration 2022-10-03 16:46:52 +02:00
Michal Simek
b0eb6d124b fix(versal-net): use api_id directly without FUNCID_MASK
The purpose of this code is to extract api_id from smc_fid but this masking
is done already in the code with using generic mask from smccc.h
(FUNCID_NUM_MASK). That's why remove FUNCID_MASK is which not needed and
actually also equal to already used FUNCID_NUM_MASK.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I1113825baa5d9d58d9d7c5d9d5855fecf62e8d45
2022-10-03 14:03:38 +02:00
Sandrine Bailleux
967d8c99f4 Merge "build(rss): introduce rss_comms.mk makefile" into integration 2022-10-03 13:37:54 +02:00
Sandrine Bailleux
4348497ace build(rss): introduce rss_comms.mk makefile
Provide a new makefile as a convenience for platform makefiles to pull
in the list of source files and headers for the RSS communication
driver.

Change-Id: I188a1a8f4e77318cdc87c3155b280090c46ce813
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2022-10-03 12:44:36 +02:00
Joel Goddard
91890b7ab3 refactor(sgi): rename RD-Edmunds to RD-V2
Neoverse Reference Design platform RD-Edmunds has been renamed to RD-V2
and so all corresponding references have been changed.

Signed-off-by: Joel Goddard <joel.goddard@arm.com>
Change-Id: I134f125f8ce9ec2f42988ecd742de307da936f2b
2022-10-03 15:31:40 +05:30
Joel Goddard
bd063a73a8 refactor(cpu): use the updated IP name for Demeter CPU
Neoverse Demeter CPU has been renamed to Neoverse V2 CPU.
Correspondingly, update the CPU library, file names and other
references to use the updated IP name.

Signed-off-by: Joel Goddard <joel.goddard@arm.com>
Change-Id: Ia4bf45bf47807c06f4c966861230faea420d088f
2022-10-03 15:31:40 +05:30
Manish Pandey
e8f4ec1ab0 Merge changes from topic "st_uart_updates" into integration
* changes:
  feat(stm32mp1): add early console in SP_min
  feat(st): properly manage early console
  feat(st-uart): manage STM32MP_RECONFIGURE_CONSOLE
  docs(st): introduce STM32MP_RECONFIGURE_CONSOLE
  feat(st): add trace for early console
  fix(stm32mp1): enable crash console in FIQ handler
  feat(st-uart): add initialization with the device tree
  refactor(stm32mp1): move DT_UART_COMPAT in include file
  feat(stm32mp1): configure the serial boot load address
  fix(stm32mp1): update the FIP load address for serial boot
  refactor(st): configure baudrate for UART programmer
  refactor(st-uart): compute the over sampling dynamically
2022-10-03 11:58:07 +02:00
Sandrine Bailleux
8efbd9dc29 Merge "fix(rcar3): fix RPC-IF device node name" into integration 2022-10-03 11:21:28 +02:00
Manish V Badarkhe
4db1bd801c Merge "fix(st): add missing string.h include" into integration 2022-10-03 11:14:30 +02:00
Sandrine Bailleux
fe8573ef1c Merge "fix(intel): fix asynchronous read response by copying data to input buffer" into integration 2022-10-03 10:51:09 +02:00
Sandrine Bailleux
34cf68ad4a Merge "fix(intel): fix Mac verify update and finalize for return response data" into integration 2022-10-03 10:50:01 +02:00
Geert Uytterhoeven
08ae2471b1 fix(rcar3): fix RPC-IF device node name
According to the Generic Names Recommendation in the Devicetree
Specification Release v0.3, and the DT Bindings for the Renesas Reduced
Pin Count Interface, the node name for a Renesas RPC-IF device should be
"spi".  The node name matters, as the node is enabled by passing a DT
fragment from TF-A to subsequent software.

Fix this by renaming the device node in the passed DT fragment from
"rpc" to "spi".

Fixes: 12c75c8886 ("feat(plat/rcar3): emit RPC status to DT fragment if RPC unlocked")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Change-Id: Idb43353947607611331abc344f8c8ae932a20408
2022-10-03 10:47:23 +02:00
Yann Gautier
0d33d38334 fix(st): add missing string.h include
Since patch on libc refactoring, there is a compilation error with
STM32MP_USB_PROGRAMMER=1:
plat/st/common/stm32cubeprogrammer_usb.c:81:35: error:
 implicit declaration of function 'strnlen'
 [-Werror=implicit-function-declaration]
      length += strnlen((char *)&dfu->buffer[GET_PHASE_LEN],

The string.h header file should be included.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I1fbb2d9714cbc0d0640cb5e3c5ae8201dbfbe14e
2022-10-03 10:00:03 +02:00
Joanna Farley
aa9d315009 Merge "chore(libc): clean up includes in lib/libc/printf.c" into integration 2022-09-30 17:50:15 +02:00
Lauren Wehrmeister
8e834443a2 Merge "docs(changelog): fix incorrect documentation title" into integration 2022-09-30 15:35:42 +02:00
Joanna Farley
76250d51d6 Merge "fix(zynqmp): resolve MISRA-C:2012 R.10.1 warnings" into integration 2022-09-30 14:35:25 +02:00
Manish Pandey
2c16b802cb Merge "fix(ras): trap "RAS error record" accesses only for NS" into integration 2022-09-30 14:14:26 +02:00
HariBabu Gattem
c889088386 fix(zynqmp): resolve MISRA-C:2012 R.10.1 warnings
MISRA Violation: MISRA-C: 2012 R.10.1
- The operand to the operator does not have an essentially
unsigned type.

Signed-off-by: HariBabu Gattem <haribabu.gattem@amd.com>
Change-Id: I0f974e9d6f63dddfab55d55c952a57645d931e40
2022-09-30 10:40:34 +02:00
Chris Kay
833b4ffefd docs(changelog): fix incorrect documentation title
Change-Id: Idb4b174f65891ba406f83c213c80ebb8a6ba0b81
Signed-off-by: Chris Kay <chris.kay@arm.com>
2022-09-29 16:56:12 +01:00
Jayanth Dodderi Chidanand
b41b082464 refactor(psci): unify psci_is_last_on_cpu and psci_is_last_on_cpu_safe
"psci_is_last_on_cpu" and "psci_is_last_on_cpu_safe" modules perform
mostly similar functionalities, verifying whether the current CPU
is the only active core and other cores have been turned off.

However, psci_is_last_on_cpu_safe function differs from the other with:
1. Safe API locks the power domain

This patch removes the section duplicating the functionality
and ensures that "psci_is_last_on_cpu api",is reused in
"psci_is_last_on_cpu_safe" procedure.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: Ie372519e423898d7afa5427cdd77a7f9d3369587
2022-09-29 16:37:34 +01:00
Madhukar Pappireddy
62068b10a3 Merge "feat(ls1043ardb): update ddr configure for ls1043ardb-pd" into integration 2022-09-29 16:45:48 +02:00
Manish Pandey
76453e7e7e Merge "fix(rme): update FVP platform token" into integration 2022-09-29 16:39:01 +02:00
Mate Toth-Pal
364b4cddba fix(rme): update FVP platform token
Update test CCA Platform token in fvp_plat_attest_token.c to be
up-to-date with RMM spec Beta0.

Change-Id: I0f5e2ac1149eb6f7a93a997682f41d90e109a049
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
2022-09-29 15:35:18 +02:00
Manish V Badarkhe
ea7aee20c1 Merge "fix(rmmd): return X4 output value" into integration 2022-09-29 10:25:57 +02:00
Joanna Farley
a291687de2 Merge "fix(zynqmp): resolve misra 4.6 warnings" into integration 2022-09-29 10:15:01 +02:00
Sandrine Bailleux
711ce52bc6 Merge "feat(rss): add new comms protocols" into integration 2022-09-29 08:20:59 +02:00
Manish Pandey
00e8f79c15 fix(ras): trap "RAS error record" accesses only for NS
RAS_TRAP_LOWER_EL_ERR_ACCESS was used to prevent access to RAS error
record registers (RAS ERR* & RAS ERX*) from lower EL's in any security
state. To give more fine grain control per world basis re-purpose this
macro to RAS_TRAP_NS_ERR_REC_ACCESS, which will enable the trap only
if Error record registers are accessed from NS.
This will also help in future scenarios when RAS handling(in Firmware
first handling paradigm)can be offloaded to a secure partition.

This is first patch in series to refactor RAS framework in TF-A.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ifa7f60bc8c82c9960adf029001bc36c443016d5d
2022-09-28 17:10:57 +01:00
Manish Pandey
3a3722c9e1 Merge "fix(tc): resolve the static-checks errors" into integration 2022-09-28 16:06:45 +02:00
AlexeiFedorov
8e51cccaef fix(rmmd): return X4 output value
Return values contained in 'smc_result' structure
are shifted down by one register:
X1 written by RMM is returned to NS in X0 and
X5 is returned in X4.

Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: I92907ac3ff3bac8554643ae7c198a4a758c38cb3
2022-09-28 15:11:03 +02:00
Jayanth Dodderi Chidanand
066450abf3 fix(tc): resolve the static-checks errors
Converted the space indentation to tabs to fix the
errors listed under tf-static-checks CI job.

Change-Id: Ie911a5befd0eeaa5a2019245cc3c43ad375cd068
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2022-09-28 13:48:12 +01:00
Raef Coles
3125901923 feat(rss): add new comms protocols
The current comms protocol (where arguments and return data is embedded
into the MHU message) is now protocol v0. Protocol v1 embeds pointers
into the message, and has the RSS retrieve the data via DMA.

Change-Id: I08d7f09c4eaea673769fde9eee194447a99f1b78
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-09-28 13:38:02 +01:00
Chunlei Xu
18af644279 feat(ls1043ardb): update ddr configure for ls1043ardb-pd
DDR4 Chip is EOL during redesign of ls1043ardb pd version. The replacement from MT is MT40A1G8SA-062E:R.
New ddr configure is compatible with both pd and old version of ls1043ardb.

Signed-off-by: Chunlei Xu <chunlei.xu@nxp.com>
Change-Id: I714c091a2cf15046438d0723fb55a4410c386ef4
2022-09-28 16:58:15 +08:00
Jorge Troncoso
c5862af72d chore(libc): clean up includes in lib/libc/printf.c
stddef.h is needed for the definition of size_t
stdio.h is needed for the declaration of putchar

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: I72dac843dbbfc440cff0f9e9d13669b78a812abc
2022-09-27 22:50:54 -07:00
Joanna Farley
58aebb6a53 Merge "fix(libc): pri*ptr macros for aarch64" into integration 2022-09-28 01:19:28 +02:00
Sandrine Bailleux
0f2ab75fa3 Merge "feat(tc): add RTC PL031 device tree node" into integration 2022-09-27 13:03:54 +02:00
Manish V Badarkhe
14ec900a42 Merge "docs(maintainers): add myself as TC code owner" into integration 2022-09-27 11:42:46 +02:00
Anders Dellien
8fecda3c8a docs(maintainers): add myself as TC code owner
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Change-Id: Ic67334bf1a979cb7b7355d0dcca7eb94752c4611
2022-09-27 09:47:54 +01:00
K
d307229d75 fix(libc): pri*ptr macros for aarch64
This fix solves problems with using PRI*PTR on aarch64 like so:
error: format '%x' expects argument of type 'unsigned int', but
argument 3 has type 'uintptr_t' {aka 'long unsigned int'}

Change-Id: I135d3e5cea5459f138b20331b5e9472e2e9e566c
Signed-off-by: K <kayo@illumium.org>
2022-09-27 09:19:32 +02:00
HariBabu Gattem
cdb62114cf fix(zynqmp): resolve misra 4.6 warnings
MISRA Violation: MISRA-C:2012 R.4.6
- Using basic numerical type int rather than a typedef
that includes size and signedness information.

Signed-off-by: HariBabu Gattem <haribabu.gattem@amd.com>
Change-Id: I3779f7b6e074e33cb66ace3bef2117029badce1e
2022-09-26 12:13:00 +02:00
Sandrine Bailleux
d8d0ea9a7f Merge "docs(fwu): update firmware update design" into integration 2022-09-26 11:02:51 +02:00
Joanna Farley
2aaed86080 Merge "refactor(libc): clean up dependencies in libc" into integration 2022-09-23 17:24:01 +02:00
Yann Gautier
14a070408d feat(stm32mp1): add early console in SP_min
Allow early console to be used at the beginning of SP_min, before
the clocks and UART have been reconfigured.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I53d66938d42fcec830d9b81e5ef62b3790d0c3b3
2022-09-23 15:17:43 +02:00
Yann Gautier
5223d88032 feat(st): properly manage early console
The new flag STM32MP_RECONFIGURE_CONSOLE is managed in platform.mk.
It is used in stm32mp_setup_early_console() when calling
plat_crash_console_init(). This call is also under:
"#if defined(IMAGE_BL2)"
as this crash console init shouldn't be done by default in BL32.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Ib6b89db83d80095b662a2016e18ceb3fa8668435
2022-09-23 15:17:43 +02:00
Yann Gautier
ea69dcdc73 feat(st-uart): manage STM32MP_RECONFIGURE_CONSOLE
If the flag STM32MP_RECONFIGURE_CONSOLE is set in BL32, the UART init
should be skipped if the UART clock is set to zero. This will be used
when configuring the default console, after an early console has been
configured.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Icbc640c7bdd6342f9c3ec1586a0d0c64127b18b8
2022-09-23 15:17:43 +02:00
Yann Gautier
156709ddde docs(st): introduce STM32MP_RECONFIGURE_CONSOLE
This flag will be used in BL32, to reconfigure UART parameters for
the early or crash console. By default, it is zero, as UART is
already configured in BL2.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I7b28ff489479ab04a2fade027933524cdd36e959
2022-09-23 15:17:43 +02:00