]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/NetworkDefines.dsc.inc
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / NetworkPkg / NetworkDefines.dsc.inc
CommitLineData
1e948802
LG
1## @file\r
2# Network DSC include file for [Defines] section of all Architectures.\r
3#\r
4# This file can be included to the [Defines] section of a platform DSC file by\r
5# using "!include NetworkPkg/NetworkDefines.dsc.inc" to set default value of\r
6# flags if they are not defined somewhere else, and also check the value to see\r
7# if there is any conflict.\r
8#\r
9# These flags can be defined before the !include line, or changed on the command\r
10# line to enable or disable related feature support.\r
11# -D FLAG=VALUE\r
12# The default value of these flags are:\r
13# DEFINE NETWORK_ENABLE = TRUE\r
14# DEFINE NETWORK_SNP_ENABLE = TRUE\r
15# DEFINE NETWORK_IP4_ENABLE = TRUE\r
16# DEFINE NETWORK_IP6_ENABLE = TRUE\r
17# DEFINE NETWORK_TLS_ENABLE = TRUE\r
126115a9 18# DEFINE NETWORK_HTTP_ENABLE = FALSE\r
1e948802
LG
19# DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE\r
20# DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE\r
4ecb1ba5 21# DEFINE NETWORK_ISCSI_ENABLE = FALSE\r
bb33c27f 22# DEFINE NETWORK_ISCSI_MD5_ENABLE = TRUE\r
1e948802
LG
23# DEFINE NETWORK_VLAN_ENABLE = TRUE\r
24#\r
25# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
126115a9 26# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
1e948802
LG
27#\r
28# SPDX-License-Identifier: BSD-2-Clause-Patent\r
29#\r
30##\r
31\r
32!ifndef NETWORK_ENABLE\r
33 #\r
34 # This flag is to enable or disable the whole network stack.\r
35 #\r
36 DEFINE NETWORK_ENABLE = TRUE\r
37!endif\r
38\r
39!ifndef NETWORK_SNP_ENABLE\r
40 #\r
41 # This flag is to include the common SNP driver or not.\r
42 #\r
43 DEFINE NETWORK_SNP_ENABLE = TRUE\r
44!endif\r
45\r
46!ifndef NETWORK_VLAN_ENABLE\r
47 #\r
48 # This flag is to enable or disable VLAN feature.\r
49 #\r
50 DEFINE NETWORK_VLAN_ENABLE = TRUE\r
51!endif\r
52\r
53!ifndef NETWORK_IP4_ENABLE\r
54 #\r
55 # This flag is to enable or disable IPv4 network stack.\r
56 #\r
57 DEFINE NETWORK_IP4_ENABLE = TRUE\r
58!endif\r
59\r
60!ifndef NETWORK_IP6_ENABLE\r
61 #\r
62 # This flag is to enable or disable IPv6 network stack.\r
63 #\r
64 DEFINE NETWORK_IP6_ENABLE = TRUE\r
65!endif\r
66\r
67!ifndef NETWORK_TLS_ENABLE\r
68 #\r
69 # This flag is to enable or disable TLS feature.\r
70 #\r
71 # Note: This feature depends on the OpenSSL building. To enable this feature, please\r
72 # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in\r
73 # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.\r
74 # The OpensslLib.inf library instance should be used since libssl is required.\r
75 #\r
76 DEFINE NETWORK_TLS_ENABLE = TRUE\r
77!endif\r
78\r
126115a9
AC
79!ifndef NETWORK_HTTP_ENABLE\r
80 #\r
81 # This flag is to enable or disable HTTP(S) feature.\r
82 # The default is set to FALSE to not affecting the existing\r
83 # platforms.\r
84 # NETWORK_HTTP_ENABLE set to FALSE is not affecting NETWORK_HTTP_BOOT_ENABLE\r
85 # when NETWORK_HTTP_BOOT_ENABLE is TRUE.\r
86 DEFINE NETWORK_HTTP_ENABLE = FALSE\r
87!endif\r
88\r
1e948802
LG
89!ifndef NETWORK_HTTP_BOOT_ENABLE\r
90 #\r
91 # This flag is to enable or disable HTTP(S) boot feature.\r
92 #\r
126115a9 93 #\r
1e948802
LG
94 DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE\r
95!endif\r
96\r
97!ifndef NETWORK_ALLOW_HTTP_CONNECTIONS\r
98 #\r
99 # Indicates whether HTTP connections (i.e., unsecured) are permitted or not.\r
100 #\r
101 # Note: If NETWORK_ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are allowed.\r
102 # Both the "https://" and "http://" URI schemes are permitted. Otherwise, HTTP\r
103 # connections are denied. Only the "https://" URI scheme is permitted.\r
104 #\r
105 DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE\r
106!endif\r
107\r
108!ifndef NETWORK_ISCSI_ENABLE\r
109 #\r
110 # This flag is to enable or disable iSCSI feature.\r
111 #\r
112 # Note: This feature depends on the OpenSSL building. To enable this feature, please\r
113 # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in\r
114 # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.\r
115 # Both OpensslLib.inf and OpensslLibCrypto.inf library instance can be used\r
116 # since libssl is not required for iSCSI.\r
117 #\r
4ecb1ba5 118 DEFINE NETWORK_ISCSI_ENABLE = FALSE\r
1e948802
LG
119!endif\r
120\r
bb33c27f
LE
121!ifndef NETWORK_ISCSI_MD5_ENABLE\r
122 #\r
123 # This flag enables the deprecated MD5 hash algorithm in iSCSI CHAP\r
124 # authentication.\r
125 #\r
126 # Note: The NETWORK_ISCSI_MD5_ENABLE flag only makes a difference if\r
127 # NETWORK_ISCSI_ENABLE is TRUE; otherwise, NETWORK_ISCSI_MD5_ENABLE is\r
128 # ignored.\r
129 #\r
130 # With NETWORK_ISCSI_MD5_ENABLE set to TRUE, MD5 is enabled as the\r
131 # least preferred CHAP hash algorithm. With NETWORK_ISCSI_MD5_ENABLE\r
132 # set to FALSE, MD5 is disabled statically, at build time.\r
133 #\r
134 # The default value is TRUE, because RFC 7143 mandates MD5, and because\r
135 # several vendors' iSCSI targets only support MD5, for CHAP.\r
136 #\r
137 DEFINE NETWORK_ISCSI_MD5_ENABLE = TRUE\r
138!endif\r
139\r
1e948802
LG
140!if $(NETWORK_ENABLE) == TRUE\r
141 #\r
142 # Check the flags to see if there is any conflict.\r
143 #\r
144 !if ($(NETWORK_IP4_ENABLE) == FALSE) AND ($(NETWORK_IP6_ENABLE) == FALSE)\r
145 !error "Must enable at least IP4 or IP6 stack if NETWORK_ENABLE is set to TRUE!"\r
146 !endif\r
147\r
126115a9
AC
148 !if ($(NETWORK_HTTP_BOOT_ENABLE) == TRUE) OR ($(NETWORK_HTTP_ENABLE) == TRUE)\r
149 !if ($(NETWORK_TLS_ENABLE) == FALSE) AND ($(NETWORK_ALLOW_HTTP_CONNECTIONS) == FALSE)\r
150 !error "Must enable TLS to support HTTPS, or allow unsecured HTTP connection, if NETWORK_HTTP_BOOT_ENABLE or NETWORK_HTTP_ENABLE is set to TRUE!"\r
151 !endif\r
1e948802
LG
152 !endif\r
153!endif\r