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