66 Commits

Author SHA1 Message Date
Michael Kubacki
1c8a26051e OverdriveBoard: Add VariableFlashInfoLib
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3479

Adds an instance for the library class VariableFlashInfoLib that
was recently introduced in MdeModulePkg. This change is made to
allow the new variable driver to build that has a dependency on
this library class and does not require any further platform
changes.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-19 11:46:19 +08:00
Ard Biesheuvel
c9e377b00f Platform/Overdrive: enable resizable BAR support
Enable resizable BAR support so that BARs for, e.g., GPU cards that are
sized conservatively by default, but can be resized to cover all of the
GPU's VRAM, are resized by the firmware before handing over to the OS.
This is a more appropriate time to perform the resize, as usually, the
boot time GPU driver and the GOP will be up during PCI discovery of the
OS.

Tested on Overdrive B1 with an AMD GPU based on the Oland ASIC and the
Linux radeon driver (which does not implement PCI BAR resizing in the
first place)

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2022-02-25 17:49:04 +01:00
Rebecca Cran
a9ba24d58b Platform/AMD: Move VariablePolicyHelperLib into LibraryClasses.common
The VariablePolicyHelperLib is now used by a number of driver types, so
instead of duplicating it, move it into the LibraryClasses.common section.

Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-02-01 18:13:31 +01:00
Abner Chang
494a373f5a Platform/OverdriveBoard: Use PcdPciMmio(32)64Translation PCD from MdePkg
Compliant with BZ: #3665
https://bugzilla.tianocore.org/show_bug.cgi?id=3665

PcdPciMmio(32)64Translation PCD is relocated to MdePkg that leveraged
by both ARM and RISC-V arch. This patch uses the one from MdePkg
instead the one under ArmPkg.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Acked-by: Leif Lindholm <leif@nuviainc.com>
2021-10-15 18:43:23 +08:00
Abner Chang
8abcd00ec6 Platform/AMD: Use PcdPciIoTranslation PCD from MdePkg
Compliant with BZ: #3665
https://bugzilla.tianocore.org/show_bug.cgi?id=3665

PcdPciIoTranslation PCD is relocated to MdePkg that leveraged by
both ARM and RISC-V arch. This patch uses the one from MdePkg
instead the one under ArmVirtPkg.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Acked-by: Leif Lindholm <leif@nuviainc.com>
2021-10-14 12:10:08 +08:00
Rebecca Cran
0efab5febe Fix AMD/OverdriveBoard and SoftIron/Overdrive1000Board builds
BdsDxe depends on VariablePolicyHelperLib, so move it out from
VariableRuntimeDxe.inf and add it to LibraryClasses.DXE_DRIVER and
LibraryClasses.DXE_RUNTIME_DRIVER.

This fixes the build of AMD/OverdriveBoard and
SoftIron/Overdrive1000Board.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2021-08-22 15:24:52 +02:00
Dandan Bi
db1bbd4e1a Platform/AMD: Consume MdeLibs.dsc.inc for RegisterFilterLib
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

MdeLibs.dsc.inc was added for some basic/default library
instances provided by MdePkg and RegisterFilterLibNull Library
was also added into it as the first version of MdeLibs.dsc.inc.

So update platform dsc to consume MdeLibs.dsc.inc for
RegisterFilterLibNull which will be consumed by IoLib and BaseLib.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2021-03-31 14:20:13 +08:00
Laszlo Ersek
d12d9c963b ARM Silicon and Platforms: add OrderedCollectionLib class resolution
The edk2 patch

  ShellPkg/ShellCommandLib: add ShellSortFileList

for BZ#3151 will make the

  ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf

instance dependent on the OrderedCollectionLib class. Because the shell
binaries in the ARM silicon and platform DSCs consume the above
UefiShellCommandLib instance, resolve the OrderedCollectionLib class in
them.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Marcin Wojtas <mw@semihalf.com>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Thomas Abraham <thomas.abraham@arm.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3151
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210113082843.9095-3-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Acked-by: Ard Biesheuvel <ardb+tianocore@kernel.org>
Acked-by: Leif Lindholm <leif@nuviainc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Marcin Wojtas <mw@semihalf.com>
2021-01-18 09:12:06 +01:00
Ard Biesheuvel
5cd8327db2 Platform/AMD/Styx: add missing TimeBaseLib resolutions
Add the resolution for TimeBaseLib to the various Styx DSCs, which is
now required to build the EmbeddedPkg RTC driver.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-01-08 16:48:06 +01:00
Leif Lindholm
cdc997a3f1 Platform/AMD: add VariablePolicy library resolutions for Overdrive
Add resolutions for
- VariablePolicyLib
- VariablePolicyHelperLib
- VariablePolicyLib (DXE_RUNTIME_DRIVER)

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-11-27 11:53:23 +00:00
Leif Lindholm
6072e08490 Platform/AMD: add RngLib for Overdriveboard
OpenSSL now requires an RngLib. Since we have EFI_RNG_PROTOCOL,
add MdePkg/Library/DxeRngLib/DxeRngLib.inf to fix Overdrive build.

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-11-26 16:20:22 +00:00
Ard Biesheuvel
608d71ec93 Platform/OverdriveBoard: work around network ConnectAll() dependency
The AMD Seattle based platforms have been kept up to date in recent
years, even though the hardware is obsolete and was never available
that widely in the first place.

However, one aspect that has sadly been left behind is the support for
the builtin network controllers. These are only wired up and enabled
on the Overdrive board to begin with, and the driver was only made
available as two separate binary blobs implementing the SNP protocol
for each controller separately, without taking the UEFI driver model
into account.

Even worse, the PHY initialization code that needs to run at boot in
order for the OS to be able to use the device never executes unless
the upper networking layers start the SNP protocol, which doesn't
happen on a fast boot (one that does not use ConnectAll()) unless the
boot target is a network device path.

We cannot fix the driver, but fortunately, there is another way out:
protocols that are installed on a handle during the execution of the
entrypoint of a driver will be connected by the DXE core, and so we
can ensure that the old behavior is retained regardless of whether
ConnectAll() is ever invoked, by reordering the load sequence so that
the upper layer drivers have all been registered by the time the
entrypoints of the SNP drivers are called.

This relies on FV contents to be dispatched in the order they appear
in the .FDF file. The AMD SNP driver as well as the upper layer
drivers in NetworkPkg are UEFI_DRIVER modules, which means their
DEPEXes are implicitly defined as the full set of architectural
PI protocols. This means that all these modules become available for
dispatch at the same time, and their dispatch order is fully defined
by the order of appearance in the FV. Unfortunately, this is an
implementation detail rather than something that is supported by the
PI spec, but this is unlikely to ever change since other platforms
undoubtedly exist that depend on this behavior as well.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2020-06-02 08:55:21 +02:00
Ard Biesheuvel
b7e1c6c1a3 Platform/Overdrive: revert streamID DT changes for first SATA port
Commit 7a1cd6efbb updated the stream ID
assignment for various masters on the Seattle SoC, primarily to address
a conflict between the second SATA port and the crypto accelerator on
platforms that implement them (B1 silicon). Unfortunately, B0 variants
turn out to exist where the stream ID assignment deviates from the
observed assignment on the B0 Overdrive that I tested these changes on,
leading to DMA access faults when using the first SATA port.

Since that port does not share its SMMU with any other masters, let's
revert the change to its stream ID assignment in the device tree, and
switch back to matching the entire range [0x0, 0x1f].

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-12-09 18:36:05 +01:00
Ard Biesheuvel
b515c25be3 Platform/Overdrive: fix a typo in the DT
DT unit addresses are hex quantities but they should not include
the 0x prefix. Note that this is a cosmetic change only.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-11-28 15:51:15 +01:00
Ard Biesheuvel
7a1cd6efbb Platform/Overdrive: clean up stream ID descriptions in DT
Align the DT description of the SMMU topology and stream IDs with the
actual routing of the SoC. As with the preceding IORT change, this is
mostly a cleanup exercise, but it does actually fix an issue with the
CCP crypto accelerator on B1 silicon.

Since the CCP shares its SMMU with the second SATA controller, which
is only enabled on B1 silicon, we can drop the logic that disables
this SMMU on B0 silicon or on platforms that do not expose any SATA
ports on the second controller (such as the Cello).

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-11-28 15:50:17 +01:00
Ard Biesheuvel
ff5e2c5c4c Platform/Overdrive: add missing resolution for FileHandleLib
Changes to the core EDK2 repository have caused the build for
Overdrive to break. Move the existing FileHandleLib resolution
to global scope to get things working again.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-11-28 15:50:07 +01:00
Hao A Wu
f36b5db674 Platform/AMD: Use Lzma decompress lib in MdeModulePkg
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1800

This commit will update the DSC file to consume the LzmaDecompressLib in
MdeModulePkg, instead of using the one in IntelFrameworkModulePkg.

Please note that, the 2 LzmaDecompressLib are identical. Thus, there is no
functional impact for this commit.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-06-12 08:18:39 +08:00
Shenglei Zhang
e36c532632 Platform/OverdriveBoard: Update DSC/FDF to use NetworkPkg DSC/FDF
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.

Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-05-24 14:08:33 +08:00
Michael D Kinney
807df65750 Platform/AMD: Replace BSD License with BSD+Patent License
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-05-17 14:21:34 -07:00
Michael D Kinney
ae604e4ffe edk2-platforms: Change License.txt from 2-Clause BSD to BSD+Patent
Change License.txt in the root of the edk2-platforms repository from
the 2-Clause BSD License to the BSD+Patent License.

The text difference between these licenses in the patch is larger
than expected due to different choices for the position of the line
breaks.  The text from the BSD 2-Clause license and its disclaimer
are the same.  New clauses from the BSD+Patent license have been
added.

The License.txt files in other directories that contain the 2-Clause
BSD License are deleted.  The single License.txt in the root of the
edk2-platforms repository with the BSD+Patent License contents is the
preferred license for the edk2-platforms repository.

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

This change is based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Thad Gillispie <thad.gillispie@intel.com>
Cc: Daocheng Bu <daocheng.bu@intel.com>
Cc: Isaac W Oram <isaac.w.oram@intel.com>
Cc: Maciej Piwko <maciej.piwko@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Shifei A Lu <shifei.a.lu@intel.com>
Cc: Xiaohu Zhou <bowen.zhou@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-05-17 14:21:32 -07:00
Dandan Bi
184cca3299 Platform/AMD: Update UefiDecompressLib instance
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722

BaseUefiDecompressLib in MdePkg is the
base UEFI decompress Library.
BaseUefiTianoCustomDecompressLib in MdeModulePkg
implements the base UEFI decompress functionality and
Tiano decompress functionality.

1. TIANOCOMPRESSED rule in OverdriveBoard.fdf
is not used, so remove it.
2. Platform doesn't use the TianoCompress, so do
not have to use BaseUefiTianoCustomDecompressLib,
can use the BaseUefiDecompressLib in MdePkg directly.
3. A common UefiDecompressLib resolution can apply to
all module types now. So keep the common one in
[LibraryClasses.common] section and remove all others.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-05-09 12:32:59 +01:00
Ard Biesheuvel
304e51ae35 Silicon/AMD/Styx: remove the non-capsule based flasher tool
We have had capsule support enabled on this platform for a while now, so
let's drop the hacked up flasher tool that we no longer have a need for.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-05-02 12:18:13 +02:00
Ard Biesheuvel
f560f7f6c8 Platform/Overdrive: conditionally include the X64 PE/COFF emulator
Add the X64 emulator to the build if '-D X64EMU_ENABLE=TRUE' is passed
on the build command line.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-04-24 15:45:42 +02:00
Dandan Bi
fa354094f4 Platform/AMD: Update to use UefiDecompressLib in MdeModulePkg
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1683

We have moved the BaseUefiTianoCustomDecompressLib
from IntelFrameworkModulePkg to MdeModulePkg, so
update the consumer accordingly.

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-04-24 14:51:17 +02:00
Ard Biesheuvel
ca70cbbcc0 Platform/Various: drop DefaultExceptionHandlerLibBase reference
Now that DebugAgentSymbolsBaseLib from ArmPkg no longer requires
a DefaultExceptionHandlerLib resolution, drop the overrides from
the [LibraryClasses.SEC] sections of various platforms.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-01-16 21:24:34 +01:00