mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-01 12:53:27 +01:00
50 lines
1017 B
C
50 lines
1017 B
C
/** @file
|
|
Configure some PCDs dynamically for
|
|
"NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf", from QEMU's fw_cfg.
|
|
|
|
Copyright (C) 2020, Red Hat, Inc.
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
**/
|
|
|
|
#include <Library/PcdLib.h>
|
|
#include <Library/QemuFwCfgSimpleParserLib.h>
|
|
|
|
RETURN_STATUS
|
|
EFIAPI
|
|
SetPxeBcPcds (
|
|
VOID
|
|
)
|
|
{
|
|
BOOLEAN FwCfgBool;
|
|
RETURN_STATUS PcdStatus;
|
|
|
|
if (!RETURN_ERROR (
|
|
QemuFwCfgParseBool (
|
|
"opt/org.tianocore/IPv4PXESupport",
|
|
&FwCfgBool
|
|
)
|
|
))
|
|
{
|
|
PcdStatus = PcdSet8S (PcdIPv4PXESupport, FwCfgBool);
|
|
if (RETURN_ERROR (PcdStatus)) {
|
|
return PcdStatus;
|
|
}
|
|
}
|
|
|
|
if (!RETURN_ERROR (
|
|
QemuFwCfgParseBool (
|
|
"opt/org.tianocore/IPv6PXESupport",
|
|
&FwCfgBool
|
|
)
|
|
))
|
|
{
|
|
PcdStatus = PcdSet8S (PcdIPv6PXESupport, FwCfgBool);
|
|
if (RETURN_ERROR (PcdStatus)) {
|
|
return PcdStatus;
|
|
}
|
|
}
|
|
|
|
return RETURN_SUCCESS;
|
|
}
|