Commit Graph

9163 Commits

Author SHA1 Message Date
Rex-BC Chen 5183e637a0 feat(plat/mdeiatek/mt8192): 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.

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I9c7af9a4f75216ed2c6b44458d121a352bef4b95
2021-08-10 09:41:15 +08:00
Bipin Ravi d1987f4c8f Merge "errata: workaround for Neoverse V1 errata 1925756" into integration 2021-08-10 00:32:05 +02:00
Bipin Ravi 55120f9ca6 Merge "errata: workaround for Neoverse V1 errata 1852267" into integration 2021-08-10 00:31:44 +02:00
Bipin Ravi 1d24eb33c5 Merge "errata: workaround for Neoverse V1 errata 1774420" into integration 2021-08-10 00:31:25 +02:00
Madhukar Pappireddy ddbc09abef Merge "fix: avoid redefinition of 'efi_guid' structure" into integration 2021-08-09 17:23:00 +02:00
Manish V Badarkhe f34322c1ce fix: avoid redefinition of 'efi_guid' structure
Fixed the build error by removing the local definition of 'efi_guid'
structure in 'sgi_ras.c' file as this structure definition is already
populated in 'sgi_ras.c' file via 'uuid.h' header.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I57687336863f2a0761c09b6c1aa00b4aa82a6a12
2021-08-06 12:54:11 +01:00
laurenw-arm 741dd04c81 errata: workaround for Neoverse V1 errata 1925756
Neoverse V1 erratum 1925756 is a Cat B erratum present in r0p0, r1p0,
and r1p1 of the V1 processor core, and it is still open.

SDEN can be found here:
https://documentation-service.arm.com/static/60d499080320e92fa40b4625

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I6500dc98da92a7c405b9ae09d794d666e8f4ae52
2021-08-05 12:17:04 -05:00
laurenw-arm 143b19651b errata: workaround for Neoverse V1 errata 1852267
Neoverse V1 erratum 1852267 is a Cat B erratum present in r0p0 and
r1p0 of the V1 processor core. It is fixed in r1p1.

SDEN can be found here:
https://documentation-service.arm.com/static/60d499080320e92fa40b4625

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ide5e0bc09371fbc91c2385ffdff74e604beb2dbe
2021-08-03 09:49:09 -05:00
laurenw-arm 4789cf66af errata: workaround for Neoverse V1 errata 1774420
Neoverse V1 erratum 1774420 is a Cat B erratum present in r0p0 and
r1p0 of the V1 processor core. It is fixed in r1p1.

SDEN can be found here:
https://documentation-service.arm.com/static/60d499080320e92fa40b4625

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I66e27b2518f73faeedd8615a1443a74b6a30f123
2021-08-03 09:46:12 -05:00
Manish Pandey 87311b4c16 Merge "refactor: moved drivers hdr files to include/drivers/nxp" into integration 2021-08-03 13:50:31 +02:00
Pankaj Gupta 050a99a62f refactor: moved drivers hdr files to include/drivers/nxp
NXP drivers header files are moved:
  - from:  drivers/nxp/<xx>/*.h
  - to  :  include/drivers/nxp/<xx>/*.h

To accommodate these changes each drivers makefiles
drivers/nxp/<xx>/xx.mk, are updated.

Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Change-Id: I3979c509724d87e3d631a03dbafda1ee5ef07d21
2021-08-03 12:19:56 +02:00
Madhukar Pappireddy 5e4e13e173 Merge changes from topic "fw-update-2" into integration
* changes:
  feat(sw_crc32): add software CRC32 support
  refactor(hw_crc32): renamed hw_crc32 to tf_crc32
  feat(fwu): avoid booting with an alternate boot source
  docs(fwu): add firmware update documentation
  feat(fwu): avoid NV counter upgrade in trial run state
  feat(plat/arm): add FWU support in Arm platforms
  feat(fwu): initialize FWU driver in BL2
  feat(fwu): add FWU driver
  feat(fwu): introduce FWU platform-specific functions declarations
  docs(fwu_metadata): add FWU metadata build options
  feat(fwu_metadata): add FWU metadata header and build options
2021-08-02 22:53:50 +02:00
Manish V Badarkhe f21693704a feat(sw_crc32): add software CRC32 support
Added software CRC32 support in case platform doesn't support
hardware CRC32.

Platform must include necessary Zlib source files for compilation
to use software CRC32 implementation.

Change-Id: Iecb649b2edf951944b1a7e4c250c40fe7a3bde25
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 17:15:41 +01:00
Manish V Badarkhe c885d5c84d refactor(hw_crc32): renamed hw_crc32 to tf_crc32
Renamed hw_crc32 to tf_crc32 to make the file and function
name more generic so that the same name can be used in upcoming
software CRC32 implementation.

Change-Id: Idff8f70c50ca700a4328a27b49d5e1f14d2095eb
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 17:15:41 +01:00
Manish V Badarkhe 4b48f7b565 feat(fwu): avoid booting with an alternate boot source
All firmware banks should be part of the same non-volatile storage
as per PSA FWU specification, hence avoid checking for any alternate
boot source when PSA FWU is enabled.

Change-Id: I5b016e59e87f1cbfc73f4cd29fce6017c24f88b3
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 17:15:41 +01:00
Manish V Badarkhe 0f20e50b26 docs(fwu): add firmware update documentation
Added firmware update documentation for:
1. PSA firmware update build flag
2. Porting guidelines to set the addresses of FWU metadata image
   and updated components in I/O policy

Change-Id: Iad3eb68b4be01a0b5850b69a067c60fcb464f54b
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 17:15:41 +01:00
Manish V Badarkhe c0bfc88f8e feat(fwu): avoid NV counter upgrade in trial run state
Avoided NV counter update when the system is running in
trial run state.

Change-Id: I5da6a6760f8a9faff777f2ff879156e9c3c76726
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 17:15:40 +01:00
Manish V Badarkhe 2f1177b2b9 feat(plat/arm): add FWU support in Arm platforms
Added firmware update support in Arm platforms by using
FWU platform hooks and compiling FWU driver in BL2
component.

Change-Id: I71af06c09d95c2c58e3fd766c4a61c5652637151
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 17:15:40 +01:00
Manish V Badarkhe 396b339dc2 feat(fwu): initialize FWU driver in BL2
Initialized FWU driver module in BL2 component under
build flag PSA_FWU_SUPPORT.

Change-Id: I08b191599835925c355981d695667828561b9a21
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 17:15:40 +01:00
Manish V Badarkhe 0ec3ac60d8 feat(fwu): add FWU driver
Implemented FWU metadata load and verification APIs.
Also, exported below APIs to the platform:
1. fwu_init - Load FWU metadata in a structure. Also, set the
	      addresses of updated components in I/O policy
2. fwu_is_trial_run_state - To detect trial run or regular run
			    state

Change-Id: I67eeabb52d9275ac83be635306997b7c353727cd
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 17:15:40 +01:00
Manish V Badarkhe efb2ced256 feat(fwu): introduce FWU platform-specific functions declarations
Added FWU platform specific functions declarations in common
platform header.

Change-Id: I637e61753ea3dc7f7e7f3159ae1b43ab6780aef2
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 17:15:32 +01:00
Olivier Deprez c7e39dcf68 Merge "feat(ff-a): change manifest messaging method" into integration 2021-08-02 18:14:54 +02:00
Manish V Badarkhe 34f702d5db docs(fwu_metadata): add FWU metadata build options
Added the build options used in defining the firmware update metadata
structure.

Change-Id: Idd40ea629e643e775083f283b75c80f6c026b127
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 14:39:41 +01:00
Manish V Badarkhe 5357f83d4e feat(fwu_metadata): add FWU metadata header and build options
Added a firmware update metadata structure as per section 4.1
in the specification document[1].

Also, added the build options used in defining the firmware
update metadata structure.

[1]: https://developer.arm.com/documentation/den0118/a/

Change-Id: I8f43264a46fde777ceae7fd2a5bb0326f1711928
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-08-02 14:39:41 +01:00
Madhukar Pappireddy 6881f7be46 Merge changes Ic7579b60,I05414ca1 into integration
* changes:
  fix(plat/ea_handler): print newline before fatal abort error message
  feat(common/debug): add new macro ERROR_NL() to print just a newline
2021-07-30 17:58:22 +02:00
Pali Rohár a5fea81058 fix(plat/ea_handler): print newline before fatal abort error message
External Abort may happen also during printing of some messages by
U-Boot or kernel. So print newline before fatal abort error message.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: Ic7579b605e695c2e4cb9a4f5cdc2d0b3e5083e49
2021-07-29 16:30:40 +01:00
Manish Pandey 6ea1a75df3 Merge "refactor(plat/marvell): move doc platform build options into own subsections" into integration 2021-07-29 10:55:44 +02:00
Joanna Farley 20ceff34c3 Merge "services: Fix pmr_el1 rewrote issue in sdei_disaptch_event()" into integration 2021-07-28 21:25:53 +02:00
Manish Pandey 81bbb9216b Merge "fix(plat/fvp): provide boot files via semihosting" into integration 2021-07-28 13:23:39 +02:00
Stas Sergeev 749d0fa80d fix(plat/fvp): provide boot files via semihosting
These files are needed during boot, but they were missing
for semihosting.
With this patch, the list of files is complete enough to
boot on ATF platform via semihosting.

Change-Id: I2f0ca25983a6e18096f040780776f19f8040ea79
Signed-off-by: stsp@users.sourceforge.net
2021-07-28 14:16:55 +03:00
Manish Pandey fe1021f1a1 Merge "rpi4: enable RPi4 PCI SMC conduit" into integration 2021-07-28 13:01:35 +02:00
Manish Pandey d985cb743b Merge "fix(gicv3): add dsb in both disable and enable function of gicv3_cpuif" into integration 2021-07-28 11:29:32 +02:00
Joanna Farley 7bfec3adf3 Merge "rpi4: SMCCC PCI implementation" into integration 2021-07-28 11:19:53 +02:00
Ming Huang d21f1ddb71 services: Fix pmr_el1 rewrote issue in sdei_disaptch_event()
Consider a RAS scenario:
Enter EL3 by sync exception, then call spm_mm_sp_call() enter
EL0s to handle this error, then call sdei_dispatch_event() to
inform OS. Finally, return back to OS from sync exception flow.
Similar flow is sgi_ras_intr_handler() in sgi_ras.c.

The icc_pmr_el1 register will be change in above flow:
1 cm_el1_sysregs_context_save(NON_SECURE);
  -> ehf_exited_normal_world();
    ##icc_pmr_el1: 0xf8 => 0x80
2 spm_mm_sp_call();
3 sdei_dispatch_event();
4 ehf_activate_priority(sdei_event_priority(map));
    ##icc_pmr_el1: 0x80 => 0x60
5 restore_and_resume_ns_context();
  -> ehf_exited_normal_world();
     ##return due to has_valid_pri_activations(pe_data) == 1
6 ehf_deactivate_priority(sdei_event_priority(map));
    ##icc_pmr_el1: 0x60 => 0x80
The icc_pmr_el1 was rewrote from 0xf8 to 0x80. This issue will
result in OS hang when eret to OS from RAS flow.

Move ehf_activate_priority(sdei_event_priority(map)) after
restore_and_resume_ns_context() can fix this issue.

Signed-off-by: Ming Huang <huangming@linux.alibaba.com>
Change-Id: If01ec55cf0aabf1594dece1ad50d3ec3406cdabc
2021-07-28 11:12:44 +02:00
Jeremy Linton ab061eb732 rpi4: SMCCC PCI implementation
The rpi4 has a single nonstandard ECAM. It is broken
into two pieces, the root port registers, and a window
to a single device's config space which can be moved
between devices. Now that we have widened the page
tables/MMIO window, we can create a read/write acces
functions that are called by the SMCCC/PCI API.

As an example platform, the rpi4 single device ECAM
region quirk is pretty straightforward. The assumption
here is that a lower level (uefi) has configured and
initialized the PCI root to match the values we are
using here.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Change-Id: Ie1ffa8fe9aa1d3c62e6aa84746a949c1009162e0
2021-07-28 09:41:55 +02:00
Jeremy Linton 6e63cdc55e rpi4: enable RPi4 PCI SMC conduit
Now that we have adjusted the address map, added the
SMC conduit code, and the RPi4 PCI callbacks, lets
add the flags to enable everything in the build.

By default this service is disabled because the
expectation is that its only useful in a UEFI+ACPI
environment.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Change-Id: I2a3cac6d63ba8119d3b711db121185816b89f8a2
2021-07-28 09:41:05 +02:00
Madhukar Pappireddy 743e3b4147 Merge "plat/sgi: tag dmc620 MM communicate messages with a guid" into integration 2021-07-27 21:35:11 +02:00
Pali Rohár 92024f81a6 refactor(plat/marvell): move doc platform build options into own subsections
Update documentation and group platform specific build options into
their own subsections.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I05927d8abf9f811493c49b856f06329220e7d8bb
2021-07-27 19:31:36 +01:00
Madhukar Pappireddy 7fb82d8286 Merge "fix(rk3399/suspend): correct LPDDR4 resume sequence" into integration 2021-07-27 17:01:40 +02:00
Olivier Deprez 048fe1916c Merge "fix(fdt): fix OOB write in uuid parsing function" into integration 2021-07-27 16:06:30 +02:00
David Horstmann d0d642450f fix(fdt): fix OOB write in uuid parsing function
The function read_uuid() zeroes the UUID destination buffer
on error. However, it mistakenly uses the dest pointer
that has been incremented many times during the parsing,
leading to an out-of-bounds write.

To fix this, retain a pointer to the start of the buffer,
and use this when clearing it instead.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
Change-Id: Iee8857be5d3f383ca2eab86cde99a43bf606f306
2021-07-26 16:42:25 +01:00
Madhukar Pappireddy d31f319492 Merge "fix(plat/imx): do not keep mmc_device_info in stack" into integration 2021-07-26 17:39:59 +02:00
André Przywara 81e63f25ff Merge changes from topic "allwinner_mmap" into integration
* changes:
  refactor(plat/allwinner): clean up platform definitions
  refactor(plat/allwinner): do not map BL32 DRAM at EL3
  refactor(plat/allwinner): map SRAM as device memory by default
  refactor(plat/allwinner): rename static mmap region constant
  feat(bl_common): import BL_NOBITS_{BASE,END} when defined
2021-07-26 17:29:30 +02:00
Manish Pandey f98c0bea9c Merge "fix(sdei): set SPSR for SDEI based on TakeException" into integration 2021-07-26 11:15:30 +02:00
Manish Pandey a52c52477a Merge changes from topic "sve+amu" into integration
* changes:
  fix(plat/tc0): enable AMU extension
  fix(el3_runtime): fix SVE and AMU extension enablement flags
2021-07-26 11:05:39 +02:00
Joanna Farley 76cce57108 Merge "docs(maintainers): update imx8 entry" into integration 2021-07-25 15:02:03 +02:00
Joanna Farley e73d9d0fa8 Merge "refactor(aarch64): remove `FEAT_BTI` architecture check" into integration 2021-07-24 18:38:19 +02:00
Peng Fan 7b514399e9 docs(maintainers): update imx8 entry
Add myself as i.MX8 maintainer.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Change-Id: Ib037c24a75d42febd79f2eb1ab3b985356dbfb58
2021-07-24 21:16:13 +08:00
Madhukar Pappireddy d55d83090e Merge changes from topic "diphda" into integration
* changes:
  feat: disabling non volatile counters in diphda
  feat: adding the diphda platform
2021-07-23 19:24:07 +02:00
Daniel Boulby 37596fcb43 fix(sdei): set SPSR for SDEI based on TakeException
The SDEI specification now says that during an SDEI
event handler dispatch the SPSR should be set according
to the TakeException() pseudocode function defined in
the Arm Architecture Reference Manual. This patch sets
the SPSR according to the function given in
ARM DDI 0487F.c page J1-7635

Change-Id: Id2f8f2464fd69c701d81626162827e5c4449b658
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2021-07-23 13:20:28 +01:00