mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 21:54:27 +02:00
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>
This commit is contained in:
parent
c2f643479e
commit
b29e6365c3
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# This package provides network modules that conform to UEFI 2.4 specification.
|
# This package provides network modules that conform to UEFI 2.4 specification.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
# (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>
|
# (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
@ -117,5 +117,15 @@
|
|||||||
# @Prompt Type Value of network boot policy used in iSCSI.
|
# @Prompt Type Value of network boot policy used in iSCSI.
|
||||||
gEfiNetworkPkgTokenSpaceGuid.PcdIScsiAIPNetworkBootPolicy|0x08|UINT8|0x10000007
|
gEfiNetworkPkgTokenSpaceGuid.PcdIScsiAIPNetworkBootPolicy|0x08|UINT8|0x10000007
|
||||||
|
|
||||||
|
## IPv4 PXE support
|
||||||
|
# 0x01 = PXE Enabled
|
||||||
|
# 0x00 = PXE Disabled
|
||||||
|
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01|UINT8|0x10000009
|
||||||
|
|
||||||
|
## IPv6 PXE support
|
||||||
|
# 0x01 = PXE Enabled
|
||||||
|
# 0x00 = PXE Disabled
|
||||||
|
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01|UINT8|0x1000000a
|
||||||
|
|
||||||
[UserExtensions.TianoCore."ExtraFiles"]
|
[UserExtensions.TianoCore."ExtraFiles"]
|
||||||
NetworkPkgExtra.uni
|
NetworkPkgExtra.uni
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Driver Binding functions implementationfor for UefiPxeBc Driver.
|
Driver Binding functions implementationfor for UefiPxeBc Driver.
|
||||||
|
|
||||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
(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
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
@ -1242,6 +1242,10 @@ PxeBcDriverEntryPoint (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
if ((PcdGet8(PcdIPv4PXESupport) == PXE_DISABLED) && (PcdGet8(PcdIPv6PXESupport) == PXE_DISABLED)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
Status = EfiLibInstallDriverBindingComponentName2 (
|
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
SystemTable,
|
SystemTable,
|
||||||
@ -1301,9 +1305,15 @@ PxeBcSupported (
|
|||||||
EFI_GUID *MtftpServiceBindingGuid;
|
EFI_GUID *MtftpServiceBindingGuid;
|
||||||
|
|
||||||
if (IpVersion == IP_VERSION_4) {
|
if (IpVersion == IP_VERSION_4) {
|
||||||
|
if (PcdGet8(PcdIPv4PXESupport) == PXE_DISABLED) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
DhcpServiceBindingGuid = &gEfiDhcp4ServiceBindingProtocolGuid;
|
DhcpServiceBindingGuid = &gEfiDhcp4ServiceBindingProtocolGuid;
|
||||||
MtftpServiceBindingGuid = &gEfiMtftp4ServiceBindingProtocolGuid;
|
MtftpServiceBindingGuid = &gEfiMtftp4ServiceBindingProtocolGuid;
|
||||||
} else {
|
} else {
|
||||||
|
if (PcdGet8(PcdIPv6PXESupport) == PXE_DISABLED) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
DhcpServiceBindingGuid = &gEfiDhcp6ServiceBindingProtocolGuid;
|
DhcpServiceBindingGuid = &gEfiDhcp6ServiceBindingProtocolGuid;
|
||||||
MtftpServiceBindingGuid = &gEfiMtftp6ServiceBindingProtocolGuid;
|
MtftpServiceBindingGuid = &gEfiMtftp6ServiceBindingProtocolGuid;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
This EFI_PXE_BASE_CODE_PROTOCOL and EFI_LOAD_FILE_PROTOCOL.
|
This EFI_PXE_BASE_CODE_PROTOCOL and EFI_LOAD_FILE_PROTOCOL.
|
||||||
interfaces declaration.
|
interfaces declaration.
|
||||||
|
|
||||||
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
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
@ -78,6 +78,9 @@ typedef struct _PXEBC_VIRTUAL_NIC PXEBC_VIRTUAL_NIC;
|
|||||||
#define PXEBC_PRIVATE_DATA_FROM_ID(a) CR (a, PXEBC_PRIVATE_DATA, Id, PXEBC_PRIVATE_DATA_SIGNATURE)
|
#define PXEBC_PRIVATE_DATA_FROM_ID(a) CR (a, PXEBC_PRIVATE_DATA, Id, PXEBC_PRIVATE_DATA_SIGNATURE)
|
||||||
#define PXEBC_VIRTUAL_NIC_FROM_LOADFILE(a) CR (a, PXEBC_VIRTUAL_NIC, LoadFile, PXEBC_VIRTUAL_NIC_SIGNATURE)
|
#define PXEBC_VIRTUAL_NIC_FROM_LOADFILE(a) CR (a, PXEBC_VIRTUAL_NIC, LoadFile, PXEBC_VIRTUAL_NIC_SIGNATURE)
|
||||||
|
|
||||||
|
#define PXE_ENABLED 0x01
|
||||||
|
#define PXE_DISABLED 0x00
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
PXEBC_DHCP4_PACKET_CACHE Dhcp4;
|
PXEBC_DHCP4_PACKET_CACHE Dhcp4;
|
||||||
PXEBC_DHCP6_PACKET_CACHE Dhcp6;
|
PXEBC_DHCP6_PACKET_CACHE Dhcp6;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# PXE-compatible device for network access or booting. This driver supports
|
# PXE-compatible device for network access or booting. This driver supports
|
||||||
# both IPv4 and IPv6 network stack.
|
# both IPv4 and IPv6 network stack.
|
||||||
#
|
#
|
||||||
# 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
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
#
|
#
|
||||||
@ -102,6 +102,8 @@
|
|||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize ## SOMETIMES_CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize ## SOMETIMES_CONSUMES
|
||||||
gEfiNetworkPkgTokenSpaceGuid.PcdPxeTftpWindowSize ## SOMETIMES_CONSUMES
|
gEfiNetworkPkgTokenSpaceGuid.PcdPxeTftpWindowSize ## SOMETIMES_CONSUMES
|
||||||
|
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport ## CONSUMES
|
||||||
|
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport ## CONSUMES
|
||||||
|
|
||||||
[UserExtensions.TianoCore."ExtraFiles"]
|
[UserExtensions.TianoCore."ExtraFiles"]
|
||||||
UefiPxeBcDxeExtra.uni
|
UefiPxeBcDxeExtra.uni
|
||||||
|
Loading…
x
Reference in New Issue
Block a user