52 Commits

Author SHA1 Message Date
Kun Qin
8e16d4a285 Socionext: Platform Build: Resolving newly introduced dependency
The new changes in SecureBootVariableLib brought in a new dependency
of PlatformPKProtectionLib.

This change added the new library instance from SecurityPkg to resolve
DeveloperBox platforms build.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Masami Hiramatsu <masami.hiramatsu@linaro.org>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-08-15 16:15:57 +02:00
Masahisa Kojima
c718abce99 Platform/Socionext/DeveloperBox: add SMBIOS type 17 table
This commit adds the SMBIOS type 17 table support for Developerbox.
The SPD can be accessed only from the SCP through I2C bus,
so this commit expects that SCP-firmware reads the SPD and
stores it in the non-secure SRAM.

This commit also reduces the edk2 stack size to allocate
the space for storing SPD. It requires 2KB, 512bytes * 4 DIMMs.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-12-02 08:50:53 +01:00
Grzegorz Bernacki
6196d93328 Platform: add SecureBootVariableLib resolution to various ARM platforms
The edk2 patch
  SecurityPkg: Create library for setting Secure Boot variables.

removes generic functions from SecureBootConfigDxe and places
them into SecureBootVariableLib. This patch adds SecureBootVariableLib
mapping for each ARM platform which uses SecureBootConfigDxe.

Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
Reviewed-by: Graeme Gregory <graeme@nuviainc.com> #SbsaQemu
Reviewed by: Sami Mujawar <sami.mujawar@arm.com>  #ArmVExpress
2021-08-04 14:29:32 +02:00
Dandan Bi
f2c069a3b4 Platform/Socionext: 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:20 +08:00
Kun Qin
2e9eb888aa Socionext: DeveloperBox DSC File: Added library for VariableSmmRuntimeDxe
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3250

This change added NULL MmUnblockMemoryLib instance in DeveloperBox.dsc to
resolve new dependency by VariableSmmRuntimeDxe. The library interface
is consumed by variable module to better support variable runtime cache
feature.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
2021-03-19 09:34:24 +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
2a5327499d Platform/DeveloperBox: add missing TimeBaseLib resolution
Add the resolution for TimeBaseLib, 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:27 +01:00
Ard Biesheuvel
b29531f318 Silicon/SynQuacer/NetsecDxe: avoid media detection delay at boot
Instead of unconditionally delaying the boot up to 5 seconds, even
if no network cable is connected in the first place, provide an
implementation of the EFI adapter information protocol so that the
upper networking layers can wait gracefully for the link to come up,
but only when the network is actually used to boot from.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2020-05-19 14:27:33 +02:00
Ard Biesheuvel
9c4e5fe36d Platform/DeveloperBox: omit TPM from DT when building without TPM support
The recently added support for TPM2 measured boot added a description of
the TPM to the device tree, but failed to take the build configuration
into account, and so it adds it unconditionally.

Fix this, by #define'ing a TPM2_ENABLE CPP macro that can be referenced
in the device tree source file.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2020-04-09 07:46:34 +02:00
Ard Biesheuvel
b93aa851aa DeveloperBox: implement measured boot
Enable the various components, library class resolutions and PCD defaults
to enable measured boot based on a version 2 TPM. The TPM is exposed as
having a memory mapped TIS frame, which is accomplished using the SPI
command sequencer that is available on this platform. Note that this
requires SCP firmware support.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2020-04-06 16:30:16 +02:00
Satoru Okamoto
1ad8bb58a7 NetsecDxe: SnpInitialize() waits for media linking up
The latest NetsecDxe requires issueing phy reset at the
last stage of initialization to safely exit loopback mode.
However, as a result, it takes a couple of seconds for link state
to get stable, which could cause auto-chosen pxeboot to fail
due to MediaPresent check error.

This patch adds link state check with 5s timeout in NetsecDxe
initialization. The timeout value can be adjustable via
configuration file.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-08-08 16:37:06 +01:00
Liming Gao
95e793075f Platform: Update DeveloperBox.dsc to remove unnecessary Network libraries
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-05-28 20:25:31 +08:00
Shenglei Zhang
da26ee3a95 Platform/DeveloperBox: 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:09:22 +08:00
Michael D Kinney
6fd90344c0 Platform/Socionext: 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:22:13 -07:00
Ard Biesheuvel
1fd7b43c8d Platform/DeveloperBox: 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. Note that this only works on AARCH64 builds.

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:25 +02:00
Ard Biesheuvel
11c98f35af Platform/DeveloperBox: actually enable secure boot checking
The current secure boot enabled DeveloperBox build contains all the
pieces to maintain the authenticated variable store, but doesn't
actually bother to check the signature on anything it boots. Fix that.

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-11 14:09:18 -07:00
Ard Biesheuvel
0a32c15d21 Platform/Socionext/DeveloperBox: align with upstream StandaloneMmPkg changes
Bring DeveloperBox in line with EDK2 core changes to StandaloneMmPkg:
- switch from BaseExtractGuidedSectionLib to PrePiExtractGuidedSectionLib
- include a NULL library class resolution for VariableMmDependency

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm at linaro.org>
2019-03-29 10:50:44 +01:00
Ard Biesheuvel
d571b43f87 Platform/DeveloperBox: add MM based UEFI secure boot support
This implements support for UEFI secure boot on DeveloperBox using
the standalone MM framework. This moves all of the software handling
of the UEFI authenticated variable store into the standalone MM
context residing in a secure partition.

Note that SynQuacer as configured today is not a truly secure
platform, since the NOR flash registers are accessible to the
non-secure world. However, from a software point of view, all
of the required pieces are in place. (In particular, it is no
longer possible for the OS to stub out authentication checks
in the validation code residing in RuntimeServicesCode regions)

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-21 18:39:54 +01:00
Ard Biesheuvel
75b438a341 Platform/DeveloperBox: add .DSC/.FDF description of MM components
Create a pair of .DSC/.FDF files that describe the components and
the firmware volumes and flash device that will be dispatched into
a secure partition in the secure world to control the UEFI secure
variable store.

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-21 18:39:54 +01:00
Ard Biesheuvel
931e9c04dc Platform/DeveloperBox: create shared .DSC include file
We are going to add a separate .DSC/.FDF combo for the standalone
MM components. So put all the pieces we will share in an include
file that both .DSC files can include.

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-21 18:39:54 +01:00
Ard Biesheuvel
e48031fd75 Platform/Socionext/DeveloperBox: add resolution for ArmSoftFloatLib
OpensslLib depends on ArmSoftFloatLib when built for 32-bit ARM, so
add the required resolution for it.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-01-16 21:42:07 +01:00
Ard Biesheuvel
36d0f117e1 Platform/Socionext/DeveloperBox: disable EbcDxe for ARM builds
EBC and 32-bit ARM are fundamentally incompatible, so only enable
it on AArch64 builds.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-01-16 21:41:00 +01:00
Ard Biesheuvel
307f7f5bfc Silicon/SynQuacer: add support for DEBUG output on second UART
On headless server systems where the PL011 serial port is the primary
console, having DEBUG output on the same port can be annoying, since
DEBUG output gets lost when the console driver clears the screen or
positions the cursor using control characters.

So add the ability to emit the DEBUG output on the DesignWare FUART
(which is exposed via the LS connector on DeveloperBox)

Mark Kettenis <mark.kettenis@xs4all.nl> says:

  The DesignWare component is (largely) 16550-compatible.  But the
  FIFO's are optional and if they're not included you'll end up with
  something that's probably closer to an 16450.  I suspect in most
  cases SoC designers will include the FIFO's though since without
  them you really can't use the port at anything but the slowest
  speeds.

So let's use the 16550 driver in MMIO mode to drive this IP.

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-15 00:14:14 +01:00
Sumit Garg
dc6b5ef8a6 Silicon/SynQuacer: add OP-TEE based RNG driver
This driver uses OpteeLib to interface with OP-TEE based RNG service
(pseudo trusted application) to implement EFI_RNG_PROTOCOL that is used
to seed kernel entropy pool.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2018-12-20 10:21:41 +01:00
Ard Biesheuvel
07c6bc2773 Platform, Silicon: drop gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize will be removed, so
drop any overrides from the platforms in edk2-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>
2018-11-30 12:02:20 +01:00