Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2e32bf2

Browse files
committed
Merged PR 500: Refactor Network and USB operation to accept the same JSON packet.
There are two recovery paths for dfci settings. Updated to support a JSON packets required by DDS/Intune. Changed USB support to process the same packet type.
1 parent16b835c commit2e32bf2

File tree

28 files changed

+2461
-1195
lines changed

28 files changed

+2461
-1195
lines changed

‎DfciPkg/Application/DfciMenu/DfciMenu.c‎

Lines changed: 199 additions & 108 deletions
Large diffs are not rendered by default.

‎DfciPkg/Application/DfciMenu/DfciMenu.h‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,4 @@ typedef struct {
9898
0x3147b040, 0xeac3, 0x4b9f, { 0xb5, 0xec, 0xc2, 0xe2, 0x88, 0x45, 0x17, 0x4e } \
9999
}
100100

101-
#defineUSER_STATUS_SUCCESS 0x0000000000000000L
102-
#defineUSER_STATUS_NO_NIC 0x0000000000000001L
103-
#defineUSER_STATUS_NO_MEDIA 0x0000000000000002L
104-
#defineUSER_STATUS_NO_SETTINGS 0x0000000000000003L
105-
#defineUSER_STATUS_NO_FILE 0x0000000000000004L
106-
107-
108-
#endif// __DFCI_MENU_H__
109-
101+
#endif// __DFCI_MENU_H__

‎DfciPkg/Application/DfciMenu/DfciMenu.inf‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#
4545

4646
[Sources]
47+
DfciPrivate.h
4748
DfciMenu.h
4849
DfciMenu.c
4950
DfciMenuVfr.Vfr
@@ -52,12 +53,15 @@
5253
DfciRequest.c
5354
DfciUsb.h
5455
DfciUsb.c
56+
DfciUpdate.h
57+
DfciUpdate.c
5558

5659
[Packages]
5760
DfciPkg/DfciPkg.dec
5861
NetworkPkg/NetworkPkg.dec
5962
MdePkg/MdePkg.dec
6063
MdeModulePkg/MdeModulePkg.dec
64+
MsCorePkg/MsCorePkg.dec
6165
ZeroTouchPkg/ZeroTouchPkg.dec
6266

6367
[LibraryClasses]
@@ -72,6 +76,7 @@
7276
HiiLib
7377
HttpLib
7478
MemoryAllocationLib
79+
JsonLiteParserLib
7580
PrintLib
7681
UefiBootServicesTableLib
7782
UefiDriverEntryPoint
@@ -114,5 +119,4 @@
114119
gDfciSettingPermissionsProtocolGuid
115120

116121
[BuildOptions]
117-
# DEBUG_*_*_CC_FLAGS = /Od /FAcs
118-
DEBUG_*_*_CC_FLAGS = /analyze
122+
# DEBUG_*_*_CC_FLAGS = /FAcs

‎DfciPkg/Application/DfciMenu/DfciMenuStrings.uni‎

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -138,22 +138,10 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
138138

139139
#string STR_DFCI_MB_CAPTION_FAIL #language en-US "Refresh settings request failed"
140140

141-
#string STR_DFCI_MB_NEW_SETTINGS #language en-US "Refresh settings request applied new settings. Restart now to apply those settings."
142-
143-
#string STR_DFCI_MB_NO_SETTINGS #language en-US "No new settings have been appled."
144-
145-
#string STR_DFCI_MB_NO_NIC #language en-US "No network device detected."
141+
#string STR_DFCI_MB_NEW_SETTINGS #language en-US "Refresh settings request applied new settings from\n%s\nRestart now to apply those settings."
146142

147143
#string STR_DFCI_MB_NO_MEDIA #language en-US "Unable to detect network cable."
148144

149-
#string STR_DFCI_MB_NO_FILE #language en-US "File not found."
150-
151-
#string STR_DFCI_MB_SUCCESS #language en-US " Success"
152-
153-
#string STR_DFCI_MB_FAILED #language en-US " Failed"
154-
155-
#string STR_DFCI_MB_NOT_FOUND #language en-US " Not Found"
156-
157-
#string STR_DFCI_MB_INTERNAL_ERROR #language en-US "Internal error. Reason=%ld. Code=%r."
145+
#string STR_DFCI_MB_NOT_FOUND #language en-US "%s not found."
158146

159-
#stringSTR_DFCI_RESET_BUTTON_TEXT #language en-US "Get started"
147+
#stringSTR_DFCI_MB_INTERNAL_ERROR #language en-US "Internal error. Code=%r."

‎DfciPkg/Application/DfciMenu/DfciMenuVfr.Vfr‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ formset
204204
help = STRING_TOKEN(STR_NULL_STRING), // SPACING
205205
text = STRING_TOKEN(STR_NULL_STRING); //
206206

207-
goto DFCI_MENU_CONFIGURE_FORM_ID, //External referencetorecovery menu
207+
goto DFCI_MENU_CONFIGURE_FORM_ID, //Gotoconfiguration menu
208208
prompt = STRING_TOKEN(STR_DFCI_MENU_CONFIGURE), //
209-
help = STRING_TOKEN(STR_NULL_STRING), // HTTP Update Now button
209+
help = STRING_TOKEN(STR_NULL_STRING), //
210210
flags = INTERACTIVE,
211211
key = DFCI_MENU_CONFIGURE_QUESTION_ID;
212212

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/** @file
2+
DfciPrivate.h
3+
4+
Header file for Dfci Private Data
5+
6+
Copyright (c) 2018, Microsoft Corporation
7+
8+
All rights reserved.
9+
10+
Redistribution and use in source and binary forms, with or without
11+
modification, are permitted provided that the following conditions are met:
12+
13+
1. Redistributions of source code must retain the above copyright notice,
14+
this list of conditions and the following disclaimer.
15+
2. Redistributions in binary form must reproduce the above copyright notice,
16+
this list of conditions and the following disclaimer in the documentation
17+
and/or other materials provided with the distribution.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
30+
**/
31+
32+
#ifndef__DFCI_PRIVATE_H__
33+
#define__DFCI_PRIVATE_H__
34+
35+
#include<Protocol/ServiceBinding.h>
36+
#include<Protocol/Http.h>
37+
#include<Protocol/Ip4Config2.h>
38+
39+
/**
40+
* DFCI Private Data
41+
**/
42+
typedefstruct {
43+
//
44+
// Parameters
45+
//
46+
CHAR8*Url;
47+
UINTNUrlSize;
48+
CHAR8*DfciIdString;
49+
UINTNDfciIdStringSize;
50+
//
51+
// Common section -- From here to the end cleared before each NIC attempt
52+
//
53+
EFI_HANDLENicHandle;
54+
EFI_SERVICE_BINDING_PROTOCOL*HttpSbProtocol;
55+
EFI_HTTP_CONFIG_DATAConfigData;
56+
EFI_HTTP_PROTOCOL*HttpProtocol;
57+
EFI_HANDLEHttpChildHandle;
58+
BOOLEANDhcpRequested;
59+
EFI_IP4_CONFIG2_PROTOCOL*Ip4Config2;
60+
61+
//
62+
// Fields valid during DHCP delay
63+
//
64+
EFI_EVENTWaitEvent;
65+
66+
//
67+
// IPv4 Sspecific section
68+
//
69+
EFI_HTTPv4_ACCESS_POINTIPv4Node;
70+
71+
//
72+
// IPv6 Specific section
73+
//
74+
EFI_HTTPv6_ACCESS_POINTIPv6Node;
75+
76+
}DFCI_PRIVATE_DATA;
77+
78+
externDFCI_PRIVATE_DATAmDfciPrivateData;
79+
80+
81+
#endif// __DFCI_PRIVATE_H__

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp