Commit Graph

2907 Commits

Author SHA1 Message Date
Rebecca Cran
183ff25849 Silicon/Phytium: Update FT2000-4Pkg PlatformLib for ARM_CORE_INFO change
The ARM_CORE_INFO struct has been updated so the MPIDR is now a single
field instead of separate cluster/core fields. Update FT2000-4Pkg
PlatformLib.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
2022-01-30 11:27:29 +01:00
Rebecca Cran
38325a1eb9 Silicon/AMD: Update Styx code to work with changes ARM_CORE_INFO struct
The ARM_CORE_INFO struct has been updated so the MPIDR is now a single
field instead of separate cluster/core fields. Update the Styx code in
AcpiPlatformDxe, PlatInitPei and StyxDtbLoaderLib.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
2022-01-30 11:27:13 +01:00
Rebecca Cran
4a8a90c169 Silicon/Qemu: Update ARM_CORE_INFO initializer for MPIDR field change
The ARM_CORE_INFO struct has been updated so the MPIDR is now a single
field instead of separate cluster/core fields. Update the initializer.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
2022-01-30 11:26:21 +01:00
Rebecca Cran
8f60b2b84a Silicon/Marvell: Update ARM_CORE_INFO initializer for MPIDR field change
The ARM_CORE_INFO struct has been updated so the MPIDR is now a single
field instead of separate cluster/core fields. Update the initializer.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
2022-01-30 11:26:03 +01:00
Rebecca Cran
a229a20bd7 Platform/ARM: Update ARM_CORE_INFO initializer for MPIDR field change
The ARM_CORE_INFO struct has been updated so the MPIDR is now a single
field instead of separate cluster/core fields. Update the initializer.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
2022-01-30 11:25:51 +01:00
Rebecca Cran
afdc125561 Silicon/Socionext: Update ARM_CORE_INFO initializer for MPIDR field change
The ARM_CORE_INFO struct has been updated so the MPIDR is now a single
field instead of separate cluster/core fields. Update the initializer.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
2022-01-30 11:25:32 +01:00
Pierre Gondois
1bbfeb030a Platform/ARM: Add BootDiscoveryPolicy
This commit adds code which check BootDiscoveryPolicy variable and
calls Boot Policy Manager Protocol to connect device specified by
the variable. To enable that mechanism for platform
EfiMdeModulePkgTokenSpaceGuid.PcdBootDiscoveryPolicy PCD must be
added to DSC file.
For the edk2 repository, commit cae735f61328 ("ArmPkg: Enable boot
discovery policy for ARM package.") adds a mechanism to check for
the boot discovery policy. When the following are available:
- gEfiBootManagerPolicyProtocolGuid protocol
- BOOT_DISCOVERY_POLICY_VAR variable
this allows to choose whether devices need to be connected during
boot.

During boot on ARM platforms, all devices are connected if there
are no valid boot options. If the UEFI shell is added as a valid
boot option, some devices won't be connected. The BootDiscoveryPolicy
will allow to manually configure this.

For all ARM platforms, add:
- BootManagerPolicyDxe module to Bds phase
- BootDiscoveryPolicyUiLib to UiApp module
- PcdBootDiscoveryPolicy Pcd

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-01-28 15:06:15 +01:00
Sheng, W
b9d6ddebe1 IntelSiliconPkg/VTd: Only generate PEI DMA buffer once.
VTdInfoNotify may be called manay times, PEI DMA buffer should be
 generated only once.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3667

Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Cc: Robert Kowalewski <robert.kowalewski@intel.com>
Reviewed-by: Jenny Huang <jenny.huang@intel.com>
Signed-off-by: Sheng Wei <w.sheng@intel.com>
2022-01-27 11:50:00 +08:00
Sheng, W
9ffeebe07c IntelSiliconPkg/VTd: Support VTd Abort DMA Mode
If VTd ECAP_REG.ADMS bit is set, abort DMA mode is supported.
When VTd Abort DMA Mode is enabled, hardware will abort all DMA
 operations without the need to set up a root-table with each
 entry marked as not-present.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3766

Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Cc: Robert Kowalewski <robert.kowalewski@intel.com>
Reviewed-by: Jenny Huang <jenny.huang@intel.com>
Signed-off-by: Sheng Wei <w.sheng@intel.com>
2022-01-27 11:50:00 +08:00
Sheng, W
f4f8e0027f IntelSiliconPkg/VTd: Update VTd register structs
Update VTd register structs accroding to VTd spec ver 3.3

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3765

Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Cc: Robert Kowalewski <robert.kowalewski@intel.com>
Reviewed-by: Jenny Huang <jenny.huang@intel.com>
Signed-off-by: Sheng Wei <w.sheng@intel.com>
2022-01-27 11:49:59 +08:00
Sheng, W
57d1ec006c IntelSiliconPkg/VTd: Fix typos
It is DRHD(DMA Remapping Hardware Unit Definition).

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3622

Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Cc: Robert Kowalewski <robert.kowalewski@intel.com>
Reviewed-by: Jenny Huang <jenny.huang@intel.com>
Reviewed-by: Robert Kowalewski <robert.kowalewski@intel.com>
Signed-off-by: Sheng Wei <w.sheng@intel.com>
2022-01-27 11:49:59 +08:00
Khasim Syed Mohammed
239181acdd Platform/ARM/N1Sdp: Remove PciExpressLib use PciSegmentLib instead
Update N1Sdp Platform dsc to use PciSegmentLib instead of PciExpressLib.

Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 16:08:26 +00:00
Khasim Syed Mohammed
8dbc05c0b6 Silicon/ARM/NeoverseN1Soc: Remove PciExpressLib use PciSegmentLib instead
The patch removes PciExpressLib implementation for N1Sdp as:

  a) The PciSegmentLib implementation for N1Sdp makes MmioRead() calls
     instead of PciRead() which makes the PciExpressLib redundant.

  b) Since N1Sdp requires multiple segments to be supported, PciExpressLib
     and PciLib cannot be used, PciSegmentLib should be used instead as it
     supports multiple segments.

Signed-off-by: Deepak Pandey <Deepak.Pandey@arm.com>
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 16:08:15 +00:00
Khasim Syed Mohammed
3fb045f534 Silicon/ARM/NeoverseN1Soc: Add CCIX root complex support
This patch enables CCIX root complex support by updating
the root complex node info in PciHostBridge library.

Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 16:08:02 +00:00
Khasim Syed Mohammed
ebfdaaab7c Platform/ARM/N1Sdp: Update PCDs to support multiple PCI root ports
PCD entries are updated to add support for multiple PCI root ports.

Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 16:07:48 +00:00
Khasim Syed Mohammed
cfde4aae63 Silicon/ARM/NeoverseN1Soc: Update PCDs to support multiple PCI root ports
PCD entries are updated to remove the hardcoded assignments and to
add support for multiple PCI root ports.

Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 16:07:20 +00:00
Khasim Syed Mohammed
91a5e5bb15 Silicon/ARM/NeoverseN1Soc: Port PCI Segment Library
The BasePCISegment Library in MdePkg doesn't allow configuring
multiple segments required for PCIe and CCIX root port
enumeration. Therefore, a custom PCI Segment library is adapted
from SynQuacerPciSegmentLib and ported for N1Sdp.

In addition to this, the hardware has few other limitations which affects
the access to the PCIe root port:
  1. ECAM space is not contiguous, root port ECAM (BDF = 0:0:0) is isolated
     from rest of the downstream hierarchy ECAM space.
  2. Root port ECAM space is not capable of 8bit/16bit writes.
  3. A slave error is generated when host accesses the configuration
     space of non-available device or unimplemented function on a
     given bus.

The description of the workarounds included for these limitations can
be found in the corresponding files of this patch.

Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 16:04:45 +00:00
Pierre Gondois
8050598129 Platform/ARM: Fix Ecc error 5005
This patch fixes the following Ecc reported error:
The body of a function should be contained by open
and close braces that must be in the first column.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 12:44:08 +00:00
Pierre Gondois
220332b1fb Platform/ARM: Fix Ecc error 9005
This patch fixes the following Ecc reported error:
Only Doxygen commands '@bug', '@todo', '@example',
'@file', '@attention', '@param', '@post', '@pre',
'@retval', '@return', '@sa', '@since', '@test',
'@note', '@par', '@endcode', '@code', '@{', '@}'
are allowed to mark the code

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 12:44:08 +00:00
Pierre Gondois
f4527e297a Platform/ARM: Fix Ecc error 3003
This patch fixes the following Ecc reported error:
A comparison of any pointer to zero must be done
via the NULL type

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 12:44:07 +00:00
Pierre Gondois
8a77dc7243 Platform/ARM: Fix Ecc error 1012
This patch fixes the following Ecc reported error:
There should be no trailing white space in one line.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 12:44:07 +00:00
Pierre Gondois
2d310c3350 Platform/ARM: Fix Ecc error 1008
This patch fixes the following Ecc reported error:
File has invalid Non-ACSII char.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 12:44:07 +00:00
Pierre Gondois
cb53522538 Platform/ARM: Fix Ecc error 1001
This patch fixes the following Ecc reported error:
'TAB' character is not allowed in source code,
please replace each 'TAB' with two spaces.

The patch also format and document the InstallStructures
function to comply to edk2 coding style.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 12:44:07 +00:00
Pierre Gondois
f6e3d81236 Platform/ARM: Modify duplicated GUID in ArmVExpressPkg.dec
The two following packages have the same GUID:
- Platform/ARM/VExpressPkg/ArmVExpressPkg.dec
- edk2/ArmPlatformPkg/ArmPlatformPkg.dec

The gArmVExpressTokenSpaceGuid in
Platform/ARM/VExpressPkg/ArmVExpressPkg.dec is also
identical.

All the GUIDs have been added at the same time, initially
in the edk2 repository. Modify the GUIDs in the edk2-platforms
repository.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 12:44:07 +00:00
Pierre Gondois
24550dec36 Platform/ARM: Modify duplicated GUID in ArmVExpressLibSec
The two following modules have the same GUID:
- Platform/ARM/VExpressPkg/Library/
  ArmVExpressLibRTSM/ArmVExpressLibSec.inf
- Silicon/Hisilicon/Library/
  ArmPlatformLibHisilicon/ArmPlatformLibSec.inf

Therefore, update the INF GUID for the library in
Platform/ARM/VExpressPkg/Library/
ArmVExpressLibRTSM/ArmVExpressLibSec.inf.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2022-01-24 12:44:06 +00:00