diff options
author | Xue, ShengfengX <shengfengx.xue@intel.com> | 2019-04-18 13:13:22 +0300 |
---|---|---|
committer | Fu Siyuan <siyuan.fu@intel.com> | 2019-04-22 04:14:45 +0300 |
commit | b29e6365c37f60c1e3757bc1fde448102e98854c (patch) | |
tree | ce8ae696acb41aedec529d6157fbb487430b02aa /NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c | |
parent | c2f643479eb3f00d930c461cdec3ba420a36072c (diff) | |
download | edk2-b29e6365c37f60c1e3757bc1fde448102e98854c.tar.xz |
NetworkPkg/UefiPxeBcDxe:Add two PCD to control PXE.
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1695
Setup need provide an item for user to control IPV46 PXE boot.
Origin UefiPxeBcDxe driver doesn't have such interface.
This change added two PCD to control IPV4/6 PXE in PxeBcSupported().
Platform code should override this two PCD according to Setup value.
code change no side effect on current PXE function with default PCD.
Signed-off-by: Xue ShengfengX <shengfengx.xue@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Diffstat (limited to 'NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c')
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c index 3c1d400d50..b35edb687d 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c @@ -2,7 +2,7 @@ Driver Binding functions implementationfor for UefiPxeBc Driver.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -1242,6 +1242,10 @@ PxeBcDriverEntryPoint ( {
EFI_STATUS Status;
+ if ((PcdGet8(PcdIPv4PXESupport) == PXE_DISABLED) && (PcdGet8(PcdIPv6PXESupport) == PXE_DISABLED)) {
+ return EFI_UNSUPPORTED;
+ }
+
Status = EfiLibInstallDriverBindingComponentName2 (
ImageHandle,
SystemTable,
@@ -1301,9 +1305,15 @@ PxeBcSupported ( EFI_GUID *MtftpServiceBindingGuid;
if (IpVersion == IP_VERSION_4) {
+ if (PcdGet8(PcdIPv4PXESupport) == PXE_DISABLED) {
+ return EFI_UNSUPPORTED;
+ }
DhcpServiceBindingGuid = &gEfiDhcp4ServiceBindingProtocolGuid;
MtftpServiceBindingGuid = &gEfiMtftp4ServiceBindingProtocolGuid;
} else {
+ if (PcdGet8(PcdIPv6PXESupport) == PXE_DISABLED) {
+ return EFI_UNSUPPORTED;
+ }
DhcpServiceBindingGuid = &gEfiDhcp6ServiceBindingProtocolGuid;
MtftpServiceBindingGuid = &gEfiMtftp6ServiceBindingProtocolGuid;
}
|