]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
2 years agobuild(npm): add NVM version file
Chris Kay [Mon, 10 Oct 2022 12:21:19 +0000 (13:21 +0100)]
build(npm): add NVM version file

The `.nvmrc` file specifies the version of Node.js that the repository's
Node.js-based tooling has been designed to be compatible with.

Users of NVM may want to run `nvm use` to install this version
automatically.

Change-Id: Ied90c51d8d1e5b43f2ca4de08a58bc782d9ae4e6
Signed-off-by: Chris Kay <chris.kay@arm.com>
2 years agoMerge "fix(qemu): enable SVE and SME" into integration
Sandrine Bailleux [Wed, 5 Oct 2022 13:08:32 +0000 (15:08 +0200)]
Merge "fix(qemu): enable SVE and SME" into integration

2 years agoMerge "fix(rss): fix build issues with comms protocol" into integration
Sandrine Bailleux [Wed, 5 Oct 2022 12:44:05 +0000 (14:44 +0200)]
Merge "fix(rss): fix build issues with comms protocol" into integration

2 years agofix(rss): fix build issues with comms protocol
Tamas Ban [Mon, 3 Oct 2022 13:34:02 +0000 (15:34 +0200)]
fix(rss): fix build issues with comms protocol

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I77d2d3c5ac39a840b768f84f859d76b3965749aa

2 years agoMerge changes from topic "mt8188 cpu_pm" into integration
Olivier Deprez [Wed, 5 Oct 2022 11:37:10 +0000 (13:37 +0200)]
Merge changes from topic "mt8188 cpu_pm" into integration

* changes:
  feat(mediatek): move lpm drivers back to common
  feat(mt8188): add cpu_pm driver
  fix(mt8188): refine c-state power domain for extensibility

2 years agoMerge "fix(mt8186-emi-mpu): fix SCP permission" into integration
Olivier Deprez [Wed, 5 Oct 2022 09:31:36 +0000 (11:31 +0200)]
Merge "fix(mt8186-emi-mpu): fix SCP permission" into integration

2 years agofix(qemu): enable SVE and SME
Andre Przywara [Tue, 4 Oct 2022 12:41:32 +0000 (13:41 +0100)]
fix(qemu): enable SVE and SME

Starting with QEMU v3.1.0 (Dec 2018), QEMU's TCG emulation engine supports
the SVE architecture extension. In QEMU v7.1.0 (Aug 2022) it also gained
SME support.

As it stands today, running TF-A under QEMU with "-cpu max" makes Linux
hang, because SME and SVE accesses trap to EL3, but are never handled
there. This is because the Linux kernel sees the SVE or SME feature bits,
and assumes firmware has enabled the feature for lower exception levels.
This requirement is described in the Linux kernel booting protocol.

Enable those features in the TF-A build, so that BL31 does the proper
EL3 setup to make the feature usable in non-secure world.
We check the actual feature bits before accessing SVE or SME registers,
so this is safe even for older QEMU version or when not running with
-cpu max. As SVE and SME are AArch64 features only, do not enable them
when building for AArch32.

Change-Id: I5b718eb298a0bbcf36244479e8d42e54a2faca61
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoMerge changes from topic "aarch32_debug_aborts" into integration
Manish Pandey [Wed, 5 Oct 2022 09:15:28 +0000 (11:15 +0200)]
Merge changes from topic "aarch32_debug_aborts" into integration

* changes:
  feat(stm32mp1): add plat_report_*_abort functions
  feat(debug): add helpers for aborts on AARCH32
  feat(debug): add AARCH32 CP15 fault registers

2 years agoMerge "feat(fvp): support building RSS comms driver" into integration
Manish Pandey [Wed, 5 Oct 2022 09:00:26 +0000 (11:00 +0200)]
Merge "feat(fvp): support building RSS comms driver" into integration

2 years agoMerge "refactor(console): move putchar() to console driver" into integration
Madhukar Pappireddy [Tue, 4 Oct 2022 15:06:43 +0000 (17:06 +0200)]
Merge "refactor(console): move putchar() to console driver" into integration

2 years agofix(mt8186-emi-mpu): fix SCP permission
Yidi Lin [Mon, 3 Oct 2022 11:26:33 +0000 (19:26 +0800)]
fix(mt8186-emi-mpu): fix SCP permission

Hardware video decoding is not working after enabling EMI MPU protection
for SCP.

According to coreboot DEVAPC setting, SCP belongs to domain 4 instead of
domain 3. So correct the permission setting.

BUG=b:249954378
TEST=play video and see codec irq count is incrementing.

Signed-off-by: Yidi Lin <yidilin@chromium.org>
Change-Id: If71de3eabf8682909f96924c159aa92f25deb96c

2 years agoMerge "fix(versal-net): use api_id directly without FUNCID_MASK" into integration
Manish V Badarkhe [Tue, 4 Oct 2022 09:50:43 +0000 (11:50 +0200)]
Merge "fix(versal-net): use api_id directly without FUNCID_MASK" into integration

2 years agoMerge changes I134f125f,Ia4bf45bf into integration
Manish V Badarkhe [Tue, 4 Oct 2022 08:45:50 +0000 (10:45 +0200)]
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

2 years agorefactor(console): move putchar() to console driver
Claus Pedersen [Mon, 12 Sep 2022 23:47:10 +0000 (23:47 +0000)]
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

2 years agofeat(mediatek): move lpm drivers back to common
Bo-Chen Chen [Thu, 29 Sep 2022 02:41:26 +0000 (10:41 +0800)]
feat(mediatek): move lpm drivers back to common

In order to sync drivers with MediaTek internal code base, we move lpm
drivers back to common folder.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I1066e092febe0abb9782a46f668613e137737c88

2 years agofeat(mt8188): add cpu_pm driver
Edward-JW Yang [Mon, 5 Sep 2022 09:36:36 +0000 (17:36 +0800)]
feat(mt8188): add cpu_pm driver

- Add cpu_pm driver for CPU idle and SMP flow.
- Add SMP driver for CPU power on/off control.
- Add CPC driver to handle CPU powered on/off in CPU suspend.
- Add mbox driver for tinysys support.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com>
Change-Id: I20141474e1c43cdfacb9f2c6a2285721e50a617c

2 years agofix(mt8188): refine c-state power domain for extensibility
Edward-JW Yang [Thu, 15 Sep 2022 13:09:10 +0000 (21:09 +0800)]
fix(mt8188): refine c-state power domain for extensibility

1. MT8188 uses "suspend to RAM" instead of "suspend to idle", so
   remove s2idle state.
2. Definition c-state power domain:
    - bit[7:4] (main state id):
      1: Cluster.
      2: Mcusys.
      3: Memory.
      4: System pll.
      5: System bus.
      6: SoC 26m/DCXO.
      7: Vcore buck.
      15: Suspend.
    - bit[3:0] (reserved for state_id extension):
      4: CPU buck.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.corp-partner.google.com>
Change-Id: Ibacd3d642f78726e1f1c08f18892481d2695f9e6

2 years agoMerge "refactor(psci): unify psci_is_last_on_cpu and psci_is_last_on_cpu_safe" into...
Manish Pandey [Mon, 3 Oct 2022 14:46:52 +0000 (16:46 +0200)]
Merge "refactor(psci): unify psci_is_last_on_cpu and psci_is_last_on_cpu_safe" into integration

2 years agofeat(stm32mp1): add plat_report_*_abort functions
Yann Gautier [Thu, 29 Aug 2019 17:04:29 +0000 (19:04 +0200)]
feat(stm32mp1): add plat_report_*_abort functions

The new helpers are created in STM32MP1 platform for prefetch and data
aborts.
While at it, put plat_report_exception() under DEBUG flag. If DEBUG is
not set, the weak function which does the same will be used.
This plat_report_exception() function can also be simplified, as it will
no more be used to report aborts.

Change-Id: Ibe989b28e236693f317cffb0545ea0611b7bdde4
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2 years agofeat(debug): add helpers for aborts on AARCH32
Yann Gautier [Fri, 15 Feb 2019 15:42:20 +0000 (16:42 +0100)]
feat(debug): add helpers for aborts on AARCH32

New helper functions are created to handle data & prefetch aborts
in AARCH32. They call platform functions, just like what
report_exception is doing.
As extended MSR/MRS instructions (to access lr_abt in monitor mode)
are only available if CPU (Armv7) has virtualization extension,
the functions branch to original report_exception handlers if this is
not the case.
Those new helpers are created mainly to distinguish data and prefetch
aborts, as they both share the same mode.
This adds 40 bytes of code.

Change-Id: I5dd31930344ad4e3a658f8a9d366a87a300aeb67
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2 years agofeat(debug): add AARCH32 CP15 fault registers
Yann Gautier [Tue, 21 May 2019 16:59:18 +0000 (18:59 +0200)]
feat(debug): add AARCH32 CP15 fault registers

For an easier debug on Aarch32, in case of abort, it is useful to access
DFSR, IFSR, DFAR and IFAR CP15 registers.

Change-Id: Ie6b5a2882cd701f76e9d455ec43bd4b0fbe3cc78
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2 years agofix(versal-net): use api_id directly without FUNCID_MASK
Michal Simek [Mon, 3 Oct 2022 12:02:57 +0000 (14:02 +0200)]
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

2 years agoMerge "build(rss): introduce rss_comms.mk makefile" into integration
Sandrine Bailleux [Mon, 3 Oct 2022 11:37:54 +0000 (13:37 +0200)]
Merge "build(rss): introduce rss_comms.mk makefile" into integration

2 years agofeat(fvp): support building RSS comms driver
Sandrine Bailleux [Wed, 31 Aug 2022 12:05:38 +0000 (14:05 +0200)]
feat(fvp): support building RSS comms driver

On one hand, there is currently no upstream platform supporting the
RSS. On the other hand, we are gradually introducing driver code for
RSS. Even though we cannot test this code in the TF-A CI right now, we
can at least build it to make sure no build regressions are introduced
as we continue development.

This patch adds support for overriding PLAT_RSS_NOT_SUPPORTED build
flag (which defaults to 1 on the Base AEM FVP) from the command
line. This allows introducing an ad-hoc CI build config with
PLAT_RSS_NOT_SUPPORTED=0, which will correctly pull in the RSS and MHU
source files. Of course, the resulting firmware will not be
functional.

Change-Id: I2b0e8dd03bf301e7063dd4734ea5266b73265be1
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2 years agobuild(rss): introduce rss_comms.mk makefile
Sandrine Bailleux [Wed, 31 Aug 2022 11:53:10 +0000 (13:53 +0200)]
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>
2 years agorefactor(sgi): rename RD-Edmunds to RD-V2
Joel Goddard [Wed, 21 Sep 2022 16:21:12 +0000 (21:51 +0530)]
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

2 years agorefactor(cpu): use the updated IP name for Demeter CPU
Joel Goddard [Wed, 21 Sep 2022 16:22:28 +0000 (21:52 +0530)]
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

2 years agoMerge changes from topic "st_uart_updates" into integration
Manish Pandey [Mon, 3 Oct 2022 09:58:07 +0000 (11:58 +0200)]
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

2 years agoMerge "fix(rcar3): fix RPC-IF device node name" into integration
Sandrine Bailleux [Mon, 3 Oct 2022 09:21:28 +0000 (11:21 +0200)]
Merge "fix(rcar3): fix RPC-IF device node name" into integration

2 years agoMerge "fix(st): add missing string.h include" into integration
Manish V Badarkhe [Mon, 3 Oct 2022 09:14:30 +0000 (11:14 +0200)]
Merge "fix(st): add missing string.h include" into integration

2 years agoMerge "fix(intel): fix asynchronous read response by copying data to input buffer...
Sandrine Bailleux [Mon, 3 Oct 2022 08:51:09 +0000 (10:51 +0200)]
Merge "fix(intel): fix asynchronous read response by copying data to input buffer" into integration

2 years agoMerge "fix(intel): fix Mac verify update and finalize for return response data" into...
Sandrine Bailleux [Mon, 3 Oct 2022 08:50:01 +0000 (10:50 +0200)]
Merge "fix(intel): fix Mac verify update and finalize for return response data" into integration

2 years agofix(rcar3): fix RPC-IF device node name
Geert Uytterhoeven [Wed, 23 Mar 2022 13:21:31 +0000 (14:21 +0100)]
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: 12c75c8886a0ee69 ("feat(plat/rcar3): emit RPC status to DT fragment if RPC unlocked")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Change-Id: Idb43353947607611331abc344f8c8ae932a20408

2 years agofix(st): add missing string.h include
Yann Gautier [Mon, 3 Oct 2022 07:30:34 +0000 (09:30 +0200)]
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

2 years agoMerge "chore(libc): clean up includes in lib/libc/printf.c" into integration
Joanna Farley [Fri, 30 Sep 2022 15:50:15 +0000 (17:50 +0200)]
Merge "chore(libc): clean up includes in lib/libc/printf.c" into integration

2 years agoMerge "docs(changelog): fix incorrect documentation title" into integration
Lauren Wehrmeister [Fri, 30 Sep 2022 13:35:42 +0000 (15:35 +0200)]
Merge "docs(changelog): fix incorrect documentation title" into integration

2 years agoMerge "fix(zynqmp): resolve MISRA-C:2012 R.10.1 warnings" into integration
Joanna Farley [Fri, 30 Sep 2022 12:35:25 +0000 (14:35 +0200)]
Merge "fix(zynqmp): resolve MISRA-C:2012 R.10.1 warnings" into integration

2 years agoMerge "fix(ras): trap "RAS error record" accesses only for NS" into integration
Manish Pandey [Fri, 30 Sep 2022 12:14:26 +0000 (14:14 +0200)]
Merge "fix(ras): trap "RAS error record" accesses only for NS" into integration

2 years agofix(zynqmp): resolve MISRA-C:2012 R.10.1 warnings
HariBabu Gattem [Fri, 30 Sep 2022 06:59:11 +0000 (23:59 -0700)]
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

2 years agodocs(changelog): fix incorrect documentation title
Chris Kay [Thu, 29 Sep 2022 15:42:23 +0000 (16:42 +0100)]
docs(changelog): fix incorrect documentation title

Change-Id: Idb4b174f65891ba406f83c213c80ebb8a6ba0b81
Signed-off-by: Chris Kay <chris.kay@arm.com>
2 years agorefactor(psci): unify psci_is_last_on_cpu and psci_is_last_on_cpu_safe
Jayanth Dodderi Chidanand [Mon, 22 Aug 2022 22:46:10 +0000 (23:46 +0100)]
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

2 years agoMerge "feat(ls1043ardb): update ddr configure for ls1043ardb-pd" into integration
Madhukar Pappireddy [Thu, 29 Sep 2022 14:45:48 +0000 (16:45 +0200)]
Merge "feat(ls1043ardb): update ddr configure for ls1043ardb-pd" into integration

2 years agoMerge "fix(rme): update FVP platform token" into integration
Manish Pandey [Thu, 29 Sep 2022 14:39:01 +0000 (16:39 +0200)]
Merge "fix(rme): update FVP platform token" into integration

2 years agofix(rme): update FVP platform token
Mate Toth-Pal [Mon, 19 Sep 2022 14:46:49 +0000 (16:46 +0200)]
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>
2 years agoMerge "fix(rmmd): return X4 output value" into integration
Manish V Badarkhe [Thu, 29 Sep 2022 08:25:57 +0000 (10:25 +0200)]
Merge "fix(rmmd): return X4 output value" into integration

2 years agoMerge "fix(zynqmp): resolve misra 4.6 warnings" into integration
Joanna Farley [Thu, 29 Sep 2022 08:15:01 +0000 (10:15 +0200)]
Merge "fix(zynqmp): resolve misra 4.6 warnings" into integration

2 years agoMerge "feat(rss): add new comms protocols" into integration
Sandrine Bailleux [Thu, 29 Sep 2022 06:20:59 +0000 (08:20 +0200)]
Merge "feat(rss): add new comms protocols" into integration

2 years agofix(ras): trap "RAS error record" accesses only for NS
Manish Pandey [Tue, 27 Sep 2022 13:30:34 +0000 (14:30 +0100)]
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

2 years agoMerge "fix(tc): resolve the static-checks errors" into integration
Manish Pandey [Wed, 28 Sep 2022 14:06:45 +0000 (16:06 +0200)]
Merge "fix(tc): resolve the static-checks errors" into integration

2 years agofix(rmmd): return X4 output value
AlexeiFedorov [Fri, 23 Sep 2022 15:57:28 +0000 (16:57 +0100)]
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

2 years agofix(tc): resolve the static-checks errors
Jayanth Dodderi Chidanand [Wed, 28 Sep 2022 10:41:48 +0000 (11:41 +0100)]
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>
2 years agofeat(rss): add new comms protocols
Raef Coles [Wed, 15 Jun 2022 13:37:22 +0000 (14:37 +0100)]
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>
2 years agofeat(ls1043ardb): update ddr configure for ls1043ardb-pd
Chunlei Xu [Wed, 28 Sep 2022 08:58:15 +0000 (16:58 +0800)]
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

2 years agochore(libc): clean up includes in lib/libc/printf.c
Jorge Troncoso [Wed, 28 Sep 2022 00:35:54 +0000 (17:35 -0700)]
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

2 years agoMerge "fix(libc): pri*ptr macros for aarch64" into integration
Joanna Farley [Tue, 27 Sep 2022 23:19:28 +0000 (01:19 +0200)]
Merge "fix(libc): pri*ptr macros for aarch64" into integration

2 years agoMerge "feat(tc): add RTC PL031 device tree node" into integration
Sandrine Bailleux [Tue, 27 Sep 2022 11:03:54 +0000 (13:03 +0200)]
Merge "feat(tc): add RTC PL031 device tree node" into integration

2 years agoMerge "docs(maintainers): add myself as TC code owner" into integration
Manish V Badarkhe [Tue, 27 Sep 2022 09:42:46 +0000 (11:42 +0200)]
Merge "docs(maintainers): add myself as TC code owner" into integration

2 years agodocs(maintainers): add myself as TC code owner
Anders Dellien [Wed, 21 Sep 2022 14:56:02 +0000 (15:56 +0100)]
docs(maintainers): add myself as TC code owner

Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Change-Id: Ic67334bf1a979cb7b7355d0dcca7eb94752c4611

2 years agofix(libc): pri*ptr macros for aarch64
K [Wed, 27 Jul 2022 12:30:49 +0000 (17:30 +0500)]
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>
2 years agofix(zynqmp): resolve misra 4.6 warnings
HariBabu Gattem [Thu, 22 Sep 2022 09:45:16 +0000 (02:45 -0700)]
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

2 years agoMerge "docs(fwu): update firmware update design" into integration
Sandrine Bailleux [Mon, 26 Sep 2022 09:02:51 +0000 (11:02 +0200)]
Merge "docs(fwu): update firmware update design" into integration

2 years agoMerge "refactor(libc): clean up dependencies in libc" into integration
Joanna Farley [Fri, 23 Sep 2022 15:24:01 +0000 (17:24 +0200)]
Merge "refactor(libc): clean up dependencies in libc" into integration

2 years agofeat(stm32mp1): add early console in SP_min
Yann Gautier [Fri, 15 Oct 2021 14:49:07 +0000 (16:49 +0200)]
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

2 years agofeat(st): properly manage early console
Yann Gautier [Tue, 13 Sep 2022 11:59:48 +0000 (13:59 +0200)]
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

2 years agofeat(st-uart): manage STM32MP_RECONFIGURE_CONSOLE
Yann Gautier [Tue, 13 Sep 2022 11:55:43 +0000 (13:55 +0200)]
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

2 years agodocs(st): introduce STM32MP_RECONFIGURE_CONSOLE
Yann Gautier [Tue, 13 Sep 2022 11:53:41 +0000 (13:53 +0200)]
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

2 years agofeat(st): add trace for early console
Yann Gautier [Thu, 9 Jun 2022 15:34:30 +0000 (17:34 +0200)]
feat(st): add trace for early console

When the early console is configured with STM32MP_EARLY_CONSOLE,
display a message indicating it is enabled.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Iafdfa5afef27eba823d707841853a8a46de0b42d

2 years agofix(stm32mp1): enable crash console in FIQ handler
Yann Gautier [Mon, 7 Mar 2022 15:09:23 +0000 (16:09 +0100)]
fix(stm32mp1): enable crash console in FIQ handler

When a FIQ occurs and is trapped by SP_min, it is an unrecoverable
error. As kernel may have switched the UART console off, we should
re-enable it with plat_crash_console_init() for those failing states.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ib02e1271b6213f8e383a062b74494abf8826188f

2 years agofeat(st-uart): add initialization with the device tree
Patrick Delaunay [Thu, 14 Apr 2022 09:19:03 +0000 (11:19 +0200)]
feat(st-uart): add initialization with the device tree

Add the pincontrol configuration and clock enable in UART driver
with information found in the device tree.

This patch avoids an issue on STM32MP13x platform because the UART
configuration is reset by the ROM code for UART serial boot
(STM32MP_UART_PROGRAMMER=1).

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I575fd0e1026b857059abcfd4a3166eb3a239e1fd

2 years agorefactor(stm32mp1): move DT_UART_COMPAT in include file
Patrick Delaunay [Thu, 14 Apr 2022 09:15:43 +0000 (11:15 +0200)]
refactor(stm32mp1): move DT_UART_COMPAT in include file

Move the definition of DT_UART_COMPAT in stm32mp1_def.h to be used
in several files.

Change-Id: I74d0350bcd971df9b15697f2b9ec04061d6a7656
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agofeat(stm32mp1): configure the serial boot load address
Patrick Delaunay [Tue, 15 Mar 2022 10:20:56 +0000 (11:20 +0100)]
feat(stm32mp1): configure the serial boot load address

For product with 128MB DDR size, the OP-TEE is located at the end
of the DDR and the FIP can't be loaded at the default location
because it overlap the OP-TEE final location. So the default value
for DWL_BUFFER_BASE is invalid.

To avoid this conflict the serial boot load address = DWL_BUFFER_BASE
can be modified with a configuration flags.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ie27b87c10c57fea5d4c6200ce4f624e775b9a080

2 years agofix(stm32mp1): update the FIP load address for serial boot
Patrick Delaunay [Mon, 28 Feb 2022 10:02:35 +0000 (11:02 +0100)]
fix(stm32mp1): update the FIP load address for serial boot

Update the FIP load address and size for serial boot to support
product with a DDR size = 128MB
1/ Move the FIP location at the end of the first 128MB
2/ Reduce the DWL_BUFFER_SIZE to 16MB, to be coherent with the value
   indicated in USB enumeration
   - for STM32MP13x: "@SSBL /0x03/1*16Me"
   - for STM32MP15x: "@Partition3 /0x03/1*16Me"

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Id93bf00c64832c17426bfd78e060861275677ecc

2 years agorefactor(st): configure baudrate for UART programmer
Patrick Delaunay [Wed, 2 Mar 2022 14:43:02 +0000 (15:43 +0100)]
refactor(st): configure baudrate for UART programmer

Add the possibility to configure the UART baudrate; reused the
console configuration, defined in STM32MP_UART_BAUDRATE.

The default value remains 115200.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ifcf2b36e8ac929265405bc88e824ee78be3b5bbb

2 years agorefactor(st-uart): compute the over sampling dynamically
Patrick Delaunay [Wed, 2 Mar 2022 14:29:08 +0000 (15:29 +0100)]
refactor(st-uart): compute the over sampling dynamically

The parameter over_sampling of stm32_uart_init_s is not required
as it can be computed dynamically from clock rate of the serial
device and the requested baudrate.

Oversampling by 8 is allowed only for higher speed
(up to clock_rate / 8) to reduce the maximum receiver tolerance
to clock deviation.

This patch update the driver, the serial init struct and the
only user, the stm32cubeprogrammer over uart support.

Change-Id: I422731089730a288defeb7fa49886db65d0902b2
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agoMerge changes from topic "bl31_in_sram" into integration
Manish V Badarkhe [Fri, 23 Sep 2022 11:32:09 +0000 (13:32 +0200)]
Merge changes from topic "bl31_in_sram" into integration

* changes:
  feat(sgi): remove override for `ARM_BL31_IN_DRAM` build-option
  feat(sgi): configure SRAM and BL31 size for sgi platform

2 years agoMerge "fix(bl31): fix validate_el3_interrupt_rm preprocessor usage" into integration
Olivier Deprez [Fri, 23 Sep 2022 08:14:13 +0000 (10:14 +0200)]
Merge "fix(bl31): fix validate_el3_interrupt_rm preprocessor usage" into integration

2 years agofeat(sgi): remove override for `ARM_BL31_IN_DRAM` build-option
Rohit Mathew [Fri, 8 Jul 2022 12:00:22 +0000 (13:00 +0100)]
feat(sgi): remove override for `ARM_BL31_IN_DRAM` build-option

RD-N2* variants of Neoverse reference design platforms could be
configured to boot from SRAM or DRAM. Having ARM_BL31_IN_DRAM set to 1
within the common makefile would deter these platforms from having this
flexibility. Remove the default override configuration for
`ARM_BL31_IN_DRAM`.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I8d79969c003a984675cbe705de890b51a1f7f4ea

2 years agofeat(sgi): configure SRAM and BL31 size for sgi platform
Rohit Mathew [Fri, 8 Jul 2022 11:59:29 +0000 (12:59 +0100)]
feat(sgi): configure SRAM and BL31 size for sgi platform

Update SRAM size for Neoverse reference design platforms from 256KB to
512KB. This is required to place and execute BL31 image from the
on-chip SRAM. Additionally, revise BL31 image size to accommodate
larger BL31 images of multi-chip platforms.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I11c2672a1089f24a9fafcf6555b8e1d52032cfde

2 years agoMerge changes from topic "mediatek upstream" into integration
Manish Pandey [Thu, 22 Sep 2022 14:31:49 +0000 (16:31 +0200)]
Merge changes from topic "mediatek upstream" into integration

* changes:
  refactor(mt8188): move platform_def.h to mt8188/include
  feat(mt8188): add MCUSYS support
  feat(mt8188): add armv8.2 support
  feat(mt8188): add DFD control in SiP service
  feat(mt8188): add EMI MPU basic drivers
  feat(mt8188): add DCM driver
  feat(mt8188): add reset and poweroff functions
  feat(mediatek): add more flexibility of mtk_pm.c
  feat(mediatek): add more options for build helper
  feat(mt8188): add LPM driver support
  feat(mt8188): apply ERRATA for CA-78
  fix(mediatek): remove unused cold_boot.[c|h]
  fix(mediatek): wrap cold_boot.h with MTK_SIP_KERNEL_BOOT_ENABLE
  feat(mt8186): add EMI MPU support for SCP and DSP

2 years agorefactor(mt8188): move platform_def.h to mt8188/include
Bo-Chen Chen [Wed, 14 Sep 2022 05:47:59 +0000 (13:47 +0800)]
refactor(mt8188): move platform_def.h to mt8188/include

It is more suitable to place platform_def.h in mt8188/include.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I35720690ff4f2ca99c9430edb8bbe17edf9aefb9

2 years agofeat(mt8188): add MCUSYS support
Edward-JW Yang [Fri, 16 Sep 2022 03:30:43 +0000 (11:30 +0800)]
feat(mt8188): add MCUSYS support

Add MCUSYS drivers support for MT8188.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com>
Change-Id: I84107702a9fd021c37d2997ad25b321a483a1a66

2 years agofeat(mt8188): add armv8.2 support
Edward-JW Yang [Mon, 5 Sep 2022 08:07:00 +0000 (16:07 +0800)]
feat(mt8188): add armv8.2 support

Add armv8.2 support for MT8188.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com>
Change-Id: I0ac865949ba864fb207ee1f0937092cbabd550de

2 years agofeat(mt8188): add DFD control in SiP service
Fengquan Chen [Wed, 17 Aug 2022 02:42:15 +0000 (10:42 +0800)]
feat(mt8188): add DFD control in SiP service

DFD (Design for Debug) is a debugging tool, which scans flip-flops and
dumps to internal RAM on the WDT reset. After system reboots, those
values could be showed for debugging.

TEST=build pass.
BUG=b:244216434

Signed-off-by: Fengquan Chen <fengquan.chen@mediatek.corp-partner.google.com>
Change-Id: I468036131e941a46bc1ec12d33105146000730d8

2 years agofeat(mt8188): add EMI MPU basic drivers
Dawei Chien [Mon, 5 Sep 2022 11:08:59 +0000 (19:08 +0800)]
feat(mt8188): add EMI MPU basic drivers

EMI MPU stands for external memory interface memory protect unit.
MT8188 supports 32 regions and 16 domains.

Signed-off-by: Dawei Chien <dawei.chien@mediatek.com>
Change-Id: I9bbeb355665401cc71dda6db22157d9d751570d1

2 years agofeat(mt8188): add DCM driver
Garmin Chang [Mon, 5 Sep 2022 09:44:02 +0000 (17:44 +0800)]
feat(mt8188): add DCM driver

DCM means dynamic clock management, and it can dynamically
slow down or gate clocks during CPU or bus idle.

1. Add MCUSYS related DCM drivers.
2. Enable MCUSYS related DCM by default.

Signed-off-by: Garmin Chang <garmin.chang@mediatek.com>
Change-Id: I131354d72bbc190af504e9639bcc85a720e2bb17

2 years agofeat(mt8188): add reset and poweroff functions
Rex-BC Chen [Fri, 29 Jul 2022 08:38:43 +0000 (16:38 +0800)]
feat(mt8188): add reset and poweroff functions

- Add mtk_pm_system_reset_cros() for cros reset.
- Add mtk_pm_system_off_cros() for cros power-off.

TEST=build pass
BUG=b:236331724

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I4117f6080e282551b37a936a490ab7b37ac31827

2 years agofeat(mediatek): add more flexibility of mtk_pm.c
Edward-JW Yang [Mon, 5 Sep 2022 08:36:31 +0000 (16:36 +0800)]
feat(mediatek): add more flexibility of mtk_pm.c

To use power manager function more easier, we add some drivers to let
the implementation easier.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com>
Change-Id: Ibc6e1680c4534592ed37de49da39b6667f468ea1

2 years agofeat(mediatek): add more options for build helper
Edward-JW Yang [Mon, 5 Sep 2022 07:55:54 +0000 (15:55 +0800)]
feat(mediatek): add more options for build helper

To support more LPM feature, we add more options for build helper.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com>
Change-Id: I17eeedbe0674e321f1891074ba0c72d858841dae

2 years agofeat(mt8188): add LPM driver support
Bo-Chen Chen [Mon, 5 Sep 2022 07:53:32 +0000 (15:53 +0800)]
feat(mt8188): add LPM driver support

Add LPM drivers and create rules.mk for makefile.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I0bfb99a4a763e7ca93260f62d1ced184259acb39

2 years agofeat(mt8188): apply ERRATA for CA-78
Bo-Chen Chen [Wed, 14 Sep 2022 02:03:23 +0000 (10:03 +0800)]
feat(mt8188): apply ERRATA for CA-78

Apply ERRATA_A78_2376745 and ERRATA_A78_2395406 for CA-78.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I4575e83025af971a669dc1f8561cf19e1fdac469

2 years agofix(mediatek): remove unused cold_boot.[c|h]
Bo-Chen Chen [Thu, 8 Sep 2022 07:32:27 +0000 (15:32 +0800)]
fix(mediatek): remove unused cold_boot.[c|h]

We are not using cold_boot.[c|h] for mt8188, so remove them first.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I721aca37d5fb422f274bb1ab46150e1eddf7c480

2 years agofix(mediatek): wrap cold_boot.h with MTK_SIP_KERNEL_BOOT_ENABLE
Bo-Chen Chen [Thu, 8 Sep 2022 07:31:05 +0000 (15:31 +0800)]
fix(mediatek): wrap cold_boot.h with MTK_SIP_KERNEL_BOOT_ENABLE

We should wrap cold_boot.h with MTK_SIP_KERNEL_BOOT_ENABLE to avoid
build error.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Idfd760fbb7c782d4fc9de674d86a7123e0129c0d

2 years agofeat(mt8186): add EMI MPU support for SCP and DSP
Allen-KH Cheng [Mon, 12 Sep 2022 09:10:24 +0000 (17:10 +0800)]
feat(mt8186): add EMI MPU support for SCP and DSP

1. Enable domain D0 and D3 (SCP) access 0x50000000~0x5109FFFF.
2. Enable domain D4 (DSP & AFE) access 0x60000000~0x610FFFFF.

BUG=b:204229221
TEST=build pass

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.corp-partner.google.com>
Change-Id: I6a7d2eafaaa7a558829a0d741dfb3307885e3b98

2 years agorefactor(libc): clean up dependencies in libc
Claus Pedersen [Mon, 12 Sep 2022 22:42:58 +0000 (22:42 +0000)]
refactor(libc): clean up dependencies in libc

- Removing platform dependencies from libc modules.
- Replacing panicking with actual error handling.
- Debug macros are included indirectly from assert.h. Removing
  "platform_def.h" from assert.h and adding "common/debug.h"
  where the macros are used.
- Removing hack for fixing PLAT_LOG_LEVEL_ASSERT to 40.
  Instead removing assert with expression, as this
  does not provide additional information.

Signed-off-by: Claus Pedersen <claustbp@google.com>
Change-Id: Icc201ea7b63c1277e423c1cfd13fd6816c2bc568

2 years agoMerge "feat(pauth): add/modify helpers to support QARMA3" into integration
Manish Pandey [Thu, 22 Sep 2022 09:59:39 +0000 (11:59 +0200)]
Merge "feat(pauth): add/modify helpers to support QARMA3" into integration

2 years agoMerge "fix(synquacer): increase size of BL33" into integration
Manish V Badarkhe [Thu, 22 Sep 2022 08:46:06 +0000 (10:46 +0200)]
Merge "fix(synquacer): increase size of BL33" into integration

2 years agoMerge "feat(versal_net): add support for QEMU COSIM platform" into integration
Joanna Farley [Thu, 22 Sep 2022 08:22:10 +0000 (10:22 +0200)]
Merge "feat(versal_net): add support for QEMU COSIM platform" into integration

2 years agoMerge "docs(maintainers): update xilinx record to cover docs" into integration
Joanna Farley [Thu, 22 Sep 2022 08:15:38 +0000 (10:15 +0200)]
Merge "docs(maintainers): update xilinx record to cover docs" into integration

2 years agodocs(maintainers): update xilinx record to cover docs
Michal Simek [Thu, 22 Sep 2022 06:50:07 +0000 (08:50 +0200)]
docs(maintainers): update xilinx record to cover docs

Recently new Xilinx Versal NET platform has been merged but documentation
cover only zynqmp. Fix the fragment to cover all Xilinx documentation.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I10f8f865ca8d46518135adb80ba0ba4470534529

2 years agofeat(versal_net): add support for QEMU COSIM platform
Sai Pavan Boddu [Thu, 8 Sep 2022 10:39:04 +0000 (16:09 +0530)]
feat(versal_net): add support for QEMU COSIM platform

QEMU COSIM platform is equivalent to qemu with additional cosim
extensions, so just switching platform_id to QEMU if QEMU_COSIM is
detected.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I922d10b1605c7f900158fa7fbe82571d3b9d4792