From 849bce03614ef15716d19d256a7dfb4c8c020508 Mon Sep 17 00:00:00 2001 From: gustavo16a <106705441+gustavo16a@users.noreply.github.com> Date: Mon, 21 Oct 2024 17:46:16 +0200 Subject: [PATCH] Fix Network stack not being loaded (#26) Due to the changes in the commit 4c4ceb2c, the Network Stack requires the use of a new Random Number Generator (RNG). The UefiPayloadPkg has not been patched on default EDK2, since network implementation is not default in it. Therefore, the solution was to apply something that was done in another platforms in EDK2 adding the RngDxe and the Hash2DxeCrypto drivers (commits 3e722403 and e10d8323). --- UefiPayloadPkg/UefiPayloadPkg.dsc | 13 +++++++++++++ UefiPayloadPkg/UefiPayloadPkg.fdf | 9 +++++++++ 2 files changed, 22 insertions(+) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc index 7bb98f734481..839a5f8a9a9a 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -855,6 +855,19 @@ } !endif +!if $(NETWORK_DRIVER_ENABLE) == TRUE + # + # Rng Protocol producer + # + SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf + + # + # Hash2 Protocol producer + # + SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.inf +!endif + + !if $(SECURE_BOOT_ENABLE) == TRUE SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf UefiPayloadPkg/SecureBootEnrollDefaultKeys/SecureBootSetup.inf diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf index 35c32027308b..18e1de977932 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -389,6 +389,15 @@ INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf # !if $(NETWORK_DRIVER_ENABLE) == TRUE !include NetworkPkg/Network.fdf.inc + # + # Rng Protocol producer + # + INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf + + # + # Hash2 Protocol producer + # + INF SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.inf !endif !endif