Commit Graph

32675 Commits

Author SHA1 Message Date
Mike Beaton 261ae47e07 NetworkPkg/MnpDxe: Convert TX buffer allocation messages to DEBUG_VERBOSE
Under normal operation, some 30 or so of these lines logged as DEBUG_INFO
on first transmit.

This is not relevant information for users of the driver, so convert these
messages to VERBOSE.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-09-09 22:42:58 +01:00
Gerd Hoffmann 2286ed0d42 OvmfPkg: wire up RngDxe
Add OvmfRng include snippets with the random number generator
configuration for OVMF.  Include RngDxe, build with BaseRngLib,
so the rdrand instruction is used (if available).

Also move VirtioRng to the include snippets.

Use the new include snippets for OVMF builds.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-09 11:45:07 +01:00
Gerd Hoffmann 01bf6c6c9b SecurityPkg/RngDxe: add rng test
Check whenever RngLib actually returns random numbers, only return
a non-zero number of Algorithms if that is the case.

This has the effect that RndDxe loads and installs EFI_RNG_PROTOCOL
only in case it can actually deliver random numbers.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-09 11:45:07 +01:00
Pedro Falcato 6ca9334dc8 MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID
RDRAND has notoriously been broken many times over its lifespan.
Add a smoketest to RDRAND, in order to better sniff out potential
security concerns.

Also add a proper CPUID test in order to support older CPUs which may
not have it; it was previously being tested but then promptly ignored.

Testing algorithm inspired by linux's arch/x86/kernel/cpu/rdrand.c
:x86_init_rdrand() per commit 049f9ae9..

Many thanks to Jason Donenfeld for relicensing his linux RDRAND detection
code to MIT and the public domain.

>On Tue, Nov 22, 2022 at 2:21 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
  <..>
>    I (re)wrote that function in Linux. I hereby relicense it as MIT, and
>    also place it into public domain. Do with it what you will now.
>
>    Jason

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

Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
2024-09-09 11:45:06 +01:00
Gerd Hoffmann 9801a26e6e OvmfPkg: add morlock support
Add dsc + fdf include files to add the MorLock drivers to the build.
Add the include files to OVMF build configurations.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-09 11:44:55 +01:00
Mike Beaton 600dc53b6d NetworkPkg/DxeNetLib: Update misleading comment
Commit 6862b9d538d96363635677198899e1669e591259 makes
more explicit the previous logic of the code anyway, which is that
it is (and was) only a fatal error if all secure algorithms fail.

However the comment updated by this commit seems somewhat
incompatible with that change, and even with the previous code
(which operated as now, just logging different error messages).

This updates the comment to be more compatible with how the
code operates.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-09-09 11:34:13 +01:00
Gerd Hoffmann 2842d7f11e NetworkPkg/DxeNetLib: adjust PseudoRandom error logging
There is a list of allowed rng algorithms, if /one/ of them is not
supported this is not a problem, only /all/ of them failing is an
error condition.

Downgrade the message for a single unsupported algorithm from ERROR to
VERBOSE.  Add an error message in case we finish the loop without
finding a supported algorithm.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-09 11:33:44 +01:00
Mike Beaton 1d8d64b17b ArmVirtPkg: Fix unable to build with -D NETWORK_ENABLE=0
https://bugzilla.tianocore.org/show_bug.cgi?id=4829

7f17a15 (2024/02/22)
"OvmfPkg: Shell*.inc: allow building without network support"
breaks building OVMF with `-D NETWORK_ENABLE=0`.

Before this commit we could build OVMF e.g. with the following
command in the OvmfPkg directory:

./build.sh -D NETWORK_ENABLE=0

After the commit the same command fails early with:

/home/user/OpenSource/edk2/OvmfPkg/OvmfPkgX64.dsc(15):
error F001: Pcd (gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections)
defined in DSC is not declared in DEC files referenced in INF files in
FDF. Arch: ['X64']

This problem also applies in the ArmVirtPkg
platforms which are modified here, but is currently
masked by another issue, namely that these platforms
incorrectly still include some network packages when
most are disabled. (A fix for this was previously applied,
for OvmfPkg Intel platforms only, by
d933ec1 followed by
7f17a15 .)

This commit was created at the same time as the
commits resolving this issue in NetworkPkg and
OvmfPkg. It makes conditional the Pcd references
in ArmVirtPkg platforms which will become references to
undefined Pcds as and when the other issue mentioned
above is fixed.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-09-09 11:32:31 +01:00
Mike Beaton e3362a759d OvmfPkg: Fix unable to build OVMF with -D NETWORK_ENABLE=0
https://bugzilla.tianocore.org/show_bug.cgi?id=4829

7f17a15 (2024/02/22)
"OvmfPkg: Shell*.inc: allow building without network support"
breaks building OVMF with `-D NETWORK_ENABLE=0`.

Before this commit we could build OVMF e.g. with the following
command in the OvmfPkg directory:

./build.sh -D NETWORK_ENABLE=0

After the commit the same command fails early with:

/home/user/OpenSource/edk2/OvmfPkg/OvmfPkgX64.dsc(15):
error F001: Pcd (gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections)
defined in DSC is not declared in DEC files referenced in INF files in
FDF. Arch: ['X64']

The problem applies in Intel OvmfPkg platforms.
Additionally, it applies in various other OvmfPkg
platforms, but is masked buy another issue; namely
that these platforms incorrectly still include some
network packages when most are disabled.
(A fix for that issue has previously been
made, in OvmfPkg Intel platforms only, by
d933ec1 followed by
7f17a15 .)

This commit conditionally removes the undefined Pcd references
in all OvmfPkg platforms which are now affected by this
issue, and in all those which would be affected as and
when the other issue mentioned above is fixed.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-09-09 11:32:26 +01:00
Mike Beaton fc45afee2b NetworkPkg: Fix unable to build OVMF with -D NETWORK_ENABLE=0
https://bugzilla.tianocore.org/show_bug.cgi?id=4829

7f17a15 (2024/02/22)
"OvmfPkg: Shell*.inc: allow building without network support"
breaks building OVMF with `-D NETWORK_ENABLE=0`.

Before this commit we could build OVMF e.g. with the following
command in the OvmfPkg directory:

./build.sh -D NETWORK_ENABLE=0

After the commit the same command fails early with:

/home/user/OpenSource/edk2/OvmfPkg/OvmfPkgX64.dsc(15):
error F001: Pcd (gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections)
defined in DSC is not declared in DEC files referenced in INF files in
FDF. Arch: ['X64']

This commit conditionally removes the undefined Pcd reference in
NetworkPkg which is part of this issue.

Similar changes are needed in separate commits for
OvmfPkg (and for ArmVirtPkg, since the issue also
exists there, although masked by another issue).

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-09-09 11:29:25 +01:00
Michael Kubacki 9b8affc22d BaseTools/codeql: Update to CodeQL 2.18.1
Updates to the latest CodeQL version to resolve query dependencies.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-07-26 11:41:56 +03:00
dependabot[bot] 487b5945b2 pip: bump edk2-pytool-extensions from 0.26.4 to 0.27.5
Bumps [edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions) from 0.26.4 to 0.27.5.
- [Release notes](https://github.com/tianocore/edk2-pytool-extensions/releases)
- [Commits](https://github.com/tianocore/edk2-pytool-extensions/compare/v0.26.4...v0.27.5)

---
updated-dependencies:
- dependency-name: edk2-pytool-extensions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-26 10:22:47 +03:00
dependabot[bot] 96002713d8 pip: bump edk2-pytool-library from 0.20.0 to 0.21.5
Bumps [edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library) from 0.20.0 to 0.21.5.
- [Release notes](https://github.com/tianocore/edk2-pytool-library/releases)
- [Commits](https://github.com/tianocore/edk2-pytool-library/compare/v0.20.0...v0.21.5)

---
updated-dependencies:
- dependency-name: edk2-pytool-library
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-26 10:22:46 +03:00
dependabot[bot] e437f5f62b pip: bump regex from 2023.12.25 to 2024.5.15
Bumps [regex](https://github.com/mrabarnett/mrab-regex) from 2023.12.25 to 2024.5.15.
- [Changelog](https://github.com/mrabarnett/mrab-regex/blob/hg/changelog.txt)
- [Commits](https://github.com/mrabarnett/mrab-regex/compare/2023.12.25...2024.5.15)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-26 10:22:46 +03:00
Mikhail Krichanov 48d9ff62ef README: Added links to audk-stable-202305, audk-stable-202311. 2024-07-22 13:52:40 +03:00
Mikhail Krichanov a6c369fc36 Fixed compilation of all packages tracked by CI after rebasing upon edk2-stable202405 tag. 2024-07-22 13:52:40 +03:00
Mike Beaton dfbc6323ce BaseTools: Enable symbolic debugging with LTO in XCODE toolchain (#64) 2024-07-22 13:52:40 +03:00
vit9696 e2fe2aa26d BaseTools: Provide fat Mach-O binaries on Darwin
Merge pull request #63 from acidanthera/vit9696-fattools-20240327
2024-07-22 13:52:40 +03:00
Mike Beaton fde2711dcc tools_def: Remove unneeded -Wno-unneeded-internal-declaration for CLANGDWARF
This is already worked around by the alternative version
of MDEPKG_NDEBUG DEBUG() for __clang__ which is provided
in MdePkg DebugLib.h, therefore the reason why this flag
was added in EDK-II no longer applies.
2024-07-22 13:52:07 +03:00
Mikhail Krichanov cf38766c99 Fixed compilation of all packages tracked by CI after rebasing upon edk2-stable202311. 2024-07-22 13:51:38 +03:00
Mikhail Krichanov 04e068e0b8 Build: Upgraded OpenCorePkg. 2024-07-22 13:49:01 +03:00
Mikhail Krichanov 46050fc0fc SecurePE: Defined new PcdImageProtectionPolicy. 2024-07-22 13:49:00 +03:00
Mikhail Krichanov 7a25dcfffb BaseTools: Fixed '-D EDK2_REDUCE_FW_SIZE' build option. 2024-07-22 13:49:00 +03:00
Mikhail Krichanov 21327695a0 UE: Support UE generation and consumption. 2024-07-22 13:49:00 +03:00
Mikhail Krichanov 683f4b85cb OvmfPkg: Increased SECFV_SIZE at FVMAIN_COMPACT's expense to fix CLANGPDB compilation. 2024-07-22 13:49:00 +03:00
Mikhail Krichanov 1baaa3c5ce Docs: Updated README.md. 2024-07-22 13:49:00 +03:00
Mikhail Krichanov c4e3993ebe BaseTools/tools_def: Deduplicate DLINK_FLAGS from CC_FLAGS 2024-07-22 13:49:00 +03:00
Marvin Häuser 62f5d3596b BaseTools/build_rule: Always pass CC_FLAGS to DLINK 2024-07-22 13:49:00 +03:00
Marvin Häuser 03de312094 BaseTools/CommonLib: Replace aligned_alloc with posix_memalign 2024-07-22 13:49:00 +03:00
Mikhail Krichanov 028bb3e2c7 MdePkg/UefiImageLib: Introduce DebugAddress
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2024-07-22 13:49:00 +03:00
Mikhail Krichanov 410e9987f3 ImageTool: Rework PeEmit with dynamically-growing buffers 2024-07-22 13:49:00 +03:00
Mikhail Krichanov 5a8fe7214e MdePkg/UefiImageLib: Support multi-format and multi-source architecture
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2024-07-22 13:49:00 +03:00
Marvin Häuser c01eab36cb MdeModulePkg/DxeCore: Re-use ImageIsFromFv for memory protection 2024-07-22 13:49:00 +03:00
Savva Mitrofanov 06056015eb CI: Remove Dependabot configuration 2024-07-22 13:49:00 +03:00
Mikhail Krichanov 6e382e8bb0 BaseTools/Conf: Added EDK2_GCC_NOLTO build option. 2024-07-22 13:49:00 +03:00
Mikhail Krichanov f83c7b5c40 Build: Replaced GCC5 toolchain with GCC. 2024-07-22 13:49:00 +03:00
Mikhail Krichanov 7886691a93 Revert "MdeModulePkg: Enable forward edge CFI in mem attributes table"
This reverts commit e4ef609319.
2024-07-22 13:47:18 +03:00
Mikhail Krichanov 769c333a61 MdeModulePkg/Core/Dxe: Integrate CPU Architectural producer
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3223

In the current design, memory protection is not available till CpuDxe
is loaded. To resolve this, introduce CpuArchLib to move the
CPU Architectural initialization to DxeCore.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2024-07-22 13:47:18 +03:00
Mikhail Krichanov ecfa20d841 OvmfPkg, BaseTools: Fixed Amaranth compilation for gcc-12.3.0. 2024-07-22 13:47:18 +03:00
Mikhail Krichanov 047d1b2f88 BaseTools: Introduce new HII section design 2024-07-22 13:47:18 +03:00
Mikhail Krichanov c57cc69793 BaseTools/C: Consume UefiImageLib and ImageToolEmit 2024-07-22 13:47:18 +03:00
Marvin Häuser f69039282f BaseTools/GenFv: Remove .text and .data from FV map 2024-07-22 13:47:18 +03:00
Marvin Häuser f0891b587f Remove hacks related to former lack of XCODE5 .hii support 2024-07-22 13:47:18 +03:00
Mikhail Krichanov e04963f91d Added .md file summarizing current states of packages. 2024-07-22 13:47:18 +03:00
Marvin Häuser 4f05d0cc12 BaseTools/build_rule: Drop deprecated ASM16 definition 2024-07-22 13:47:18 +03:00
Mikhail Krichanov 2ae98acd86 Drop support for the TE format 2024-07-22 13:47:18 +03:00
Marvin Häuser 584d13a2eb ArmPkg/ArmMmuLib: ASSERT ArmReplaceLiveTranslationEntry alignment 2024-07-22 13:47:18 +03:00
Marvin Häuser 3aee8784da MdeModulePkg/ExtendedFirmwarePerformance: Fix FPDT struct alignment 2024-07-22 13:47:18 +03:00
Marvin Häuser e63fef0eea UefiPayloadPkg/UefiPayloadEntry: Return image destination size as UINT32 2024-07-22 13:47:18 +03:00
Savva Mitrofanov a86d9d688e ArmVirtPkg/ArmVirtQemu: Disable PcdPrePiProduceMemoryTypeInformationHob for ARM
The PcdPrePiProduceMemoryTypeInformationHob on ARM breaks Linux efistub
boot. The efistub for arm32 uncompresses Linux kernel into memory ranges
which occupied by DXE-phase drivers which leads to
'permission denied'-error during page write. So as a temporary solution
we use PcdPrePiProduceMemoryTypeInformationHob only for AARCH64

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2024-07-22 13:47:18 +03:00