blob: 477125e365f1344f83445e31515c93d78124ee6f [file] [log] [blame]
Vishal Bhoj82c80712015-12-15 21:13:33 +05301From 6451e0daf7f733a27e1afb3c7ac662a620d8b93b Mon Sep 17 00:00:00 2001
2From: Olivier Martin <olivier.martin@arm.com>
3Date: Tue, 14 Jan 2014 14:43:50 +0000
4Subject: [PATCH] EDK Shell patch to support GCC
5
6---
7 DeviceTree/devicetree.c | 4 +-
8 DeviceTree/devicetree.h | 1 +
9 DeviceTree/devicetree.inf | 28 +--
10 EfiCompress/Compress.h | 2 +-
11 EfiCompress/CompressMain.c | 2 +-
12 EfiCompress/compress.c | 2 +-
13 EfiCompress/compress.inf | 32 +--
14 EfiDecompress/Decompress.c | 8 +-
15 EfiDecompress/Decompress.h | 2 +-
16 EfiDecompress/Decompress.inf | 33 +--
17 IfConfig/IfConfig.c | 6 +-
18 IfConfig/IfConfig.h | 1 +
19 IfConfig/IfConfig.inf | 34 +--
20 IfConfig/ShellNetHelper.h | 1 +
21 IpConfig/IpConfig.c | 4 +-
22 IpConfig/IpConfig.h | 2 +-
23 IpConfig/IpConfig.inf | 29 +--
24 Library/Aarch64/efilibplat.h | 38 ++++
25 Library/Arm/efilibplat.h | 39 ++++
26 Library/CRC.c | 2 +-
27 Library/CRC.h | 4 +-
28 Library/ConsistMapping.c | 2 +-
29 Library/ConsistMapping.h | 4 +-
30 Library/DPath.c | 6 +-
31 Library/DPath.h | 3 +-
32 Library/Data.c | 2 +-
33 Library/Ebc/EfiLibPlat.h | 1 +
34 Library/EfiPart.h | 1 +
35 Library/EfiShellLib.h | 11 +-
36 Library/EfiShellLib.inf | 51 +++--
37 Library/Event.c | 2 +-
38 Library/Event.h | 4 +-
39 Library/FileIO.c | 6 +-
40 Library/FileIO.h | 4 +-
41 Library/Handle.c | 9 +-
42 Library/Handle.h | 1 +
43 Library/HiiSupport.c | 6 +-
44 Library/HiiSupport.h | 1 +
45 Library/IA32/efilibplat.h | 2 +-
46 Library/IO.c | 13 +-
47 Library/IO.h | 4 +-
48 Library/IPF/efilibplat.h | 1 +
49 Library/IPF/libsalpal.h | 2 +-
50 Library/IPF/palproc.h | 1 +
51 Library/Init.c | 2 +-
52 Library/LinkedList.h | 4 +-
53 Library/Lock.c | 2 +-
54 Library/Lock.h | 4 +-
55 Library/Mem.c | 2 +-
56 Library/Mem.h | 4 +-
57 Library/Misc.c | 15 +-
58 Library/Misc.h | 1 +
59 Library/Perf.c | 2 +-
60 Library/RtData.c | 2 +-
61 Library/ShellDebug.c | 2 +-
62 Library/ShellDebug.h | 1 +
63 Library/ShellEnvInt.c | 2 +-
64 Library/ShellEnvInt.h | 4 +-
65 Library/Str.c | 6 +-
66 Library/Str.h | 1 +
67 Library/VarCheck.c | 2 +-
68 Library/VarCheck.h | 3 +-
69 Library/X64/efilibplat.h | 1 +
70 LoadPciRom/LoadPciRom.c | 8 +-
71 LoadPciRom/LoadPciRom.h | 1 +
72 LoadPciRom/LoadPciRom.inf | 28 +--
73 Ping/Ping.c | 27 ++-
74 Ping/Ping.h | 1 +
75 Ping/Ping.inf | 34 +--
76 Shell.inf | 305 +++++++++++++-------------
77 ShellFull.inf | 494 ++++++++++++++++++++++---------------------
78 SmbiosView/EventLogInfo.c | 2 +-
79 SmbiosView/EventLogInfo.h | 1 +
80 SmbiosView/LibSmbios.h | 1 +
81 SmbiosView/LibSmbiosView.c | 10 +-
82 SmbiosView/LibSmbiosView.h | 3 +-
83 SmbiosView/PrintInfo.c | 2 +-
84 SmbiosView/PrintInfo.h | 1 +
85 SmbiosView/QueryTable.c | 2 +-
86 SmbiosView/QueryTable.h | 1 +
87 SmbiosView/Smbios.h | 1 +
88 SmbiosView/Smbiosview.inf | 33 +--
89 SmbiosView/smbiosview.c | 4 +-
90 SmbiosView/smbiosview.h | 1 +
91 TelnetMgmt/TelnetMgmt.c | 4 +-
92 TelnetMgmt/TelnetMgmt.h | 2 +-
93 TelnetMgmt/TelnetMgmt.inf | 29 +--
94 TelnetMgmt/TelnetServer.h | 1 +
95 attrib/attrib.c | 6 +-
96 attrib/attrib.h | 3 +-
97 attrib/attrib.inf | 28 +--
98 cls/cls.c | 4 +-
99 cls/cls.h | 1 +
100 cls/cls.inf | 29 +--
101 comp/comp.c | 2 +-
102 comp/comp.h | 2 +-
103 comp/comp.inf | 31 +--
104 cp/cp.c | 10 +-
105 cp/cp.h | 3 +-
106 cp/cp.inf | 29 +--
107 date/date.c | 10 +-
108 date/date.h | 1 +
109 date/date.inf | 29 +--
110 dblk/dblk.c | 2 +-
111 dblk/dblk.h | 1 +
112 dblk/dblk.inf | 31 +--
113 dblk/efidump.c | 18 +-
114 devices/devices.c | 4 +-
115 devices/devices.h | 1 +
116 devices/devices.inf | 28 +--
117 dmem/MemCommonPart.c | 14 +-
118 dmem/MemCommonPart.h | 2 +-
119 dmem/debug.h | 1 +
120 dmem/dmem.inf | 30 +--
121 dmem/efidump.c | 20 +-
122 dmpstore/dmpstore.c | 4 +-
123 dmpstore/dmpstore.h | 1 +
124 dmpstore/dmpstore.inf | 31 +--
125 drivers/drivers.c | 6 +-
126 drivers/drivers.h | 1 +
127 drivers/drivers.inf | 28 +--
128 drvcfg/drvcfg.c | 4 +-
129 drvcfg/drvcfg.h | 1 +
130 drvcfg/drvcfg.inf | 28 +--
131 drvdiag/drvdiag.c | 4 +-
132 drvdiag/drvdiag.h | 1 +
133 drvdiag/drvdiag.inf | 28 +--
134 edit/edit.inf | 32 +--
135 edit/editor.h | 5 +-
136 edit/editortype.h | 7 +-
137 edit/libEditor.c | 24 +--
138 edit/libFileBuffer.c | 24 ++-
139 edit/libInputBar.c | 26 +--
140 edit/libMenuBar.c | 9 +-
141 edit/libMisc.h | 1 +
142 edit/libStatusBar.c | 11 +-
143 edit/libTitleBar.c | 17 +-
144 edit/libeditor.h | 1 +
145 edit/libfilebuffer.h | 1 +
146 edit/libinputbar.h | 1 +
147 edit/libmenubar.h | 1 +
148 edit/libstatusbar.h | 1 +
149 edit/libtitlebar.h | 1 +
150 edit/main.c | 30 +--
151 err/DebugMask.h | 1 +
152 err/err.c | 12 +-
153 err/err.h | 2 +-
154 err/err.inf | 31 +--
155 guid/guid.c | 4 +-
156 guid/guid.h | 2 +-
157 guid/guid.inf | 33 +--
158 hexedit/heditor.h | 5 +-
159 hexedit/heditortype.h | 7 +-
160 hexedit/hexedit.inf | 31 +--
161 hexedit/libBufferImage.c | 37 ++--
162 hexedit/libEditor.c | 33 +--
163 hexedit/libInputBar.c | 11 +-
164 hexedit/libMemImage.c | 8 +-
165 hexedit/libMenuBar.c | 13 +-
166 hexedit/libMisc.h | 3 +-
167 hexedit/libStatusBar.c | 1 +
168 hexedit/libTitleBar.c | 24 ++-
169 hexedit/libbufferimage.h | 1 +
170 hexedit/libclipboard.h | 1 +
171 hexedit/libdiskimage.c | 17 +-
172 hexedit/libdiskimage.h | 1 +
173 hexedit/libeditor.h | 1 +
174 hexedit/libfileimage.h | 1 +
175 hexedit/libinputbar.h | 1 +
176 hexedit/libmemimage.h | 1 +
177 hexedit/libmenubar.h | 3 +-
178 hexedit/libstatusbar.h | 1 +
179 hexedit/libtitlebar.h | 1 +
180 hexedit/main.c | 78 +++----
181 inc/shellenv.h | 1 +
182 inc/shelltypes.h | 3 +-
183 load/load.c | 2 +-
184 load/load.h | 1 +
185 load/load.inf | 29 +--
186 ls/ls.c | 11 +-
187 ls/ls.h | 3 +-
188 ls/ls.inf | 28 +--
189 mem/MemCommonPart.c | 14 +-
190 mem/MemCommonPart.h | 2 +-
191 mem/debug.h | 1 +
192 mem/efidump.c | 20 +-
193 mem/mem.inf | 30 +--
194 memmap/memmap.c | 6 +-
195 memmap/memmap.h | 1 +
196 memmap/memmap.inf | 28 +--
197 mkdir/mkdir.c | 4 +-
198 mkdir/mkdir.h | 3 +-
199 mkdir/mkdir.inf | 28 +--
200 mm/mm.c | 72 +++----
201 mm/mm.h | 1 +
202 mm/mm.inf | 28 +--
203 mode/mode.c | 2 +-
204 mode/mode.h | 1 +
205 mode/mode.inf | 28 +--
206 mount/mount.c | 4 +-
207 mount/mount.h | 1 +
208 mount/mount.inf | 28 +--
209 mv/mv.c | 4 +-
210 mv/mv.h | 2 +-
211 mv/mv.inf | 28 +--
212 newshell/FakeHii.c | 6 +-
213 newshell/FakeHii.h | 1 +
214 newshell/init.c | 18 +-
215 newshell/nshell.h | 3 +-
216 newshell/nshell.inf | 34 +--
217 openinfo/openinfo.c | 4 +-
218 openinfo/openinfo.h | 1 +
219 openinfo/openinfo.inf | 28 +--
220 pci/pci.c | 19 +-
221 pci/pci.h | 3 +-
222 pci/pci.inf | 28 +--
223 pci/pci_class.c | 2 +-
224 pci/pci_class.h | 3 +-
225 reset/reset.c | 2 +-
226 reset/reset.h | 1 +
227 reset/reset.inf | 28 +--
228 rm/rm.c | 2 +-
229 rm/rm.h | 1 +
230 rm/rm.inf | 28 +--
231 sermode/sermode.c | 8 +-
232 sermode/sermode.h | 1 +
233 sermode/sermode.inf | 28 +--
234 shellenv/Connect.c | 20 +-
235 shellenv/ConsoleProxy.c | 6 +-
236 shellenv/batch.c | 15 +-
237 shellenv/conio.c | 2 +-
238 shellenv/dprot.c | 8 +-
239 shellenv/echo.c | 2 +-
240 shellenv/exec.c | 18 +-
241 shellenv/for.c | 7 +-
242 shellenv/help.c | 2 +-
243 shellenv/if.c | 3 -
244 shellenv/init.c | 2 +-
245 shellenv/map.c | 16 +-
246 shellenv/parsecmd.h | 3 +-
247 shellenv/pause.c | 2 +-
248 shellenv/protid.c | 22 +-
249 shellenv/shelle.h | 1 +
250 shellenv/shellenvguid.h | 1 +
251 shellenv/var.c | 6 +-
252 stall/stall.c | 2 +-
253 stall/stall.h | 1 +
254 stall/stall.inf | 28 +--
255 time/time.c | 10 +-
256 time/time.h | 1 +
257 time/time.inf | 28 +--
258 touch/touch.c | 2 +-
259 touch/touch.h | 2 +-
260 touch/touch.inf | 29 +--
261 type/type.c | 4 +-
262 type/type.h | 1 +
263 type/type.inf | 28 +--
264 tzone/timezone.inf | 32 +--
265 tzone/tzone.c | 4 +-
266 tzone/tzone.h | 1 +
267 unload/unload.c | 18 +-
268 unload/unload.h | 1 +
269 unload/unload.inf | 29 +--
270 ver/Ebc/verEbc.c | 2 +-
271 ver/Ver.inf | 36 ++--
272 ver/ver.c | 2 +-
273 ver/ver.h | 1 +
274 vol/Vol.inf | 28 +--
275 vol/vol.c | 4 +-
276 vol/vol.h | 1 +
277 270 files changed, 1985 insertions(+), 1610 deletions(-)
278 create mode 100644 Library/Aarch64/efilibplat.h
279 create mode 100644 Library/Arm/efilibplat.h
280
281diff --git a/DeviceTree/devicetree.c b/DeviceTree/devicetree.c
282index 147e2cb..77e3cf4 100644
283--- a/DeviceTree/devicetree.c
284+++ b/DeviceTree/devicetree.c
285@@ -36,7 +36,7 @@ extern UINT8 STRING_ARRAY_NAME[];
286 //
287 // Global Variables
288 //
289-EFI_HII_HANDLE HiiHandle;
290+STATIC EFI_HII_HANDLE HiiHandle;
291 EFI_GUID EfiDevicetreeGuid = EFI_DEVICETREE_GUID;
292 SHELL_VAR_CHECK_ITEM DevicetreeCheckList[] = {
293 {
294@@ -67,7 +67,7 @@ SHELL_VAR_CHECK_ITEM DevicetreeCheckList[] = {
295 NULL,
296 0,
297 0,
298- 0
299+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
300 }
301 };
302
303diff --git a/DeviceTree/devicetree.h b/DeviceTree/devicetree.h
304index c452fc7..07bb939 100644
305--- a/DeviceTree/devicetree.h
306+++ b/DeviceTree/devicetree.h
307@@ -32,3 +32,4 @@ Revision History
308 0xf21044af, 0xeef6, 0x4d58, 0xb4, 0x56, 0x32, 0x86, 0xa0, 0x2b, 0x7c, 0x49 \
309 }
310 #endif
311+
312diff --git a/DeviceTree/devicetree.inf b/DeviceTree/devicetree.inf
313index a86a1a0..7adc097 100644
314--- a/DeviceTree/devicetree.inf
315+++ b/DeviceTree/devicetree.inf
316@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
317
318
319 [sources.common]
320- ..\ShCommonStrings.uni
321+ ../ShCommonStrings.uni
322 DevicetreeStrings.uni
323 devicetree.c
324 devicetree.h
325
326 [includes.common]
327 .
328- ..\Inc
329- ..\Library
330- $(EDK_SOURCE)\Foundation
331- $(EDK_SOURCE)\Foundation\Include
332- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
333- $(EDK_SOURCE)\Foundation\Efi
334- $(EDK_SOURCE)\Foundation\Efi\Include
335- $(EDK_SOURCE)\Foundation\FrameWork
336- $(EDK_SOURCE)\Foundation\FrameWork\Include
337- $(EDK_SOURCE)\Foundation\Core\Dxe
338- $(DEST_DIR)\
339+ ../Inc
340+ ../Library
341+ $(EDK_SOURCE)/Foundation
342+ $(EDK_SOURCE)/Foundation/Include
343+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
344+ $(EDK_SOURCE)/Foundation/Efi
345+ $(EDK_SOURCE)/Foundation/Efi/Include
346+ $(EDK_SOURCE)/Foundation/FrameWork
347+ $(EDK_SOURCE)/Foundation/FrameWork/Include
348+ $(EDK_SOURCE)/Foundation/Core/Dxe
349+ $(DEST_DIR./
350
351 [libraries.common]
352 EfiShellLib
353@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
354
355 [nmake.common]
356 IMAGE_ENTRY_POINT=DevicetreeMain
357+
358+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
359 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
360 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
361 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
362
363+[nmake.ARM, nmake.AARCH64]
364+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
365diff --git a/EfiCompress/Compress.h b/EfiCompress/Compress.h
366index 6ce2bfc..4e8313f 100644
367--- a/EfiCompress/Compress.h
368+++ b/EfiCompress/Compress.h
369@@ -57,4 +57,4 @@ Returns:
370
371 --*/
372
373-#endif
374\ No newline at end of file
375+#endif
376diff --git a/EfiCompress/CompressMain.c b/EfiCompress/CompressMain.c
377index 3edb17e..082046e 100644
378--- a/EfiCompress/CompressMain.c
379+++ b/EfiCompress/CompressMain.c
380@@ -50,7 +50,7 @@ SHELL_VAR_CHECK_ITEM CompressCheckList[] = {
381 NULL,
382 0,
383 0,
384- 0
385+ (SHELL_VAR_CHECK_FLAG_TYPE)0
386 }
387 };
388
389diff --git a/EfiCompress/compress.c b/EfiCompress/compress.c
390index e21c1f6..012bbef 100644
391--- a/EfiCompress/compress.c
392+++ b/EfiCompress/compress.c
393@@ -262,7 +262,7 @@ STATIC UINT32 mBufSiz = 0, mOutputPos, mOutputMask, mSubBitBuf, mCrc;
394 STATIC UINT32 mCompSize, mOrigSize;
395
396 STATIC UINT16 *mFreq, *mSortPtr, mLenCnt[17], mLeft[2 * NC - 1], mRight[2 * NC - 1],
397- mCrcTable[UINT8_MAX + 1], mCFreq[2 * NC - 1], mCTable[4096], mCCode[NC],
398+ mCrcTable[UINT8_MAX + 1], mCFreq[2 * NC - 1], mCCode[NC],
399 mPFreq[2 * NP - 1], mPTCode[NPT], mTFreq[2 * NT - 1];
400
401 STATIC NODE mPos, mMatchPos, mAvail, *mPosition, *mParent, *mPrev, *mNext = NULL;
402diff --git a/EfiCompress/compress.inf b/EfiCompress/compress.inf
403index 2e62fbf..f3194b5 100644
404--- a/EfiCompress/compress.inf
405+++ b/EfiCompress/compress.inf
406@@ -25,7 +25,7 @@ FILE_GUID = A6A236DB-F3FB-4f7f-93BC-0AF7DAA583B9
407 COMPONENT_TYPE = APPLICATION
408
409 [sources.common]
410-..\ShCommonStrings.uni
411+../ShCommonStrings.uni
412 CompressStrings.uni
413 compressMain.c
414 compress.c
415@@ -34,17 +34,17 @@ compress.h
416
417 [includes.common]
418 .
419- ..\Inc
420- ..\Library
421- $(EDK_SOURCE)\Foundation
422- $(EDK_SOURCE)\Foundation\Include
423- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
424- $(EDK_SOURCE)\Foundation\Efi
425- $(EDK_SOURCE)\Foundation\Efi\Include
426- $(EDK_SOURCE)\Foundation\FrameWork
427- $(EDK_SOURCE)\Foundation\FrameWork\Include
428- $(EDK_SOURCE)\Foundation\Core\Dxe
429- $(DEST_DIR)\
430+ ../Inc
431+ ../Library
432+ $(EDK_SOURCE)/Foundation
433+ $(EDK_SOURCE)/Foundation/Include
434+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
435+ $(EDK_SOURCE)/Foundation/Efi
436+ $(EDK_SOURCE)/Foundation/Efi/Include
437+ $(EDK_SOURCE)/Foundation/FrameWork
438+ $(EDK_SOURCE)/Foundation/FrameWork/Include
439+ $(EDK_SOURCE)/Foundation/Core/Dxe
440+ $(DEST_DIR./
441
442 [libraries.common]
443 EfiShellLib
444@@ -64,11 +64,13 @@ compress.h
445 # we will specify some additional DEFINEs on the compile command line.
446 #
447 [nmake.common]
448- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
449 IMAGE_ENTRY_POINT=InitializeCompress
450+
451+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
452+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
453 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
454 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
455 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
456
457-
458-
459\ No newline at end of file
460+[nmake.ARM, nmake.AARCH64]
461+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
462diff --git a/EfiDecompress/Decompress.c b/EfiDecompress/Decompress.c
463index 918f673..2ee0404 100644
464--- a/EfiDecompress/Decompress.c
465+++ b/EfiDecompress/Decompress.c
466@@ -22,7 +22,7 @@ Revision History
467 --*/
468
469 #include "EfiShellLib.h"
470-#include "decompress.h"
471+#include "Decompress.h"
472
473 extern UINT8 STRING_ARRAY_NAME[];
474
475@@ -31,7 +31,7 @@ extern UINT8 STRING_ARRAY_NAME[];
476 //
477 #include STRING_DEFINES_FILE
478
479-#include EFI_PROTOCOL_DEFINITION (decompress)
480+#include EFI_PROTOCOL_DEFINITION (Decompress)
481
482 EFI_HII_HANDLE HiiDecompressHandle;
483 EFI_GUID EfiDecompressGuid = EFI_DECOMPRESS_GUID;
484@@ -52,7 +52,7 @@ SHELL_VAR_CHECK_ITEM DecompressCheckList[] = {
485 NULL,
486 0,
487 0,
488- 0
489+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
490 }
491 };
492
493@@ -192,7 +192,7 @@ Returns:
494 //
495 //
496 //
497- Status = LibLocateProtocol (&gEfiDecompressProtocolGuid, &Decompress);
498+ Status = LibLocateProtocol (&gEfiDecompressProtocolGuid, (VOID**)&Decompress);
499 if (EFI_ERROR (Status)) {
500 PrintToken (STRING_TOKEN (STR_DECOMPRESS_PROTOCOL_NOT_FOUND), HiiDecompressHandle, L"efidecompress");
501 Status = EFI_UNSUPPORTED;
502diff --git a/EfiDecompress/Decompress.h b/EfiDecompress/Decompress.h
503index abfae65..3d4520c 100644
504--- a/EfiDecompress/Decompress.h
505+++ b/EfiDecompress/Decompress.h
506@@ -29,4 +29,4 @@ Revision History
507 0xe15963a9, 0xa05a, 0x480e, 0x91, 0x49, 0x32, 0xe9, 0x24, 0x5d, 0x98, 0xcb \
508 }
509
510-#endif
511\ No newline at end of file
512+#endif
513diff --git a/EfiDecompress/Decompress.inf b/EfiDecompress/Decompress.inf
514index f955220..7b2ff3d 100644
515--- a/EfiDecompress/Decompress.inf
516+++ b/EfiDecompress/Decompress.inf
517@@ -25,7 +25,7 @@ FILE_GUID = D9D42564-071C-4d73-8DB0-43C55C62DC4C
518 COMPONENT_TYPE = APPLICATION
519
520 [sources.common]
521-..\ShCommonStrings.uni
522+../ShCommonStrings.uni
523 DecompressStrings.uni
524 decompress.c
525 decompress.h
526@@ -33,17 +33,17 @@ decompress.h
527
528 [includes.common]
529 .
530- ..\Inc
531- ..\Library
532- $(EDK_SOURCE)\Foundation
533- $(EDK_SOURCE)\Foundation\Include
534- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
535- $(EDK_SOURCE)\Foundation\Efi
536- $(EDK_SOURCE)\Foundation\Efi\Include
537- $(EDK_SOURCE)\Foundation\FrameWork
538- $(EDK_SOURCE)\Foundation\FrameWork\Include
539- $(EDK_SOURCE)\Foundation\Core\Dxe
540- $(DEST_DIR)\
541+ ../Inc
542+ ../Library
543+ $(EDK_SOURCE)/Foundation
544+ $(EDK_SOURCE)/Foundation/Include
545+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
546+ $(EDK_SOURCE)/Foundation/Efi
547+ $(EDK_SOURCE)/Foundation/Efi/Include
548+ $(EDK_SOURCE)/Foundation/FrameWork
549+ $(EDK_SOURCE)/Foundation/FrameWork/Include
550+ $(EDK_SOURCE)/Foundation/Core/Dxe
551+ $(DEST_DIR./
552
553 [libraries.common]
554 EfiShellLib
555@@ -63,11 +63,14 @@ decompress.h
556 # we will specify some additional DEFINEs on the compile command line.
557 #
558 [nmake.common]
559- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
560 IMAGE_ENTRY_POINT=InitializeDecompress
561+
562+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
563+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
564 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
565 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
566 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
567
568-
569-
570+[nmake.ARM, nmake.AARCH64]
571+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
572+
573\ No newline at end of file
574diff --git a/IfConfig/IfConfig.c b/IfConfig/IfConfig.c
575index 07cedc2..52e1add 100644
576--- a/IfConfig/IfConfig.c
577+++ b/IfConfig/IfConfig.c
578@@ -29,7 +29,7 @@ extern UINT8 STRING_ARRAY_NAME[];
579 //
580 #define NIC_ITEM_CONFIG_SIZE sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * 16
581
582-EFI_HII_HANDLE HiiHandle;
583+STATIC EFI_HII_HANDLE HiiHandle;
584
585 EFI_GUID EfiIfConfigGuid = EFI_IFCONFIG_GUID;
586
587@@ -75,7 +75,7 @@ SHELL_VAR_CHECK_ITEM IfConfigCheckList[] = {
588 NULL,
589 0,
590 0,
591- 0
592+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
593 }
594 };
595
596@@ -669,7 +669,7 @@ Returns:
597 Status = BS->LocateProtocol (
598 &gEfiHiiConfigRoutingProtocolGuid,
599 NULL,
600- &mHiiConfigRouting
601+ (VOID**)&mHiiConfigRouting
602 );
603 if (EFI_ERROR (Status)) {
604 return EFI_NOT_FOUND;
605diff --git a/IfConfig/IfConfig.h b/IfConfig/IfConfig.h
606index 4a9d3c5..b8f044e 100644
607--- a/IfConfig/IfConfig.h
608+++ b/IfConfig/IfConfig.h
609@@ -60,3 +60,4 @@ typedef struct {
610 } ARP_REQUEST;
611
612 #endif
613+
614diff --git a/IfConfig/IfConfig.inf b/IfConfig/IfConfig.inf
615index b2e4964..d8c5c23 100644
616--- a/IfConfig/IfConfig.inf
617+++ b/IfConfig/IfConfig.inf
618@@ -25,7 +25,7 @@ FILE_GUID = 6394CF3D-D3DC-4f69-926D-AF9FFE59F922
619 COMPONENT_TYPE = APPLICATION
620
621 [sources.common]
622- ..\ShCommonStrings.uni
623+ ../ShCommonStrings.uni
624 IfConfigStrings.uni
625 IfConfig.c
626 IfConfig.h
627@@ -33,30 +33,32 @@ COMPONENT_TYPE = APPLICATION
628 ShellNetHelper.h
629
630 [includes.common]
631- ..\Inc
632- ..\Library
633- $(EDK_SOURCE)\Foundation\Efi
634- $(EDK_SOURCE)\Foundation
635- $(EDK_SOURCE)\Foundation\Efi\Include
636- $(EDK_SOURCE)\Foundation\Include
637- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
638- $(EDK_SOURCE)\Foundation\FrameWork
639- $(EDK_SOURCE)\Foundation\FrameWork\Include
640- $(EDK_SOURCE)\Foundation\Core\Dxe
641- $(EDK_SOURCE)\Foundation\Library\Dxe\Include
642- $(DEST_DIR)\
643+ ../Inc
644+ ../Library
645+ $(EDK_SOURCE)/Foundation/Efi
646+ $(EDK_SOURCE)/Foundation
647+ $(EDK_SOURCE)/Foundation/Efi/Include
648+ $(EDK_SOURCE)/Foundation/Include
649+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
650+ $(EDK_SOURCE)/Foundation/FrameWork
651+ $(EDK_SOURCE)/Foundation/FrameWork/Include
652+ $(EDK_SOURCE)/Foundation/Core/Dxe
653+ $(EDK_SOURCE)/Foundation/Library/Dxe/Include
654+ $(DEST_DIR./
655
656 [libraries.common]
657 EfiShellLib
658 EdkProtocolLib
659 EfiProtocolLib
660 EdkGuidLib
661- EfiDriverLib
662
663 [nmake.common]
664- C_PROJ_FLAGS = $(C_PROJ_FLAGS)
665 IMAGE_ENTRY_POINT=IfConfig
666- C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
667+
668+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
669 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
670 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
671+ C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
672
673+[nmake.ARM, nmake.AARCH64]
674+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
675diff --git a/IfConfig/ShellNetHelper.h b/IfConfig/ShellNetHelper.h
676index 9a33d3f..87e6886 100644
677--- a/IfConfig/ShellNetHelper.h
678+++ b/IfConfig/ShellNetHelper.h
679@@ -87,3 +87,4 @@ ShellDestroyServiceChild (
680 IN EFI_HANDLE ChildHandle
681 );
682 #endif
683+
684diff --git a/IpConfig/IpConfig.c b/IpConfig/IpConfig.c
685index 0c3e4c3..474e5f1 100644
686--- a/IpConfig/IpConfig.c
687+++ b/IpConfig/IpConfig.c
688@@ -39,7 +39,7 @@ extern UINT8 STRING_ARRAY_NAME[];
689 //
690 // Global Variables
691 //
692-EFI_HII_HANDLE HiiHandle;
693+STATIC EFI_HII_HANDLE HiiHandle;
694 EFI_GUID EfiIpConfigGuid = EFI_IPCONFIG_GUID;
695 SHELL_VAR_CHECK_ITEM IpconfigCheckList[] = {
696 {
697@@ -76,7 +76,7 @@ SHELL_VAR_CHECK_ITEM IpconfigCheckList[] = {
698 NULL,
699 0,
700 0,
701- 0
702+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
703 }
704 };
705
706diff --git a/IpConfig/IpConfig.h b/IpConfig/IpConfig.h
707index 1806435..5c975a9 100644
708--- a/IpConfig/IpConfig.h
709+++ b/IpConfig/IpConfig.h
710@@ -29,4 +29,4 @@ Revision History
711 0x8252915c, 0xf1e9, 0x435c, 0x81, 0x91, 0xad, 0x2f, 0x82, 0x62, 0x23, 0x73 \
712 }
713
714-#endif
715\ No newline at end of file
716+#endif
717diff --git a/IpConfig/IpConfig.inf b/IpConfig/IpConfig.inf
718index bc8271c..8cb1e0f 100644
719--- a/IpConfig/IpConfig.inf
720+++ b/IpConfig/IpConfig.inf
721@@ -25,24 +25,24 @@ FILE_GUID = 1D73AC03-AF05-44b3-B21E-93A174893FA6
722 COMPONENT_TYPE = APPLICATION
723
724 [sources.common]
725- ..\ShCommonStrings.uni
726+ ../ShCommonStrings.uni
727 IpConfigStrings.uni
728 IpConfig.c
729 IpConfig.h
730
731 [includes.common]
732 .
733- ..\Inc
734- ..\Library
735- $(EDK_SOURCE)\Foundation
736- $(EDK_SOURCE)\Foundation\Include
737- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
738- $(EDK_SOURCE)\Foundation\Efi
739- $(EDK_SOURCE)\Foundation\Efi\Include
740- $(EDK_SOURCE)\Foundation\FrameWork
741- $(EDK_SOURCE)\Foundation\FrameWork\Include
742- $(EDK_SOURCE)\Foundation\Core\Dxe
743- $(DEST_DIR)\
744+ ../Inc
745+ ../Library
746+ $(EDK_SOURCE)/Foundation
747+ $(EDK_SOURCE)/Foundation/Include
748+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
749+ $(EDK_SOURCE)/Foundation/Efi
750+ $(EDK_SOURCE)/Foundation/Efi/Include
751+ $(EDK_SOURCE)/Foundation/FrameWork
752+ $(EDK_SOURCE)/Foundation/FrameWork/Include
753+ $(EDK_SOURCE)/Foundation/Core/Dxe
754+ $(DEST_DIR./
755
756 [libraries.common]
757 EfiShellLib
758@@ -56,9 +56,12 @@ COMPONENT_TYPE = APPLICATION
759
760
761 [nmake.common]
762- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
763 IMAGE_ENTRY_POINT=InitializeIpConfig
764+
765+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
766 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
767 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
768 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
769
770+[nmake.ARM, nmake.AARCH64]
771+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
772diff --git a/Library/Aarch64/efilibplat.h b/Library/Aarch64/efilibplat.h
773new file mode 100644
774index 0000000..185c8b7
775--- /dev/null
776+++ b/Library/Aarch64/efilibplat.h
777@@ -0,0 +1,38 @@
778+/*++
779+
780+Copyright (c) 2005, Intel Corporation
781+All rights reserved. This program and the accompanying materials
782+are licensed and made available under the terms and conditions of the BSD License
783+which accompanies this distribution. The full text of the license may be found at
784+http://opensource.org/licenses/bsd-license.php
785+
786+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
787+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
788+
789+Module Name:
790+
791+ efilibplat.h
792+
793+Abstract:
794+
795+ EFI to compile bindings
796+
797+
798+
799+Revision History
800+
801+--*/
802+
803+#ifndef _EFI_LIB_PLAT_H
804+#define _EFI_LIB_PLAT_H
805+
806+VOID
807+InitializeLibPlatform (
808+ IN EFI_HANDLE ImageHandle,
809+ IN EFI_SYSTEM_TABLE *SystemTable
810+ );
811+
812+#define MIN_ALIGNMENT_SIZE 8
813+
814+#endif
815+
816diff --git a/Library/Arm/efilibplat.h b/Library/Arm/efilibplat.h
817new file mode 100644
818index 0000000..791018d
819--- /dev/null
820+++ b/Library/Arm/efilibplat.h
821@@ -0,0 +1,39 @@
822+/*++
823+
824+Copyright (c) 2005, Intel Corporation
825+All rights reserved. This program and the accompanying materials
826+are licensed and made available under the terms and conditions of the BSD License
827+which accompanies this distribution. The full text of the license may be found at
828+http://opensource.org/licenses/bsd-license.php
829+
830+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
831+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
832+
833+Module Name:
834+
835+ efilibplat.h
836+
837+Abstract:
838+
839+ EFI to compile bindings
840+
841+
842+
843+
844+Revision History
845+
846+--*/
847+#ifndef _EFI_LIB_PLAT_H_
848+#define _EFI_LIB_PLAT_H_
849+
850+VOID
851+InitializeLibPlatform (
852+ IN EFI_HANDLE ImageHandle,
853+ IN EFI_SYSTEM_TABLE *SystemTable
854+ );
855+
856+#define MIN_ALIGNMENT_SIZE 4
857+
858+#endif
859+
860+
861diff --git a/Library/CRC.c b/Library/CRC.c
862index ce5387b..ebbdf70 100644
863--- a/Library/CRC.c
864+++ b/Library/CRC.c
865@@ -21,7 +21,7 @@ Revision History
866
867 --*/
868
869-#include "EfiShelllib.h"
870+#include "EfiShellLib.h"
871
872 UINT32 CRCTable[256] = {
873 0x00000000,
874diff --git a/Library/CRC.h b/Library/CRC.h
875index 326a5e1..db1f765 100644
876--- a/Library/CRC.h
877+++ b/Library/CRC.h
878@@ -53,4 +53,6 @@ CalculateCrc (
879 UINTN Size
880 );
881
882-#endif
883\ No newline at end of file
884+#endif
885+
886+
887diff --git a/Library/ConsistMapping.c b/Library/ConsistMapping.c
888index b70fa06..61eda8b 100644
889--- a/Library/ConsistMapping.c
890+++ b/Library/ConsistMapping.c
891@@ -21,7 +21,7 @@ Revision History
892
893 --*/
894
895-#include "EfiShelllib.h"
896+#include "EfiShellLib.h"
897
898 MTD_NAME mMTDName[] = {
899 {
900diff --git a/Library/ConsistMapping.h b/Library/ConsistMapping.h
901index bc8d6f0..d520f31 100644
902--- a/Library/ConsistMapping.h
903+++ b/Library/ConsistMapping.h
904@@ -79,4 +79,6 @@ DevicePathConsistMappingCompare (
905 IN VOID *Buffer2
906 );
907
908-#endif
909\ No newline at end of file
910+#endif
911+
912+
913diff --git a/Library/DPath.c b/Library/DPath.c
914index f0974ac..73086d7 100644
915--- a/Library/DPath.c
916+++ b/Library/DPath.c
917@@ -20,7 +20,7 @@ Revision History
918
919 --*/
920
921-#include "EfiShelllib.h"
922+#include "EfiShellLib.h"
923
924 EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid = DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL;
925
926@@ -1468,7 +1468,7 @@ Returns:
927
928 Status = LibLocateProtocol (
929 &gEfiDevicePathToTextProtocolGuid,
930- &DevPathToText
931+ (VOID**)&DevPathToText
932 );
933 if (!EFI_ERROR (Status)) {
934 ToText = DevPathToText->ConvertDevicePathToText (
935@@ -1766,7 +1766,7 @@ Returns:
936 Status = BS->HandleProtocol (
937 Device,
938 Protocol,
939- Interface
940+ (VOID**)Interface
941 );
942 }
943 }
944diff --git a/Library/DPath.h b/Library/DPath.h
945index 68da82b..0f2a33f 100644
946--- a/Library/DPath.h
947+++ b/Library/DPath.h
948@@ -24,7 +24,7 @@ Revision History
949 #ifndef _D_PATH_H
950 #define _D_PATH_H
951
952-#define NextStrA(a) ((UINT8 *) (((UINT8 *) (a)) + strlena (a) + 1))
953+#define NextStrA(a) (CHAR8*)((UINT8 *) (((UINT8 *) (a)) + strlena (a) + 1))
954
955 #include EFI_GUID_DEFINITION (PcAnsi)
956
957@@ -153,3 +153,4 @@ GetNameGuidFromFwVolDevicePathNode (
958 );
959
960 #endif
961+
962diff --git a/Library/Data.c b/Library/Data.c
963index d2ffe4a..979b3dd 100644
964--- a/Library/Data.c
965+++ b/Library/Data.c
966@@ -21,7 +21,7 @@ Revision History
967
968 --*/
969
970-#include "EfiShelllib.h"
971+#include "EfiShellLib.h"
972
973 //
974 // ShellLibInitialized - TRUE once InitializeShellLib() is called for the first time
975diff --git a/Library/Ebc/EfiLibPlat.h b/Library/Ebc/EfiLibPlat.h
976index 922c881..e4a8771 100644
977--- a/Library/Ebc/EfiLibPlat.h
978+++ b/Library/Ebc/EfiLibPlat.h
979@@ -44,3 +44,4 @@ Returns:
980 ;
981
982 #define MIN_ALIGNMENT_SIZE 8
983+
984diff --git a/Library/EfiPart.h b/Library/EfiPart.h
985index a62cd15..e59ae77 100644
986--- a/Library/EfiPart.h
987+++ b/Library/EfiPart.h
988@@ -56,3 +56,4 @@ typedef struct {
989 #pragma pack()
990
991 #endif
992+
993diff --git a/Library/EfiShellLib.h b/Library/EfiShellLib.h
994index 6243d1d..e0ffe43 100644
995--- a/Library/EfiShellLib.h
996+++ b/Library/EfiShellLib.h
997@@ -25,7 +25,7 @@ Revision History
998 #define _EFI_SHELL_LIB_INCLUDE_
999
1000 #include "Tiano.h"
1001-#include "ShellEnv.h"
1002+#include "shellenv.h"
1003 #include "pci22.h"
1004
1005 #include EFI_ARCH_PROTOCOL_DEFINITION (Bds)
1006@@ -51,7 +51,7 @@ Revision History
1007 #include EFI_GUID_DEFINITION (PrimaryConsoleOutDevice)
1008 #include EFI_GUID_DEFINITION (PrimaryStandardErrorDevice)
1009 #include EFI_GUID_DEFINITION (SalSystemTable)
1010-#include EFI_GUID_DEFINITION (Smbios)
1011+#include EFI_GUID_DEFINITION (SmBios)
1012 #include EFI_GUID_DEFINITION (StandardErrorDevice)
1013 #include EFI_GUID_DEFINITION (FrameworkDevicePath)
1014 #include EFI_PROTOCOL_DEFINITION (AbsolutePointer)
1015@@ -67,7 +67,7 @@ Revision History
1016 #include EFI_PROTOCOL_DEFINITION (DebugPort)
1017 #include EFI_PROTOCOL_DEFINITION (DebugSupport)
1018 #include EFI_PROTOCOL_DEFINITION (Decompress)
1019-#include EFI_PROTOCOL_DEFINITION (DeviceIO)
1020+#include EFI_PROTOCOL_DEFINITION (DeviceIo)
1021 #include EFI_PROTOCOL_DEFINITION (DevicePath)
1022 #include EFI_PROTOCOL_DEFINITION (DevicePathFromText)
1023 #include EFI_PROTOCOL_DEFINITION (DevicePathToText)
1024@@ -111,7 +111,7 @@ Revision History
1025 #include EFI_PROTOCOL_DEFINITION (PciRootBridgeIo)
1026 #include EFI_PROTOCOL_DEFINITION (PlatformDriverOverride)
1027 #include EFI_PROTOCOL_DEFINITION (PxeBaseCode)
1028-#include EFI_PROTOCOL_DEFINITION (PxeBaseCodeCallback)
1029+#include EFI_PROTOCOL_DEFINITION (PxeBaseCodeCallBack)
1030 #include EFI_PROTOCOL_DEFINITION (ScsiIo)
1031 #include EFI_PROTOCOL_DEFINITION (ScsiPassThru)
1032 #include EFI_PROTOCOL_DEFINITION (SectionExtraction)
1033@@ -152,7 +152,7 @@ Revision History
1034 #include EFI_PROTOCOL_DEFINITION (PlatformToDriverConfiguration)
1035
1036 #include "efilibplat.h"
1037-#include "efipart.h"
1038+#include "EfiPart.h"
1039 #include "ShellDebug.h"
1040 #include "CRC.h"
1041 #include "DPath.h"
1042@@ -358,3 +358,4 @@ LibGetControllerName (
1043 );
1044
1045 #endif
1046+
1047diff --git a/Library/EfiShellLib.inf b/Library/EfiShellLib.inf
1048index d450f9d..a63406c 100644
1049--- a/Library/EfiShellLib.inf
1050+++ b/Library/EfiShellLib.inf
1051@@ -45,34 +45,42 @@ COMPONENT_TYPE = LIBRARY
1052 HiiSupport.c
1053
1054 [sources.ia32]
1055- ia32\math.c
1056- ia32\initplat.c
1057+ IA32/math.c
1058+ IA32/initplat.c
1059
1060 [sources.ipf]
1061- ipf\math.c
1062- ipf\initplat.c
1063- ipf\palproc.s
1064- ipf\salpal.c
1065+ IPF/math.c
1066+ IPF/initplat.c
1067+ IPF/palproc.s
1068+ IPF/salpal.c
1069
1070 [sources.EBC]
1071- EBC\math.c
1072- EBC\initplat.c
1073-
1074+ Ebc/math.c
1075+ Ebc/initplat.c
1076+
1077 [sources.x64]
1078- ipf\math.c
1079- ia32\initplat.c
1080+ IPF/math.c
1081+ IA32/initplat.c
1082+
1083+[sources.ARM]
1084+ IPF/math.c
1085+ IA32/initplat.c
1086+
1087+[sources.AARCH64]
1088+ IPF/math.c
1089+ IA32/initplat.c
1090
1091 [includes.common]
1092 .
1093- ..\Inc
1094- $(EDK_SOURCE)\Foundation
1095- $(EDK_SOURCE)\Foundation\Include
1096- $(EDK_SOURCE)\Foundation\Efi
1097- $(EDK_SOURCE)\Foundation\Efi\Include
1098- $(EDK_SOURCE)\Foundation\FrameWork
1099- $(EDK_SOURCE)\Foundation\FrameWork\Include
1100- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1101- $(EDK_SOURCE)\Foundation\Core\Dxe
1102+ ../Inc
1103+ $(EDK_SOURCE)/Foundation
1104+ $(EDK_SOURCE)/Foundation/Include
1105+ $(EDK_SOURCE)/Foundation/Efi
1106+ $(EDK_SOURCE)/Foundation/Efi/Include
1107+ $(EDK_SOURCE)/Foundation/FrameWork
1108+ $(EDK_SOURCE)/Foundation/FrameWork/Include
1109+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1110+ $(EDK_SOURCE)/Foundation/Core/Dxe
1111
1112 [libraries.common]
1113 EdkFrameworkProtocolLib
1114@@ -81,4 +89,7 @@ COMPONENT_TYPE = LIBRARY
1115 EfiGuidLib
1116 EdkGuidLib
1117
1118+[libraries.ARM]
1119+ CompilerIntrinsicsLib, CompilerIntrinsicsLib
1120+
1121 [nmake.common]
1122diff --git a/Library/Event.c b/Library/Event.c
1123index 4929e4b..a0cbdc2 100644
1124--- a/Library/Event.c
1125+++ b/Library/Event.c
1126@@ -21,7 +21,7 @@ Revision History
1127
1128 --*/
1129
1130-#include "EfiShelllib.h"
1131+#include "EfiShellLib.h"
1132
1133 EFI_EVENT
1134 LibCreateProtocolNotifyEvent (
1135diff --git a/Library/Event.h b/Library/Event.h
1136index b8df801..8e0e718 100644
1137--- a/Library/Event.h
1138+++ b/Library/Event.h
1139@@ -50,4 +50,6 @@ WaitForEventWithTimeout (
1140 OUT EFI_INPUT_KEY *Key
1141 );
1142
1143-#endif
1144\ No newline at end of file
1145+#endif
1146+
1147+
1148diff --git a/Library/FileIO.c b/Library/FileIO.c
1149index 40c67d1..8820c52 100644
1150--- a/Library/FileIO.c
1151+++ b/Library/FileIO.c
1152@@ -21,7 +21,7 @@ Revision History
1153
1154 --*/
1155
1156-#include "EfiShelllib.h"
1157+#include "EfiShellLib.h"
1158
1159 typedef struct _PATH_COMPONENTS {
1160 CHAR16 *Name;
1161@@ -719,7 +719,6 @@ LibSplitFsAndPath (
1162 IN OUT CHAR16 **Path
1163 )
1164 {
1165- EFI_STATUS Status;
1166 CHAR16 *p;
1167 UINTN Size;
1168
1169@@ -728,7 +727,6 @@ LibSplitFsAndPath (
1170
1171 *Fs = NULL;
1172 *Path = NULL;
1173- Status = EFI_SUCCESS;
1174
1175 p = AbPath;
1176 while (*p) {
1177@@ -1017,13 +1015,11 @@ Return:
1178 EFI_LIST_ENTRY SrcList;
1179 EFI_LIST_ENTRY DstList;
1180 EFI_STATUS Status;
1181- EFI_LIST_ENTRY *Link;
1182 SHELL_FILE_ARG *SrcArg;
1183 SHELL_FILE_ARG *DstArg;
1184
1185 ASSERT (IsSame != NULL);
1186
1187- Link = NULL;
1188 SrcArg = NULL;
1189 DstArg = NULL;
1190 InitializeListHead (&SrcList);
1191diff --git a/Library/FileIO.h b/Library/FileIO.h
1192index bb07d91..e568e17 100644
1193--- a/Library/FileIO.h
1194+++ b/Library/FileIO.h
1195@@ -208,4 +208,6 @@ CloseSimpleReadFile (
1196 IN SIMPLE_READ_FILE SimpleReadHandle
1197 );
1198
1199-#endif
1200\ No newline at end of file
1201+#endif
1202+
1203+
1204diff --git a/Library/Handle.c b/Library/Handle.c
1205index 25da2a1..45e623c 100644
1206--- a/Library/Handle.c
1207+++ b/Library/Handle.c
1208@@ -21,7 +21,7 @@ Revision History
1209
1210 --*/
1211
1212-#include "EfiShelllib.h"
1213+#include "EfiShellLib.h"
1214
1215 EFI_STATUS
1216 LibLocateHandle (
1217@@ -131,7 +131,6 @@ Returns:
1218 EFI_HANDLE *BlockIoBuffer;
1219 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
1220 UINTN Index;
1221- EFI_DEVICE_PATH_PROTOCOL *Start;
1222 EFI_DEVICE_PATH_PROTOCOL *Next;
1223 EFI_DEVICE_PATH_PROTOCOL *DevPath;
1224 HARDDRIVE_DEVICE_PATH *HardDriveDevicePath;
1225@@ -204,7 +203,6 @@ Returns:
1226 PreviousNodeIsHardDriveDevicePath = FALSE;
1227
1228 DevPath = DevicePath;
1229- Start = DevPath;
1230 //
1231 // Check for end of device path type
1232 //
1233@@ -796,14 +794,12 @@ LibScanHandleDatabase (
1234 UINTN OpenInfoIndex;
1235 UINTN ChildIndex;
1236 BOOLEAN DriverBindingHandleIndexValid;
1237- BOOLEAN ControllerHandleIndexValid;
1238
1239 DriverBindingHandleIndexValid = FALSE;
1240 if (DriverBindingHandleIndex != NULL) {
1241 *DriverBindingHandleIndex = 0xffffffff;
1242 }
1243
1244- ControllerHandleIndexValid = FALSE;
1245 if (ControllerHandleIndex != NULL) {
1246 *ControllerHandleIndex = 0xffffffff;
1247 }
1248@@ -847,7 +843,6 @@ LibScanHandleDatabase (
1249
1250 if (ControllerHandle != NULL && ControllerHandleIndex != NULL && (*HandleBuffer)[HandleIndex] == ControllerHandle) {
1251 *ControllerHandleIndex = (UINT32) HandleIndex;
1252- ControllerHandleIndexValid = TRUE;
1253 }
1254
1255 }
1256@@ -1305,7 +1300,7 @@ Returns:
1257 Status = BS->HandleProtocol (
1258 Handles[Index],
1259 ProtocolGuid,
1260- Interface
1261+ (VOID**)Interface
1262 );
1263
1264 if (!EFI_ERROR (Status)) {
1265diff --git a/Library/Handle.h b/Library/Handle.h
1266index 40ad40b..010e2cf 100644
1267--- a/Library/Handle.h
1268+++ b/Library/Handle.h
1269@@ -161,3 +161,4 @@ ShellGetHandleNum (
1270 );
1271
1272 #endif
1273+
1274diff --git a/Library/HiiSupport.c b/Library/HiiSupport.c
1275index bce645b..5f70712 100644
1276--- a/Library/HiiSupport.c
1277+++ b/Library/HiiSupport.c
1278@@ -21,7 +21,7 @@ Revision History
1279
1280 --*/
1281
1282-#include "EfiShelllib.h"
1283+#include "EfiShellLib.h"
1284
1285 #if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
1286
1287@@ -56,11 +56,11 @@ Returns:
1288 return EFI_SUCCESS;
1289 }
1290
1291- Status = LibLocateProtocol (&gEfiHiiDatabaseProtocolGuid, &gLibHiiDatabase);
1292+ Status = LibLocateProtocol (&gEfiHiiDatabaseProtocolGuid, (VOID**)&gLibHiiDatabase);
1293 if (EFI_ERROR (Status)) {
1294 return Status;
1295 }
1296- Status = LibLocateProtocol (&gEfiHiiStringProtocolGuid, &gLibHiiString);
1297+ Status = LibLocateProtocol (&gEfiHiiStringProtocolGuid, (VOID**)&gLibHiiString);
1298 if (EFI_ERROR (Status)) {
1299 return Status;
1300 }
1301diff --git a/Library/HiiSupport.h b/Library/HiiSupport.h
1302index b04c443..bfeb077 100644
1303--- a/Library/HiiSupport.h
1304+++ b/Library/HiiSupport.h
1305@@ -142,3 +142,4 @@ LibGetString (
1306 ;
1307
1308 #endif
1309+
1310diff --git a/Library/IA32/efilibplat.h b/Library/IA32/efilibplat.h
1311index 4e58f50..a6eb87f 100644
1312--- a/Library/IA32/efilibplat.h
1313+++ b/Library/IA32/efilibplat.h
1314@@ -34,4 +34,4 @@ InitializeLibPlatform (
1315
1316 #define MIN_ALIGNMENT_SIZE 4
1317
1318-#endif
1319\ No newline at end of file
1320+#endif
1321diff --git a/Library/IO.c b/Library/IO.c
1322index 81f26fd..b976e32 100644
1323--- a/Library/IO.c
1324+++ b/Library/IO.c
1325@@ -21,7 +21,7 @@ Revision History
1326
1327 --*/
1328
1329-#include "EfiShelllib.h"
1330+#include "EfiShellLib.h"
1331
1332 #define PRINT_STRING_LEN 1024
1333 #define PRINT_ITEM_BUFFER_LEN 100
1334@@ -86,8 +86,8 @@ typedef struct _pstate {
1335 typedef struct {
1336 BOOLEAN PageBreak;
1337 BOOLEAN AutoWrap;
1338- INTN MaxRow;
1339- INTN MaxColumn;
1340+ UINTN MaxRow;
1341+ UINTN MaxColumn;
1342 INTN InitRow;
1343 INTN Row;
1344 INTN Column;
1345@@ -1575,7 +1575,7 @@ Returns:
1346 {
1347 BOOLEAN Done;
1348 UINTN Column;
1349- INTN Row;
1350+ UINTN Row;
1351 UINTN StartColumn;
1352 UINTN Update;
1353 UINTN Delete;
1354@@ -1769,7 +1769,7 @@ Returns:
1355 //
1356 // If we need to update the output do so now
1357 //
1358- if (Update != -1) {
1359+ if (Update != (UINTN) -1) {
1360 PrintAt (Column, Row, L"%s%.*s", InStr + Update, Delete, L"");
1361 Len = StrLen (InStr);
1362
1363@@ -1928,8 +1928,8 @@ LibGetPageBreak (
1364 return mPrintMode.PageBreak;
1365 }
1366
1367+#if 0
1368 STATIC
1369-
1370 BOOLEAN
1371 GetOutputPause (
1372 VOID
1373@@ -1937,6 +1937,7 @@ GetOutputPause (
1374 {
1375 return mPrintMode.OutputPause;
1376 }
1377+#endif
1378
1379 INTN
1380 DbgPrint (
1381diff --git a/Library/IO.h b/Library/IO.h
1382index 7469c32..6dfc743 100644
1383--- a/Library/IO.h
1384+++ b/Library/IO.h
1385@@ -157,4 +157,6 @@ LibGetPageBreak (
1386 );
1387
1388
1389-#endif
1390\ No newline at end of file
1391+#endif
1392+
1393+
1394diff --git a/Library/IPF/efilibplat.h b/Library/IPF/efilibplat.h
1395index 90659b4..aad0dd0 100644
1396--- a/Library/IPF/efilibplat.h
1397+++ b/Library/IPF/efilibplat.h
1398@@ -35,3 +35,4 @@ InitializeLibPlatform (
1399 #define MIN_ALIGNMENT_SIZE 8
1400
1401 #endif
1402+
1403diff --git a/Library/IPF/libsalpal.h b/Library/IPF/libsalpal.h
1404index fc25995..1461669 100644
1405--- a/Library/IPF/libsalpal.h
1406+++ b/Library/IPF/libsalpal.h
1407@@ -74,4 +74,4 @@ LibSalProc (
1408 IN UINT64 Arg8
1409 );
1410
1411-#endif
1412\ No newline at end of file
1413+#endif
1414diff --git a/Library/IPF/palproc.h b/Library/IPF/palproc.h
1415index 6d1edf8..ea426bf 100644
1416--- a/Library/IPF/palproc.h
1417+++ b/Library/IPF/palproc.h
1418@@ -58,3 +58,4 @@
1419 #define PAL_MC_REGISTER_MEM 0x001b
1420
1421 #endif // _PALPROC_H
1422+
1423diff --git a/Library/Init.c b/Library/Init.c
1424index 3ef0c8e..e791ff1 100644
1425--- a/Library/Init.c
1426+++ b/Library/Init.c
1427@@ -20,7 +20,7 @@ Revision History
1428
1429 --*/
1430
1431-#include "EfiShelllib.h"
1432+#include "EfiShellLib.h"
1433
1434 extern EFI_UNICODE_COLLATION_PROTOCOL LibStubUnicodeInterface;
1435
1436diff --git a/Library/LinkedList.h b/Library/LinkedList.h
1437index d39e5a3..0c82b61 100644
1438--- a/Library/LinkedList.h
1439+++ b/Library/LinkedList.h
1440@@ -77,11 +77,10 @@ typedef struct _EFI_LIST_ENTRY {
1441 }
1442
1443 #define SwapListEntries(Entry1, Entry2) { \
1444- EFI_LIST_ENTRY *Entry1Flink, *Entry1Blink; \
1445+ EFI_LIST_ENTRY *Entry1Blink; \
1446 EFI_LIST_ENTRY *Entry2Flink, *Entry2Blink; \
1447 Entry2Flink = (Entry2)->Flink; \
1448 Entry2Blink = (Entry2)->Blink; \
1449- Entry1Flink = (Entry1)->Flink; \
1450 Entry1Blink = (Entry1)->Blink; \
1451 Entry2Blink->Flink = Entry2Flink; \
1452 Entry2Flink->Blink = Entry2Blink; \
1453@@ -100,3 +99,4 @@ typedef struct _EFI_LIST_ENTRY {
1454 // A lock structure
1455 //
1456 #endif
1457+
1458diff --git a/Library/Lock.c b/Library/Lock.c
1459index 8a40db5..b3f9bad 100644
1460--- a/Library/Lock.c
1461+++ b/Library/Lock.c
1462@@ -21,7 +21,7 @@ Revision History
1463
1464 --*/
1465
1466-#include "EfiShelllib.h"
1467+#include "EfiShellLib.h"
1468
1469 VOID
1470 InitializeLock (
1471diff --git a/Library/Lock.h b/Library/Lock.h
1472index 9e35b92..bd5304e 100644
1473--- a/Library/Lock.h
1474+++ b/Library/Lock.h
1475@@ -45,4 +45,6 @@ ReleaseLock (
1476 IN FLOCK *Lock
1477 );
1478
1479-#endif
1480\ No newline at end of file
1481+#endif
1482+
1483+
1484diff --git a/Library/Mem.c b/Library/Mem.c
1485index f82cb52..9675b52 100644
1486--- a/Library/Mem.c
1487+++ b/Library/Mem.c
1488@@ -21,7 +21,7 @@ Revision History
1489
1490 --*/
1491
1492-#include "EfiShelllib.h"
1493+#include "EfiShellLib.h"
1494
1495 VOID
1496 SetMem (
1497diff --git a/Library/Mem.h b/Library/Mem.h
1498index bca1e1d..1e0b331 100644
1499--- a/Library/Mem.h
1500+++ b/Library/Mem.h
1501@@ -73,4 +73,6 @@ ZeroMem (
1502 IN UINTN Size
1503 );
1504
1505-#endif
1506\ No newline at end of file
1507+#endif
1508+
1509+
1510diff --git a/Library/Misc.c b/Library/Misc.c
1511index 1564c49..e3204ff 100644
1512--- a/Library/Misc.c
1513+++ b/Library/Misc.c
1514@@ -21,7 +21,7 @@ Revision History
1515
1516 --*/
1517
1518-#include "EfiShelllib.h"
1519+#include "EfiShellLib.h"
1520
1521 #if (PLATFORM == NT32)
1522 #define LOCAL_EFI_WIN_NT_THUNK_PROTOCOL_GUID \
1523@@ -348,7 +348,7 @@ Returns:
1524 ASSERT (Buffer != NULL);
1525
1526 if (mShellEnv == NULL) {
1527- Status = LibLocateProtocol (&ShellEnvProtocol, &mShellEnv);
1528+ Status = LibLocateProtocol (&ShellEnvProtocol, (VOID**)&mShellEnv);
1529 if (EFI_ERROR (Status)) {
1530 mShellEnv = NULL;
1531 }
1532@@ -1171,7 +1171,7 @@ Returns:
1533 Status = BS->HandleProtocol (
1534 Image->DeviceHandle,
1535 &gEfiFirmwareVolumeProtocolGuid,
1536- &FV
1537+ (VOID**)&FV
1538 );
1539 if (!EFI_ERROR (Status)) {
1540 Status = FV->ReadSection (
1541@@ -1192,7 +1192,7 @@ Returns:
1542 Status = BS->HandleProtocol (
1543 Image->DeviceHandle,
1544 &gEfiFirmwareVolume2ProtocolGuid,
1545- &FV2
1546+ (VOID**)&FV2
1547 );
1548 if (!EFI_ERROR (Status)) {
1549 Status = FV2->ReadSection (
1550@@ -1339,7 +1339,7 @@ LibCmdGetStringByToken (
1551 {
1552 EFI_STATUS Status;
1553 CHAR16 *String;
1554- EFI_HII_HANDLE HiiHandle;
1555+ STATIC EFI_HII_HANDLE HiiHandle;
1556
1557 ASSERT (Str);
1558
1559@@ -1730,6 +1730,8 @@ Returns:
1560 return L"X64";
1561 case EFI_IMAGE_MACHINE_IA64:
1562 return L"IA64";
1563+ case EFI_IMAGE_MACHINE_AARCH64:
1564+ return L"AARCH64";
1565 default:
1566 return L"UNKNOWN";
1567 }
1568@@ -2544,4 +2546,5 @@ Returns:
1569 }
1570
1571 return Status;
1572-}
1573\ No newline at end of file
1574+}
1575+
1576diff --git a/Library/Misc.h b/Library/Misc.h
1577index 7a99186..a7a6825 100644
1578--- a/Library/Misc.h
1579+++ b/Library/Misc.h
1580@@ -258,3 +258,4 @@ LibGetExitCode (
1581 );
1582
1583 #endif
1584+
1585diff --git a/Library/Perf.c b/Library/Perf.c
1586index 43e09ea..87c4113 100644
1587--- a/Library/Perf.c
1588+++ b/Library/Perf.c
1589@@ -19,7 +19,7 @@ Abstract:
1590
1591 --*/
1592
1593-#include "EfiShelllib.h"
1594+#include "EfiShellLib.h"
1595
1596 #include EFI_PROTOCOL_DEFINITION (Performance)
1597
1598diff --git a/Library/RtData.c b/Library/RtData.c
1599index af55cb4..145e933 100644
1600--- a/Library/RtData.c
1601+++ b/Library/RtData.c
1602@@ -21,7 +21,7 @@ Revision History
1603
1604 --*/
1605
1606-#include "EfiShelllib.h"
1607+#include "EfiShellLib.h"
1608
1609 //
1610 // RT - pointer to the runtime table
1611diff --git a/Library/ShellDebug.c b/Library/ShellDebug.c
1612index b31ef06..c8b93d5 100644
1613--- a/Library/ShellDebug.c
1614+++ b/Library/ShellDebug.c
1615@@ -19,7 +19,7 @@ Abstract:
1616
1617 --*/
1618
1619-#include "EfiShelllib.h"
1620+#include "EfiShellLib.h"
1621 #include EFI_PROTOCOL_DEFINITION (DebugAssert)
1622
1623 EFI_DEBUG_ASSERT_PROTOCOL *mDebugAssert = NULL;
1624diff --git a/Library/ShellDebug.h b/Library/ShellDebug.h
1625index 039197e..aedb3fa 100644
1626--- a/Library/ShellDebug.h
1627+++ b/Library/ShellDebug.h
1628@@ -99,3 +99,4 @@ EFIDebugVariable (
1629 );
1630 #endif
1631
1632+
1633diff --git a/Library/ShellEnvInt.c b/Library/ShellEnvInt.c
1634index b99d973..53de481 100644
1635--- a/Library/ShellEnvInt.c
1636+++ b/Library/ShellEnvInt.c
1637@@ -21,7 +21,7 @@ Revision History
1638
1639 --*/
1640
1641-#include "EfiShelllib.h"
1642+#include "EfiShellLib.h"
1643
1644 EFI_STATUS
1645 ShellExecute (
1646diff --git a/Library/ShellEnvInt.h b/Library/ShellEnvInt.h
1647index 4182dff..653f997 100644
1648--- a/Library/ShellEnvInt.h
1649+++ b/Library/ShellEnvInt.h
1650@@ -196,4 +196,6 @@ ShellGetHandleNum (
1651 VOID
1652 );
1653
1654-#endif
1655\ No newline at end of file
1656+#endif
1657+
1658+
1659diff --git a/Library/Str.c b/Library/Str.c
1660index ca0c76b..d881dae 100644
1661--- a/Library/Str.c
1662+++ b/Library/Str.c
1663@@ -22,7 +22,7 @@ Revision History
1664
1665 --*/
1666
1667-#include "EfiShelllib.h"
1668+#include "EfiShellLib.h"
1669
1670 INTN
1671 StrCmp (
1672@@ -421,7 +421,7 @@ Returns:
1673 return (UINTN) -1;
1674 }
1675
1676- u = u << 4 | c - (c >= 'A' ? 'A' - 10 : '0');
1677+ u = (u << 4) | (c - (c >= 'A' ? 'A' - 10 : '0'));
1678 } else {
1679 break;
1680 }
1681@@ -472,7 +472,7 @@ Returns:
1682 c = *(str++);
1683 while (c) {
1684 if (c >= '0' && c <= '9') {
1685- if (u > m || u == m && c - '0' > (INTN) n) {
1686+ if ((u > m) || ((u == m) && (c - '0' > (INTN) n))) {
1687 return (UINTN) -1;
1688 }
1689
1690diff --git a/Library/Str.h b/Library/Str.h
1691index 3f73bc5..7b01848 100644
1692--- a/Library/Str.h
1693+++ b/Library/Str.h
1694@@ -248,3 +248,4 @@ LibStubStrUpr (
1695 );
1696
1697 #endif
1698+
1699diff --git a/Library/VarCheck.c b/Library/VarCheck.c
1700index 53597ff..1abec9d 100644
1701--- a/Library/VarCheck.c
1702+++ b/Library/VarCheck.c
1703@@ -21,7 +21,7 @@ Revision History
1704
1705 --*/
1706
1707-#include "EfiShelllib.h"
1708+#include "EfiShellLib.h"
1709
1710 VOID
1711 LibCheckVarFreeVarList (
1712diff --git a/Library/VarCheck.h b/Library/VarCheck.h
1713index bc1f412..d2bfa66 100644
1714--- a/Library/VarCheck.h
1715+++ b/Library/VarCheck.h
1716@@ -41,7 +41,7 @@ typedef enum {
1717 ARG_PARTIALLY_QUOTED = 0x2,
1718 ARG_FIRST_HALF_QUOTED = 0x4,
1719 ARG_FIRST_CHAR_IS_ESC = 0x8
1720-};
1721+} SHELL_ARG_EXPR;
1722
1723 typedef struct {
1724 CHAR16 *FlagStr;
1725@@ -116,3 +116,4 @@ LibGetErrRedirFilename (
1726 );
1727
1728 #endif
1729+
1730diff --git a/Library/X64/efilibplat.h b/Library/X64/efilibplat.h
1731index 90659b4..aad0dd0 100644
1732--- a/Library/X64/efilibplat.h
1733+++ b/Library/X64/efilibplat.h
1734@@ -35,3 +35,4 @@ InitializeLibPlatform (
1735 #define MIN_ALIGNMENT_SIZE 8
1736
1737 #endif
1738+
1739diff --git a/LoadPciRom/LoadPciRom.c b/LoadPciRom/LoadPciRom.c
1740index f8854b7..99fd99d 100644
1741--- a/LoadPciRom/LoadPciRom.c
1742+++ b/LoadPciRom/LoadPciRom.c
1743@@ -24,7 +24,7 @@ Revision History
1744
1745 #include "EfiShellLib.h"
1746 #include "LoadPciRom.h"
1747-#include "Pci22.h"
1748+#include "pci22.h"
1749
1750 extern UINT8 STRING_ARRAY_NAME[];
1751
1752@@ -56,7 +56,7 @@ LoadEfiDriversFromRomImage (
1753 );
1754
1755 EFI_HANDLE gMyImageHandle;
1756-EFI_HII_HANDLE HiiHandle;
1757+STATIC EFI_HII_HANDLE HiiHandle;
1758 EFI_GUID EfiLoadPciRomGuid = EFI_LOADPCIROM_GUID;
1759 SHELL_VAR_CHECK_ITEM LPRCheckList[] = {
1760 {
1761@@ -81,7 +81,7 @@ SHELL_VAR_CHECK_ITEM LPRCheckList[] = {
1762 NULL,
1763 0,
1764 0,
1765- 0
1766+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
1767 }
1768 };
1769
1770@@ -377,7 +377,7 @@ Returns:
1771 }
1772
1773 if (EfiRomHeader->CompressionType == EFI_PCI_EXPANSION_ROM_HEADER_COMPRESSED) {
1774- Status = BS->LocateProtocol (&gEfiDecompressProtocolGuid, NULL, &Decompress);
1775+ Status = BS->LocateProtocol (&gEfiDecompressProtocolGuid, NULL, (VOID**)&Decompress);
1776 if (EFI_ERROR (Status)) {
1777 PrintToken (STRING_TOKEN (STR_LOADPCIROM_DECOMP_NOT_FOUND), HiiHandle);
1778 SkipImage = TRUE;
1779diff --git a/LoadPciRom/LoadPciRom.h b/LoadPciRom/LoadPciRom.h
1780index e9db96d..116bb89 100644
1781--- a/LoadPciRom/LoadPciRom.h
1782+++ b/LoadPciRom/LoadPciRom.h
1783@@ -30,3 +30,4 @@ Revision History
1784 }
1785
1786 #endif
1787+
1788diff --git a/LoadPciRom/LoadPciRom.inf b/LoadPciRom/LoadPciRom.inf
1789index 8e79af7..83744ef 100644
1790--- a/LoadPciRom/LoadPciRom.inf
1791+++ b/LoadPciRom/LoadPciRom.inf
1792@@ -41,23 +41,23 @@ COMPONENT_TYPE = APPLICATION
1793
1794 [sources.common]
1795 LoadPciRomStrings.uni
1796- ..\ShCommonStrings.uni
1797+ ../ShCommonStrings.uni
1798 LoadPciRom.c
1799 LoadPciRom.h
1800
1801 [includes.common]
1802 .
1803- ..\Inc
1804- ..\Library
1805- $(EDK_SOURCE)\Foundation
1806- $(EDK_SOURCE)\Foundation\Include
1807- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1808- $(EDK_SOURCE)\Foundation\Efi
1809- $(EDK_SOURCE)\Foundation\Efi\Include
1810- $(EDK_SOURCE)\Foundation\FrameWork
1811- $(EDK_SOURCE)\Foundation\FrameWork\Include
1812- $(EDK_SOURCE)\Foundation\Core\Dxe
1813- $(DEST_DIR)\
1814+ ../Inc
1815+ ../Library
1816+ $(EDK_SOURCE)/Foundation
1817+ $(EDK_SOURCE)/Foundation/Include
1818+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1819+ $(EDK_SOURCE)/Foundation/Efi
1820+ $(EDK_SOURCE)/Foundation/Efi/Include
1821+ $(EDK_SOURCE)/Foundation/FrameWork
1822+ $(EDK_SOURCE)/Foundation/FrameWork/Include
1823+ $(EDK_SOURCE)/Foundation/Core/Dxe
1824+ $(DEST_DIR./
1825
1826 [libraries.common]
1827 EfiShellLib
1828@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
1829
1830 [nmake.common]
1831 IMAGE_ENTRY_POINT=InitializeLoadPciRom
1832+
1833+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
1834 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
1835 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
1836 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
1837
1838+[nmake.ARM, nmake.AARCH64]
1839+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
1840diff --git a/Ping/Ping.c b/Ping/Ping.c
1841index 7d92881..65e45b7 100644
1842--- a/Ping/Ping.c
1843+++ b/Ping/Ping.c
1844@@ -20,14 +20,14 @@ Abstract:
1845 --*/
1846
1847 #include "EfiShellLib.h"
1848-#include "CpuFuncs.h"
1849+//#include "CpuFuncs.h"
1850 #include EFI_ARCH_PROTOCOL_DEFINITION (Cpu)
1851 #include EFI_PROTOCOL_DEFINITION (Ip4)
1852 #include "Ping.h"
1853 #include STRING_DEFINES_FILE
1854 extern UINT8 STRING_ARRAY_NAME[];
1855
1856-EFI_HII_HANDLE HiiHandle;
1857+STATIC EFI_HII_HANDLE HiiHandle;
1858
1859 EFI_GUID EfiPingGuid = EFI_PING_GUID;
1860 SHELL_VAR_CHECK_ITEM PingCheckList[] = {
1861@@ -59,7 +59,7 @@ SHELL_VAR_CHECK_ITEM PingCheckList[] = {
1862 NULL,
1863 0,
1864 0,
1865- 0
1866+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
1867 }
1868 };
1869
1870@@ -114,6 +114,8 @@ UINT32 RttSum;
1871 UINT32 RttMin;
1872 UINT32 RttMax;
1873
1874+EFI_CPU_ARCH_PROTOCOL *gCpu = NULL;
1875+
1876 STATIC
1877 UINT64
1878 GetTimerValue (
1879@@ -135,7 +137,22 @@ Returns:
1880
1881 --*/
1882 {
1883- return EfiReadTsc ();
1884+ static UINT64 CurrentTick = 0;
1885+ UINT64 TimerPeriod;
1886+ EFI_STATUS Status;
1887+
1888+ ASSERT (gCpu != NULL);
1889+
1890+ Status = gCpu->GetTimerValue (gCpu, 0, &CurrentTick, &TimerPeriod);
1891+ if (EFI_ERROR (Status)) {
1892+ //
1893+ // The WinntGetTimerValue will return EFI_UNSUPPORTED. Set the
1894+ // TimerPeriod by ourselves.
1895+ //
1896+ CurrentTick += 1000000;
1897+ }
1898+
1899+ return CurrentTick;
1900 }
1901
1902 STATIC
1903@@ -168,7 +185,7 @@ Returns:
1904 //
1905 // Locate the Cpu Arch Protocol.
1906 //
1907- Status = BS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, &Cpu);
1908+ Status = BS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID**)&Cpu);
1909 if (EFI_ERROR (Status)) {
1910 return Status;
1911 }
1912diff --git a/Ping/Ping.h b/Ping/Ping.h
1913index 7867caf..6f59a0c 100644
1914--- a/Ping/Ping.h
1915+++ b/Ping/Ping.h
1916@@ -78,3 +78,4 @@ typedef struct _ICMP_TX_INFO {
1917 } ICMP_TX_INFO;
1918
1919 #endif
1920+
1921diff --git a/Ping/Ping.inf b/Ping/Ping.inf
1922index 64dec5c..a678489 100644
1923--- a/Ping/Ping.inf
1924+++ b/Ping/Ping.inf
1925@@ -25,24 +25,24 @@ FILE_GUID = FAAA94BA-7095-4c0f-8D69-8E00C8328863
1926 COMPONENT_TYPE = APPLICATION
1927
1928 [sources.common]
1929- ..\ShCommonStrings.uni
1930+ ../ShCommonStrings.uni
1931 PingStrings.uni
1932 Ping.h
1933 Ping.c
1934
1935 [includes.common]
1936- ..\Inc
1937- ..\Library
1938- $(EDK_SOURCE)\Foundation\Efi
1939- $(EDK_SOURCE)\Foundation
1940- $(EDK_SOURCE)\Foundation\Efi\Include
1941- $(EDK_SOURCE)\Foundation\Include
1942- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1943- $(EDK_SOURCE)\Foundation\FrameWork
1944- $(EDK_SOURCE)\Foundation\FrameWork\Include
1945- $(EDK_SOURCE)\Foundation\Core\Dxe
1946- $(EDK_SOURCE)\Foundation\Library\Dxe\Include
1947- $(DEST_DIR)\
1948+ ../Inc
1949+ ../Library
1950+ $(EDK_SOURCE)/Foundation/Efi
1951+ $(EDK_SOURCE)/Foundation
1952+ $(EDK_SOURCE)/Foundation/Efi/Include
1953+ $(EDK_SOURCE)/Foundation/Include
1954+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1955+ $(EDK_SOURCE)/Foundation/FrameWork
1956+ $(EDK_SOURCE)/Foundation/FrameWork/Include
1957+ $(EDK_SOURCE)/Foundation/Core/Dxe
1958+ $(EDK_SOURCE)/Foundation/Library/Dxe/Include
1959+ $(DEST_DIR./
1960
1961 [libraries.common]
1962 EfiShellLib
1963@@ -52,7 +52,6 @@ COMPONENT_TYPE = APPLICATION
1964 ArchProtocolLib
1965 EdkGuidLib
1966 EdkFrameworkGuidLib
1967- EfiDriverLib
1968
1969 [libraries.Ia32]
1970 CpuIA32Lib
1971@@ -64,9 +63,12 @@ COMPONENT_TYPE = APPLICATION
1972 CpuIA32Lib
1973
1974 [nmake.common]
1975- C_PROJ_FLAGS = $(C_PROJ_FLAGS)
1976 IMAGE_ENTRY_POINT=Ping
1977- C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
1978+
1979+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
1980 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
1981 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
1982+ C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
1983
1984+[nmake.ARM, nmake.AARCH64]
1985+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
1986diff --git a/Shell.inf b/Shell.inf
1987index fee3558..b1dc90e 100644
1988--- a/Shell.inf
1989+++ b/Shell.inf
1990@@ -25,179 +25,189 @@ FILE_GUID = c57ad6b7-0515-40a8-9d21-551652854e37
1991 COMPONENT_TYPE = APPLICATION
1992
1993 [sources.common]
1994- Library\ShellDebug.c
1995- Library\DPath.c
1996- Library\Init.c
1997- Library\Lock.c
1998- Library\Str.c
1999- Library\IO.c
2000- Library\Mem.c
2001- Library\Misc.c
2002- Library\Data.c
2003- Library\RtData.c
2004- Library\ShellEnvInt.c
2005- Library\Handle.c
2006- Library\FileIO.c
2007- Library\ConsistMapping.c
2008- Library\CRC.c
2009- Library\Event.c
2010- Library\Perf.c
2011- Library\VarCheck.c
2012- Library\HiiSupport.c
2013-
2014- newshell\NshellStrings.uni
2015- newshell\init.c
2016- newshell\nshell.h
2017- newshell\fakehii.c
2018+ Library/ShellDebug.c
2019+ Library/DPath.c
2020+ Library/Init.c
2021+ Library/Lock.c
2022+ Library/Str.c
2023+ Library/IO.c
2024+ Library/Mem.c
2025+ Library/Misc.c
2026+ Library/Data.c
2027+ Library/RtData.c
2028+ Library/ShellEnvInt.c
2029+ Library/Handle.c
2030+ Library/FileIO.c
2031+ Library/ConsistMapping.c
2032+ Library/CRC.c
2033+ Library/Event.c
2034+ Library/Perf.c
2035+ Library/VarCheck.c
2036+ Library/HiiSupport.c
2037+
2038+ newshell/NshellStrings.uni
2039+ newshell/init.c
2040+ newshell/nshell.h
2041+ newshell/fakehii.c
2042
2043 ShCommonStrings.uni
2044- shellenv\ShellenvHelpStrings.uni
2045- shellenv\ShellenvStrings.uni
2046- shellenv\ScriptCmdStrings.uni
2047- shellenv\ConnectStrings.uni
2048- shellenv\EchoStrings.uni
2049- shellenv\HelpStrings.uni
2050- shellenv\MapStrings.uni
2051- shellenv\CdStrings.uni
2052- shellenv\DhStrings.uni
2053+ shellenv/ShellenvHelpStrings.uni
2054+ shellenv/ShellenvStrings.uni
2055+ shellenv/ScriptCmdStrings.uni
2056+ shellenv/ConnectStrings.uni
2057+ shellenv/EchoStrings.uni
2058+ shellenv/HelpStrings.uni
2059+ shellenv/MapStrings.uni
2060+ shellenv/CdStrings.uni
2061+ shellenv/DhStrings.uni
2062
2063- shellenv\cmddisp.c
2064- shellenv\connect.c
2065- shellenv\data.c
2066- shellenv\exec.c
2067- shellenv\init.c
2068- shellenv\protid.c
2069- shellenv\var.c
2070- shellenv\conio.c
2071- shellenv\consoleproxy.c
2072- shellenv\handle.c
2073- shellenv\dprot.c
2074- shellenv\map.c
2075- shellenv\marg.c
2076- shellenv\batch.c
2077- shellenv\if.c
2078- shellenv\goto.c
2079- shellenv\echo.c
2080- shellenv\pause.c
2081- shellenv\for.c
2082- shellenv\wait.c
2083- shellenv\help.c
2084- shellenv\shelle.h
2085- shellenv\shellenvguid.h
2086- shellenv\parsecmd.c
2087- shellenv\shift.c
2088+ shellenv/cmddisp.c
2089+ shellenv/connect.c
2090+ shellenv/data.c
2091+ shellenv/exec.c
2092+ shellenv/init.c
2093+ shellenv/protid.c
2094+ shellenv/var.c
2095+ shellenv/conio.c
2096+ shellenv/consoleproxy.c
2097+ shellenv/handle.c
2098+ shellenv/dprot.c
2099+ shellenv/map.c
2100+ shellenv/marg.c
2101+ shellenv/batch.c
2102+ shellenv/if.c
2103+ shellenv/goto.c
2104+ shellenv/echo.c
2105+ shellenv/pause.c
2106+ shellenv/for.c
2107+ shellenv/wait.c
2108+ shellenv/help.c
2109+ shellenv/shelle.h
2110+ shellenv/shellenvguid.h
2111+ shellenv/parsecmd.c
2112+ shellenv/shift.c
2113
2114- unload\UnloadStrings.uni
2115- unload\unload.c
2116+ unload/UnloadStrings.uni
2117+ unload/unload.c
2118
2119- attrib\AttribStrings.uni
2120- attrib\attrib.c
2121- attrib\attrib.h
2122+ attrib/AttribStrings.uni
2123+ attrib/attrib.c
2124+ attrib/attrib.h
2125
2126- cls\clsstrings.uni
2127- cls\cls.c
2128+ cls/clsstrings.uni
2129+ cls/cls.c
2130
2131- cp\CpStrings.uni
2132- cp\cp.h
2133- cp\cp.c
2134+ cp/CpStrings.uni
2135+ cp/cp.h
2136+ cp/cp.c
2137
2138- date\DateStrings.uni
2139- date\date.c
2140- date\date.h
2141+ date/DateStrings.uni
2142+ date/date.c
2143+ date/date.h
2144
2145- load\LoadStrings.uni
2146- load\load.c
2147- load\load.h
2148+ load/LoadStrings.uni
2149+ load/load.c
2150+ load/load.h
2151
2152- ls\LsStrings.uni
2153- ls\ls.h
2154- ls\ls.c
2155+ ls/LsStrings.uni
2156+ ls/ls.h
2157+ ls/ls.c
2158
2159- mkdir\MkdirStrings.uni
2160- mkdir\mkdir.c
2161- mkdir\mkdir.h
2162+ mkdir/MkdirStrings.uni
2163+ mkdir/mkdir.c
2164+ mkdir/mkdir.h
2165
2166- mv\MvStrings.uni
2167- mv\mv.c
2168- mv\mv.h
2169+ mv/MvStrings.uni
2170+ mv/mv.c
2171+ mv/mv.h
2172
2173- reset\ResetStrings.uni
2174- reset\reset.c
2175- reset\reset.h
2176+ reset/ResetStrings.uni
2177+ reset/reset.c
2178+ reset/reset.h
2179
2180- rm\RmStrings.uni
2181- rm\rm.h
2182- rm\rm.c
2183+ rm/RmStrings.uni
2184+ rm/rm.h
2185+ rm/rm.c
2186
2187- type\TypeStrings.uni
2188- type\type.c
2189- type\type.h
2190- time\TimeStrings.uni
2191- time\time.c
2192- time\time.h
2193-
2194- touch\TouchStrings.uni
2195- touch\touch.c
2196- touch\touch.h
2197-
2198- vol\VolStrings.uni
2199- vol\vol.c
2200- vol\vol.h
2201-
2202- ver\VerStrings.uni
2203- ver\ver.c
2204- ver\ver.h
2205+ type/TypeStrings.uni
2206+ type/type.c
2207+ type/type.h
2208+ time/TimeStrings.uni
2209+ time/time.c
2210+ time/time.h
2211+
2212+ touch/TouchStrings.uni
2213+ touch/touch.c
2214+ touch/touch.h
2215+
2216+ vol/VolStrings.uni
2217+ vol/vol.c
2218+ vol/vol.h
2219+
2220+ ver/VerStrings.uni
2221+ ver/ver.c
2222+ ver/ver.h
2223
2224- drivers\driversStrings.uni
2225- drivers\drivers.c
2226- drivers\drivers.h
2227+ drivers/driversStrings.uni
2228+ drivers/drivers.c
2229+ drivers/drivers.h
2230
2231- drvcfg\DrvcfgStrings.uni
2232- drvcfg\drvcfg.c
2233- drvcfg\drvcfg.h
2234+ drvcfg/DrvcfgStrings.uni
2235+ drvcfg/drvcfg.c
2236+ drvcfg/drvcfg.h
2237
2238- drvdiag\DrvdiagStrings.uni
2239- drvdiag\drvdiag.c
2240- drvdiag\drvdiag.h
2241+ drvdiag/DrvdiagStrings.uni
2242+ drvdiag/drvdiag.c
2243+ drvdiag/drvdiag.h
2244
2245
2246
2247 [sources.ia32]
2248- ver\ia32\ver32.c
2249- Library\ia32\math.c
2250- Library\ia32\initplat.c
2251+ ver/IA32/ver32.c
2252+ Library/IA32/math.c
2253+ Library/IA32/initplat.c
2254
2255
2256 [sources.ipf]
2257- ver\ipf\ver64.c
2258- Library\ipf\math.c
2259- Library\ipf\initplat.c
2260- Library\ipf\palproc.s
2261- Library\ipf\salpal.c
2262+ ver/IPF/ver64.c
2263+ Library/IPF/math.c
2264+ Library/IPF/initplat.c
2265+ Library/IPF/palproc.s
2266+ Library/IPF/salpal.c
2267
2268 [sources.EBC]
2269- ver\ebc\verEbc.c
2270- Library\EBC\math.c
2271- Library\EBC\initplat.c
2272+ ver/ebc/verEbc.c
2273+ Library/Ebc/math.c
2274+ Library/Ebc/initplat.c
2275
2276 [sources.x64]
2277- ver\ia32\ver32.c
2278- Library\ipf\math.c
2279- Library\ia32\initplat.c
2280+ ver/IA32/ver32.c
2281+ Library/IPF/math.c
2282+ Library/IA32/initplat.c
2283+
2284+[sources.ARM]
2285+ ver/ia32/ver32.c
2286+ Library/IPF/math.c
2287+ Library/IA32/initplat.c
2288+
2289+[sources.AARCH64]
2290+ ver/ia32/ver32.c
2291+ Library/IPF/math.c
2292+ Library/IA32/initplat.c
2293
2294 [includes.common]
2295 .
2296- .\Inc
2297- .\ver
2298- .\Library
2299- $(EDK_SOURCE)\Foundation
2300- $(EDK_SOURCE)\Foundation\Include
2301- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
2302- $(EDK_SOURCE)\Foundation\Efi
2303- $(EDK_SOURCE)\Foundation\Efi\Include
2304- $(EDK_SOURCE)\Foundation\FrameWork
2305- $(EDK_SOURCE)\Foundation\FrameWork\Include
2306- $(EDK_SOURCE)\Foundation\Core\Dxe
2307+ ./Inc
2308+ ./ver
2309+ ./Library
2310+ $(EDK_SOURCE)/Foundation
2311+ $(EDK_SOURCE)/Foundation/Include
2312+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
2313+ $(EDK_SOURCE)/Foundation/Efi
2314+ $(EDK_SOURCE)/Foundation/Efi/Include
2315+ $(EDK_SOURCE)/Foundation/FrameWork
2316+ $(EDK_SOURCE)/Foundation/FrameWork/Include
2317+ $(EDK_SOURCE)/Foundation/Core/Dxe
2318 $(DEST_DIR)
2319
2320 [libraries.common]
2321@@ -216,17 +226,18 @@ COMPONENT_TYPE = APPLICATION
2322 # we will specify some additional DEFINEs on the compile command line.
2323 #
2324 [nmake.common]
2325- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
2326 IMAGE_ENTRY_POINT=InitializeShell
2327- C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_MONOSHELL
2328+
2329+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
2330+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
2331 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
2332 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
2333+ C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_MONOSHELL
2334+
2335+[nmake.ARM, nmake.AARCH64]
2336+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_MONOSHELL
2337
2338 [nmake.ebc]
2339 EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DEFI_MONOSHELL
2340 EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
2341 EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
2342-
2343-
2344-
2345-
2346\ No newline at end of file
2347diff --git a/ShellFull.inf b/ShellFull.inf
2348index 832dc79..48fa7aa 100644
2349--- a/ShellFull.inf
2350+++ b/ShellFull.inf
2351@@ -20,300 +20,310 @@
2352 #--*/
2353
2354 [defines]
2355-BASE_NAME = Shell
2356-FILE_GUID = c57ad6b7-0515-40a8-9d21-551652854e37
2357+BASE_NAME = ShellFull
2358+FILE_GUID = 1903FB23-E526-4BDA-85E4-D68F2EEF0C20
2359 COMPONENT_TYPE = APPLICATION
2360
2361 [sources.common]
2362- Library\ShellDebug.c
2363- Library\DPath.c
2364- Library\Init.c
2365- Library\Lock.c
2366- Library\Str.c
2367- Library\IO.c
2368- Library\Mem.c
2369- Library\Misc.c
2370- Library\Data.c
2371- Library\RtData.c
2372- Library\ShellEnvInt.c
2373- Library\Handle.c
2374- Library\FileIO.c
2375- Library\ConsistMapping.c
2376- Library\CRC.c
2377- Library\Event.c
2378- Library\Perf.c
2379- Library\VarCheck.c
2380- Library\HiiSupport.c
2381-
2382- newshell\NshellStrings.uni
2383- newshell\init.c
2384- newshell\nshell.h
2385- newshell\fakehii.c
2386+ Library/ShellDebug.c
2387+ Library/DPath.c
2388+ Library/Init.c
2389+ Library/Lock.c
2390+ Library/Str.c
2391+ Library/IO.c
2392+ Library/Mem.c
2393+ Library/Misc.c
2394+ Library/Data.c
2395+ Library/RtData.c
2396+ Library/ShellEnvInt.c
2397+ Library/Handle.c
2398+ Library/FileIO.c
2399+ Library/ConsistMapping.c
2400+ Library/CRC.c
2401+ Library/Event.c
2402+ Library/Perf.c
2403+ Library/VarCheck.c
2404+ Library/HiiSupport.c
2405+
2406+ newshell/NshellStrings.uni
2407+ newshell/init.c
2408+ newshell/nshell.h
2409+ newshell/fakehii.c
2410
2411 ShCommonStrings.uni
2412- shellenv\ShellenvHelpStrings.uni
2413- shellenv\ShellenvStrings.uni
2414- shellenv\ScriptCmdStrings.uni
2415- shellenv\ConnectStrings.uni
2416- shellenv\EchoStrings.uni
2417- shellenv\HelpStrings.uni
2418- shellenv\MapStrings.uni
2419- shellenv\CdStrings.uni
2420- shellenv\DhStrings.uni
2421+ shellenv/ShellenvHelpStrings.uni
2422+ shellenv/ShellenvStrings.uni
2423+ shellenv/ScriptCmdStrings.uni
2424+ shellenv/ConnectStrings.uni
2425+ shellenv/EchoStrings.uni
2426+ shellenv/HelpStrings.uni
2427+ shellenv/MapStrings.uni
2428+ shellenv/CdStrings.uni
2429+ shellenv/DhStrings.uni
2430
2431- shellenv\cmddisp.c
2432- shellenv\connect.c
2433- shellenv\data.c
2434- shellenv\exec.c
2435- shellenv\init.c
2436- shellenv\protid.c
2437- shellenv\var.c
2438- shellenv\conio.c
2439- shellenv\consoleproxy.c
2440- shellenv\handle.c
2441- shellenv\dprot.c
2442- shellenv\map.c
2443- shellenv\marg.c
2444- shellenv\batch.c
2445- shellenv\if.c
2446- shellenv\goto.c
2447- shellenv\echo.c
2448- shellenv\pause.c
2449- shellenv\for.c
2450- shellenv\wait.c
2451- shellenv\help.c
2452- shellenv\shelle.h
2453- shellenv\shellenvguid.h
2454- shellenv\parsecmd.c
2455- shellenv\shift.c
2456+ shellenv/cmddisp.c
2457+ shellenv/connect.c
2458+ shellenv/data.c
2459+ shellenv/exec.c
2460+ shellenv/init.c
2461+ shellenv/protid.c
2462+ shellenv/var.c
2463+ shellenv/conio.c
2464+ shellenv/consoleproxy.c
2465+ shellenv/handle.c
2466+ shellenv/dprot.c
2467+ shellenv/map.c
2468+ shellenv/marg.c
2469+ shellenv/batch.c
2470+ shellenv/if.c
2471+ shellenv/goto.c
2472+ shellenv/echo.c
2473+ shellenv/pause.c
2474+ shellenv/for.c
2475+ shellenv/wait.c
2476+ shellenv/help.c
2477+ shellenv/shelle.h
2478+ shellenv/shellenvguid.h
2479+ shellenv/parsecmd.c
2480+ shellenv/shift.c
2481
2482- unload\UnloadStrings.uni
2483- unload\unload.c
2484+ unload/UnloadStrings.uni
2485+ unload/unload.c
2486
2487- attrib\AttribStrings.uni
2488- attrib\attrib.c
2489- attrib\attrib.h
2490+ attrib/AttribStrings.uni
2491+ attrib/attrib.c
2492+ attrib/attrib.h
2493
2494- cls\clsstrings.uni
2495- cls\cls.c
2496+ cls/clsstrings.uni
2497+ cls/cls.c
2498
2499- cp\CpStrings.uni
2500- cp\cp.h
2501- cp\cp.c
2502+ cp/CpStrings.uni
2503+ cp/cp.h
2504+ cp/cp.c
2505
2506- date\DateStrings.uni
2507- date\date.c
2508- date\date.h
2509+ date/DateStrings.uni
2510+ date/date.c
2511+ date/date.h
2512
2513- load\LoadStrings.uni
2514- load\load.c
2515- load\load.h
2516+ load/LoadStrings.uni
2517+ load/load.c
2518+ load/load.h
2519
2520- ls\LsStrings.uni
2521- ls\ls.h
2522- ls\ls.c
2523+ ls/LsStrings.uni
2524+ ls/ls.h
2525+ ls/ls.c
2526
2527- mkdir\MkdirStrings.uni
2528- mkdir\mkdir.c
2529- mkdir\mkdir.h
2530+ mkdir/MkdirStrings.uni
2531+ mkdir/mkdir.c
2532+ mkdir/mkdir.h
2533
2534- mv\MvStrings.uni
2535- mv\mv.c
2536- mv\mv.h
2537+ mv/MvStrings.uni
2538+ mv/mv.c
2539+ mv/mv.h
2540
2541- reset\ResetStrings.uni
2542- reset\reset.c
2543- reset\reset.h
2544+ reset/ResetStrings.uni
2545+ reset/reset.c
2546+ reset/reset.h
2547
2548- rm\RmStrings.uni
2549- rm\rm.h
2550- rm\rm.c
2551+ rm/RmStrings.uni
2552+ rm/rm.h
2553+ rm/rm.c
2554
2555- type\TypeStrings.uni
2556- type\type.c
2557- type\type.h
2558- time\TimeStrings.uni
2559- time\time.c
2560- time\time.h
2561-
2562- touch\TouchStrings.uni
2563- touch\touch.c
2564- touch\touch.h
2565-
2566- vol\VolStrings.uni
2567- vol\vol.c
2568- vol\vol.h
2569-
2570- ver\VerStrings.uni
2571- ver\ver.c
2572- ver\ver.h
2573+ type/TypeStrings.uni
2574+ type/type.c
2575+ type/type.h
2576+ time/TimeStrings.uni
2577+ time/time.c
2578+ time/time.h
2579+
2580+ touch/TouchStrings.uni
2581+ touch/touch.c
2582+ touch/touch.h
2583+
2584+ vol/VolStrings.uni
2585+ vol/vol.c
2586+ vol/vol.h
2587+
2588+ ver/VerStrings.uni
2589+ ver/ver.c
2590+ ver/ver.h
2591
2592- drivers\driversStrings.uni
2593- drivers\drivers.c
2594- drivers\drivers.h
2595+ drivers/driversStrings.uni
2596+ drivers/drivers.c
2597+ drivers/drivers.h
2598
2599- drvcfg\DrvcfgStrings.uni
2600- drvcfg\drvcfg.c
2601- drvcfg\drvcfg.h
2602+ drvcfg/DrvcfgStrings.uni
2603+ drvcfg/drvcfg.c
2604+ drvcfg/drvcfg.h
2605
2606- drvdiag\DrvdiagStrings.uni
2607- drvdiag\drvdiag.c
2608- drvdiag\drvdiag.h
2609+ drvdiag/DrvdiagStrings.uni
2610+ drvdiag/drvdiag.c
2611+ drvdiag/drvdiag.h
2612
2613- comp\CompStrings.uni
2614- comp\comp.c
2615+ comp/CompStrings.uni
2616+ comp/comp.c
2617
2618- dblk\dblkStrings.uni
2619- dblk\dblk.c
2620- dblk\efidump.c
2621+ dblk/dblkStrings.uni
2622+ dblk/dblk.c
2623+ dblk/efidump.c
2624
2625- devices\DevicesStrings.uni
2626- devices\devices.c
2627+ devices/DevicesStrings.uni
2628+ devices/devices.c
2629
2630- devicetree\DevicetreeStrings.uni
2631- devicetree\devicetree.c
2632+ devicetree/DevicetreeStrings.uni
2633+ devicetree/devicetree.c
2634
2635- dmem\MemStrings.uni
2636- dmem\DebugStrings.uni
2637- dmem\mem.c
2638- dmem\MemCommonPart.c
2639- dmem\efidump.c
2640+ dmem/MemStrings.uni
2641+ dmem/DebugStrings.uni
2642+ dmem/mem.c
2643+ dmem/MemCommonPart.c
2644+ dmem/efidump.c
2645
2646- dmpstore\DmpstoreStrings.uni
2647- dmpstore\dmpstore.c
2648+ dmpstore/DmpstoreStrings.uni
2649+ dmpstore/dmpstore.c
2650
2651- edit\EditStrings.uni
2652- edit\main.c
2653- edit\libFileBuffer.c
2654- edit\libEditor.c
2655- edit\libTitleBar.c
2656- edit\libStatusBar.c
2657- edit\libInputBar.c
2658- edit\libMenuBar.c
2659- edit\libMisc.c
2660+ edit/EditStrings.uni
2661+ edit/main.c
2662+ edit/libFileBuffer.c
2663+ edit/libEditor.c
2664+ edit/libTitleBar.c
2665+ edit/libStatusBar.c
2666+ edit/libInputBar.c
2667+ edit/libMenuBar.c
2668+ edit/libMisc.c
2669
2670- eficompress\CompressStrings.uni
2671- eficompress\compressMain.c
2672- eficompress\compress.c
2673+ eficompress/CompressStrings.uni
2674+ eficompress/compressMain.c
2675+ eficompress/compress.c
2676
2677- efidecompress\DecompressStrings.uni
2678- efidecompress\decompress.c
2679+ efidecompress/DecompressStrings.uni
2680+ efidecompress/decompress.c
2681
2682- err\ErrStrings.uni
2683- err\err.c
2684+ err/ErrStrings.uni
2685+ err/err.c
2686
2687- guid\GuidStrings.uni
2688- guid\guid.c
2689+ guid/GuidStrings.uni
2690+ guid/guid.c
2691
2692- hexedit\HexeditStrings.uni
2693- hexedit\main.c
2694- hexedit\libBufferImage.c
2695- hexedit\libFileImage.c
2696- hexedit\libDiskImage.c
2697- hexedit\libMemImage.c
2698- hexedit\libEditor.c
2699- hexedit\libTitleBar.c
2700- hexedit\libStatusBar.c
2701- hexedit\libInputBar.c
2702- hexedit\libMenuBar.c
2703- hexedit\libClipBoard.c
2704- hexedit\libMisc.c
2705-
2706- IfConfig\IfConfigStrings.uni
2707- IfConfig\IfConfig.c
2708- IfConfig\IfConfig.h
2709- IfConfig\ShellNetHelper.c
2710-
2711- ipconfig\IpConfigStrings.uni
2712- ipconfig\IpConfig.c
2713+ hexedit/HexeditStrings.uni
2714+ hexedit/main.c
2715+ hexedit/libBufferImage.c
2716+ hexedit/libFileImage.c
2717+ hexedit/libDiskImage.c
2718+ hexedit/libMemImage.c
2719+ hexedit/libEditor.c
2720+ hexedit/libTitleBar.c
2721+ hexedit/libStatusBar.c
2722+ hexedit/libInputBar.c
2723+ hexedit/libMenuBar.c
2724+ hexedit/libClipBoard.c
2725+ hexedit/libMisc.c
2726+
2727+ IfConfig/IfConfigStrings.uni
2728+ IfConfig/IfConfig.c
2729+ IfConfig/IfConfig.h
2730+ IfConfig/ShellNetHelper.c
2731+
2732+ IpConfig/IpConfigStrings.uni
2733+ IpConfig/IpConfig.c
2734
2735- loadpcirom\LoadPciRomStrings.uni
2736- loadpcirom\LoadPciRom.c
2737+ loadpcirom/LoadPciRomStrings.uni
2738+ loadpcirom/LoadPciRom.c
2739
2740- mem\MemStrings.uni
2741- mem\DebugStrings.uni
2742- mem\mm.c
2743- mem\MemCommonPart.c
2744- mem\efidump.c
2745+ mem/MemStrings.uni
2746+ mem/DebugStrings.uni
2747+ mem/mm.c
2748+ mem/MemCommonPart.c
2749+ mem/efidump.c
2750
2751- memmap\memmapStrings.uni
2752- memmap\memmap.c
2753+ memmap/memmapStrings.uni
2754+ memmap/memmap.c
2755
2756- mm\MmStrings.uni
2757- mm\mm.c
2758+ mm/MmStrings.uni
2759+ mm/mm.c
2760
2761- mode\ModeStrings.uni
2762- mode\mode.c
2763+ mode/ModeStrings.uni
2764+ mode/mode.c
2765
2766- mount\MountStrings.uni
2767- mount\mount.c
2768+ mount/MountStrings.uni
2769+ mount/mount.c
2770
2771- openinfo\OPeninfoStrings.uni
2772- openinfo\openinfo.c
2773+ openinfo/OPeninfoStrings.uni
2774+ openinfo/openinfo.c
2775
2776- Ping\PingStrings.uni
2777- Ping\Ping.c
2778+ Ping/PingStrings.uni
2779+ Ping/Ping.c
2780
2781- pci\PciStrings.uni
2782- pci\pci.c
2783- pci\pci_class.c
2784+ pci/PciStrings.uni
2785+ pci/pci.c
2786+ pci/pci_class.c
2787
2788- sermode\SermodeStrings.uni
2789- sermode\sermode.c
2790+ sermode/SermodeStrings.uni
2791+ sermode/sermode.c
2792
2793- smbiosview\SmBiosViewStrings.uni
2794- smbiosview\QueryTable.c
2795- smbiosview\EventLogInfo.c
2796- smbiosview\PrintInfo.c
2797- smbiosview\LibSmbiosView.c
2798- smbiosview\smbiosview.c
2799- smbiosview\smbios.c
2800+ smbiosview/SmBiosViewStrings.uni
2801+ smbiosview/QueryTable.c
2802+ smbiosview/EventLogInfo.c
2803+ smbiosview/PrintInfo.c
2804+ smbiosview/LibSmbiosView.c
2805+ smbiosview/smbiosview.c
2806+ smbiosview/smbios.c
2807
2808- stall\stallStrings.uni
2809- stall\stall.c
2810+ stall/stallStrings.uni
2811+ stall/stall.c
2812
2813- telnetmgmt\TelnetMgmtStrings.uni
2814- telnetmgmt\TelnetMgmt.c
2815+ telnetmgmt/TelnetMgmtStrings.uni
2816+ telnetmgmt/TelnetMgmt.c
2817
2818- tzone\TZoneStrings.uni
2819- tzone\tzone.c
2820+ tzone/TZoneStrings.uni
2821+ tzone/tzone.c
2822
2823 [sources.ia32]
2824- ver\ia32\ver32.c
2825- Library\ia32\math.c
2826- Library\ia32\initplat.c
2827+ ver/IA32/ver32.c
2828+ Library/IA32/math.c
2829+ Library/IA32/initplat.c
2830
2831 [sources.ipf]
2832- ver\ipf\ver64.c
2833- Library\ipf\math.c
2834- Library\ipf\initplat.c
2835- Library\ipf\palproc.s
2836- Library\ipf\salpal.c
2837+ ver/IPF/ver64.c
2838+ Library/IPF/math.c
2839+ Library/IPF/initplat.c
2840+ Library/IPF/palproc.s
2841+ Library/IPF/salpal.c
2842
2843 [sources.EBC]
2844- ver\ebc\verEbc.c
2845- Library\EBC\math.c
2846- Library\EBC\initplat.c
2847+ ver/ebc/verEbc.c
2848+ Library/Ebc/math.c
2849+ Library/Ebc/initplat.c
2850
2851 [sources.x64]
2852- ver\ia32\ver32.c
2853- Library\ipf\math.c
2854- Library\ia32\initplat.c
2855+ ver/IA32/ver32.c
2856+ Library/IPF/math.c
2857+ Library/IA32/initplat.c
2858+
2859+[sources.ARM]
2860+ ver/ia32/ver32.c
2861+ Library/IPF/math.c
2862+ Library/IA32/initplat.c
2863+
2864+[sources.AARCH64]
2865+ ver/ia32/ver32.c
2866+ Library/IPF/math.c
2867+ Library/IA32/initplat.c
2868
2869 [includes.common]
2870 .
2871- .\Inc
2872- .\ver
2873- .\Library
2874- $(EDK_SOURCE)\Foundation
2875- $(EDK_SOURCE)\Foundation\Include
2876- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
2877- $(EDK_SOURCE)\Foundation\Efi
2878- $(EDK_SOURCE)\Foundation\Efi\Include
2879- $(EDK_SOURCE)\Foundation\FrameWork
2880- $(EDK_SOURCE)\Foundation\FrameWork\Include
2881- $(EDK_SOURCE)\Foundation\Core\Dxe
2882- $(EDK_SOURCE)\Foundation\Library\Dxe\Include
2883+ ./Inc
2884+ ./ver
2885+ ./Library
2886+ $(EDK_SOURCE)/Foundation
2887+ $(EDK_SOURCE)/Foundation/Include
2888+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
2889+ $(EDK_SOURCE)/Foundation/Efi
2890+ $(EDK_SOURCE)/Foundation/Efi/Include
2891+ $(EDK_SOURCE)/Foundation/FrameWork
2892+ $(EDK_SOURCE)/Foundation/FrameWork/Include
2893+ $(EDK_SOURCE)/Foundation/Core/Dxe
2894+ $(EDK_SOURCE)/Foundation/Library/Dxe/Include
2895 $(DEST_DIR)
2896
2897 [libraries.common]
2898@@ -341,16 +351,18 @@ COMPONENT_TYPE = APPLICATION
2899 # we will specify some additional DEFINEs on the compile command line.
2900 #
2901 [nmake.common]
2902- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
2903 IMAGE_ENTRY_POINT=InitializeShell
2904- C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_MONOSHELL /DEFI_FULLSHELL
2905+
2906+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
2907+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
2908 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
2909 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
2910+ C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_MONOSHELL /DEFI_FULLSHELL
2911+
2912+[nmake.ARM, nmake.AARCH64]
2913+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_MONOSHELL -DEFI_FULLSHELL
2914
2915 [nmake.ebc]
2916 EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DEFI_MONOSHELL /DEFI_FULLSHELL
2917 EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
2918 EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
2919-
2920-
2921-
2922\ No newline at end of file
2923diff --git a/SmbiosView/EventLogInfo.c b/SmbiosView/EventLogInfo.c
2924index 7f9b726..33e3549 100644
2925--- a/SmbiosView/EventLogInfo.c
2926+++ b/SmbiosView/EventLogInfo.c
2927@@ -25,7 +25,7 @@ Revision History
2928 #include "PrintInfo.h"
2929 #include "QueryTable.h"
2930 #include "EventLogInfo.h"
2931-#include "smbios.h"
2932+#include "Smbios.h"
2933 #include STRING_DEFINES_FILE
2934
2935 VOID
2936diff --git a/SmbiosView/EventLogInfo.h b/SmbiosView/EventLogInfo.h
2937index d1591c0..ca58380 100644
2938--- a/SmbiosView/EventLogInfo.h
2939+++ b/SmbiosView/EventLogInfo.h
2940@@ -85,3 +85,4 @@ DisplaySysEventLogData (
2941 );
2942
2943 #endif
2944+
2945diff --git a/SmbiosView/LibSmbios.h b/SmbiosView/LibSmbios.h
2946index b13fd6b..c2e6b5e 100644
2947--- a/SmbiosView/LibSmbios.h
2948+++ b/SmbiosView/LibSmbios.h
2949@@ -642,3 +642,4 @@ LibGetSmbiosSystemGuidAndSerialNumber (
2950
2951
2952 #endif
2953+
2954diff --git a/SmbiosView/LibSmbiosView.c b/SmbiosView/LibSmbiosView.c
2955index d31ed01..f1438bc 100644
2956--- a/SmbiosView/LibSmbiosView.c
2957+++ b/SmbiosView/LibSmbiosView.c
2958@@ -22,10 +22,10 @@ Revision History
2959 --*/
2960
2961 #include "EfiShellLib.h"
2962-#include "LIbSmbios.h"
2963+#include "LibSmbios.h"
2964 #include "LibSmbiosView.h"
2965 #include "smbiosview.h"
2966-#include "smbios.h"
2967+#include "Smbios.h"
2968 #include STRING_DEFINES_FILE
2969
2970 STATIC UINT8 mInit = 0;
2971@@ -62,7 +62,7 @@ Returns:
2972 //
2973 // Get SMBIOS table from System Configure table
2974 //
2975- Status = LibGetSystemConfigurationTable (&gEfiSmbiosTableGuid, &mSmbiosTable);
2976+ Status = LibGetSystemConfigurationTable (&gEfiSmbiosTableGuid, (VOID**)&mSmbiosTable);
2977
2978 if (mSmbiosTable == NULL) {
2979 PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_CANNOT_GET_TABLE), HiiHandle);
2980@@ -110,13 +110,13 @@ LibSmbiosGetEPS (
2981
2982 VOID
2983 LibSmbiosGetStructHead (
2984- SMBIOS_STRUCTURE_POINTER *pHead
2985+ SMBIOS_STRUCTURE_POINTER **pHead
2986 )
2987 {
2988 //
2989 // return SMBIOS structure table address
2990 //
2991- pHead = mSmbiosStruct;
2992+ *pHead = mSmbiosStruct;
2993 }
2994
2995 EFI_STATUS
2996diff --git a/SmbiosView/LibSmbiosView.h b/SmbiosView/LibSmbiosView.h
2997index d763937..b7f7989 100644
2998--- a/SmbiosView/LibSmbiosView.h
2999+++ b/SmbiosView/LibSmbiosView.h
3000@@ -66,7 +66,7 @@ LibSmbiosGetEPS (
3001
3002 VOID
3003 LibSmbiosGetStructHead (
3004- SMBIOS_STRUCTURE_POINTER *pHead
3005+ SMBIOS_STRUCTURE_POINTER **pHead
3006 );
3007
3008 EFI_STATUS
3009@@ -128,3 +128,4 @@ SmbiosCheckStructure (
3010 );
3011
3012 #endif
3013+
3014diff --git a/SmbiosView/PrintInfo.c b/SmbiosView/PrintInfo.c
3015index ff1f63c..1789ef6 100644
3016--- a/SmbiosView/PrintInfo.c
3017+++ b/SmbiosView/PrintInfo.c
3018@@ -26,7 +26,7 @@ Revision History
3019 #include "LibSmbiosView.h"
3020 #include "QueryTable.h"
3021 #include "EventLogInfo.h"
3022-#include "smbios.h"
3023+#include "Smbios.h"
3024 #include STRING_DEFINES_FILE
3025
3026 //
3027diff --git a/SmbiosView/PrintInfo.h b/SmbiosView/PrintInfo.h
3028index 608dfb1..10faf21 100644
3029--- a/SmbiosView/PrintInfo.h
3030+++ b/SmbiosView/PrintInfo.h
3031@@ -199,3 +199,4 @@ DisplaySPSCharacteristics (
3032 );
3033
3034 #endif
3035+
3036diff --git a/SmbiosView/QueryTable.c b/SmbiosView/QueryTable.c
3037index 4570938..1d9d60f 100644
3038--- a/SmbiosView/QueryTable.c
3039+++ b/SmbiosView/QueryTable.c
3040@@ -23,7 +23,7 @@ Revision History
3041 #include "EfiShellLib.h"
3042 #include "QueryTable.h"
3043 #include "PrintInfo.h"
3044-#include "smbios.h"
3045+#include "Smbios.h"
3046
3047 #include STRING_DEFINES_FILE
3048
3049diff --git a/SmbiosView/QueryTable.h b/SmbiosView/QueryTable.h
3050index 727a053..ceb02fe 100644
3051--- a/SmbiosView/QueryTable.h
3052+++ b/SmbiosView/QueryTable.h
3053@@ -437,3 +437,4 @@ DisplayIPMIDIBMCInterfaceType (
3054 );
3055
3056 #endif
3057+
3058diff --git a/SmbiosView/Smbios.h b/SmbiosView/Smbios.h
3059index 8a91b9e..15eb89c 100644
3060--- a/SmbiosView/Smbios.h
3061+++ b/SmbiosView/Smbios.h
3062@@ -37,3 +37,4 @@ extern EFI_HII_HANDLE HiiHandle;
3063
3064
3065 #endif
3066+
3067diff --git a/SmbiosView/Smbiosview.inf b/SmbiosView/Smbiosview.inf
3068index f9e8c0b..d35b669 100644
3069--- a/SmbiosView/Smbiosview.inf
3070+++ b/SmbiosView/Smbiosview.inf
3071@@ -25,7 +25,7 @@ FILE_GUID = 0F4C0280-B581-4940-AF19-D0CB5559CC95
3072 COMPONENT_TYPE = APPLICATION
3073
3074 [sources.common]
3075- ..\ShCommonStrings.uni
3076+ ../ShCommonStrings.uni
3077 SmBiosViewStrings.uni
3078 QueryTable.c
3079 QueryTable.h
3080@@ -43,19 +43,19 @@ COMPONENT_TYPE = APPLICATION
3081
3082 [includes.common]
3083 .
3084- ..\Inc
3085- ..\Library
3086- $(EDK_SOURCE)\Foundation
3087- $(EDK_SOURCE)\Foundation\Include
3088- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
3089- $(EDK_SOURCE)\Foundation\Efi
3090- $(EDK_SOURCE)\Foundation\Efi\Include
3091- $(EDK_SOURCE)\Foundation\FrameWork
3092- $(EDK_SOURCE)\Foundation\FrameWork\Include
3093- $(EDK_SOURCE)\Foundation\Core\Dxe
3094- $(DEST_DIR)\
3095- $(EFI_SOURCE)\Application\Shell\Inc
3096- $(EFI_SOURCE)\Application\Shell\Library
3097+ ../Inc
3098+ ../Library
3099+ $(EDK_SOURCE)/Foundation
3100+ $(EDK_SOURCE)/Foundation/Include
3101+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
3102+ $(EDK_SOURCE)/Foundation/Efi
3103+ $(EDK_SOURCE)/Foundation/Efi/Include
3104+ $(EDK_SOURCE)/Foundation/FrameWork
3105+ $(EDK_SOURCE)/Foundation/FrameWork/Include
3106+ $(EDK_SOURCE)/Foundation/Core/Dxe
3107+ $(DEST_DIR./
3108+ $(EFI_SOURCE)/Applicatio./Shels/Inc
3109+ $(EFI_SOURCE)/Applicatio./Shels/Library
3110
3111 [libraries.common]
3112 EfiShellLib
3113@@ -70,7 +70,12 @@ COMPONENT_TYPE = APPLICATION
3114
3115 [nmake.common]
3116 IMAGE_ENTRY_POINT=InitializeSmbiosViewApplication
3117+
3118+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
3119 L_PROJ_FLAGS=/align:4096
3120 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
3121 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
3122 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
3123+
3124+[nmake.ARM, nmake.AARCH64]
3125+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
3126diff --git a/SmbiosView/smbiosview.c b/SmbiosView/smbiosview.c
3127index 13b4fb7..79716d3 100644
3128--- a/SmbiosView/smbiosview.c
3129+++ b/SmbiosView/smbiosview.c
3130@@ -26,7 +26,7 @@ Revision History
3131 #include "smbiosview.h"
3132 #include "PrintInfo.h"
3133 #include "QueryTable.h"
3134-#include "smbios.h"
3135+#include "Smbios.h"
3136
3137 extern UINT8 STRING_ARRAY_NAME[];
3138
3139@@ -88,7 +88,7 @@ SHELL_VAR_CHECK_ITEM SmbiosviewCheckList[] = {
3140 NULL,
3141 0,
3142 0,
3143- 0
3144+ (SHELL_VAR_CHECK_FLAG_TYPE)0
3145 }
3146 };
3147
3148diff --git a/SmbiosView/smbiosview.h b/SmbiosView/smbiosview.h
3149index dd65bc1..2101551 100644
3150--- a/SmbiosView/smbiosview.h
3151+++ b/SmbiosView/smbiosview.h
3152@@ -84,3 +84,4 @@ GetShowTypeString (
3153 extern UINT8 gShowType;
3154
3155 #endif
3156+
3157diff --git a/TelnetMgmt/TelnetMgmt.c b/TelnetMgmt/TelnetMgmt.c
3158index 9d779df..04088d1 100644
3159--- a/TelnetMgmt/TelnetMgmt.c
3160+++ b/TelnetMgmt/TelnetMgmt.c
3161@@ -32,7 +32,7 @@ extern UINT8 STRING_ARRAY_NAME[];
3162 //
3163 #include STRING_DEFINES_FILE
3164
3165-EFI_HII_HANDLE HiiHandle;
3166+STATIC EFI_HII_HANDLE HiiHandle;
3167 EFI_GUID EfiTelnetMgmtGuid = EFI_TELNETMGMT_GUID;
3168 EFI_GUID mEfiTelnetServerGuid = EFI_TELNET_SERVER_PROTOCOL_GUID;
3169 SHELL_VAR_CHECK_ITEM TelnetmgmtCheckList[] = {
3170@@ -58,7 +58,7 @@ SHELL_VAR_CHECK_ITEM TelnetmgmtCheckList[] = {
3171 NULL,
3172 0,
3173 0,
3174- 0
3175+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
3176 }
3177 };
3178
3179diff --git a/TelnetMgmt/TelnetMgmt.h b/TelnetMgmt/TelnetMgmt.h
3180index 224fc3b..ed3c2f2 100644
3181--- a/TelnetMgmt/TelnetMgmt.h
3182+++ b/TelnetMgmt/TelnetMgmt.h
3183@@ -29,4 +29,4 @@ Revision History
3184 0x55d41b9a, 0x954d, 0x4fbb, 0x8d, 0x6d, 0x24, 0x75, 0xf5, 0x30, 0x9d, 0x37 \
3185 }
3186
3187-#endif
3188\ No newline at end of file
3189+#endif
3190diff --git a/TelnetMgmt/TelnetMgmt.inf b/TelnetMgmt/TelnetMgmt.inf
3191index ad8b8bd..d2d9edb 100644
3192--- a/TelnetMgmt/TelnetMgmt.inf
3193+++ b/TelnetMgmt/TelnetMgmt.inf
3194@@ -25,23 +25,23 @@ FILE_GUID = 0C6282F4-F575-469d-BD55-7693AAC9D812
3195 COMPONENT_TYPE = APPLICATION
3196
3197 [sources.common]
3198- ..\ShCommonStrings.uni
3199+ ../ShCommonStrings.uni
3200 TelnetMgmtStrings.uni
3201 TelnetMgmt.c
3202
3203 [includes.common]
3204 .
3205- ..\Inc
3206- ..\Library
3207- $(EDK_SOURCE)\Foundation
3208- $(EDK_SOURCE)\Foundation\Include
3209- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
3210- $(EDK_SOURCE)\Foundation\Efi
3211- $(EDK_SOURCE)\Foundation\Efi\Include
3212- $(EDK_SOURCE)\Foundation\FrameWork
3213- $(EDK_SOURCE)\Foundation\FrameWork\Include
3214- $(EDK_SOURCE)\Foundation\Core\Dxe
3215- $(DEST_DIR)\
3216+ ../Inc
3217+ ../Library
3218+ $(EDK_SOURCE)/Foundation
3219+ $(EDK_SOURCE)/Foundation/Include
3220+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
3221+ $(EDK_SOURCE)/Foundation/Efi
3222+ $(EDK_SOURCE)/Foundation/Efi/Include
3223+ $(EDK_SOURCE)/Foundation/FrameWork
3224+ $(EDK_SOURCE)/Foundation/FrameWork/Include
3225+ $(EDK_SOURCE)/Foundation/Core/Dxe
3226+ $(DEST_DIR./
3227
3228 [libraries.common]
3229 EfiShellLib
3230@@ -55,6 +55,11 @@ COMPONENT_TYPE = APPLICATION
3231
3232 [nmake.common]
3233 IMAGE_ENTRY_POINT=InitializeTelnetMgmt
3234+
3235+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
3236 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
3237 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
3238 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
3239+
3240+[nmake.ARM, nmake.AARCH64]
3241+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
3242diff --git a/TelnetMgmt/TelnetServer.h b/TelnetMgmt/TelnetServer.h
3243index 5eca179..8e0610f 100644
3244--- a/TelnetMgmt/TelnetServer.h
3245+++ b/TelnetMgmt/TelnetServer.h
3246@@ -81,3 +81,4 @@ typedef struct _EFI_TELNET_SERVER_PROTOCOL {
3247 extern EFI_GUID gEfiTelnetServerGuid;
3248
3249 #endif
3250+
3251diff --git a/attrib/attrib.c b/attrib/attrib.c
3252index 3599d6d..6d1e677 100644
3253--- a/attrib/attrib.c
3254+++ b/attrib/attrib.c
3255@@ -57,7 +57,7 @@ AttribFile (
3256 //
3257 // Global Variables
3258 //
3259-EFI_HII_HANDLE HiiHandle;
3260+STATIC EFI_HII_HANDLE HiiHandle;
3261 EFI_GUID EfiAttribGuid = EFI_ATTRIB_GUID;
3262 SHELL_VAR_CHECK_ITEM AttribCheckList[] = {
3263 {
3264@@ -124,7 +124,7 @@ SHELL_VAR_CHECK_ITEM AttribCheckList[] = {
3265 NULL,
3266 0,
3267 0,
3268- 0
3269+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
3270 }
3271 };
3272
3273@@ -438,7 +438,7 @@ Returns:
3274 //
3275 Info = Arg->Info;
3276 if (Add || Remove) {
3277- Info->Attribute = Info->Attribute & (~Remove) | Add;
3278+ Info->Attribute = (Info->Attribute & (~Remove)) | Add;
3279 Status = Arg->Handle->SetInfo (
3280 Arg->Handle,
3281 &gEfiFileInfoGuid,
3282diff --git a/attrib/attrib.h b/attrib/attrib.h
3283index 69ebd2f..c40c2df 100644
3284--- a/attrib/attrib.h
3285+++ b/attrib/attrib.h
3286@@ -29,4 +29,5 @@ Revision History
3287 0xcd691c77, 0xfc45, 0x4d7b, 0xb8, 0x92, 0x92, 0xa, 0x86, 0x2d, 0x67, 0xdc \
3288 }
3289
3290-#endif
3291\ No newline at end of file
3292+#endif
3293+
3294diff --git a/attrib/attrib.inf b/attrib/attrib.inf
3295index 38cc094..a35f1a7 100644
3296--- a/attrib/attrib.inf
3297+++ b/attrib/attrib.inf
3298@@ -41,24 +41,24 @@ COMPONENT_TYPE = APPLICATION
3299
3300 [sources.common]
3301 AttribStrings.uni
3302- ..\ShCommonStrings.uni
3303+ ../ShCommonStrings.uni
3304 attrib.c
3305 attrib.h
3306
3307
3308 [includes.common]
3309 .
3310- ..\Inc
3311- ..\Library
3312- $(EDK_SOURCE)\Foundation
3313- $(EDK_SOURCE)\Foundation\Include
3314- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
3315- $(EDK_SOURCE)\Foundation\Efi
3316- $(EDK_SOURCE)\Foundation\Efi\Include
3317- $(EDK_SOURCE)\Foundation\FrameWork
3318- $(EDK_SOURCE)\Foundation\FrameWork\Include
3319- $(EDK_SOURCE)\Foundation\Core\Dxe
3320- $(DEST_DIR)\
3321+ ../Inc
3322+ ../Library
3323+ $(EDK_SOURCE)/Foundation
3324+ $(EDK_SOURCE)/Foundation/Include
3325+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
3326+ $(EDK_SOURCE)/Foundation/Efi
3327+ $(EDK_SOURCE)/Foundation/Efi/Include
3328+ $(EDK_SOURCE)/Foundation/FrameWork
3329+ $(EDK_SOURCE)/Foundation/FrameWork/Include
3330+ $(EDK_SOURCE)/Foundation/Core/Dxe
3331+ $(DEST_DIR./
3332
3333 [libraries.common]
3334 EfiShellLib
3335@@ -73,7 +73,11 @@ COMPONENT_TYPE = APPLICATION
3336
3337 [nmake.common]
3338 IMAGE_ENTRY_POINT=InitializeAttrib
3339+
3340+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
3341 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
3342 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
3343 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
3344
3345+[nmake.ARM, nmake.AARCH64]
3346+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
3347diff --git a/cls/cls.c b/cls/cls.c
3348index 572cc82..bd9826a 100644
3349--- a/cls/cls.c
3350+++ b/cls/cls.c
3351@@ -30,7 +30,7 @@ extern UINT8 STRING_ARRAY_NAME[];
3352 //
3353 #include STRING_DEFINES_FILE
3354
3355-EFI_HII_HANDLE HiiHandle;
3356+STATIC EFI_HII_HANDLE HiiHandle;
3357 EFI_GUID EfiClsGuid = EFI_CLS_GUID;
3358 SHELL_VAR_CHECK_ITEM ClsCheckList[] = {
3359 {
3360@@ -49,7 +49,7 @@ SHELL_VAR_CHECK_ITEM ClsCheckList[] = {
3361 NULL,
3362 0,
3363 0,
3364- 0
3365+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
3366 }
3367 };
3368
3369diff --git a/cls/cls.h b/cls/cls.h
3370index eab21eb..31361c7 100644
3371--- a/cls/cls.h
3372+++ b/cls/cls.h
3373@@ -36,3 +36,4 @@ Revision History
3374 }
3375
3376 #endif
3377+
3378diff --git a/cls/cls.inf b/cls/cls.inf
3379index 1e5ef66..70e676a 100644
3380--- a/cls/cls.inf
3381+++ b/cls/cls.inf
3382@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
3383
3384
3385 [sources.common]
3386- ..\ShCommonStrings.uni
3387+ ../ShCommonStrings.uni
3388 ClsStrings.uni
3389 Cls.c
3390 Cls.h
3391
3392 [includes.common]
3393 .
3394- ..\Inc
3395- ..\Library
3396- $(EDK_SOURCE)\Foundation
3397- $(EDK_SOURCE)\Foundation\Include
3398- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
3399- $(EDK_SOURCE)\Foundation\Efi
3400- $(EDK_SOURCE)\Foundation\Efi\Include
3401- $(EDK_SOURCE)\Foundation\FrameWork
3402- $(EDK_SOURCE)\Foundation\FrameWork\Include
3403- $(EDK_SOURCE)\Foundation\Core\Dxe
3404- $(DEST_DIR)\
3405+ ../Inc
3406+ ../Library
3407+ $(EDK_SOURCE)/Foundation
3408+ $(EDK_SOURCE)/Foundation/Include
3409+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
3410+ $(EDK_SOURCE)/Foundation/Efi
3411+ $(EDK_SOURCE)/Foundation/Efi/Include
3412+ $(EDK_SOURCE)/Foundation/FrameWork
3413+ $(EDK_SOURCE)/Foundation/FrameWork/Include
3414+ $(EDK_SOURCE)/Foundation/Core/Dxe
3415+ $(DEST_DIR./
3416
3417 [libraries.common]
3418 EfiShellLib
3419@@ -72,7 +72,12 @@ COMPONENT_TYPE = APPLICATION
3420
3421 [nmake.common]
3422 IMAGE_ENTRY_POINT=InitializeCls
3423+
3424+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
3425 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
3426 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
3427 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
3428
3429+[nmake.ARM, nmake.AARCH64]
3430+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
3431+
3432diff --git a/comp/comp.c b/comp/comp.c
3433index 734bbe7..888f53f 100644
3434--- a/comp/comp.c
3435+++ b/comp/comp.c
3436@@ -50,7 +50,7 @@ SHELL_VAR_CHECK_ITEM CompCheckList[] = {
3437 NULL,
3438 0,
3439 0,
3440- 0
3441+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
3442 }
3443 };
3444
3445diff --git a/comp/comp.h b/comp/comp.h
3446index 4dd667c..4d6c647 100644
3447--- a/comp/comp.h
3448+++ b/comp/comp.h
3449@@ -29,4 +29,4 @@ Revision History
3450 0x7761e2c2, 0x7297, 0x434d, 0xb6, 0x52, 0xa9, 0x76, 0x91, 0xb8, 0x66, 0xf3 \
3451 }
3452
3453-#endif
3454\ No newline at end of file
3455+#endif
3456diff --git a/comp/comp.inf b/comp/comp.inf
3457index 7a525e4..86c464d 100644
3458--- a/comp/comp.inf
3459+++ b/comp/comp.inf
3460@@ -28,21 +28,21 @@ COMPONENT_TYPE = APPLICATION
3461 CompStrings.uni
3462 comp.c
3463 comp.h
3464-..\ShCommonStrings.uni
3465+../ShCommonStrings.uni
3466
3467 [includes.common]
3468 .
3469- ..\Inc
3470- ..\Library
3471- $(EDK_SOURCE)\Foundation
3472- $(EDK_SOURCE)\Foundation\Include
3473- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
3474- $(EDK_SOURCE)\Foundation\Efi
3475- $(EDK_SOURCE)\Foundation\Efi\Include
3476- $(EDK_SOURCE)\Foundation\FrameWork
3477- $(EDK_SOURCE)\Foundation\FrameWork\Include
3478- $(EDK_SOURCE)\Foundation\Core\Dxe
3479- $(DEST_DIR)\
3480+ ../Inc
3481+ ../Library
3482+ $(EDK_SOURCE)/Foundation
3483+ $(EDK_SOURCE)/Foundation/Include
3484+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
3485+ $(EDK_SOURCE)/Foundation/Efi
3486+ $(EDK_SOURCE)/Foundation/Efi/Include
3487+ $(EDK_SOURCE)/Foundation/FrameWork
3488+ $(EDK_SOURCE)/Foundation/FrameWork/Include
3489+ $(EDK_SOURCE)/Foundation/Core/Dxe
3490+ $(DEST_DIR./
3491
3492 [libraries.common]
3493 EfiShellLib
3494@@ -61,11 +61,16 @@ comp.h
3495 # we will specify some additional DEFINEs on the compile command line.
3496 #
3497 [nmake.common]
3498- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
3499 IMAGE_ENTRY_POINT=InitializeComp
3500+
3501+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
3502+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
3503 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
3504 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
3505 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
3506
3507+[nmake.ARM, nmake.AARCH64]
3508+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
3509+
3510
3511
3512\ No newline at end of file
3513diff --git a/cp/cp.c b/cp/cp.c
3514index 25ac3cf..9299af4 100644
3515--- a/cp/cp.c
3516+++ b/cp/cp.c
3517@@ -66,7 +66,7 @@ SHELL_VAR_CHECK_ITEM CpCheckList[] = {
3518 NULL,
3519 0,
3520 0,
3521- 0
3522+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
3523 }
3524 };
3525
3526@@ -578,7 +578,7 @@ Returns:
3527 //
3528 if (SrcArg->Status == EFI_SUCCESS &&
3529 (SrcArg->Info->Attribute & EFI_FILE_DIRECTORY) &&
3530- (DstArg->Status == EFI_SUCCESS && (DstArg->Info->Attribute & EFI_FILE_DIRECTORY) || DstMustDir && DstHandle)
3531+ (DstArg->Status == EFI_SUCCESS && ((DstArg->Info->Attribute & EFI_FILE_DIRECTORY) || (DstMustDir && DstHandle)))
3532 ) {
3533 if (StrCmp (SrcFilePath, DstFilePath) == 0) {
3534 PrintToken (STRING_TOKEN (STR_CP_CANNOT_COPY_ITSELF), HiiCpyHandle, L"cp/copy", SrcArg->FullName);
3535@@ -592,7 +592,7 @@ Returns:
3536 // we need to compose a full name of dir\file for the source
3537 //
3538 if (SrcArg->Status == EFI_SUCCESS &&
3539- (DstArg->Status == EFI_SUCCESS && (DstArg->Info->Attribute & EFI_FILE_DIRECTORY) || DstMustDir && DstHandle)) {
3540+ (DstArg->Status == EFI_SUCCESS && ((DstArg->Info->Attribute & EFI_FILE_DIRECTORY) || (DstMustDir && DstHandle)))) {
3541 if (DstFullName) {
3542 FreePool (DstFullName);
3543 }
3544@@ -869,7 +869,6 @@ Returns:
3545 EFI_STATUS Status;
3546 EFI_FILE_INFO *SrcInfo;
3547 EFI_FILE_INFO *DstInfo;
3548- EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *DstVol;
3549 EFI_FILE_SYSTEM_INFO *DstFsInfo;
3550 CHAR16 InputString[10];
3551 UINTN BufSize;
3552@@ -894,7 +893,6 @@ Returns:
3553 SrcInfo = NULL;
3554 DstInfo = NULL;
3555 FileInfo = NULL;
3556- DstVol = NULL;
3557 DstFsInfo = NULL;
3558 InputString[0] = 0;
3559 BufSize = 0;
3560@@ -1789,7 +1787,7 @@ Returns:
3561 //
3562 if (SrcArg->Status == EFI_SUCCESS &&
3563 !(SrcArg->Info->Attribute & EFI_FILE_DIRECTORY) &&
3564- (DstArg->Status == EFI_SUCCESS && (DstArg->Info->Attribute & EFI_FILE_DIRECTORY) || DstDir && DstHandle)
3565+ (DstArg->Status == EFI_SUCCESS && ((DstArg->Info->Attribute & EFI_FILE_DIRECTORY) || (DstDir && DstHandle)))
3566 ) {
3567 if (DstFullName) {
3568 FreePool (DstFullName);
3569diff --git a/cp/cp.h b/cp/cp.h
3570index 338cdaa..89d22dd 100644
3571--- a/cp/cp.h
3572+++ b/cp/cp.h
3573@@ -67,4 +67,5 @@ CPMainProcOld (
3574 IN EFI_SYSTEM_TABLE *SystemTable
3575 );
3576
3577-#endif
3578\ No newline at end of file
3579+#endif
3580+
3581diff --git a/cp/cp.inf b/cp/cp.inf
3582index 714c7bb..160434c 100644
3583--- a/cp/cp.inf
3584+++ b/cp/cp.inf
3585@@ -41,23 +41,23 @@ COMPONENT_TYPE = APPLICATION
3586
3587 [sources.common]
3588 CpStrings.uni
3589- ..\ShCommonStrings.uni
3590+ ../ShCommonStrings.uni
3591 cp.h
3592 cp.c
3593
3594 [includes.common]
3595 .
3596- ..\Inc
3597- ..\Library
3598- $(EDK_SOURCE)\Foundation
3599- $(EDK_SOURCE)\Foundation\Include
3600- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
3601- $(EDK_SOURCE)\Foundation\Efi
3602- $(EDK_SOURCE)\Foundation\Efi\Include
3603- $(EDK_SOURCE)\Foundation\FrameWork
3604- $(EDK_SOURCE)\Foundation\FrameWork\Include
3605- $(EDK_SOURCE)\Foundation\Core\Dxe
3606- $(DEST_DIR)\
3607+ ../Inc
3608+ ../Library
3609+ $(EDK_SOURCE)/Foundation
3610+ $(EDK_SOURCE)/Foundation/Include
3611+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
3612+ $(EDK_SOURCE)/Foundation/Efi
3613+ $(EDK_SOURCE)/Foundation/Efi/Include
3614+ $(EDK_SOURCE)/Foundation/FrameWork
3615+ $(EDK_SOURCE)/Foundation/FrameWork/Include
3616+ $(EDK_SOURCE)/Foundation/Core/Dxe
3617+ $(DEST_DIR./
3618
3619 [libraries.common]
3620 EfiShellLib
3621@@ -72,7 +72,12 @@ COMPONENT_TYPE = APPLICATION
3622
3623 [nmake.common]
3624 IMAGE_ENTRY_POINT=InitializeCP
3625+
3626+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
3627 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
3628 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
3629 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
3630
3631+[nmake.ARM, nmake.AARCH64]
3632+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
3633+
3634diff --git a/date/date.c b/date/date.c
3635index fb2f765..0416abe 100644
3636--- a/date/date.c
3637+++ b/date/date.c
3638@@ -53,8 +53,8 @@ STATIC
3639 BOOLEAN
3640 GetNumber (
3641 IN CHAR16 *Str,
3642- IN OUT INTN *Position,
3643- IN OUT INTN *Number,
3644+ IN OUT UINTN *Position,
3645+ IN OUT UINTN *Number,
3646 IN BOOLEAN EndNum
3647 );
3648
3649@@ -92,7 +92,7 @@ SHELL_VAR_CHECK_ITEM DateCheckList[] = {
3650 NULL,
3651 0,
3652 0,
3653- 0
3654+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
3655 }
3656 };
3657
3658@@ -330,8 +330,8 @@ STATIC
3659 BOOLEAN
3660 GetNumber (
3661 IN CHAR16 *Str,
3662- IN OUT INTN *Position,
3663- IN OUT INTN *Number,
3664+ IN OUT UINTN *Position,
3665+ IN OUT UINTN *Number,
3666 IN BOOLEAN EndNum
3667 )
3668 {
3669diff --git a/date/date.h b/date/date.h
3670index c95ac4d..d327c33 100644
3671--- a/date/date.h
3672+++ b/date/date.h
3673@@ -32,3 +32,4 @@ Revision History
3674 }
3675
3676 #endif
3677+
3678diff --git a/date/date.inf b/date/date.inf
3679index 2c40f72..affbb73 100644
3680--- a/date/date.inf
3681+++ b/date/date.inf
3682@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
3683
3684
3685 [sources.common]
3686- ..\ShCommonStrings.uni
3687+ ../ShCommonStrings.uni
3688 DateStrings.uni
3689 Date.c
3690 Date.h
3691
3692 [includes.common]
3693 .
3694- ..\Inc
3695- ..\Library
3696- $(EDK_SOURCE)\Foundation
3697- $(EDK_SOURCE)\Foundation\Include
3698- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
3699- $(EDK_SOURCE)\Foundation\Efi
3700- $(EDK_SOURCE)\Foundation\Efi\Include
3701- $(EDK_SOURCE)\Foundation\FrameWork
3702- $(EDK_SOURCE)\Foundation\FrameWork\Include
3703- $(EDK_SOURCE)\Foundation\Core\Dxe
3704- $(DEST_DIR)\
3705+ ../Inc
3706+ ../Library
3707+ $(EDK_SOURCE)/Foundation
3708+ $(EDK_SOURCE)/Foundation/Include
3709+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
3710+ $(EDK_SOURCE)/Foundation/Efi
3711+ $(EDK_SOURCE)/Foundation/Efi/Include
3712+ $(EDK_SOURCE)/Foundation/FrameWork
3713+ $(EDK_SOURCE)/Foundation/FrameWork/Include
3714+ $(EDK_SOURCE)/Foundation/Core/Dxe
3715+ $(DEST_DIR./
3716
3717 [libraries.common]
3718 EfiShellLib
3719@@ -71,7 +71,12 @@ COMPONENT_TYPE = APPLICATION
3720
3721 [nmake.common]
3722 IMAGE_ENTRY_POINT=InitializeDate
3723+
3724+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
3725 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
3726 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
3727 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
3728
3729+[nmake.ARM, nmake.AARCH64]
3730+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
3731+
3732diff --git a/dblk/dblk.c b/dblk/dblk.c
3733index 3019627..21c841e 100644
3734--- a/dblk/dblk.c
3735+++ b/dblk/dblk.c
3736@@ -52,7 +52,7 @@ SHELL_VAR_CHECK_ITEM DblkCheckList[] = {
3737 NULL,
3738 0,
3739 0,
3740- 0
3741+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
3742 }
3743 };
3744
3745diff --git a/dblk/dblk.h b/dblk/dblk.h
3746index 0341aeb..d7ec371 100644
3747--- a/dblk/dblk.h
3748+++ b/dblk/dblk.h
3749@@ -168,3 +168,4 @@ DblkStructsPrint (
3750 extern EFI_HII_HANDLE HiiDblkHandle;
3751
3752 #endif
3753+
3754diff --git a/dblk/dblk.inf b/dblk/dblk.inf
3755index f15392c..3c5dd45 100644
3756--- a/dblk/dblk.inf
3757+++ b/dblk/dblk.inf
3758@@ -26,23 +26,23 @@ COMPONENT_TYPE = APPLICATION
3759
3760 [sources.common]
3761 DblkStrings.uni
3762- ..\ShCommonStrings.uni
3763+ ../ShCommonStrings.uni
3764 dblk.c
3765 efidump.c
3766
3767 [includes.common]
3768 .
3769- ..\Inc
3770- ..\Library
3771- $(EDK_SOURCE)\Foundation
3772- $(EDK_SOURCE)\Foundation\Include
3773- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
3774- $(EDK_SOURCE)\Foundation\Efi
3775- $(EDK_SOURCE)\Foundation\Efi\Include
3776- $(EDK_SOURCE)\Foundation\FrameWork
3777- $(EDK_SOURCE)\Foundation\FrameWork\Include
3778- $(EDK_SOURCE)\Foundation\Core\Dxe
3779- $(DEST_DIR)\
3780+ ../Inc
3781+ ../Library
3782+ $(EDK_SOURCE)/Foundation
3783+ $(EDK_SOURCE)/Foundation/Include
3784+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
3785+ $(EDK_SOURCE)/Foundation/Efi
3786+ $(EDK_SOURCE)/Foundation/Efi/Include
3787+ $(EDK_SOURCE)/Foundation/FrameWork
3788+ $(EDK_SOURCE)/Foundation/FrameWork/Include
3789+ $(EDK_SOURCE)/Foundation/Core/Dxe
3790+ $(DEST_DIR./
3791
3792 [libraries.common]
3793 EfiShellLib
3794@@ -61,11 +61,16 @@ COMPONENT_TYPE = APPLICATION
3795 # we will specify some additional DEFINEs on the compile command line.
3796 #
3797 [nmake.common]
3798- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
3799 IMAGE_ENTRY_POINT=DumpBlockDev
3800+
3801+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
3802+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
3803 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
3804 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
3805 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
3806
3807+[nmake.ARM, nmake.AARCH64]
3808+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
3809+
3810
3811
3812\ No newline at end of file
3813diff --git a/dblk/efidump.c b/dblk/efidump.c
3814index 7fc0337..c18b826 100644
3815--- a/dblk/efidump.c
3816+++ b/dblk/efidump.c
3817@@ -24,7 +24,7 @@ Revision History
3818 --*/
3819
3820 #include "dblk.h"
3821-#include "Efipart.h"
3822+#include "EfiPart.h"
3823 #include "EfiShellLib.h"
3824
3825 #include STRING_DEFINES_FILE
3826@@ -320,13 +320,11 @@ DblkDumpSystemTable (
3827 VOID *AcpiTable;
3828 VOID *Acpi20Table;
3829 VOID *SMBIOSTable;
3830- VOID *SalSystemTable;
3831 VOID *MpsTable;
3832
3833 AcpiTable = NULL;
3834 Acpi20Table = NULL;
3835 SMBIOSTable = NULL;
3836- SalSystemTable = NULL;
3837 MpsTable = NULL;
3838
3839 PrintToken (
3840@@ -352,10 +350,12 @@ DblkDumpSystemTable (
3841 PrintToken (STRING_TOKEN (STR_DEBUG_STD_ERROR_ON), HiiDblkHandle, LibDevicePathToStr (DevicePath));
3842 }
3843
3844- PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiDblkHandle, (UINT64) Tbl.Sys->RuntimeServices);
3845- PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiDblkHandle, (UINT64) Tbl.Sys->BootServices);
3846+ PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiDblkHandle, (UINT64)(UINTN) Tbl.Sys->RuntimeServices);
3847+ PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiDblkHandle, (UINT64)(UINTN) Tbl.Sys->BootServices);
3848
3849 EFI64_CODE (
3850+ VOID *SalSystemTable;
3851+
3852 Status = LibGetSystemConfigurationTable(&gEfiSalSystemTableGuid, &SalSystemTable);
3853 if (!EFI_ERROR(Status)) {
3854 PrintToken (STRING_TOKEN(STR_DEBUG_SAL_SYSTEM_TABLE), HiiDblkHandle, (UINT64)SalSystemTable);
3855@@ -364,22 +364,22 @@ DblkDumpSystemTable (
3856
3857 Status = LibGetSystemConfigurationTable (&gEfiAcpiTableGuid, &AcpiTable);
3858 if (!EFI_ERROR (Status)) {
3859- PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiDblkHandle, (UINT64) AcpiTable);
3860+ PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiDblkHandle, (UINT64)(UINTN) AcpiTable);
3861 }
3862
3863 Status = LibGetSystemConfigurationTable (&gEfiAcpi20TableGuid, &Acpi20Table);
3864 if (!EFI_ERROR (Status)) {
3865- PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiDblkHandle, (UINT64) Acpi20Table);
3866+ PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiDblkHandle, (UINT64)(UINTN) Acpi20Table);
3867 }
3868
3869 Status = LibGetSystemConfigurationTable (&gEfiMpsTableGuid, &MpsTable);
3870 if (!EFI_ERROR (Status)) {
3871- PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiDblkHandle, (UINT64) MpsTable);
3872+ PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiDblkHandle, (UINT64)(UINTN) MpsTable);
3873 }
3874
3875 Status = LibGetSystemConfigurationTable (&gEfiSmbiosTableGuid, &SMBIOSTable);
3876 if (!EFI_ERROR (Status)) {
3877- PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiDblkHandle, (UINT64) SMBIOSTable);
3878+ PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiDblkHandle, (UINT64)(UINTN) SMBIOSTable);
3879 }
3880 }
3881
3882diff --git a/devices/devices.c b/devices/devices.c
3883index bcc8beb..1934ef5 100644
3884--- a/devices/devices.c
3885+++ b/devices/devices.c
3886@@ -36,7 +36,7 @@ extern UINT8 STRING_ARRAY_NAME[];
3887 //
3888 // Global Variables
3889 //
3890-EFI_HII_HANDLE HiiHandle;
3891+STATIC EFI_HII_HANDLE HiiHandle;
3892 EFI_GUID EfiDevicesGuid = EFI_DEVICES_GUID;
3893 SHELL_VAR_CHECK_ITEM DevicesCheckList[] = {
3894 {
3895@@ -61,7 +61,7 @@ SHELL_VAR_CHECK_ITEM DevicesCheckList[] = {
3896 NULL,
3897 0,
3898 0,
3899- 0
3900+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
3901 }
3902 };
3903
3904diff --git a/devices/devices.h b/devices/devices.h
3905index 19e0983..6aff8bf 100644
3906--- a/devices/devices.h
3907+++ b/devices/devices.h
3908@@ -32,3 +32,4 @@ Revision History
3909 0x6fabed98, 0x2a7, 0x46a4, 0x84, 0xd1, 0x76, 0xcd, 0x5c, 0x49, 0x78, 0x74 \
3910 }
3911 #endif
3912+
3913diff --git a/devices/devices.inf b/devices/devices.inf
3914index c380f7d..f9356da 100644
3915--- a/devices/devices.inf
3916+++ b/devices/devices.inf
3917@@ -41,23 +41,23 @@ COMPONENT_TYPE = APPLICATION
3918
3919 [sources.common]
3920 DevicesStrings.uni
3921- ..\ShCommonStrings.uni
3922+ ../ShCommonStrings.uni
3923 devices.c
3924 devices.h
3925
3926 [includes.common]
3927 .
3928- ..\Inc
3929- ..\Library
3930- $(EDK_SOURCE)\Foundation
3931- $(EDK_SOURCE)\Foundation\Include
3932- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
3933- $(EDK_SOURCE)\Foundation\Efi
3934- $(EDK_SOURCE)\Foundation\Efi\Include
3935- $(EDK_SOURCE)\Foundation\FrameWork
3936- $(EDK_SOURCE)\Foundation\FrameWork\Include
3937- $(EDK_SOURCE)\Foundation\Core\Dxe
3938- $(DEST_DIR)\
3939+ ../Inc
3940+ ../Library
3941+ $(EDK_SOURCE)/Foundation
3942+ $(EDK_SOURCE)/Foundation/Include
3943+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
3944+ $(EDK_SOURCE)/Foundation/Efi
3945+ $(EDK_SOURCE)/Foundation/Efi/Include
3946+ $(EDK_SOURCE)/Foundation/FrameWork
3947+ $(EDK_SOURCE)/Foundation/FrameWork/Include
3948+ $(EDK_SOURCE)/Foundation/Core/Dxe
3949+ $(DEST_DIR./
3950
3951 [libraries.common]
3952 EfiShellLib
3953@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
3954
3955 [nmake.common]
3956 IMAGE_ENTRY_POINT=DevicesMain
3957+
3958+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
3959 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
3960 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
3961 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
3962
3963+[nmake.ARM, nmake.AARCH64]
3964+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
3965diff --git a/dmem/MemCommonPart.c b/dmem/MemCommonPart.c
3966index 377da17..c4807a3 100644
3967--- a/dmem/MemCommonPart.c
3968+++ b/dmem/MemCommonPart.c
3969@@ -58,7 +58,7 @@ SHELL_VAR_CHECK_ITEM DmemCheckList[] = {
3970 NULL,
3971 0,
3972 0,
3973- 0
3974+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
3975 }
3976 };
3977
3978@@ -148,7 +148,7 @@ Return:
3979 return EFI_SUCCESS;
3980 }
3981
3982- Address = (AddressStr) ? Xtoi (AddressStr) : (UINT64) SystemTable;
3983+ Address = (AddressStr) ? Xtoi (AddressStr) : (UINT64)(UINTN) SystemTable;
3984 Size = (SizeStr) ? Xtoi (SizeStr) : 512;
3985
3986 //
3987@@ -156,7 +156,7 @@ Return:
3988 //
3989 PrintToken (STRING_TOKEN (STR_DMEM_MEMORY_ADDR), HiiDmemHandle, 2 * sizeof (UINTN), Address, Size);
3990 if (MMIo) {
3991- Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, &PciRootBridgeIo);
3992+ Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID**)&PciRootBridgeIo);
3993 if (EFI_ERROR (Status)) {
3994 PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LOC_PROT_ERR_EX), HiiDmemHandle, L"dmem", L"PciRootBridgeIo");
3995 return Status;
3996@@ -171,7 +171,7 @@ Return:
3997 return Status;
3998 }
3999
4000- PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciIoWidthUint8, Address, Size, Buffer);
4001+ PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciWidthUint8, Address, Size, Buffer);
4002 } else {
4003 Buffer = (UINT8 *) (UINTN) Address;
4004 }
4005@@ -233,7 +233,7 @@ Return:
4006 //
4007 MMIo = FALSE;
4008 AddressStr = SizeStr = NULL;
4009- Address = (UINT64) SystemTable;
4010+ Address = (UINT64)(UINTN) SystemTable;
4011 Size = 512;
4012 RetCode = LibCheckVariables (SI, DmemCheckList, &ChkPck, &Useful);
4013 if (VarCheckOk != RetCode) {
4014@@ -316,7 +316,7 @@ Return:
4015 //
4016 PrintToken (STRING_TOKEN (STR_DMEM_NEW_MEMORY_ADDR), HiiDmemHandle, 2 * sizeof (UINTN), Address, Size);
4017 if (MMIo) {
4018- Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, &PciRootBridgeIo);
4019+ Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID**)&PciRootBridgeIo);
4020 if (EFI_ERROR (Status)) {
4021 PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LOC_PROT_ERR_EX), HiiDmemHandle, L"dmem", L"PciRootBridgeIo");
4022 return Status;
4023@@ -331,7 +331,7 @@ Return:
4024 return Status;
4025 }
4026
4027- PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciIoWidthUint8, Address, Size, Buffer);
4028+ PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciWidthUint8, Address, Size, Buffer);
4029 } else {
4030 Buffer = (UINT8 *) (UINTN) Address;
4031 }
4032diff --git a/dmem/MemCommonPart.h b/dmem/MemCommonPart.h
4033index f57e32a..f094fbb 100644
4034--- a/dmem/MemCommonPart.h
4035+++ b/dmem/MemCommonPart.h
4036@@ -61,4 +61,4 @@ EFIStructsPrint (
4037 IN EFI_BLOCK_IO_PROTOCOL *BlkIo
4038 );
4039
4040-#endif
4041\ No newline at end of file
4042+#endif
4043diff --git a/dmem/debug.h b/dmem/debug.h
4044index 50df0ed..8d5cd4e 100644
4045--- a/dmem/debug.h
4046+++ b/dmem/debug.h
4047@@ -156,3 +156,4 @@ EFIStructsPrint (
4048 extern EFI_HII_HANDLE HiiDmemHandle;
4049
4050 #endif
4051+
4052diff --git a/dmem/dmem.inf b/dmem/dmem.inf
4053index ca0dcaf..acdf279 100644
4054--- a/dmem/dmem.inf
4055+++ b/dmem/dmem.inf
4056@@ -25,7 +25,7 @@ FILE_GUID = 644E259E-FF88-4d31-8092-B99D8777F1C4
4057 COMPONENT_TYPE = APPLICATION
4058
4059 [sources.common]
4060- ..\ShCommonStrings.uni
4061+ ../ShCommonStrings.uni
4062 MemStrings.uni
4063 DebugStrings.uni
4064 mem.c
4065@@ -34,17 +34,17 @@ COMPONENT_TYPE = APPLICATION
4066
4067 [includes.common]
4068 .
4069- ..\Inc
4070- ..\Library
4071- $(EDK_SOURCE)\Foundation
4072- $(EDK_SOURCE)\Foundation\Include
4073- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4074- $(EDK_SOURCE)\Foundation\Efi
4075- $(EDK_SOURCE)\Foundation\Efi\Include
4076- $(EDK_SOURCE)\Foundation\FrameWork
4077- $(EDK_SOURCE)\Foundation\FrameWork\Include
4078- $(EDK_SOURCE)\Foundation\Core\Dxe
4079- $(DEST_DIR)\
4080+ ../Inc
4081+ ../Library
4082+ $(EDK_SOURCE)/Foundation
4083+ $(EDK_SOURCE)/Foundation/Include
4084+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4085+ $(EDK_SOURCE)/Foundation/Efi
4086+ $(EDK_SOURCE)/Foundation/Efi/Include
4087+ $(EDK_SOURCE)/Foundation/FrameWork
4088+ $(EDK_SOURCE)/Foundation/FrameWork/Include
4089+ $(EDK_SOURCE)/Foundation/Core/Dxe
4090+ $(DEST_DIR./
4091
4092 [libraries.common]
4093 EfiShellLib
4094@@ -64,9 +64,13 @@ COMPONENT_TYPE = APPLICATION
4095 # we will specify some additional DEFINEs on the compile command line.
4096 #
4097 [nmake.common]
4098- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
4099 IMAGE_ENTRY_POINT=DumpMem
4100+
4101+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
4102+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
4103 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
4104 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
4105 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
4106
4107+[nmake.ARM, nmake.AARCH64]
4108+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
4109diff --git a/dmem/efidump.c b/dmem/efidump.c
4110index 051f6a0..11526f2 100644
4111--- a/dmem/efidump.c
4112+++ b/dmem/efidump.c
4113@@ -24,7 +24,7 @@ Revision History
4114 --*/
4115
4116 #include "debug.h"
4117-#include "Efipart.h"
4118+#include "EfiPart.h"
4119 #include "EfiShellLib.h"
4120
4121 #include STRING_DEFINES_FILE
4122@@ -320,13 +320,11 @@ DumpSystemTable (
4123 VOID *AcpiTable;
4124 VOID *Acpi20Table;
4125 VOID *SMBIOSTable;
4126- VOID *SalSystemTable;
4127 VOID *MpsTable;
4128
4129 AcpiTable = NULL;
4130 Acpi20Table = NULL;
4131 SMBIOSTable = NULL;
4132- SalSystemTable = NULL;
4133 MpsTable = NULL;
4134
4135 PrintToken (
4136@@ -352,11 +350,13 @@ DumpSystemTable (
4137 PrintToken (STRING_TOKEN (STR_DEBUG_STD_ERROR_ON), HiiDmemHandle, LibDevicePathToStr (DevicePath));
4138 }
4139
4140- PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiDmemHandle, (UINT64) Tbl.Sys->RuntimeServices);
4141- PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiDmemHandle, (UINT64) Tbl.Sys->BootServices);
4142+ PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiDmemHandle, (UINT64)(UINTN) Tbl.Sys->RuntimeServices);
4143+ PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiDmemHandle, (UINT64)(UINTN) Tbl.Sys->BootServices);
4144
4145 EFI64_CODE (
4146- Status = LibGetSystemConfigurationTable(&gEfiSalSystemTableGuid, &SalSystemTable);
4147+ VOID *SalSystemTable;
4148+
4149+ Status = LibGetSystemConfigurationTable(&gEfiSalSystemTableGuid, &SalSystemTable);
4150 if (!EFI_ERROR(Status)) {
4151 PrintToken (STRING_TOKEN(STR_DEBUG_SAL_SYSTEM_TABLE), HiiDmemHandle, (UINT64)SalSystemTable);
4152 }
4153@@ -364,22 +364,22 @@ DumpSystemTable (
4154
4155 Status = LibGetSystemConfigurationTable (&gEfiAcpiTableGuid, &AcpiTable);
4156 if (!EFI_ERROR (Status)) {
4157- PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiDmemHandle, (UINT64) AcpiTable);
4158+ PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiDmemHandle, (UINT64)(UINTN) AcpiTable);
4159 }
4160
4161 Status = LibGetSystemConfigurationTable (&gEfiAcpi20TableGuid, &Acpi20Table);
4162 if (!EFI_ERROR (Status)) {
4163- PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiDmemHandle, (UINT64) Acpi20Table);
4164+ PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiDmemHandle, (UINT64)(UINTN) Acpi20Table);
4165 }
4166
4167 Status = LibGetSystemConfigurationTable (&gEfiMpsTableGuid, &MpsTable);
4168 if (!EFI_ERROR (Status)) {
4169- PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiDmemHandle, (UINT64) MpsTable);
4170+ PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiDmemHandle, (UINT64)(UINTN) MpsTable);
4171 }
4172
4173 Status = LibGetSystemConfigurationTable (&gEfiSmbiosTableGuid, &SMBIOSTable);
4174 if (!EFI_ERROR (Status)) {
4175- PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiDmemHandle, (UINT64) SMBIOSTable);
4176+ PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiDmemHandle, (UINT64)(UINTN) SMBIOSTable);
4177 }
4178 }
4179
4180diff --git a/dmpstore/dmpstore.c b/dmpstore/dmpstore.c
4181index 747762e..3473d19 100644
4182--- a/dmpstore/dmpstore.c
4183+++ b/dmpstore/dmpstore.c
4184@@ -95,7 +95,7 @@ SetFileVariable (
4185 //
4186 // Global Variables
4187 //
4188-EFI_HII_HANDLE HiiHandle;
4189+STATIC EFI_HII_HANDLE HiiHandle;
4190 EFI_GUID EfiDmpstoreGuid = EFI_DMPSTORE_GUID;
4191 SHELL_VAR_CHECK_ITEM DmpstoreCheckList[] = {
4192 {
4193@@ -132,7 +132,7 @@ SHELL_VAR_CHECK_ITEM DmpstoreCheckList[] = {
4194 NULL,
4195 0,
4196 0,
4197- 0
4198+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
4199 }
4200 };
4201
4202diff --git a/dmpstore/dmpstore.h b/dmpstore/dmpstore.h
4203index 32d72ec..278fb59 100644
4204--- a/dmpstore/dmpstore.h
4205+++ b/dmpstore/dmpstore.h
4206@@ -40,3 +40,4 @@ typedef struct {
4207 } DMPSTORE_VARIABLE;
4208
4209 #endif
4210+
4211diff --git a/dmpstore/dmpstore.inf b/dmpstore/dmpstore.inf
4212index f380759..4a5563d 100644
4213--- a/dmpstore/dmpstore.inf
4214+++ b/dmpstore/dmpstore.inf
4215@@ -25,24 +25,24 @@ FILE_GUID = 7185D15A-A0AE-4dd1-A58F-C6EAD28EC9A8
4216 COMPONENT_TYPE = APPLICATION
4217
4218 [sources.common]
4219- ..\ShCommonStrings.uni
4220+ ../ShCommonStrings.uni
4221 DmpstoreStrings.uni
4222 dmpstore.c
4223 dmpstore.h
4224
4225 [includes.common]
4226 .
4227- ..\Inc
4228- ..\Library
4229- $(EDK_SOURCE)\Foundation
4230- $(EDK_SOURCE)\Foundation\Include
4231- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4232- $(EDK_SOURCE)\Foundation\Efi
4233- $(EDK_SOURCE)\Foundation\Efi\Include
4234- $(EDK_SOURCE)\Foundation\FrameWork
4235- $(EDK_SOURCE)\Foundation\FrameWork\Include
4236- $(EDK_SOURCE)\Foundation\Core\Dxe
4237- $(DEST_DIR)\
4238+ ../Inc
4239+ ../Library
4240+ $(EDK_SOURCE)/Foundation
4241+ $(EDK_SOURCE)/Foundation/Include
4242+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4243+ $(EDK_SOURCE)/Foundation/Efi
4244+ $(EDK_SOURCE)/Foundation/Efi/Include
4245+ $(EDK_SOURCE)/Foundation/FrameWork
4246+ $(EDK_SOURCE)/Foundation/FrameWork/Include
4247+ $(EDK_SOURCE)/Foundation/Core/Dxe
4248+ $(DEST_DIR./
4249
4250 [libraries.common]
4251 EfiShellLib
4252@@ -61,11 +61,14 @@ COMPONENT_TYPE = APPLICATION
4253 # we will specify some additional DEFINEs on the compile command line.
4254 #
4255 [nmake.common]
4256- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
4257 IMAGE_ENTRY_POINT=InitializeDumpStore
4258+
4259+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
4260+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
4261 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
4262 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
4263 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
4264
4265-
4266+[nmake.ARM, nmake.AARCH64]
4267+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
4268
4269\ No newline at end of file
4270diff --git a/drivers/drivers.c b/drivers/drivers.c
4271index 0c6cfc0..84271b9 100644
4272--- a/drivers/drivers.c
4273+++ b/drivers/drivers.c
4274@@ -43,7 +43,7 @@ extern UINT8 STRING_ARRAY_NAME[];
4275 //
4276 // Global Variables
4277 //
4278-EFI_HII_HANDLE HiiHandle;
4279+STATIC EFI_HII_HANDLE HiiHandle;
4280 EFI_GUID EfiDriversGuid = EFI_DRIVERS_GUID;
4281 SHELL_VAR_CHECK_ITEM DriversCheckList[] = {
4282 {
4283@@ -68,7 +68,7 @@ SHELL_VAR_CHECK_ITEM DriversCheckList[] = {
4284 NULL,
4285 0,
4286 0,
4287- 0
4288+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
4289 }
4290 };
4291
4292@@ -133,7 +133,6 @@ Returns:
4293 EFI_HANDLE *ControllerHandleBuffer;
4294 UINTN ChildControllerHandleCount;
4295 CHAR16 *ImageName;
4296- BOOLEAN IsHelp;
4297 SHELL_VAR_CHECK_CODE RetCode;
4298 CHAR16 *Useful;
4299 SHELL_ARG_LIST *Item;
4300@@ -143,7 +142,6 @@ Returns:
4301 Language = NULL;
4302 DriverImageHandleCount = 0;
4303 DriverImageHandleBuffer = NULL;
4304- IsHelp = FALSE;
4305 ZeroMem (&ChkPck, sizeof (SHELL_VAR_CHECK_PACKAGE));
4306
4307 EFI_SHELL_APP_INIT (ImageHandle, SystemTable);
4308diff --git a/drivers/drivers.h b/drivers/drivers.h
4309index 6ef5e12..7c29cb0 100644
4310--- a/drivers/drivers.h
4311+++ b/drivers/drivers.h
4312@@ -33,3 +33,4 @@ Revision History
4313 }
4314
4315 #endif
4316+
4317diff --git a/drivers/drivers.inf b/drivers/drivers.inf
4318index befa6cd..056bf90 100644
4319--- a/drivers/drivers.inf
4320+++ b/drivers/drivers.inf
4321@@ -40,7 +40,7 @@ COMPONENT_TYPE = APPLICATION
4322
4323
4324 [sources.common]
4325- ..\ShCommonStrings.uni
4326+ ../ShCommonStrings.uni
4327 DriversStrings.uni
4328 drivers.c
4329 drivers.h
4330@@ -48,17 +48,17 @@ COMPONENT_TYPE = APPLICATION
4331
4332 [includes.common]
4333 .
4334- ..\Inc
4335- ..\Library
4336- $(EDK_SOURCE)\Foundation
4337- $(EDK_SOURCE)\Foundation\Include
4338- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4339- $(EDK_SOURCE)\Foundation\Efi
4340- $(EDK_SOURCE)\Foundation\Efi\Include
4341- $(EDK_SOURCE)\Foundation\FrameWork
4342- $(EDK_SOURCE)\Foundation\FrameWork\Include
4343- $(EDK_SOURCE)\Foundation\Core\Dxe
4344- $(DEST_DIR)\
4345+ ../Inc
4346+ ../Library
4347+ $(EDK_SOURCE)/Foundation
4348+ $(EDK_SOURCE)/Foundation/Include
4349+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4350+ $(EDK_SOURCE)/Foundation/Efi
4351+ $(EDK_SOURCE)/Foundation/Efi/Include
4352+ $(EDK_SOURCE)/Foundation/FrameWork
4353+ $(EDK_SOURCE)/Foundation/FrameWork/Include
4354+ $(EDK_SOURCE)/Foundation/Core/Dxe
4355+ $(DEST_DIR./
4356
4357 [libraries.common]
4358 EfiShellLib
4359@@ -73,7 +73,11 @@ COMPONENT_TYPE = APPLICATION
4360
4361 [nmake.common]
4362 IMAGE_ENTRY_POINT=DriversMain
4363+
4364+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
4365 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
4366 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
4367 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
4368
4369+[nmake.ARM, nmake.AARCH64]
4370+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
4371diff --git a/drvcfg/drvcfg.c b/drvcfg/drvcfg.c
4372index b604432..a037ac6 100644
4373--- a/drvcfg/drvcfg.c
4374+++ b/drvcfg/drvcfg.c
4375@@ -38,7 +38,7 @@ extern UINT8 STRING_ARRAY_NAME[];
4376 //
4377 // Global Variables
4378 //
4379-EFI_HII_HANDLE HiiHandle;
4380+STATIC EFI_HII_HANDLE HiiHandle;
4381 EFI_GUID EfiDrvcfgGuid = EFI_DRVCFG_GUID;
4382 SHELL_VAR_CHECK_ITEM DrvcfgCheckList[] = {
4383 {
4384@@ -87,7 +87,7 @@ SHELL_VAR_CHECK_ITEM DrvcfgCheckList[] = {
4385 NULL,
4386 0,
4387 0,
4388- 0
4389+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
4390 }
4391 };
4392
4393diff --git a/drvcfg/drvcfg.h b/drvcfg/drvcfg.h
4394index 9e14b9f..4255940 100644
4395--- a/drvcfg/drvcfg.h
4396+++ b/drvcfg/drvcfg.h
4397@@ -33,3 +33,4 @@ Revision History
4398 }
4399
4400 #endif
4401+
4402diff --git a/drvcfg/drvcfg.inf b/drvcfg/drvcfg.inf
4403index 71b2778..1abd9f2 100644
4404--- a/drvcfg/drvcfg.inf
4405+++ b/drvcfg/drvcfg.inf
4406@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
4407
4408
4409 [sources.common]
4410- ..\ShCommonStrings.uni
4411+ ../ShCommonStrings.uni
4412 DrvcfgStrings.uni
4413 drvcfg.c
4414 drvcfg.h
4415
4416 [includes.common]
4417 .
4418- ..\Inc
4419- ..\Library
4420- $(EDK_SOURCE)\Foundation
4421- $(EDK_SOURCE)\Foundation\Include
4422- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4423- $(EDK_SOURCE)\Foundation\Efi
4424- $(EDK_SOURCE)\Foundation\Efi\Include
4425- $(EDK_SOURCE)\Foundation\FrameWork
4426- $(EDK_SOURCE)\Foundation\FrameWork\Include
4427- $(EDK_SOURCE)\Foundation\Core\Dxe
4428- $(DEST_DIR)\
4429+ ../Inc
4430+ ../Library
4431+ $(EDK_SOURCE)/Foundation
4432+ $(EDK_SOURCE)/Foundation/Include
4433+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4434+ $(EDK_SOURCE)/Foundation/Efi
4435+ $(EDK_SOURCE)/Foundation/Efi/Include
4436+ $(EDK_SOURCE)/Foundation/FrameWork
4437+ $(EDK_SOURCE)/Foundation/FrameWork/Include
4438+ $(EDK_SOURCE)/Foundation/Core/Dxe
4439+ $(DEST_DIR./
4440
4441 [libraries.common]
4442 EfiShellLib
4443@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
4444
4445 [nmake.common]
4446 IMAGE_ENTRY_POINT=DrvcfgMain
4447+
4448+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
4449 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
4450 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
4451 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
4452
4453+[nmake.ARM, nmake.AARCH64]
4454+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
4455diff --git a/drvdiag/drvdiag.c b/drvdiag/drvdiag.c
4456index 3a9435c..0db01de 100644
4457--- a/drvdiag/drvdiag.c
4458+++ b/drvdiag/drvdiag.c
4459@@ -41,7 +41,7 @@ extern UINT8 STRING_ARRAY_NAME[];
4460 //
4461 // Global Variables
4462 //
4463-EFI_HII_HANDLE HiiHandle;
4464+STATIC EFI_HII_HANDLE HiiHandle;
4465 EFI_GUID EfiDrvdiagGuid = EFI_DRVDIAG_GUID;
4466 SHELL_VAR_CHECK_ITEM DrvdiagCheckList[] = {
4467 {
4468@@ -90,7 +90,7 @@ SHELL_VAR_CHECK_ITEM DrvdiagCheckList[] = {
4469 NULL,
4470 0,
4471 0,
4472- 0
4473+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
4474 }
4475 };
4476
4477diff --git a/drvdiag/drvdiag.h b/drvdiag/drvdiag.h
4478index 53d0478..8e10686 100644
4479--- a/drvdiag/drvdiag.h
4480+++ b/drvdiag/drvdiag.h
4481@@ -33,3 +33,4 @@ Revision History
4482 }
4483
4484 #endif
4485+
4486diff --git a/drvdiag/drvdiag.inf b/drvdiag/drvdiag.inf
4487index f27c238..097b31b 100644
4488--- a/drvdiag/drvdiag.inf
4489+++ b/drvdiag/drvdiag.inf
4490@@ -40,7 +40,7 @@ COMPONENT_TYPE = APPLICATION
4491
4492
4493 [sources.common]
4494- ..\ShCommonStrings.uni
4495+ ../ShCommonStrings.uni
4496 DrvdiagStrings.uni
4497 drvdiag.c
4498 drvdiag.h
4499@@ -48,17 +48,17 @@ COMPONENT_TYPE = APPLICATION
4500
4501 [includes.common]
4502 .
4503- ..\Inc
4504- ..\Library
4505- $(EDK_SOURCE)\Foundation
4506- $(EDK_SOURCE)\Foundation\Include
4507- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4508- $(EDK_SOURCE)\Foundation\Efi
4509- $(EDK_SOURCE)\Foundation\Efi\Include
4510- $(EDK_SOURCE)\Foundation\FrameWork
4511- $(EDK_SOURCE)\Foundation\FrameWork\Include
4512- $(EDK_SOURCE)\Foundation\Core\Dxe
4513- $(DEST_DIR)\
4514+ ../Inc
4515+ ../Library
4516+ $(EDK_SOURCE)/Foundation
4517+ $(EDK_SOURCE)/Foundation/Include
4518+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4519+ $(EDK_SOURCE)/Foundation/Efi
4520+ $(EDK_SOURCE)/Foundation/Efi/Include
4521+ $(EDK_SOURCE)/Foundation/FrameWork
4522+ $(EDK_SOURCE)/Foundation/FrameWork/Include
4523+ $(EDK_SOURCE)/Foundation/Core/Dxe
4524+ $(DEST_DIR./
4525
4526 [libraries.common]
4527 EfiShellLib
4528@@ -73,7 +73,11 @@ COMPONENT_TYPE = APPLICATION
4529
4530 [nmake.common]
4531 IMAGE_ENTRY_POINT=DrvdiagMain
4532+
4533+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
4534 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
4535 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
4536 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
4537
4538+[nmake.ARM, nmake.AARCH64]
4539+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
4540diff --git a/edit/edit.inf b/edit/edit.inf
4541index 0a48e87..3d69d4b 100644
4542--- a/edit/edit.inf
4543+++ b/edit/edit.inf
4544@@ -25,7 +25,7 @@ FILE_GUID = 51A60577-F1F6-444a-A372-244BED272023
4545 COMPONENT_TYPE = APPLICATION
4546
4547 [sources.common]
4548- ..\ShCommonStrings.uni
4549+ ../ShCommonStrings.uni
4550 EditStrings.uni
4551 editor.h
4552 editortype.h
4553@@ -41,17 +41,17 @@ COMPONENT_TYPE = APPLICATION
4554
4555 [includes.common]
4556 .
4557- ..\Inc
4558- ..\Library
4559- $(EDK_SOURCE)\Foundation
4560- $(EDK_SOURCE)\Foundation\Include
4561- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4562- $(EDK_SOURCE)\Foundation\Efi
4563- $(EDK_SOURCE)\Foundation\Efi\Include
4564- $(EDK_SOURCE)\Foundation\FrameWork
4565- $(EDK_SOURCE)\Foundation\FrameWork\Include
4566- $(EDK_SOURCE)\Foundation\Core\Dxe
4567- $(DEST_DIR)\
4568+ ../Inc
4569+ ../Library
4570+ $(EDK_SOURCE)/Foundation
4571+ $(EDK_SOURCE)/Foundation/Include
4572+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4573+ $(EDK_SOURCE)/Foundation/Efi
4574+ $(EDK_SOURCE)/Foundation/Efi/Include
4575+ $(EDK_SOURCE)/Foundation/FrameWork
4576+ $(EDK_SOURCE)/Foundation/FrameWork/Include
4577+ $(EDK_SOURCE)/Foundation/Core/Dxe
4578+ $(DEST_DIR./
4579
4580 [libraries.common]
4581 EfiShellLib
4582@@ -70,11 +70,13 @@ COMPONENT_TYPE = APPLICATION
4583 # we will specify some additional DEFINEs on the compile command line.
4584 #
4585 [nmake.common]
4586- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
4587 IMAGE_ENTRY_POINT=InitializeEFIEditor
4588+
4589+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
4590+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
4591 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
4592 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
4593 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
4594
4595-
4596-
4597\ No newline at end of file
4598+[nmake.ARM, nmake.AARCH64]
4599+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
4600diff --git a/edit/editor.h b/edit/editor.h
4601index c18db6a..f41b5b1 100644
4602--- a/edit/editor.h
4603+++ b/edit/editor.h
4604@@ -33,7 +33,7 @@ Abstract:
4605 #include "libstatusbar.h"
4606 #include "libinputbar.h"
4607 #include "libmenubar.h"
4608-#include "libmisc.h"
4609+#include "libMisc.h"
4610 //
4611 // This is the generated header file which includes whatever needs to be exported (strings + IFR)
4612 //
4613@@ -43,9 +43,10 @@ extern EFI_EDITOR_GLOBAL_EDITOR MainEditor;
4614 extern BOOLEAN EditorFirst;
4615 extern BOOLEAN EditorExit;
4616
4617-extern EFI_HII_HANDLE HiiHandle;
4618+extern EFI_HII_HANDLE gEditHiiHandle;
4619 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
4620 extern EFI_HII_PROTOCOL *Hii;
4621 #endif
4622
4623 #endif // _EFI_EDITOR_H_
4624+
4625diff --git a/edit/editortype.h b/edit/editortype.h
4626index 674f120..861b6c1 100644
4627--- a/edit/editortype.h
4628+++ b/edit/editortype.h
4629@@ -28,7 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4630 #define EDITOR_NAME L"EFI Editor\0"
4631 #define EDITOR_VERSION L"0.99\0"
4632
4633-#define EFI_EDITOR_LINE_LIST 'eell'
4634+#define EFI_EDITOR_LINE_LIST EFI_SIGNATURE_32 ('e','e','l','l')
4635
4636 #define INSERT_MODE_STR L"INS"
4637 #define OVERWR_MODE_STR L"OVR"
4638@@ -149,8 +149,8 @@ typedef struct _EFI_EDITOR_MENU_ITEM {
4639 } EFI_EDITOR_MENU_ITEM;
4640
4641 typedef struct {
4642- UINT32 Foreground : 4;
4643- UINT32 Background : 4;
4644+ UINT8 Foreground : 4;
4645+ UINT8 Background : 4;
4646 } EFI_EDITOR_COLOR_ATTRIBUTES;
4647
4648 typedef union {
4649@@ -223,3 +223,4 @@ typedef struct {
4650 } EFI_EDITOR_GLOBAL_EDITOR;
4651
4652 #endif
4653+
4654diff --git a/edit/libEditor.c b/edit/libEditor.c
4655index b39a2f0..7f32ce1 100644
4656--- a/edit/libEditor.c
4657+++ b/edit/libEditor.c
4658@@ -123,7 +123,7 @@ MainEditorInit (
4659 Status = BS->HandleProtocol (
4660 In,
4661 &gEfiSimplePointerProtocolGuid,
4662- &MainEditor.MouseInterface
4663+ (VOID**)&MainEditor.MouseInterface
4664 );
4665 if (EFI_ERROR (Status)) {
4666 //
4667@@ -146,7 +146,7 @@ MainEditorInit (
4668 Status = BS->HandleProtocol (
4669 HandleBuffer[Index],
4670 &gEfiSimplePointerProtocolGuid,
4671- &MainEditor.MouseInterface
4672+ (VOID**)&MainEditor.MouseInterface
4673 );
4674 if (!EFI_ERROR (Status)) {
4675 break;
4676@@ -169,31 +169,31 @@ MainEditorInit (
4677 //
4678 Status = MainTitleBarInit ();
4679 if (EFI_ERROR (Status)) {
4680- PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_TITLEBAR), HiiHandle);
4681+ PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_TITLEBAR), gEditHiiHandle);
4682 return EFI_LOAD_ERROR;
4683 }
4684
4685 Status = MainMenuBarInit ();
4686 if (EFI_ERROR (Status)) {
4687- PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_MAINMENU), HiiHandle);
4688+ PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_MAINMENU), gEditHiiHandle);
4689 return EFI_LOAD_ERROR;
4690 }
4691
4692 Status = MainStatusBarInit ();
4693 if (EFI_ERROR (Status)) {
4694- PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_STATUSBAR), HiiHandle);
4695+ PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_STATUSBAR), gEditHiiHandle);
4696 return EFI_LOAD_ERROR;
4697 }
4698
4699 Status = MainInputBarInit ();
4700 if (EFI_ERROR (Status)) {
4701- PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_INPUTBAR), HiiHandle);
4702+ PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_INPUTBAR), gEditHiiHandle);
4703 return EFI_LOAD_ERROR;
4704 }
4705
4706 Status = FileBufferInit ();
4707 if (EFI_ERROR (Status)) {
4708- PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_FILEBUFFER), HiiHandle);
4709+ PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_FILEBUFFER), gEditHiiHandle);
4710 return EFI_LOAD_ERROR;
4711 }
4712 //
4713@@ -234,27 +234,27 @@ MainEditorCleanup (
4714 //
4715 Status = MainTitleBarCleanup ();
4716 if (EFI_ERROR (Status)) {
4717- PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_TILEBAR_CLEANUP), HiiHandle);
4718+ PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_TILEBAR_CLEANUP), gEditHiiHandle);
4719 }
4720
4721 Status = MainMenuBarCleanup ();
4722 if (EFI_ERROR (Status)) {
4723- PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_MENUBAR_CLEANUP), HiiHandle);
4724+ PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_MENUBAR_CLEANUP), gEditHiiHandle);
4725 }
4726
4727 Status = MainStatusBarCleanup ();
4728 if (EFI_ERROR (Status)) {
4729- PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_STATUSBAR_CLEANUP), HiiHandle);
4730+ PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_STATUSBAR_CLEANUP), gEditHiiHandle);
4731 }
4732
4733 Status = MainInputBarCleanup ();
4734 if (EFI_ERROR (Status)) {
4735- PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_INPUTBAR_CLEANUP), HiiHandle);
4736+ PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_INPUTBAR_CLEANUP), gEditHiiHandle);
4737 }
4738
4739 Status = FileBufferCleanup ();
4740 if (EFI_ERROR (Status)) {
4741- PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_FILEBUFFER_CLEANUP), HiiHandle);
4742+ PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_FILEBUFFER_CLEANUP), gEditHiiHandle);
4743 }
4744 //
4745 // restore old mode
4746diff --git a/edit/libFileBuffer.c b/edit/libFileBuffer.c
4747index 1f1e2aa..1be2124 100644
4748--- a/edit/libFileBuffer.c
4749+++ b/edit/libFileBuffer.c
4750@@ -196,8 +196,9 @@ FileBufferRestoreMousePosition (
4751 // backup the old screen attributes
4752 //
4753 Orig = MainEditor.ColorAttributes;
4754- New.Colors.Foreground = Orig.Colors.Background;
4755- New.Colors.Background = Orig.Colors.Foreground;
4756+ New.Data = 0;
4757+ New.Colors.Foreground = Orig.Colors.Foreground;
4758+ New.Colors.Background = Orig.Colors.Background;
4759
4760 //
4761 // clear the old mouse position
4762@@ -235,10 +236,14 @@ FileBufferRestoreMousePosition (
4763 Value
4764 );
4765 }
4766+
4767 //
4768 // set the new mouse position
4769 //
4770- Out->SetAttribute (Out, New.Data);
4771+ Out->SetAttribute (
4772+ Out,
4773+ EFI_TEXT_ATTR (New.Colors.Background, New.Colors.Foreground)
4774+ );
4775
4776 //
4777 // clear the old mouse position
4778@@ -278,7 +283,10 @@ FileBufferRestoreMousePosition (
4779 //
4780 // end of HasCharacter
4781 //
4782- Out->SetAttribute (Out, Orig.Data);
4783+ Out->SetAttribute (
4784+ Out,
4785+ EFI_TEXT_ATTR (Orig.Colors.Foreground, Orig.Colors.Background)
4786+ );
4787 }
4788 //
4789 // end of MouseNeedRefresh
4790@@ -768,7 +776,7 @@ Returns:
4791 Handle = NULL;
4792 FileSize = 0;
4793 UnicodeBuffer = NULL;
4794- Type = 0;
4795+ Type = DEFAULT_TYPE;
4796
4797 //
4798 // in this function, when you return error ( except EFI_OUT_OF_RESOURCES )
4799@@ -2624,15 +2632,9 @@ FileBufferHome (
4800 VOID
4801 )
4802 {
4803- EFI_EDITOR_LINE *Line;
4804 UINTN FRow;
4805 UINTN FCol;
4806
4807- //
4808- // go to the first column of the line
4809- //
4810- Line = FileBuffer.CurrentLine;
4811-
4812 FRow = FileBuffer.FilePosition.Row;
4813 FCol = 1;
4814
4815diff --git a/edit/libInputBar.c b/edit/libInputBar.c
4816index 0ec6858..f868ffb 100644
4817--- a/edit/libInputBar.c
4818+++ b/edit/libInputBar.c
4819@@ -141,8 +141,6 @@ Returns:
4820 UINTN Size;
4821 EFI_STATUS Status;
4822 BOOLEAN NoDisplay;
4823- UINTN Limit;
4824- UINTN PromptLen;
4825
4826 //
4827 // variable initialization
4828@@ -162,10 +160,14 @@ Returns:
4829 // back up the old screen attributes
4830 //
4831 Orig = MainEditor.ColorAttributes;
4832+ New.Data = 0;
4833 New.Colors.Foreground = Orig.Colors.Background;
4834 New.Colors.Background = Orig.Colors.Foreground;
4835
4836- Out->SetAttribute (Out, New.Data);
4837+ Out->SetAttribute (
4838+ Out,
4839+ EFI_TEXT_ATTR (New.Colors.Foreground, New.Colors.Background)
4840+ );
4841
4842 //
4843 // clear input bar
4844@@ -173,13 +175,7 @@ Returns:
4845 EditorClearLine (INPUT_BAR_LOCATION);
4846
4847 Out->SetCursorPosition (Out, 0, INPUT_BAR_LOCATION - 1);
4848- PrintToken (STRING_TOKEN (STR_EDIT_LIBINPUTBAR_MAININPUTBAR), HiiHandle, MainInputBar.Prompt);
4849-
4850- //
4851- // that's the maximum input length that can be displayed on screen
4852- //
4853- PromptLen = StrLen (MainInputBar.Prompt);
4854- Limit = MainEditor.ScreenSize.Column - PromptLen;
4855+ PrintToken (STRING_TOKEN (STR_EDIT_LIBINPUTBAR_MAININPUTBAR), gEditHiiHandle, MainInputBar.Prompt);
4856
4857 //
4858 // this is a selection prompt, cursor will stay in edit area
4859@@ -188,7 +184,10 @@ Returns:
4860 if (StrStr (MainInputBar.Prompt, L"Yes/No")) {
4861 NoDisplay = TRUE;
4862 FileBufferRestorePosition ();
4863- Out->SetAttribute (Out, Orig.Data);
4864+ Out->SetAttribute (
4865+ Out,
4866+ EFI_TEXT_ATTR (Orig.Colors.Foreground, Orig.Colors.Background)
4867+ );
4868 } else {
4869 NoDisplay = FALSE;
4870 }
4871@@ -265,7 +264,10 @@ Returns:
4872 //
4873 // restore screen attributes
4874 //
4875- Out->SetAttribute (Out, Orig.Data);
4876+ Out->SetAttribute (
4877+ Out,
4878+ EFI_TEXT_ATTR (Orig.Colors.Foreground, Orig.Colors.Background)
4879+ );
4880
4881 StatusBarNeedRefresh = TRUE;
4882
4883diff --git a/edit/libMenuBar.c b/edit/libMenuBar.c
4884index 32fef4e..5ab13e6 100644
4885--- a/edit/libMenuBar.c
4886+++ b/edit/libMenuBar.c
4887@@ -189,7 +189,6 @@ MainMenuBarRefresh (
4888 CHAR16 *NameString;
4889 CHAR16 *FunctionKeyString;
4890 UINTN BufferSize;
4891- EFI_STATUS Status;
4892
4893 //
4894 // variable initialization
4895@@ -220,9 +219,9 @@ MainMenuBarRefresh (
4896 FunctionKeyString = AllocatePool (BufferSize);
4897
4898 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
4899- Status = Hii->GetString (Hii, HiiHandle, Item->NameToken, FALSE, NULL, &BufferSize, NameString);
4900+ Hii->GetString (Hii, gEditHiiHandle, Item->NameToken, FALSE, NULL, &BufferSize, NameString);
4901 #else
4902- Status = LibGetString (HiiHandle, Item->NameToken, NameString, &BufferSize);
4903+ LibGetString (gEditHiiHandle, Item->NameToken, NameString, &BufferSize);
4904 #endif
4905
4906 Width = max ((StrLen (NameString) + 6), 20);
4907@@ -232,9 +231,9 @@ MainMenuBarRefresh (
4908 }
4909
4910 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
4911- Status = Hii->GetString (Hii, HiiHandle, Item->FunctionKeyToken, FALSE, NULL, &BufferSize, FunctionKeyString);
4912+ Hii->GetString (Hii, gEditHiiHandle, Item->FunctionKeyToken, FALSE, NULL, &BufferSize, FunctionKeyString);
4913 #else
4914- Status = LibGetString (HiiHandle, Item->FunctionKeyToken, FunctionKeyString, &BufferSize);
4915+ LibGetString (gEditHiiHandle, Item->FunctionKeyToken, FunctionKeyString, &BufferSize);
4916 #endif
4917 PrintAt (Col - 1, Row - 1, L"%E%s%N %H%s%N ", FunctionKeyString, NameString);
4918
4919diff --git a/edit/libMisc.h b/edit/libMisc.h
4920index b7a438b..38cabf3 100644
4921--- a/edit/libMisc.h
4922+++ b/edit/libMisc.h
4923@@ -96,3 +96,4 @@ GetTextY (
4924 ) ;
4925
4926 #endif
4927+
4928diff --git a/edit/libStatusBar.c b/edit/libStatusBar.c
4929index 1527c6e..88a24c9 100644
4930--- a/edit/libStatusBar.c
4931+++ b/edit/libStatusBar.c
4932@@ -157,11 +157,15 @@ Returns:
4933 // back up the screen attributes
4934 //
4935 Orig = MainEditor.ColorAttributes;
4936+ New.Data = 0;
4937 New.Colors.Foreground = Orig.Colors.Background;
4938 New.Colors.Background = Orig.Colors.Foreground;
4939
4940 Out->EnableCursor (Out, FALSE);
4941- Out->SetAttribute (Out, New.Data);
4942+ Out->SetAttribute (
4943+ Out,
4944+ EFI_TEXT_ATTR (New.Colors.Foreground, New.Colors.Background)
4945+ );
4946
4947 //
4948 // clear status bar
4949@@ -191,7 +195,10 @@ Returns:
4950 //
4951 // restore the old screen attributes
4952 //
4953- Out->SetAttribute (Out, Orig.Data);
4954+ Out->SetAttribute (
4955+ Out,
4956+ EFI_TEXT_ATTR (Orig.Colors.Foreground, Orig.Colors.Background)
4957+ );
4958
4959 //
4960 // restore position in edit area
4961diff --git a/edit/libTitleBar.c b/edit/libTitleBar.c
4962index d5d1ad9..8b432a2 100644
4963--- a/edit/libTitleBar.c
4964+++ b/edit/libTitleBar.c
4965@@ -120,10 +120,15 @@ Returns:
4966 // backup the old screen attributes
4967 //
4968 Orig = MainEditor.ColorAttributes;
4969+
4970+ New.Data = 0;
4971 New.Colors.Foreground = Orig.Colors.Background;
4972 New.Colors.Background = Orig.Colors.Foreground;
4973
4974- Out->SetAttribute (Out, New.Data);
4975+ Out->SetAttribute (
4976+ Out,
4977+ EFI_TEXT_ATTR (New.Colors.Foreground, New.Colors.Background)
4978+ );
4979
4980 //
4981 // clear the old title bar
4982@@ -142,7 +147,10 @@ Returns:
4983 );
4984
4985 if (MainEditor.FileBuffer->FileName == NULL) {
4986- Out->SetAttribute (Out, Orig.Data);
4987+ Out->SetAttribute (
4988+ Out,
4989+ EFI_TEXT_ATTR (Orig.Colors.Foreground, Orig.Colors.Background)
4990+ );
4991 FileBufferRestorePosition ();
4992 return EFI_SUCCESS;
4993 }
4994@@ -204,7 +212,10 @@ Returns:
4995 //
4996 // restore the old attribute
4997 //
4998- Out->SetAttribute (Out, Orig.Data);
4999+ Out->SetAttribute (
5000+ Out,
5001+ EFI_TEXT_ATTR (Orig.Colors.Foreground, Orig.Colors.Background)
5002+ );
5003
5004 //
5005 // restore edit area cursor position
5006diff --git a/edit/libeditor.h b/edit/libeditor.h
5007index 9c84059..e6a174c 100644
5008--- a/edit/libeditor.h
5009+++ b/edit/libeditor.h
5010@@ -52,3 +52,4 @@ MainEditorSetCutLine (
5011 );
5012
5013 #endif
5014+
5015diff --git a/edit/libfilebuffer.h b/edit/libfilebuffer.h
5016index d2b519b..79ecd1b 100644
5017--- a/edit/libfilebuffer.h
5018+++ b/edit/libfilebuffer.h
5019@@ -209,3 +209,4 @@ EditGetDefaultFileName (
5020 );
5021
5022 #endif
5023+
5024diff --git a/edit/libinputbar.h b/edit/libinputbar.h
5025index bdbe9bf..3768306 100644
5026--- a/edit/libinputbar.h
5027+++ b/edit/libinputbar.h
5028@@ -44,3 +44,4 @@ MainInputBarSetStringSize (
5029 );
5030
5031 #endif
5032+
5033diff --git a/edit/libmenubar.h b/edit/libmenubar.h
5034index 486aa81..27a89d8 100644
5035--- a/edit/libmenubar.h
5036+++ b/edit/libmenubar.h
5037@@ -85,3 +85,4 @@ MainCommandGotoLine (
5038 );
5039
5040 #endif
5041+
5042diff --git a/edit/libstatusbar.h b/edit/libstatusbar.h
5043index bcc6997..05ccdef 100644
5044--- a/edit/libstatusbar.h
5045+++ b/edit/libstatusbar.h
5046@@ -53,3 +53,4 @@ MainStatusBarBackup (
5047 );
5048
5049 #endif
5050+
5051diff --git a/edit/libtitlebar.h b/edit/libtitlebar.h
5052index eb7c1a3..3946ca7 100644
5053--- a/edit/libtitlebar.h
5054+++ b/edit/libtitlebar.h
5055@@ -46,3 +46,4 @@ MainTitleBarBackup (
5056 );
5057
5058 #endif
5059+
5060diff --git a/edit/main.c b/edit/main.c
5061index 9f1c987..a69a1bc 100644
5062--- a/edit/main.c
5063+++ b/edit/main.c
5064@@ -34,7 +34,7 @@ EFI_BOOTSHELL_CODE(
5065 //
5066 // Global Variables
5067 //
5068-EFI_HII_HANDLE HiiHandle;
5069+EFI_HII_HANDLE gEditHiiHandle;
5070 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
5071 EFI_HII_PROTOCOL *Hii;
5072 #endif
5073@@ -56,7 +56,7 @@ SHELL_VAR_CHECK_ITEM EditCheckList[] = {
5074 NULL,
5075 0,
5076 0,
5077- 0
5078+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
5079 }
5080 };
5081
5082@@ -121,13 +121,13 @@ Returns:
5083 //
5084 // There should only be one HII protocol
5085 //
5086- Status = LibLocateProtocol (&gEfiHiiProtocolGuid, &Hii);
5087+ Status = LibLocateProtocol (&gEfiHiiProtocolGuid, (VOID**)&Hii);
5088 if (EFI_ERROR (Status) || NULL == Hii) {
5089 return EFI_ABORTED;
5090 }
5091 #endif
5092
5093- Status = LibInitializeStrings (&HiiHandle, STRING_ARRAY_NAME, &EfiEditGuid);
5094+ Status = LibInitializeStrings (&gEditHiiHandle, STRING_ARRAY_NAME, &EfiEditGuid);
5095
5096 if (EFI_ERROR (Status)) {
5097 return Status;
5098@@ -137,7 +137,7 @@ Returns:
5099 if (VarCheckOk != RetCode) {
5100 switch (RetCode) {
5101 case VarCheckUnknown:
5102- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), HiiHandle, L"edit", Useful);
5103+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), gEditHiiHandle, L"edit", Useful);
5104 break;
5105
5106 default:
5107@@ -161,10 +161,10 @@ Returns:
5108 ChkPck.FlagCount > 2 ||
5109 (ChkPck.FlagCount == 2 && LibCheckVarGetFlag (&ChkPck, L"-b") == NULL)
5110 ) {
5111- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"edit");
5112+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gEditHiiHandle, L"edit");
5113 Status = EFI_INVALID_PARAMETER;
5114 } else {
5115- PrintToken (STRING_TOKEN (STR_EDIT_VERBOSE_HELP), HiiHandle);
5116+ PrintToken (STRING_TOKEN (STR_EDIT_VERBOSE_HELP), gEditHiiHandle);
5117 Status = EFI_SUCCESS;
5118 }
5119
5120@@ -172,21 +172,21 @@ Returns:
5121 }
5122
5123 if (ChkPck.ValueCount > 1) {
5124- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"edit");
5125+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gEditHiiHandle, L"edit");
5126 Status = EFI_INVALID_PARAMETER;
5127 goto done;
5128 }
5129
5130 if (ChkPck.ValueCount == 1) {
5131 if (!IsValidFileName (ChkPck.VarList->VarStr)) {
5132- PrintToken (STRING_TOKEN (STR_EDIT_MAIN_INVALID_FILE_NAME), HiiHandle);
5133+ PrintToken (STRING_TOKEN (STR_EDIT_MAIN_INVALID_FILE_NAME), gEditHiiHandle);
5134 Status = EFI_INVALID_PARAMETER;
5135 goto done;
5136 }
5137 }
5138
5139 if (SI->RedirArgc != 0) {
5140- PrintToken (STRING_TOKEN (STR_EDIT_NOREDIRECT), HiiHandle);
5141+ PrintToken (STRING_TOKEN (STR_EDIT_NOREDIRECT), gEditHiiHandle);
5142 Status = EFI_INVALID_PARAMETER;
5143 goto done;
5144 }
5145@@ -195,7 +195,7 @@ Returns:
5146 if (EFI_ERROR (Status)) {
5147 Out->ClearScreen (Out);
5148 Out->EnableCursor (Out, TRUE);
5149- PrintToken (STRING_TOKEN (STR_EDIT_MAIN_INIT_FAILED), HiiHandle);
5150+ PrintToken (STRING_TOKEN (STR_EDIT_MAIN_INIT_FAILED), gEditHiiHandle);
5151 goto done;
5152 }
5153
5154@@ -240,19 +240,19 @@ Returns:
5155 //
5156 if (Status == EFI_SUCCESS) {
5157 } else if (Status == EFI_OUT_OF_RESOURCES) {
5158- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_OUT_RESOURCE), HiiHandle, L"edit");
5159+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_OUT_RESOURCE), gEditHiiHandle, L"edit");
5160 } else {
5161 if (Buffer != NULL) {
5162 if (StrCmp (Buffer, L"") != 0) {
5163 //
5164 // print out the status string
5165 //
5166- PrintToken (STRING_TOKEN (STR_EDIT_MAIN_BUFFER), HiiHandle, Buffer);
5167+ PrintToken (STRING_TOKEN (STR_EDIT_MAIN_BUFFER), gEditHiiHandle, Buffer);
5168 } else {
5169- PrintToken (STRING_TOKEN (STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR), HiiHandle);
5170+ PrintToken (STRING_TOKEN (STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR), gEditHiiHandle);
5171 }
5172 } else {
5173- PrintToken (STRING_TOKEN (STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR), HiiHandle);
5174+ PrintToken (STRING_TOKEN (STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR), gEditHiiHandle);
5175 }
5176 }
5177
5178diff --git a/err/DebugMask.h b/err/DebugMask.h
5179index 61136aa..9ce362f 100644
5180--- a/err/DebugMask.h
5181+++ b/err/DebugMask.h
5182@@ -67,3 +67,4 @@ typedef struct _EFI_DEBUG_MASK_PROTOCOL {
5183 extern EFI_GUID gEfiDebugMaskProtocolGuid;
5184
5185 #endif
5186+
5187diff --git a/err/err.c b/err/err.c
5188index e41a9d6..6062ddb 100644
5189--- a/err/err.c
5190+++ b/err/err.c
5191@@ -35,7 +35,7 @@ extern UINTN EFIDebug;
5192 //
5193 // Global Variables
5194 //
5195-EFI_HII_HANDLE HiiHandle;
5196+STATIC EFI_HII_HANDLE HiiHandle;
5197 EFI_GUID EfiErrGuid = EFI_ERR_GUID;
5198 SHELL_VAR_CHECK_ITEM ErrCheckList[] = {
5199 {
5200@@ -60,7 +60,7 @@ SHELL_VAR_CHECK_ITEM ErrCheckList[] = {
5201 NULL,
5202 0,
5203 0,
5204- 0
5205+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
5206 }
5207 };
5208
5209@@ -149,7 +149,7 @@ _DumpHandleMask (
5210 EFI_DEBUG_MASK_PROTOCOL *dmp;
5211 UINTN Mask;
5212
5213- Status = BS->HandleProtocol (Handle, &gEfiDebugMaskProtocolGuid, &dmp);
5214+ Status = BS->HandleProtocol (Handle, &gEfiDebugMaskProtocolGuid, (VOID**)&dmp);
5215 if (!EFI_ERROR (Status)) {
5216 Status = dmp->GetDebugMask (dmp, &Mask);
5217 if (!EFI_ERROR (Status)) {
5218@@ -170,13 +170,11 @@ _DumpDriverMask (
5219 UINTN HandleNum;
5220 UINTN Index;
5221 UINTN DrvHandle;
5222- BOOLEAN Found;
5223
5224 HandleBuf = NULL;
5225 HandleNum = 0;
5226 DrvHandle = 0;
5227 Status = EFI_SUCCESS;
5228- Found = FALSE;
5229
5230 if (NULL != Handle) {
5231 DrvHandle = (UINTN) StrToUIntegerBase (Handle, 16, &Status) - 1;
5232@@ -278,7 +276,7 @@ _SetDriverMask (
5233 goto Done;
5234 }
5235
5236- Status = BS->HandleProtocol (RealHandle, &gEfiDebugMaskProtocolGuid, &dmp);
5237+ Status = BS->HandleProtocol (RealHandle, &gEfiDebugMaskProtocolGuid, (VOID**)&dmp);
5238 if (EFI_ERROR (Status)) {
5239 PrintToken (STRING_TOKEN (STR_ERR_HANDLE_NOT_FOUND), HiiHandle, DrvHandle + 1);
5240 goto Done;
5241@@ -336,7 +334,7 @@ _SetAllDriverMask (
5242 }
5243
5244 for (Index = 0; Index < BufferSize / sizeof(EFI_HANDLE); Index ++) {
5245- Status = BS->HandleProtocol (Buffer[Index], &gEfiDebugMaskProtocolGuid, &dmp);
5246+ Status = BS->HandleProtocol (Buffer[Index], &gEfiDebugMaskProtocolGuid, (VOID**)&dmp);
5247 Status = dmp->SetDebugMask (dmp, Msk);
5248 }
5249
5250diff --git a/err/err.h b/err/err.h
5251index f42e503..133006a 100644
5252--- a/err/err.h
5253+++ b/err/err.h
5254@@ -29,4 +29,4 @@ Revision History
5255 0xdaab229b, 0x7883, 0x4f5f, 0xac, 0x6e, 0x15, 0x20, 0xc7, 0xe7, 0x8f, 0xd4 \
5256 }
5257
5258-#endif
5259\ No newline at end of file
5260+#endif
5261diff --git a/err/err.inf b/err/err.inf
5262index 467e734..3afd967 100644
5263--- a/err/err.inf
5264+++ b/err/err.inf
5265@@ -25,7 +25,7 @@ FILE_GUID = 7ED86F56-5558-4d4f-A972-9307909AE9BA
5266 COMPONENT_TYPE = APPLICATION
5267
5268 [sources.common]
5269-..\ShCommonStrings.uni
5270+../ShCommonStrings.uni
5271 ErrStrings.uni
5272 err.c
5273 err.h
5274@@ -33,17 +33,17 @@ err.h
5275
5276 [includes.common]
5277 .
5278- ..\Inc
5279- ..\Library
5280- $(EDK_SOURCE)\Foundation
5281- $(EDK_SOURCE)\Foundation\Include
5282- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
5283- $(EDK_SOURCE)\Foundation\Efi
5284- $(EDK_SOURCE)\Foundation\Efi\Include
5285- $(EDK_SOURCE)\Foundation\FrameWork
5286- $(EDK_SOURCE)\Foundation\FrameWork\Include
5287- $(EDK_SOURCE)\Foundation\Core\Dxe
5288- $(DEST_DIR)\
5289+ ../Inc
5290+ ../Library
5291+ $(EDK_SOURCE)/Foundation
5292+ $(EDK_SOURCE)/Foundation/Include
5293+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
5294+ $(EDK_SOURCE)/Foundation/Efi
5295+ $(EDK_SOURCE)/Foundation/Efi/Include
5296+ $(EDK_SOURCE)/Foundation/FrameWork
5297+ $(EDK_SOURCE)/Foundation/FrameWork/Include
5298+ $(EDK_SOURCE)/Foundation/Core/Dxe
5299+ $(DEST_DIR./
5300
5301 [libraries.common]
5302 EfiShellLib
5303@@ -63,11 +63,14 @@ err.h
5304 # we will specify some additional DEFINEs on the compile command line.
5305 #
5306 [nmake.common]
5307- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
5308 IMAGE_ENTRY_POINT=InitializeError
5309+
5310+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
5311+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
5312 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
5313 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
5314 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
5315
5316-
5317+[nmake.ARM, nmake.AARCH64]
5318+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
5319
5320\ No newline at end of file
5321diff --git a/guid/guid.c b/guid/guid.c
5322index 7f26e7d..78ec5eb 100644
5323--- a/guid/guid.c
5324+++ b/guid/guid.c
5325@@ -36,7 +36,7 @@ extern UINT8 STRING_ARRAY_NAME[];
5326 //
5327 // Global Variables
5328 //
5329-EFI_HII_HANDLE HiiHandle;
5330+STATIC EFI_HII_HANDLE HiiHandle;
5331 EFI_GUID EfiGuidGuid = EFI_GUID_GUID;
5332 SHELL_VAR_CHECK_ITEM GuidCheckList[] = {
5333 {
5334@@ -55,7 +55,7 @@ SHELL_VAR_CHECK_ITEM GuidCheckList[] = {
5335 NULL,
5336 0,
5337 0,
5338- 0
5339+ (SHELL_VAR_CHECK_FLAG_TYPE)0
5340 }
5341 };
5342
5343diff --git a/guid/guid.h b/guid/guid.h
5344index af7560a..e6cf872 100644
5345--- a/guid/guid.h
5346+++ b/guid/guid.h
5347@@ -31,4 +31,4 @@ Revision History
5348 0x425bff44, 0x1cae, 0x4c27, 0x98, 0x2c, 0x25, 0xc8, 0x74, 0x59, 0xdf, 0xd6 \
5349 }
5350
5351-#endif
5352\ No newline at end of file
5353+#endif
5354diff --git a/guid/guid.inf b/guid/guid.inf
5355index 60639d2..621fab4 100644
5356--- a/guid/guid.inf
5357+++ b/guid/guid.inf
5358@@ -37,23 +37,23 @@
5359 FILE_GUID = CBEB01F8-0912-4d87-8A6B-45D02847A405
5360 COMPONENT_TYPE = APPLICATION
5361 [sources.common]
5362- ..\ShCommonStrings.uni
5363+ ../ShCommonStrings.uni
5364 GuidStrings.uni
5365 guid.c
5366 guid.h
5367 [includes.common]
5368 .
5369- ..\Inc
5370- ..\Library
5371- $(EDK_SOURCE)\Foundation
5372- $(EDK_SOURCE)\Foundation\Include
5373- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
5374- $(EDK_SOURCE)\Foundation\Efi
5375- $(EDK_SOURCE)\Foundation\Efi\Include
5376- $(EDK_SOURCE)\Foundation\FrameWork
5377- $(EDK_SOURCE)\Foundation\FrameWork\Include
5378- $(EDK_SOURCE)\Foundation\Core\Dxe
5379- $(DEST_DIR)\
5380+ ../Inc
5381+ ../Library
5382+ $(EDK_SOURCE)/Foundation
5383+ $(EDK_SOURCE)/Foundation/Include
5384+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
5385+ $(EDK_SOURCE)/Foundation/Efi
5386+ $(EDK_SOURCE)/Foundation/Efi/Include
5387+ $(EDK_SOURCE)/Foundation/FrameWork
5388+ $(EDK_SOURCE)/Foundation/FrameWork/Include
5389+ $(EDK_SOURCE)/Foundation/Core/Dxe
5390+ $(DEST_DIR./
5391 [libraries.common]
5392 EfiShellLib
5393 EdkProtocolLib
5394@@ -63,8 +63,15 @@
5395 EdkGuidLib
5396 EdkFrameworkGuidLib
5397 EfiGuidLib
5398+
5399 [nmake.common]
5400 IMAGE_ENTRY_POINT=GuidMain
5401- C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
5402+
5403+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
5404+ C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
5405 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
5406 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
5407+
5408+[nmake.ARM, nmake.AARCH64]
5409+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
5410+
5411\ No newline at end of file
5412diff --git a/hexedit/heditor.h b/hexedit/heditor.h
5413index 09196d6..74a3160 100644
5414--- a/hexedit/heditor.h
5415+++ b/hexedit/heditor.h
5416@@ -39,7 +39,7 @@ Abstract:
5417 #include "libinputbar.h"
5418 #include "libmenubar.h"
5419
5420-#include "libmisc.h"
5421+#include "libMisc.h"
5422
5423 #include "libclipboard.h"
5424
5425@@ -52,9 +52,10 @@ extern HEFI_EDITOR_GLOBAL_EDITOR HMainEditor;
5426 extern BOOLEAN HEditorFirst;
5427 extern BOOLEAN HEditorExit;
5428
5429-extern EFI_HII_HANDLE HiiHandle;
5430+extern EFI_HII_HANDLE gHexEditHiiHandle;
5431 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
5432 extern EFI_HII_PROTOCOL *Hii;
5433 #endif
5434
5435 #endif // _HEDITOR_H
5436+
5437diff --git a/hexedit/heditortype.h b/hexedit/heditortype.h
5438index 59317a9..d3936d0 100644
5439--- a/hexedit/heditortype.h
5440+++ b/hexedit/heditortype.h
5441@@ -30,7 +30,7 @@ Abstract:
5442 #define EDITOR_NAME L"EFI Hex Editor\0"
5443 #define EDITOR_VERSION L"0.99\0"
5444
5445-#define EFI_EDITOR_LINE_LIST 'eell'
5446+#define EFI_EDITOR_LINE_LIST EFI_SIGNATURE_32 ('e','e','l','l')
5447
5448 #define FILE_ATTRIBUTES EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE
5449 #define FILE_READ_WRITE EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE
5450@@ -147,8 +147,8 @@ typedef struct _HEFI_EDITOR_MENU_ITEM {
5451 } HEFI_EDITOR_MENU_ITEM;
5452
5453 typedef struct {
5454- UINT32 Foreground : 4;
5455- UINT32 Background : 4;
5456+ UINT8 Foreground : 4;
5457+ UINT8 Background : 4;
5458 } HEFI_EDITOR_COLOR_ATTRIBUTES;
5459
5460 typedef union {
5461@@ -251,3 +251,4 @@ typedef struct {
5462 } HEFI_EDITOR_GLOBAL_EDITOR;
5463
5464 #endif
5465+
5466diff --git a/hexedit/hexedit.inf b/hexedit/hexedit.inf
5467index cf89b9e..aa44590 100644
5468--- a/hexedit/hexedit.inf
5469+++ b/hexedit/hexedit.inf
5470@@ -25,7 +25,7 @@ FILE_GUID = A5A41A42-5B2B-4de6-9556-DDC6DC31231C
5471 COMPONENT_TYPE = APPLICATION
5472
5473 [sources.common]
5474- ..\ShCommonStrings.uni
5475+ ../ShCommonStrings.uni
5476 HexeditStrings.uni
5477 heditor.h
5478 heditortype.h
5479@@ -45,17 +45,17 @@ COMPONENT_TYPE = APPLICATION
5480
5481 [includes.common]
5482 .
5483- ..\Inc
5484- ..\Library
5485- $(EDK_SOURCE)\Foundation
5486- $(EDK_SOURCE)\Foundation\Include
5487- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
5488- $(EDK_SOURCE)\Foundation\Efi
5489- $(EDK_SOURCE)\Foundation\Efi\Include
5490- $(EDK_SOURCE)\Foundation\FrameWork
5491- $(EDK_SOURCE)\Foundation\FrameWork\Include
5492- $(EDK_SOURCE)\Foundation\Core\Dxe
5493- $(DEST_DIR)\
5494+ ../Inc
5495+ ../Library
5496+ $(EDK_SOURCE)/Foundation
5497+ $(EDK_SOURCE)/Foundation/Include
5498+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
5499+ $(EDK_SOURCE)/Foundation/Efi
5500+ $(EDK_SOURCE)/Foundation/Efi/Include
5501+ $(EDK_SOURCE)/Foundation/FrameWork
5502+ $(EDK_SOURCE)/Foundation/FrameWork/Include
5503+ $(EDK_SOURCE)/Foundation/Core/Dxe
5504+ $(DEST_DIR./
5505
5506 [libraries.common]
5507 EfiShellLib
5508@@ -75,11 +75,14 @@ COMPONENT_TYPE = APPLICATION
5509 # we will specify some additional DEFINEs on the compile command line.
5510 #
5511 [nmake.common]
5512- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
5513 IMAGE_ENTRY_POINT=InitializeEFIHexEditor
5514+
5515+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
5516+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
5517 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
5518 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
5519 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
5520
5521-
5522+[nmake.ARM, nmake.AARCH64]
5523+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
5524
5525\ No newline at end of file
5526diff --git a/hexedit/libBufferImage.c b/hexedit/libBufferImage.c
5527index 8a91058..2481dd3 100644
5528--- a/hexedit/libBufferImage.c
5529+++ b/hexedit/libBufferImage.c
5530@@ -203,6 +203,9 @@ Returns:
5531 case MEM_BUFFER:
5532 HMemImageBackup ();
5533 break;
5534+
5535+ case NO_BUFFER:
5536+ break;
5537 }
5538
5539 return EFI_SUCCESS;
5540@@ -587,7 +590,7 @@ HBufferImageRestoreMousePosition (
5541 UINT8 Value;
5542 BOOLEAN HighBits;
5543
5544- Line = NULL;
5545+ Line = NULL;
5546 if (HMainEditor.MouseSupported) {
5547
5548 if (HBufferImageMouseNeedRefresh) {
5549@@ -610,6 +613,7 @@ HBufferImageRestoreMousePosition (
5550 // backup the old screen attributes
5551 //
5552 Orig = HMainEditor.ColorAttributes;
5553+ New.Data = 0;
5554 New.Colors.Foreground = Orig.Colors.Background;
5555 New.Colors.Background = Orig.Colors.Foreground;
5556
5557@@ -801,10 +805,10 @@ Returns:
5558 UINTN StartRow;
5559 UINTN EndRow;
5560 UINTN FStartRow;
5561- UINTN FEndRow;
5562 UINTN Tmp;
5563
5564 Orig = HMainEditor.ColorAttributes;
5565+ New.Data = 0;
5566 New.Colors.Foreground = Orig.Colors.Background;
5567 New.Colors.Background = Orig.Colors.Foreground;
5568
5569@@ -870,7 +874,6 @@ Returns:
5570 }
5571
5572 FStartRow = StartRow;
5573- FEndRow = EndRow;
5574
5575 StartRow = TEXT_START_ROW + StartRow - HBufferImage.LowVisibleRow;
5576 EndRow = TEXT_START_ROW + EndRow - HBufferImage.LowVisibleRow;
5577@@ -980,6 +983,10 @@ HBufferImageRead (
5578 case MEM_BUFFER:
5579 Status = HMemImageRead (MemOffset, MemSize, Recover);
5580 break;
5581+
5582+ case NO_BUFFER:
5583+ Status = EFI_UNSUPPORTED;
5584+ break;
5585 }
5586
5587 if (EFI_ERROR (Status)) {
5588@@ -1030,6 +1037,10 @@ HBufferImageSave (
5589 case MEM_BUFFER:
5590 Status = HMemImageSave (MemOffset, MemSize);
5591 break;
5592+
5593+ case NO_BUFFER:
5594+ Status = EFI_UNSUPPORTED;
5595+ break;
5596 }
5597
5598 if (EFI_ERROR (Status)) {
5599@@ -1967,14 +1978,11 @@ Returns:
5600
5601 --*/
5602 {
5603- HEFI_EDITOR_LINE *Line;
5604 UINTN FRow;
5605 UINTN FCol;
5606 UINTN Gap;
5607 INTN Retreat;
5608
5609- Line = HBufferImage.CurrentLine;
5610-
5611 FRow = HBufferImage.BufferPosition.Row;
5612 FCol = HBufferImage.BufferPosition.Column;
5613
5614@@ -1996,7 +2004,7 @@ Returns:
5615 //
5616 // get correct line
5617 //
5618- Line = HMoveLine (Retreat);
5619+ HMoveLine (Retreat);
5620
5621 FRow -= Gap;
5622
5623@@ -2025,13 +2033,10 @@ Returns:
5624
5625 --*/
5626 {
5627- HEFI_EDITOR_LINE *Line;
5628 UINTN FRow;
5629 UINTN FCol;
5630 BOOLEAN HighBits;
5631
5632- Line = HBufferImage.CurrentLine;
5633-
5634 //
5635 // curosr will at the high bit
5636 //
5637@@ -2157,7 +2162,6 @@ Returns:
5638
5639 HEFI_EDITOR_LINE *Line;
5640 EFI_LIST_ENTRY *Link;
5641- UINTN StartRow;
5642
5643 UINTN OldFCol;
5644 UINTN OldFRow;
5645@@ -2167,11 +2171,6 @@ Returns:
5646
5647 EFI_STATUS Status;
5648
5649- //
5650- // get the line that start position is at
5651- //
5652- StartRow = Pos / 0x10;
5653-
5654 Size = HBufferImageGetTotalSize ();
5655
5656 if (Size < Count) {
5657@@ -2300,7 +2299,6 @@ Returns:
5658 HEFI_EDITOR_LINE *Line;
5659
5660 EFI_LIST_ENTRY *Link;
5661- UINTN StartRow;
5662
5663 UINTN OldFCol;
5664 UINTN OldFRow;
5665@@ -2308,11 +2306,6 @@ Returns:
5666
5667 UINTN NewPos;
5668
5669- //
5670- // get the line that start position is at
5671- //
5672- StartRow = Pos / 0x10;
5673-
5674 Size = HBufferImageGetTotalSize ();
5675
5676 //
5677diff --git a/hexedit/libEditor.c b/hexedit/libEditor.c
5678index f511020..ac085b7 100644
5679--- a/hexedit/libEditor.c
5680+++ b/hexedit/libEditor.c
5681@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
5682
5683 --*/
5684
5685-#include "Heditor.h"
5686+#include "heditor.h"
5687
5688 HEFI_EDITOR_COLOR_ATTRIBUTES HOriginalColors;
5689 INTN HOriginalMode;
5690@@ -136,7 +136,7 @@ Returns:
5691 Status = BS->HandleProtocol (
5692 In,
5693 &gEfiSimplePointerProtocolGuid,
5694- &HMainEditor.MouseInterface
5695+ (VOID**)&HMainEditor.MouseInterface
5696 );
5697 if (EFI_ERROR (Status)) {
5698 //
5699@@ -159,7 +159,7 @@ Returns:
5700 Status = BS->HandleProtocol (
5701 HandleBuffer[Index],
5702 &gEfiSimplePointerProtocolGuid,
5703- &HMainEditor.MouseInterface
5704+ (VOID**)&HMainEditor.MouseInterface
5705 );
5706 if (!EFI_ERROR (Status)) {
5707 break;
5708@@ -182,37 +182,37 @@ Returns:
5709 //
5710 Status = HMainTitleBarInit ();
5711 if (EFI_ERROR (Status)) {
5712- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_TITLE), HiiHandle);
5713+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_TITLE), gHexEditHiiHandle);
5714 return EFI_LOAD_ERROR;
5715 }
5716
5717 Status = HMainMenuBarInit ();
5718 if (EFI_ERROR (Status)) {
5719- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_MAINMENU), HiiHandle);
5720+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_MAINMENU), gHexEditHiiHandle);
5721 return EFI_LOAD_ERROR;
5722 }
5723
5724 Status = HMainStatusBarInit ();
5725 if (EFI_ERROR (Status)) {
5726- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_STATUS), HiiHandle);
5727+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_STATUS), gHexEditHiiHandle);
5728 return EFI_LOAD_ERROR;
5729 }
5730
5731 Status = HMainInputBarInit ();
5732 if (EFI_ERROR (Status)) {
5733- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_INPUTBAR), HiiHandle);
5734+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_INPUTBAR), gHexEditHiiHandle);
5735 return EFI_LOAD_ERROR;
5736 }
5737
5738 Status = HBufferImageInit ();
5739 if (EFI_ERROR (Status)) {
5740- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_BUFFERIMAGE), HiiHandle);
5741+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_BUFFERIMAGE), gHexEditHiiHandle);
5742 return EFI_LOAD_ERROR;
5743 }
5744
5745 Status = HClipBoardInit ();
5746 if (EFI_ERROR (Status)) {
5747- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_CLIPBOARD), HiiHandle);
5748+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_CLIPBOARD), gHexEditHiiHandle);
5749 return EFI_LOAD_ERROR;
5750 }
5751 //
5752@@ -259,32 +259,32 @@ Returns:
5753 //
5754 Status = HMainTitleBarCleanup ();
5755 if (EFI_ERROR (Status)) {
5756- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_TITLEBAR_CLEAN), HiiHandle);
5757+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_TITLEBAR_CLEAN), gHexEditHiiHandle);
5758 }
5759
5760 Status = HMainMenuBarCleanup ();
5761 if (EFI_ERROR (Status)) {
5762- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MENUBAR_CLEAN), HiiHandle);
5763+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MENUBAR_CLEAN), gHexEditHiiHandle);
5764 }
5765
5766 Status = HMainStatusBarCleanup ();
5767 if (EFI_ERROR (Status)) {
5768- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_STATUSBAR_CLEAN), HiiHandle);
5769+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_STATUSBAR_CLEAN), gHexEditHiiHandle);
5770 }
5771
5772 Status = HMainInputBarCleanup ();
5773 if (EFI_ERROR (Status)) {
5774- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_INPUTBAR_CLEAN), HiiHandle);
5775+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_INPUTBAR_CLEAN), gHexEditHiiHandle);
5776 }
5777
5778 Status = HBufferImageCleanup ();
5779 if (EFI_ERROR (Status)) {
5780- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_BUFFERIMAGE_CLEAN), HiiHandle);
5781+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_BUFFERIMAGE_CLEAN), gHexEditHiiHandle);
5782 }
5783
5784 Status = HClipBoardCleanup ();
5785 if (EFI_ERROR (Status)) {
5786- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_CLIPBOARD_CLEAN), HiiHandle);
5787+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_CLIPBOARD_CLEAN), gHexEditHiiHandle);
5788 }
5789 //
5790 // restore old mode
5791@@ -732,6 +732,9 @@ Returns:
5792 case MEM_BUFFER:
5793 OldSize = HBufferImage.MemImage->Size;
5794 break;
5795+
5796+ default:
5797+ break;
5798 }
5799
5800 if (LengthChange == FALSE) {
5801diff --git a/hexedit/libInputBar.c b/hexedit/libInputBar.c
5802index 3a4cc7e..1cb911f 100644
5803--- a/hexedit/libInputBar.c
5804+++ b/hexedit/libInputBar.c
5805@@ -169,8 +169,6 @@ Returns:
5806 UINTN Size;
5807 EFI_STATUS Status;
5808 BOOLEAN NoDisplay;
5809- UINTN Limit;
5810- UINTN PromptLen;
5811
5812 //
5813 // variable initialization
5814@@ -190,6 +188,7 @@ Returns:
5815 // back up the old screen attributes
5816 //
5817 Orig = HMainEditor.ColorAttributes;
5818+ New.Data = 0;
5819 New.Colors.Foreground = Orig.Colors.Background;
5820 New.Colors.Background = Orig.Colors.Foreground;
5821
5822@@ -201,13 +200,7 @@ Returns:
5823 HEditorClearLine (INPUT_BAR_LOCATION);
5824
5825 Out->SetCursorPosition (Out, 0, INPUT_BAR_LOCATION - 1);
5826- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBINPUTBAR_MAININPUTBAR), HiiHandle, HMainInputBar.Prompt);
5827-
5828- //
5829- // that's the maximum input length that can be displayed on screen
5830- //
5831- PromptLen = StrLen (HMainInputBar.Prompt);
5832- Limit = HMainEditor.ScreenSize.Column - PromptLen;
5833+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBINPUTBAR_MAININPUTBAR), gHexEditHiiHandle, HMainInputBar.Prompt);
5834
5835 //
5836 // this is a selection prompt, cursor will stay in edit area
5837diff --git a/hexedit/libMemImage.c b/hexedit/libMemImage.c
5838index 407bb2e..2fed45b 100644
5839--- a/hexedit/libMemImage.c
5840+++ b/hexedit/libMemImage.c
5841@@ -91,7 +91,7 @@ Returns:
5842 Status = BS->LocateProtocol (
5843 &gEfiPciRootBridgeIoProtocolGuid,
5844 NULL,
5845- &HMemImage.IoFncs
5846+ (VOID**)&HMemImage.IoFncs
5847 );
5848 if (Status == EFI_NOT_FOUND) {
5849 //
5850@@ -225,9 +225,6 @@ Returns:
5851 CHAR16 *Str;
5852 HEFI_EDITOR_LINE *Line;
5853
5854- HEFI_EDITOR_ACTIVE_BUFFER_TYPE BufferTypeBackup;
5855-
5856- BufferTypeBackup = HBufferImage.BufferType;
5857 HBufferImage.BufferType = MEM_BUFFER;
5858
5859 Buffer = AllocatePool (Size);
5860@@ -344,8 +341,6 @@ Returns:
5861 EFI_STATUS Status;
5862 VOID *Buffer;
5863
5864- HEFI_EDITOR_ACTIVE_BUFFER_TYPE BufferTypeBackup;
5865-
5866 //
5867 // not modified, so directly return
5868 //
5869@@ -353,7 +348,6 @@ Returns:
5870 return EFI_SUCCESS;
5871 }
5872
5873- BufferTypeBackup = HBufferImage.BufferType;
5874 HBufferImage.BufferType = MEM_BUFFER;
5875
5876 Buffer = AllocatePool (Size);
5877diff --git a/hexedit/libMenuBar.c b/hexedit/libMenuBar.c
5878index 5ecb694..00bfa99 100644
5879--- a/hexedit/libMenuBar.c
5880+++ b/hexedit/libMenuBar.c
5881@@ -222,7 +222,6 @@ Returns:
5882 CHAR16 *NameString;
5883 CHAR16 *FunctionKeyString;
5884 UINTN BufferSize;
5885- EFI_STATUS Status;
5886
5887 //
5888 // variable initialization
5889@@ -255,9 +254,9 @@ Returns:
5890 FunctionKeyString = AllocatePool (BufferSize);
5891
5892 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
5893- Status = Hii->GetString (Hii, HiiHandle, Item->NameToken, FALSE, NULL, &BufferSize, NameString);
5894+ Hii->GetString (Hii, gHexEditHiiHandle, Item->NameToken, FALSE, NULL, &BufferSize, NameString);
5895 #else
5896- Status = LibGetString (HiiHandle, Item->NameToken, NameString, &BufferSize);
5897+ LibGetString (gHexEditHiiHandle, Item->NameToken, NameString, &BufferSize);
5898 #endif
5899
5900 Width = max ((StrLen (NameString) + 6), 18);
5901@@ -267,9 +266,9 @@ Returns:
5902 }
5903
5904 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
5905- Status = Hii->GetString (Hii, HiiHandle, Item->FunctionKeyToken, FALSE, NULL, &BufferSize, FunctionKeyString);
5906+ Hii->GetString (Hii, gHexEditHiiHandle, Item->FunctionKeyToken, FALSE, NULL, &BufferSize, FunctionKeyString);
5907 #else
5908- Status = LibGetString (HiiHandle, Item->FunctionKeyToken, FunctionKeyString, &BufferSize);
5909+ LibGetString (gHexEditHiiHandle, Item->FunctionKeyToken, FunctionKeyString, &BufferSize);
5910 #endif
5911 if (Index >= 10) {
5912 PrintAt (Col - 1, Row - 1, L"%E%s%N %H%s%N ", FunctionKeyString, NameString);
5913@@ -1138,7 +1137,6 @@ Returns:
5914 // the file won't be saved
5915 //
5916 return EFI_SUCCESS;
5917- break;
5918
5919 case L'c':
5920 case L'C':
5921@@ -1567,7 +1565,6 @@ Returns:
5922 --*/
5923 {
5924 UINTN Index;
5925- HEFI_EDITOR_LINE *Line;
5926 EFI_LIST_ENTRY *Link;
5927 UINT8 *Buffer;
5928 UINTN Count;
5929@@ -1592,8 +1589,6 @@ Returns:
5930 Link = Link->Flink;
5931 }
5932
5933- Line = CR (Link, HEFI_EDITOR_LINE, Link, EFI_EDITOR_LINE_LIST);
5934-
5935 Count = HMainEditor.SelectEnd - HMainEditor.SelectStart + 1;
5936 Buffer = AllocatePool (Count);
5937 if (Buffer == NULL) {
5938diff --git a/hexedit/libMisc.h b/hexedit/libMisc.h
5939index 979a7f0..5c2216b 100644
5940--- a/hexedit/libMisc.h
5941+++ b/hexedit/libMisc.h
5942@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
5943 #ifndef _LIB_MISC_H_
5944 #define _LIB_MISC_H_
5945
5946-#include "Heditortype.h"
5947+#include "heditortype.h"
5948
5949 VOID
5950 HEditorClearLine (
5951@@ -108,3 +108,4 @@ HXtoi (
5952 );
5953
5954 #endif
5955+
5956diff --git a/hexedit/libStatusBar.c b/hexedit/libStatusBar.c
5957index 59d3d4b..278b3ba 100644
5958--- a/hexedit/libStatusBar.c
5959+++ b/hexedit/libStatusBar.c
5960@@ -173,6 +173,7 @@ Returns:
5961 // back up the screen attributes
5962 //
5963 Orig = HMainEditor.ColorAttributes;
5964+ New.Data = 0;
5965 New.Colors.Foreground = Orig.Colors.Background;
5966 New.Colors.Background = Orig.Colors.Foreground;
5967
5968diff --git a/hexedit/libTitleBar.c b/hexedit/libTitleBar.c
5969index 9e7b9e9..cf010f5 100644
5970--- a/hexedit/libTitleBar.c
5971+++ b/hexedit/libTitleBar.c
5972@@ -166,6 +166,7 @@ Returns:
5973 // backup the old screen attributes
5974 //
5975 Orig = HMainEditor.ColorAttributes;
5976+ New.Data = 0;
5977 New.Colors.Foreground = Orig.Colors.Background;
5978 New.Colors.Background = Orig.Colors.Foreground;
5979
5980@@ -212,7 +213,7 @@ Returns:
5981 // the space for file name is 35 characters
5982 //
5983 if (StrLen (FileNameTmp) <= 35) {
5984- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR), HiiHandle, FileNameTmp);
5985+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR), gHexEditHiiHandle, FileNameTmp);
5986
5987 for (Index = StrLen (FileNameTmp); Index < 35; Index++) {
5988 Print (L" ");
5989@@ -220,7 +221,7 @@ Returns:
5990
5991 } else {
5992 for (Index = 0; Index < 32; Index++) {
5993- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR_C), HiiHandle, FileNameTmp[Index]);
5994+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR_C), gHexEditHiiHandle, FileNameTmp[Index]);
5995 }
5996 //
5997 // print "..."
5998@@ -234,14 +235,14 @@ Returns:
5999 if (StrLen (HMainEditor.BufferImage->DiskImage->Name) <= 9) {
6000 PrintToken (
6001 STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR),
6002- HiiHandle,
6003+ gHexEditHiiHandle,
6004 HMainEditor.BufferImage->DiskImage->Name
6005 );
6006 } else {
6007 for (Index = 0; Index < 6; Index++) {
6008 PrintToken (
6009 STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR_C),
6010- HiiHandle,
6011+ gHexEditHiiHandle,
6012 HMainEditor.BufferImage->DiskImage->Name[Index]
6013 );
6014 }
6015@@ -253,7 +254,7 @@ Returns:
6016
6017 PrintToken (
6018 STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR_TWOVARS),
6019- HiiHandle,
6020+ gHexEditHiiHandle,
6021 HMainEditor.BufferImage->DiskImage->Offset,
6022 HMainEditor.BufferImage->DiskImage->Offset + HMainEditor.BufferImage->DiskImage->Size - 1
6023 );
6024@@ -269,7 +270,7 @@ Returns:
6025 case MEM_BUFFER:
6026 PrintToken (
6027 STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR_TWOVARS),
6028- HiiHandle,
6029+ gHexEditHiiHandle,
6030 HMainEditor.BufferImage->MemImage->Offset,
6031 HMainEditor.BufferImage->MemImage->Offset + HMainEditor.BufferImage->MemImage->Size - 1
6032 );
6033@@ -280,21 +281,26 @@ Returns:
6034
6035 break;
6036
6037+ default:
6038+ break;
6039 }
6040 //
6041 // 9 characters
6042 //
6043 switch (HMainEditor.BufferImage->BufferType) {
6044 case FILE_BUFFER:
6045- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_FILE), HiiHandle);
6046+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_FILE), gHexEditHiiHandle);
6047 break;
6048
6049 case DISK_BUFFER:
6050- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_DISK), HiiHandle);
6051+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_DISK), gHexEditHiiHandle);
6052 break;
6053
6054 case MEM_BUFFER:
6055- PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MEM), HiiHandle);
6056+ PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MEM), gHexEditHiiHandle);
6057+ break;
6058+
6059+ default:
6060 break;
6061 }
6062 //
6063diff --git a/hexedit/libbufferimage.h b/hexedit/libbufferimage.h
6064index 71b48c2..ed8c673 100644
6065--- a/hexedit/libbufferimage.h
6066+++ b/hexedit/libbufferimage.h
6067@@ -253,3 +253,4 @@ HBufferImageIsInSelectedArea (
6068 );
6069
6070 #endif
6071+
6072diff --git a/hexedit/libclipboard.h b/hexedit/libclipboard.h
6073index 1604fc5..766f089 100644
6074--- a/hexedit/libclipboard.h
6075+++ b/hexedit/libclipboard.h
6076@@ -43,3 +43,4 @@ HClipBoardGet (
6077 );
6078
6079 #endif
6080+
6081diff --git a/hexedit/libdiskimage.c b/hexedit/libdiskimage.c
6082index 7e11ad0..5b67a76 100644
6083--- a/hexedit/libdiskimage.c
6084+++ b/hexedit/libdiskimage.c
6085@@ -228,11 +228,7 @@ Returns:
6086 UINTN Bytes;
6087
6088 HEFI_EDITOR_LINE *Line;
6089- UINT64 ByteOffset;
6090
6091- HEFI_EDITOR_ACTIVE_BUFFER_TYPE BufferTypeBackup;
6092-
6093- BufferTypeBackup = HBufferImage.BufferType;
6094 HBufferImage.BufferType = DISK_BUFFER;
6095
6096 DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) ShellGetMap (DeviceName);
6097@@ -246,7 +242,7 @@ Returns:
6098 Status = LibDevicePathToInterface (
6099 &gEfiBlockIoProtocolGuid,
6100 DevicePath,
6101- &BlkIo
6102+ (VOID**)&BlkIo
6103 );
6104 if (EFI_ERROR (Status)) {
6105 HMainStatusBarSetStatusString (L"Read Disk Failed");
6106@@ -269,8 +265,6 @@ Returns:
6107 return EFI_OUT_OF_RESOURCES;
6108 }
6109
6110- ByteOffset = MultU64x32 (Offset, BlkIo->Media->BlockSize);
6111-
6112 //
6113 // read from disk
6114 //
6115@@ -405,10 +399,6 @@ Returns:
6116 VOID *Buffer;
6117 UINTN Bytes;
6118
6119- UINT64 ByteOffset;
6120-
6121- HEFI_EDITOR_ACTIVE_BUFFER_TYPE BufferTypeBackup;
6122-
6123 //
6124 // if not modified, directly return
6125 //
6126@@ -416,7 +406,6 @@ Returns:
6127 return EFI_SUCCESS;
6128 }
6129
6130- BufferTypeBackup = HBufferImage.BufferType;
6131 HBufferImage.BufferType = DISK_BUFFER;
6132
6133 DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) ShellGetMap (DeviceName);
6134@@ -427,7 +416,7 @@ Returns:
6135 Status = LibDevicePathToInterface (
6136 &gEfiBlockIoProtocolGuid,
6137 DevicePath,
6138- &BlkIo
6139+ (VOID**)&BlkIo
6140 );
6141 if (EFI_ERROR (Status)) {
6142 return Status;
6143@@ -448,8 +437,6 @@ Returns:
6144 return Status;
6145 }
6146
6147- ByteOffset = MultU64x32 (Offset, BlkIo->Media->BlockSize);
6148-
6149 //
6150 // write the buffer to disk
6151 //
6152diff --git a/hexedit/libdiskimage.h b/hexedit/libdiskimage.h
6153index 505c857..4effe6c 100644
6154--- a/hexedit/libdiskimage.h
6155+++ b/hexedit/libdiskimage.h
6156@@ -58,3 +58,4 @@ HDiskImageSave (
6157 );
6158
6159 #endif
6160+
6161diff --git a/hexedit/libeditor.h b/hexedit/libeditor.h
6162index 6c2e3d9..573eca6 100644
6163--- a/hexedit/libeditor.h
6164+++ b/hexedit/libeditor.h
6165@@ -47,3 +47,4 @@ HMainEditorBackup (
6166 );
6167
6168 #endif
6169+
6170diff --git a/hexedit/libfileimage.h b/hexedit/libfileimage.h
6171index baff90c..5ae42b3 100644
6172--- a/hexedit/libfileimage.h
6173+++ b/hexedit/libfileimage.h
6174@@ -59,3 +59,4 @@ HFileImageSave (
6175 );
6176
6177 #endif
6178+
6179diff --git a/hexedit/libinputbar.h b/hexedit/libinputbar.h
6180index 24a8973..f7f14ca 100644
6181--- a/hexedit/libinputbar.h
6182+++ b/hexedit/libinputbar.h
6183@@ -44,3 +44,4 @@ HMainInputBarSetStringSize (
6184 );
6185
6186 #endif
6187+
6188diff --git a/hexedit/libmemimage.h b/hexedit/libmemimage.h
6189index 98c0c08..7cae8b7 100644
6190--- a/hexedit/libmemimage.h
6191+++ b/hexedit/libmemimage.h
6192@@ -55,3 +55,4 @@ HMemImageSave (
6193 );
6194
6195 #endif
6196+
6197diff --git a/hexedit/libmenubar.h b/hexedit/libmenubar.h
6198index e3766e2..2ee2033 100644
6199--- a/hexedit/libmenubar.h
6200+++ b/hexedit/libmenubar.h
6201@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
6202 #ifndef _LIB_MENU_BAR_H_
6203 #define _LIB_MENU_BAR_H_
6204
6205-#include "Heditortype.h"
6206+#include "heditortype.h"
6207
6208 EFI_STATUS
6209 HMainMenuBarInit (
6210@@ -94,3 +94,4 @@ HMainCommandExit (
6211 );
6212
6213 #endif
6214+
6215diff --git a/hexedit/libstatusbar.h b/hexedit/libstatusbar.h
6216index eade183..6ee05a3 100644
6217--- a/hexedit/libstatusbar.h
6218+++ b/hexedit/libstatusbar.h
6219@@ -55,3 +55,4 @@ HMainStatusBarBackup (
6220 );
6221
6222 #endif
6223+
6224diff --git a/hexedit/libtitlebar.h b/hexedit/libtitlebar.h
6225index b6045ab..948cd43 100644
6226--- a/hexedit/libtitlebar.h
6227+++ b/hexedit/libtitlebar.h
6228@@ -46,3 +46,4 @@ HMainTitleBarBackup (
6229 );
6230
6231 #endif
6232+
6233diff --git a/hexedit/main.c b/hexedit/main.c
6234index 9c2a032..43340d8 100644
6235--- a/hexedit/main.c
6236+++ b/hexedit/main.c
6237@@ -27,7 +27,7 @@ extern UINT8 STRING_ARRAY_NAME[];
6238 //
6239 // Global Variables
6240 //
6241-EFI_HII_HANDLE HiiHandle;
6242+EFI_HII_HANDLE gHexEditHiiHandle;
6243 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
6244 EFI_HII_PROTOCOL *Hii;
6245 #endif
6246@@ -67,7 +67,7 @@ SHELL_VAR_CHECK_ITEM HexeditCheckList[] = {
6247 NULL,
6248 0,
6249 0,
6250- 0
6251+ (SHELL_VAR_CHECK_FLAG_TYPE)0
6252 }
6253 };
6254
6255@@ -93,10 +93,10 @@ PrintUsage (
6256 VOID
6257 )
6258 {
6259- PrintToken (STRING_TOKEN (STR_HEXEDIT_USAGE), HiiHandle);
6260- PrintToken (STRING_TOKEN (STR_HEXEDIT_FILENAME), HiiHandle);
6261- PrintToken (STRING_TOKEN (STR_HEXEDIT_DISKNAME), HiiHandle);
6262- PrintToken (STRING_TOKEN (STR_HEXEDIT_OFFSET_SIZE), HiiHandle);
6263+ PrintToken (STRING_TOKEN (STR_HEXEDIT_USAGE), gHexEditHiiHandle);
6264+ PrintToken (STRING_TOKEN (STR_HEXEDIT_FILENAME), gHexEditHiiHandle);
6265+ PrintToken (STRING_TOKEN (STR_HEXEDIT_DISKNAME), gHexEditHiiHandle);
6266+ PrintToken (STRING_TOKEN (STR_HEXEDIT_OFFSET_SIZE), gHexEditHiiHandle);
6267 Print (L"\n\n");
6268 }
6269
6270@@ -147,7 +147,7 @@ Returns:
6271 EFI_SHELL_APP_INIT (ImageHandle, SystemTable);
6272
6273 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
6274- Status = LibLocateProtocol (&gEfiHiiProtocolGuid, &Hii);
6275+ Status = LibLocateProtocol (&gEfiHiiProtocolGuid, (VOID**)&Hii);
6276 if (EFI_ERROR (Status)) {
6277 return Status;
6278 }
6279@@ -158,12 +158,12 @@ Returns:
6280 // Register our string package with HII and return the handle to it.
6281 // If previously registered we will simply receive the handle
6282 //
6283- EFI_SHELL_STR_INIT (HiiHandle, STRING_ARRAY_NAME, EfiHexeditGuid);
6284+ EFI_SHELL_STR_INIT (gHexEditHiiHandle, STRING_ARRAY_NAME, EfiHexeditGuid);
6285
6286 if (!EFI_PROPER_VERSION (1, 10)) {
6287 PrintToken (
6288 STRING_TOKEN (STR_SHELLENV_GNC_COMMAND_NOT_SUPPORT),
6289- HiiHandle,
6290+ gHexEditHiiHandle,
6291 L"hexedit",
6292 EFI_VERSION_1_10
6293 );
6294@@ -187,17 +187,17 @@ Returns:
6295 switch (RetCode) {
6296 case VarCheckConflict:
6297
6298- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_FLAG_CONFLICT), HiiHandle, L"hexedit", Useful);
6299+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_FLAG_CONFLICT), gHexEditHiiHandle, L"hexedit", Useful);
6300 break;
6301
6302 case VarCheckDuplicate:
6303
6304- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_DUP_FLAG), HiiHandle, L"hexedit", Useful);
6305+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_DUP_FLAG), gHexEditHiiHandle, L"hexedit", Useful);
6306 break;
6307
6308 case VarCheckUnknown:
6309
6310- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), HiiHandle, L"hexedit", Useful);
6311+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), gHexEditHiiHandle, L"hexedit", Useful);
6312 break;
6313
6314 default:
6315@@ -220,10 +220,10 @@ Returns:
6316 ChkPck.FlagCount > 2 ||
6317 (ChkPck.FlagCount == 2 && LibCheckVarGetFlag (&ChkPck, L"-b") == NULL)
6318 ) {
6319- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"hexedit");
6320+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gHexEditHiiHandle, L"hexedit");
6321 Status = EFI_INVALID_PARAMETER;
6322 } else {
6323- PrintToken (STRING_TOKEN (STR_HEXEDIT_VERBOSE_HELP), HiiHandle);
6324+ PrintToken (STRING_TOKEN (STR_HEXEDIT_VERBOSE_HELP), gHexEditHiiHandle);
6325 Status = EFI_SUCCESS;
6326 }
6327
6328@@ -233,13 +233,13 @@ Returns:
6329 Item = LibCheckVarGetFlag (&ChkPck, L"-d");
6330 if (Item) {
6331 if (3 < ChkPck.ValueCount) {
6332- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"hexedit");
6333+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gHexEditHiiHandle, L"hexedit");
6334 Status = EFI_INVALID_PARAMETER;
6335 goto done;
6336 }
6337
6338 if (3 > ChkPck.ValueCount) {
6339- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), HiiHandle, L"hexedit");
6340+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), gHexEditHiiHandle, L"hexedit");
6341 Status = EFI_INVALID_PARAMETER;
6342 goto done;
6343 }
6344@@ -249,7 +249,7 @@ Returns:
6345 Item = Item->Next;
6346 Result = HXtoi (Item->VarStr, &Offset);
6347 if (EFI_ERROR (Result)) {
6348- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
6349+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
6350 Status = EFI_INVALID_PARAMETER;
6351 goto done;
6352 }
6353@@ -257,13 +257,13 @@ Returns:
6354 Item = Item->Next;
6355 Result = HXtoi (Item->VarStr, &Size);
6356 if (EFI_ERROR (Result)) {
6357- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
6358+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
6359 Status = EFI_INVALID_PARAMETER;
6360 goto done;
6361 }
6362
6363 if (Offset < 0 || Size <= 0) {
6364- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
6365+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
6366 Status = EFI_INVALID_PARAMETER;
6367 goto done;
6368 }
6369@@ -274,13 +274,13 @@ Returns:
6370 Item = LibCheckVarGetFlag (&ChkPck, L"-m");
6371 if (Item) {
6372 if (2 < ChkPck.ValueCount) {
6373- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"hexedit");
6374+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gHexEditHiiHandle, L"hexedit");
6375 Status = EFI_INVALID_PARAMETER;
6376 goto done;
6377 }
6378
6379 if (2 > ChkPck.ValueCount) {
6380- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), HiiHandle, L"hexedit");
6381+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), gHexEditHiiHandle, L"hexedit");
6382 Status = EFI_INVALID_PARAMETER;
6383 goto done;
6384 }
6385@@ -288,7 +288,7 @@ Returns:
6386 Item = ChkPck.VarList;
6387 Result = HXtoi (Item->VarStr, &Offset);
6388 if (EFI_ERROR (Result)) {
6389- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
6390+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
6391 Status = EFI_INVALID_PARAMETER;
6392 goto done;
6393 }
6394@@ -296,20 +296,20 @@ Returns:
6395 Item = Item->Next;
6396 Result = HXtoi (Item->VarStr, &Size);
6397 if (EFI_ERROR (Result)) {
6398- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
6399+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
6400 Status = EFI_INVALID_PARAMETER;
6401 goto done;
6402 }
6403
6404 if (Offset < 0 || Size <= 0) {
6405- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
6406+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
6407 Status = EFI_INVALID_PARAMETER;
6408 goto done;
6409 }
6410
6411 LastOffset = (UINT64) Offset + (UINT64) Size - (UINT64) 1;
6412 if (LastOffset > 0xffffffff) {
6413- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
6414+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
6415 goto done;
6416 }
6417
6418@@ -319,13 +319,13 @@ Returns:
6419 Item = LibCheckVarGetFlag (&ChkPck, L"-f");
6420 if (Item) {
6421 if (1 < ChkPck.ValueCount) {
6422- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"hexedit");
6423+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gHexEditHiiHandle, L"hexedit");
6424 Status = EFI_INVALID_PARAMETER;
6425 goto done;
6426 }
6427
6428 if (1 > ChkPck.ValueCount) {
6429- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), HiiHandle, L"hexedit");
6430+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), gHexEditHiiHandle, L"hexedit");
6431 Status = EFI_INVALID_PARAMETER;
6432 goto done;
6433 }
6434@@ -333,7 +333,7 @@ Returns:
6435 Item = ChkPck.VarList;
6436 Name = Item->VarStr;
6437 if (!HIsValidFileName (Name)) {
6438- PrintToken (STRING_TOKEN (STR_HEXEDIT_FILE_NAME), HiiHandle);
6439+ PrintToken (STRING_TOKEN (STR_HEXEDIT_FILE_NAME), gHexEditHiiHandle);
6440 Status = EFI_INVALID_PARAMETER;
6441 goto done;
6442 }
6443@@ -345,20 +345,20 @@ Returns:
6444 if (Name != NULL) {
6445 FreeName = TRUE;
6446 } else {
6447- PrintToken(STRING_TOKEN (STR_HEXEDIT_INVALID_DIRECTORY), HiiHandle, L"hexedit");
6448+ PrintToken(STRING_TOKEN (STR_HEXEDIT_INVALID_DIRECTORY), gHexEditHiiHandle, L"hexedit");
6449 Status = EFI_INVALID_PARAMETER;
6450 goto done ;
6451 }
6452 } else if (1 == ChkPck.ValueCount) {
6453 Name = ChkPck.VarList->VarStr;
6454 } else {
6455- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"hexedit");
6456+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gHexEditHiiHandle, L"hexedit");
6457 Status = EFI_INVALID_PARAMETER;
6458 goto done;
6459 }
6460
6461 if (!HIsValidFileName (Name)) {
6462- PrintToken (STRING_TOKEN (STR_HEXEDIT_FILE_NAME), HiiHandle);
6463+ PrintToken (STRING_TOKEN (STR_HEXEDIT_FILE_NAME), gHexEditHiiHandle);
6464 Status = EFI_INVALID_PARAMETER;
6465 goto done;
6466 }
6467@@ -367,7 +367,7 @@ Returns:
6468 }
6469
6470 if (SI->RedirArgc != 0) {
6471- PrintToken (STRING_TOKEN (STR_HEXEDIT_NOREDIRECT), HiiHandle);
6472+ PrintToken (STRING_TOKEN (STR_HEXEDIT_NOREDIRECT), gHexEditHiiHandle);
6473 Status = EFI_INVALID_PARAMETER;
6474 goto done;
6475 }
6476@@ -376,7 +376,7 @@ Returns:
6477 if (EFI_ERROR (Status)) {
6478 Out->ClearScreen (Out);
6479 Out->EnableCursor (Out, TRUE);
6480- PrintToken (STRING_TOKEN (STR_HEXEDIT_INIT_FAILED), HiiHandle);
6481+ PrintToken (STRING_TOKEN (STR_HEXEDIT_INIT_FAILED), gHexEditHiiHandle);
6482 goto done;
6483 }
6484
6485@@ -421,7 +421,9 @@ Returns:
6486 FALSE
6487 );
6488 break;
6489-
6490+ case NEW_FILE:
6491+ Status = EFI_UNSUPPORTED;
6492+ break;
6493 }
6494
6495 if (!EFI_ERROR (Status)) {
6496@@ -453,19 +455,19 @@ Returns:
6497 //
6498 if (Status == EFI_SUCCESS) {
6499 } else if (Status == EFI_OUT_OF_RESOURCES) {
6500- PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_OUT_RESOURCE), HiiHandle, L"hexedit");
6501+ PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_OUT_RESOURCE), gHexEditHiiHandle, L"hexedit");
6502 } else {
6503 if (Buffer != NULL) {
6504 if (StrCmp (Buffer, L"") != 0) {
6505 //
6506 // print out the status string
6507 //
6508- PrintToken (STRING_TOKEN (STR_HEXEDIT_ONE_VAR), HiiHandle, Buffer);
6509+ PrintToken (STRING_TOKEN (STR_HEXEDIT_ONE_VAR), gHexEditHiiHandle, Buffer);
6510 } else {
6511- PrintToken (STRING_TOKEN (STR_HEXEDIT_UNKNOWN_EDITOR), HiiHandle);
6512+ PrintToken (STRING_TOKEN (STR_HEXEDIT_UNKNOWN_EDITOR), gHexEditHiiHandle);
6513 }
6514 } else {
6515- PrintToken (STRING_TOKEN (STR_HEXEDIT_UNKNOWN_EDITOR), HiiHandle);
6516+ PrintToken (STRING_TOKEN (STR_HEXEDIT_UNKNOWN_EDITOR), gHexEditHiiHandle);
6517 }
6518 }
6519
6520diff --git a/inc/shellenv.h b/inc/shellenv.h
6521index 1334f2c..10b28c9 100644
6522--- a/inc/shellenv.h
6523+++ b/inc/shellenv.h
6524@@ -492,3 +492,4 @@ UnInstallShellEnvironment (
6525 #endif
6526
6527 #endif // _SHELLENV_H_
6528+
6529diff --git a/inc/shelltypes.h b/inc/shelltypes.h
6530index 1b6cc38..36de6c7 100644
6531--- a/inc/shelltypes.h
6532+++ b/inc/shelltypes.h
6533@@ -36,7 +36,7 @@ extern "C"
6534 #endif
6535
6536 #include "Tiano.h"
6537-#include "linkedlist.h"
6538+#include "LinkedList.h"
6539
6540 #include EFI_PROTOCOL_DEFINITION (FileInfo)
6541 #include EFI_PROTOCOL_DEFINITION (SimpleFileSystem)
6542@@ -183,3 +183,4 @@ typedef struct {
6543 #endif
6544
6545 #endif
6546+
6547diff --git a/load/load.c b/load/load.c
6548index 44247cc..b268c58 100644
6549--- a/load/load.c
6550+++ b/load/load.c
6551@@ -60,7 +60,7 @@ SHELL_VAR_CHECK_ITEM LoadCheckList[] = {
6552 NULL,
6553 0,
6554 0,
6555- 0
6556+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
6557 }
6558 };
6559
6560diff --git a/load/load.h b/load/load.h
6561index 477c816..746aa89 100644
6562--- a/load/load.h
6563+++ b/load/load.h
6564@@ -33,3 +33,4 @@ Revision History
6565 }
6566
6567 #endif
6568+
6569diff --git a/load/load.inf b/load/load.inf
6570index 3ba1dbf..6d1785d 100644
6571--- a/load/load.inf
6572+++ b/load/load.inf
6573@@ -39,23 +39,23 @@ FILE_GUID = 5B93B225-2E47-4a61-8EE5-B8EA42EE3EA8
6574 COMPONENT_TYPE = APPLICATION
6575
6576 [sources.common]
6577- ..\ShCommonStrings.uni
6578+ ../ShCommonStrings.uni
6579 LoadStrings.uni
6580 load.c
6581
6582 [includes.common]
6583 .
6584- ..\Inc
6585- ..\Library
6586- $(EDK_SOURCE)\Foundation
6587- $(EDK_SOURCE)\Foundation\Include
6588- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
6589- $(EDK_SOURCE)\Foundation\Efi
6590- $(EDK_SOURCE)\Foundation\Efi\Include
6591- $(EDK_SOURCE)\Foundation\FrameWork
6592- $(EDK_SOURCE)\Foundation\FrameWork\Include
6593- $(EDK_SOURCE)\Foundation\Core\Dxe
6594- $(DEST_DIR)\
6595+ ../Inc
6596+ ../Library
6597+ $(EDK_SOURCE)/Foundation
6598+ $(EDK_SOURCE)/Foundation/Include
6599+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
6600+ $(EDK_SOURCE)/Foundation/Efi
6601+ $(EDK_SOURCE)/Foundation/Efi/Include
6602+ $(EDK_SOURCE)/Foundation/FrameWork
6603+ $(EDK_SOURCE)/Foundation/FrameWork/Include
6604+ $(EDK_SOURCE)/Foundation/Core/Dxe
6605+ $(DEST_DIR./
6606
6607 [libraries.common]
6608 EfiShellLib
6609@@ -70,6 +70,11 @@ COMPONENT_TYPE = APPLICATION
6610
6611 [nmake.common]
6612 IMAGE_ENTRY_POINT=InitializeLoad
6613+
6614+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
6615 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
6616 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
6617 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
6618+
6619+[nmake.ARM, nmake.AARCH64]
6620+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
6621diff --git a/ls/ls.c b/ls/ls.c
6622index bfb4f9c..0d731d7 100644
6623--- a/ls/ls.c
6624+++ b/ls/ls.c
6625@@ -59,7 +59,7 @@ SHELL_VAR_CHECK_ITEM LsCheckList[] = {
6626 NULL,
6627 0,
6628 0,
6629- 0
6630+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
6631 }
6632 };
6633
6634@@ -199,7 +199,6 @@ Returns:
6635 CHAR16 *PtrTwo;
6636 CHAR16 *Path;
6637 EFI_LIST_ENTRY DirList;
6638- EFI_LIST_ENTRY *Link;
6639 SHELL_FILE_ARG *Arg;
6640 BOOLEAN WildcardsEncountered;
6641 CHAR16 *Pattern;
6642@@ -210,7 +209,6 @@ Returns:
6643 Argv = SI->Argv;
6644 PtrTwo = NULL;
6645 InitializeListHead (&DirList);
6646- Link = NULL;
6647 Arg = NULL;
6648 Pattern = NULL;
6649 Status = EFI_SUCCESS;
6650@@ -815,8 +813,6 @@ GetPattern (
6651 CHAR16 *Path
6652 )
6653 {
6654-
6655- EFI_STATUS Status;
6656 CHAR16 *PtrOne;
6657 CHAR16 *PtrTwo;
6658 UINTN Index1;
6659@@ -825,7 +821,6 @@ GetPattern (
6660 BOOLEAN LeadingBlanks;
6661
6662 LeadingBlanks = TRUE;
6663- Status = EFI_SUCCESS;
6664
6665 for (PtrOne = PtrTwo = Path; PtrOne < Path + StrLen (Path); PtrOne++) {
6666 if ((*PtrOne) == ' ' && LeadingBlanks) {
6667@@ -917,14 +912,14 @@ IsMatch (
6668
6669 if ((IsMatch && mIgnoreAttribute) ||
6670 (IsMatch && !mAttributes && !(Info->Attribute & EFI_FILE_HIDDEN) && !(Info->Attribute & EFI_FILE_SYSTEM)) ||
6671- IsMatch &&
6672+ (IsMatch &&
6673 mAttributes &&
6674 (
6675 (mAttribA ? (Info->Attribute & EFI_FILE_ARCHIVE ? TRUE : FALSE) : TRUE) &&
6676 (mAttribH ? (Info->Attribute & EFI_FILE_HIDDEN ? TRUE : FALSE) : TRUE) &&
6677 (mAttribR ? (Info->Attribute & EFI_FILE_READ_ONLY ? TRUE : FALSE) : TRUE) &&
6678 (mAttribS ? (Info->Attribute & EFI_FILE_SYSTEM ? TRUE : FALSE) : TRUE) &&
6679- (mAttribD ? (Info->Attribute & EFI_FILE_DIRECTORY ? TRUE : FALSE) : TRUE)
6680+ (mAttribD ? (Info->Attribute & EFI_FILE_DIRECTORY ? TRUE : FALSE) : TRUE))
6681 )
6682 ) {
6683 IsMatch = TRUE;
6684diff --git a/ls/ls.h b/ls/ls.h
6685index e967235..f0a5151 100644
6686--- a/ls/ls.h
6687+++ b/ls/ls.h
6688@@ -91,4 +91,5 @@ MainProc (
6689 IN UINT16 VHlpToken
6690 );
6691
6692-#endif
6693\ No newline at end of file
6694+#endif
6695+
6696diff --git a/ls/ls.inf b/ls/ls.inf
6697index 854a5b1..547fce8 100644
6698--- a/ls/ls.inf
6699+++ b/ls/ls.inf
6700@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
6701
6702
6703 [sources.common]
6704- ..\ShCommonStrings.uni
6705+ ../ShCommonStrings.uni
6706 LsStrings.uni
6707 ls.c
6708 ls.h
6709
6710 [includes.common]
6711 .
6712- ..\Inc
6713- ..\Library
6714- $(EDK_SOURCE)\Foundation
6715- $(EDK_SOURCE)\Foundation\Include
6716- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
6717- $(EDK_SOURCE)\Foundation\Efi
6718- $(EDK_SOURCE)\Foundation\Efi\Include
6719- $(EDK_SOURCE)\Foundation\FrameWork
6720- $(EDK_SOURCE)\Foundation\FrameWork\Include
6721- $(EDK_SOURCE)\Foundation\Core\Dxe
6722- $(DEST_DIR)\
6723+ ../Inc
6724+ ../Library
6725+ $(EDK_SOURCE)/Foundation
6726+ $(EDK_SOURCE)/Foundation/Include
6727+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
6728+ $(EDK_SOURCE)/Foundation/Efi
6729+ $(EDK_SOURCE)/Foundation/Efi/Include
6730+ $(EDK_SOURCE)/Foundation/FrameWork
6731+ $(EDK_SOURCE)/Foundation/FrameWork/Include
6732+ $(EDK_SOURCE)/Foundation/Core/Dxe
6733+ $(DEST_DIR./
6734
6735 [libraries.common]
6736 EfiShellLib
6737@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
6738
6739 [nmake.common]
6740 IMAGE_ENTRY_POINT=InitializeLS
6741+
6742+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
6743 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
6744 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
6745 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
6746
6747+[nmake.ARM, nmake.AARCH64]
6748+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
6749diff --git a/mem/MemCommonPart.c b/mem/MemCommonPart.c
6750index 54af027..b5ccc17 100644
6751--- a/mem/MemCommonPart.c
6752+++ b/mem/MemCommonPart.c
6753@@ -58,7 +58,7 @@ SHELL_VAR_CHECK_ITEM MemCheckList[] = {
6754 NULL,
6755 0,
6756 0,
6757- 0
6758+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
6759 }
6760 };
6761
6762@@ -149,7 +149,7 @@ Returns:
6763 return EFI_SUCCESS;
6764 }
6765
6766- Address = (AddressStr) ? Xtoi (AddressStr) : (UINT64) SystemTable;
6767+ Address = (AddressStr) ? Xtoi (AddressStr) : (UINT64)(UINTN) SystemTable;
6768 Size = (SizeStr) ? Xtoi (SizeStr) : 512;
6769
6770 //
6771@@ -157,7 +157,7 @@ Returns:
6772 //
6773 PrintToken (STRING_TOKEN (STR_MEM_MEMORY_ADDR), HiiMemHandle, 2 * sizeof (UINTN), Address, Size);
6774 if (MMIo) {
6775- Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, &PciRootBridgeIo);
6776+ Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID**)&PciRootBridgeIo);
6777 if (EFI_ERROR (Status)) {
6778 PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LOC_PROT_ERR_EX), HiiMemHandle, L"mem", L"PciRootBridgeIo");
6779 return Status;
6780@@ -172,7 +172,7 @@ Returns:
6781 return Status;
6782 }
6783
6784- PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciIoWidthUint8, Address, Size, Buffer);
6785+ PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciWidthUint8, Address, Size, Buffer);
6786 } else {
6787 Buffer = (UINT8 *) (UINTN) Address;
6788 }
6789@@ -233,7 +233,7 @@ Returns:
6790 MMIo = FALSE;
6791 AddressStr = NULL;
6792 SizeStr = NULL;
6793- Address = (UINT64) SystemTable;
6794+ Address = (UINT64)(UINTN) SystemTable;
6795 Size = 512;
6796 RetCode = LibCheckVariables (SI, MemCheckList, &ChkPck, &Useful);
6797 if (VarCheckOk != RetCode) {
6798@@ -312,7 +312,7 @@ Returns:
6799 //
6800 PrintToken (STRING_TOKEN (STR_MEM_NEW_MEMORY_ADDR), HiiMemHandle, 2 * sizeof (UINTN), Address, Size);
6801 if (MMIo) {
6802- Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, &PciRootBridgeIo);
6803+ Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID**)&PciRootBridgeIo);
6804 if (EFI_ERROR (Status)) {
6805 PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LOC_PROT_ERR_EX), HiiMemHandle, L"mem", L"PciRootBridgeIo");
6806 return Status;
6807@@ -327,7 +327,7 @@ Returns:
6808 return Status;
6809 }
6810
6811- PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciIoWidthUint8, Address, Size, Buffer);
6812+ PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciWidthUint8, Address, Size, Buffer);
6813 } else {
6814 Buffer = (UINT8 *) (UINTN) Address;
6815 }
6816diff --git a/mem/MemCommonPart.h b/mem/MemCommonPart.h
6817index 3b34908..f1fd015 100644
6818--- a/mem/MemCommonPart.h
6819+++ b/mem/MemCommonPart.h
6820@@ -62,4 +62,4 @@ EFIMemStructsPrint (
6821 IN EFI_BLOCK_IO_PROTOCOL *BlkIo
6822 );
6823
6824-#endif
6825\ No newline at end of file
6826+#endif
6827diff --git a/mem/debug.h b/mem/debug.h
6828index 2b02c89..8db1a9f 100644
6829--- a/mem/debug.h
6830+++ b/mem/debug.h
6831@@ -156,3 +156,4 @@ EFIStructsPrint (
6832 extern EFI_HII_HANDLE HiiMemHandle;
6833
6834 #endif
6835+
6836diff --git a/mem/efidump.c b/mem/efidump.c
6837index d7b22cb..cf5382a 100644
6838--- a/mem/efidump.c
6839+++ b/mem/efidump.c
6840@@ -24,7 +24,7 @@ Revision History
6841 --*/
6842
6843 #include "debug.h"
6844-#include "Efipart.h"
6845+#include "EfiPart.h"
6846 #include "EfiShellLib.h"
6847
6848 #include STRING_DEFINES_FILE
6849@@ -320,13 +320,11 @@ DumpMemSystemTable (
6850 VOID *AcpiTable;
6851 VOID *Acpi20Table;
6852 VOID *SMBIOSTable;
6853- VOID *SalSystemTable;
6854 VOID *MpsTable;
6855
6856 AcpiTable = NULL;
6857 Acpi20Table = NULL;
6858 SMBIOSTable = NULL;
6859- SalSystemTable = NULL;
6860 MpsTable = NULL;
6861
6862 PrintToken (
6863@@ -352,11 +350,13 @@ DumpMemSystemTable (
6864 PrintToken (STRING_TOKEN (STR_DEBUG_STD_ERROR_ON), HiiMemHandle, LibDevicePathToStr (DevicePath));
6865 }
6866
6867- PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiMemHandle, (UINT64) Tbl.Sys->RuntimeServices);
6868- PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiMemHandle, (UINT64) Tbl.Sys->BootServices);
6869+ PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiMemHandle, (UINT64)(UINTN) Tbl.Sys->RuntimeServices);
6870+ PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiMemHandle, (UINT64)(UINTN) Tbl.Sys->BootServices);
6871
6872 EFI64_CODE (
6873- Status = LibGetSystemConfigurationTable(&gEfiSalSystemTableGuid, &SalSystemTable);
6874+ VOID *SalSystemTable;
6875+
6876+ Status = LibGetSystemConfigurationTable(&gEfiSalSystemTableGuid, &SalSystemTable);
6877 if (!EFI_ERROR(Status)) {
6878 PrintToken (STRING_TOKEN(STR_DEBUG_SAL_SYSTEM_TABLE), HiiMemHandle, (UINT64)SalSystemTable);
6879 }
6880@@ -364,22 +364,22 @@ DumpMemSystemTable (
6881
6882 Status = LibGetSystemConfigurationTable (&gEfiAcpiTableGuid, &AcpiTable);
6883 if (!EFI_ERROR (Status)) {
6884- PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiMemHandle, (UINT64) AcpiTable);
6885+ PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiMemHandle, (UINT64)(UINTN) AcpiTable);
6886 }
6887
6888 Status = LibGetSystemConfigurationTable (&gEfiAcpi20TableGuid, &Acpi20Table);
6889 if (!EFI_ERROR (Status)) {
6890- PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiMemHandle, (UINT64) Acpi20Table);
6891+ PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiMemHandle, (UINT64)(UINTN) Acpi20Table);
6892 }
6893
6894 Status = LibGetSystemConfigurationTable (&gEfiMpsTableGuid, &MpsTable);
6895 if (!EFI_ERROR (Status)) {
6896- PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiMemHandle, (UINT64) MpsTable);
6897+ PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiMemHandle, (UINT64)(UINTN) MpsTable);
6898 }
6899
6900 Status = LibGetSystemConfigurationTable (&gEfiSmbiosTableGuid, &SMBIOSTable);
6901 if (!EFI_ERROR (Status)) {
6902- PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiMemHandle, (UINT64) SMBIOSTable);
6903+ PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiMemHandle, (UINT64)(UINTN) SMBIOSTable);
6904 }
6905 }
6906
6907diff --git a/mem/mem.inf b/mem/mem.inf
6908index 0561176..4ba34ad 100644
6909--- a/mem/mem.inf
6910+++ b/mem/mem.inf
6911@@ -25,7 +25,7 @@ FILE_GUID = 1B0B8206-74DC-4681-AA0D-039A9699EA56
6912 COMPONENT_TYPE = APPLICATION
6913
6914 [sources.common]
6915- ..\ShCommonStrings.uni
6916+ ../ShCommonStrings.uni
6917 MemStrings.uni
6918 DebugStrings.uni
6919 mm.c
6920@@ -34,17 +34,17 @@ COMPONENT_TYPE = APPLICATION
6921
6922 [includes.common]
6923 .
6924- ..\Inc
6925- ..\Library
6926- $(EDK_SOURCE)\Foundation
6927- $(EDK_SOURCE)\Foundation\Include
6928- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
6929- $(EDK_SOURCE)\Foundation\Efi
6930- $(EDK_SOURCE)\Foundation\Efi\Include
6931- $(EDK_SOURCE)\Foundation\FrameWork
6932- $(EDK_SOURCE)\Foundation\FrameWork\Include
6933- $(EDK_SOURCE)\Foundation\Core\Dxe
6934- $(DEST_DIR)\
6935+ ../Inc
6936+ ../Library
6937+ $(EDK_SOURCE)/Foundation
6938+ $(EDK_SOURCE)/Foundation/Include
6939+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
6940+ $(EDK_SOURCE)/Foundation/Efi
6941+ $(EDK_SOURCE)/Foundation/Efi/Include
6942+ $(EDK_SOURCE)/Foundation/FrameWork
6943+ $(EDK_SOURCE)/Foundation/FrameWork/Include
6944+ $(EDK_SOURCE)/Foundation/Core/Dxe
6945+ $(DEST_DIR./
6946
6947 [libraries.common]
6948 EfiShellLib
6949@@ -63,9 +63,13 @@ COMPONENT_TYPE = APPLICATION
6950 # we will specify some additional DEFINEs on the compile command line.
6951 #
6952 [nmake.common]
6953- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
6954 IMAGE_ENTRY_POINT=DumpMm
6955+
6956+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
6957+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
6958 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
6959 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
6960 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
6961
6962+[nmake.ARM, nmake.AARCH64]
6963+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
6964diff --git a/memmap/memmap.c b/memmap/memmap.c
6965index f7353ff..24da6e2 100644
6966--- a/memmap/memmap.c
6967+++ b/memmap/memmap.c
6968@@ -35,7 +35,7 @@ extern UINT8 STRING_ARRAY_NAME[];
6969 //
6970 // Global Variables
6971 //
6972-EFI_HII_HANDLE HiiHandle;
6973+STATIC EFI_HII_HANDLE HiiHandle;
6974 EFI_GUID EfiMemmapGuid = EFI_MEMMAP_GUID;
6975 SHELL_VAR_CHECK_ITEM MemmapCheckList[] = {
6976 {
6977@@ -54,7 +54,7 @@ SHELL_VAR_CHECK_ITEM MemmapCheckList[] = {
6978 NULL,
6979 0,
6980 0,
6981- 0
6982+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
6983 }
6984 };
6985
6986@@ -216,7 +216,7 @@ Returns:
6987 }
6988
6989 Bytes = LShiftU64 (Desc->NumberOfPages, 12);
6990- Ptr = MemoryTypeStr (Desc->Type);
6991+ Ptr = MemoryTypeStr ((EFI_MEMORY_TYPE)Desc->Type);
6992 PrintToken (
6993 STRING_TOKEN (STR_MEMMAP_FIVE_ARGS),
6994 HiiHandle,
6995diff --git a/memmap/memmap.h b/memmap/memmap.h
6996index d9f5d72..e32a0aa 100644
6997--- a/memmap/memmap.h
6998+++ b/memmap/memmap.h
6999@@ -33,3 +33,4 @@ Revision History
7000 }
7001
7002 #endif
7003+
7004diff --git a/memmap/memmap.inf b/memmap/memmap.inf
7005index 1d68c61..48af15c 100644
7006--- a/memmap/memmap.inf
7007+++ b/memmap/memmap.inf
7008@@ -40,7 +40,7 @@ COMPONENT_TYPE = APPLICATION
7009
7010
7011 [sources.common]
7012- ..\ShCommonStrings.uni
7013+ ../ShCommonStrings.uni
7014 memmapStrings.uni
7015 memmap.c
7016 memmap.h
7017@@ -48,17 +48,17 @@ COMPONENT_TYPE = APPLICATION
7018
7019 [includes.common]
7020 .
7021- ..\Inc
7022- ..\Library
7023- $(EDK_SOURCE)\Foundation
7024- $(EDK_SOURCE)\Foundation\Include
7025- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7026- $(EDK_SOURCE)\Foundation\Efi
7027- $(EDK_SOURCE)\Foundation\Efi\Include
7028- $(EDK_SOURCE)\Foundation\FrameWork
7029- $(EDK_SOURCE)\Foundation\FrameWork\Include
7030- $(EDK_SOURCE)\Foundation\Core\Dxe
7031- $(DEST_DIR)\
7032+ ../Inc
7033+ ../Library
7034+ $(EDK_SOURCE)/Foundation
7035+ $(EDK_SOURCE)/Foundation/Include
7036+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7037+ $(EDK_SOURCE)/Foundation/Efi
7038+ $(EDK_SOURCE)/Foundation/Efi/Include
7039+ $(EDK_SOURCE)/Foundation/FrameWork
7040+ $(EDK_SOURCE)/Foundation/FrameWork/Include
7041+ $(EDK_SOURCE)/Foundation/Core/Dxe
7042+ $(DEST_DIR./
7043
7044 [libraries.common]
7045 EfiShellLib
7046@@ -73,7 +73,11 @@ COMPONENT_TYPE = APPLICATION
7047
7048 [nmake.common]
7049 IMAGE_ENTRY_POINT=InitializeMemmap
7050+
7051+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
7052 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
7053 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
7054 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
7055
7056+[nmake.ARM, nmake.AARCH64]
7057+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
7058diff --git a/mkdir/mkdir.c b/mkdir/mkdir.c
7059index 79a08ca..5d8c5f5 100644
7060--- a/mkdir/mkdir.c
7061+++ b/mkdir/mkdir.c
7062@@ -49,7 +49,7 @@ MkDir (
7063 //
7064 // Global Variables
7065 //
7066-EFI_HII_HANDLE HiiHandle;
7067+STATIC EFI_HII_HANDLE HiiHandle;
7068 EFI_GUID EfiMkdirGuid = EFI_MKDIR_GUID;
7069 SHELL_VAR_CHECK_ITEM MkdirCheckList[] = {
7070 {
7071@@ -68,7 +68,7 @@ SHELL_VAR_CHECK_ITEM MkdirCheckList[] = {
7072 NULL,
7073 0,
7074 0,
7075- 0
7076+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
7077 }
7078 };
7079
7080diff --git a/mkdir/mkdir.h b/mkdir/mkdir.h
7081index 20f8068..2da2b13 100644
7082--- a/mkdir/mkdir.h
7083+++ b/mkdir/mkdir.h
7084@@ -29,4 +29,5 @@ Revision History
7085 0x75ecb57f, 0x4264, 0x49d2, 0x98, 0xe6, 0x39, 0x1a, 0x32, 0x17, 0x9d, 0xf2 \
7086 }
7087
7088-#endif
7089\ No newline at end of file
7090+#endif
7091+
7092diff --git a/mkdir/mkdir.inf b/mkdir/mkdir.inf
7093index e49daac..4f98af0 100644
7094--- a/mkdir/mkdir.inf
7095+++ b/mkdir/mkdir.inf
7096@@ -41,23 +41,23 @@ COMPONENT_TYPE = APPLICATION
7097
7098 [sources.common]
7099 MkdirStrings.uni
7100- ..\ShCommonStrings.uni
7101+ ../ShCommonStrings.uni
7102 mkdir.c
7103 mkdir.h
7104
7105 [includes.common]
7106 .
7107- ..\Inc
7108- ..\Library
7109- $(EDK_SOURCE)\Foundation
7110- $(EDK_SOURCE)\Foundation\Include
7111- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7112- $(EDK_SOURCE)\Foundation\Efi
7113- $(EDK_SOURCE)\Foundation\Efi\Include
7114- $(EDK_SOURCE)\Foundation\FrameWork
7115- $(EDK_SOURCE)\Foundation\FrameWork\Include
7116- $(EDK_SOURCE)\Foundation\Core\Dxe
7117- $(DEST_DIR)\
7118+ ../Inc
7119+ ../Library
7120+ $(EDK_SOURCE)/Foundation
7121+ $(EDK_SOURCE)/Foundation/Include
7122+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7123+ $(EDK_SOURCE)/Foundation/Efi
7124+ $(EDK_SOURCE)/Foundation/Efi/Include
7125+ $(EDK_SOURCE)/Foundation/FrameWork
7126+ $(EDK_SOURCE)/Foundation/FrameWork/Include
7127+ $(EDK_SOURCE)/Foundation/Core/Dxe
7128+ $(DEST_DIR./
7129
7130 [libraries.common]
7131 EfiShellLib
7132@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
7133
7134 [nmake.common]
7135 IMAGE_ENTRY_POINT=InitializeMkDir
7136+
7137+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
7138 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
7139 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
7140 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
7141
7142+[nmake.ARM, nmake.AARCH64]
7143+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
7144diff --git a/mm/mm.c b/mm/mm.c
7145index 033849b..cb53465 100644
7146--- a/mm/mm.c
7147+++ b/mm/mm.c
7148@@ -49,18 +49,18 @@ DumpIoModify (
7149
7150 VOID
7151 ReadMem (
7152- IN EFI_IO_WIDTH Width,
7153- IN UINT64 Address,
7154- IN UINTN Size,
7155- IN VOID *Buffer
7156+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
7157+ IN UINT64 Address,
7158+ IN UINTN Size,
7159+ IN VOID *Buffer
7160 );
7161
7162 VOID
7163 WriteMem (
7164- IN EFI_IO_WIDTH Width,
7165- IN UINT64 Address,
7166- IN UINTN Size,
7167- IN VOID *Buffer
7168+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
7169+ IN UINT64 Address,
7170+ IN UINTN Size,
7171+ IN VOID *Buffer
7172 );
7173
7174 STATIC
7175@@ -73,7 +73,7 @@ GetHex (
7176 //
7177 // Global Variables
7178 //
7179-EFI_HII_HANDLE HiiHandle;
7180+STATIC EFI_HII_HANDLE HiiHandle;
7181 EFI_GUID EfiIomodGuid = EFI_IOMOD_GUID;
7182 SHELL_VAR_CHECK_ITEM IomodCheckList[] = {
7183 {
7184@@ -134,7 +134,7 @@ SHELL_VAR_CHECK_ITEM IomodCheckList[] = {
7185 NULL,
7186 0,
7187 0,
7188- 0
7189+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
7190 }
7191 };
7192
7193@@ -146,13 +146,13 @@ EFI_BOOTSHELL_CODE(
7194
7195 EFI_STATUS
7196 OldShellParserMM (
7197- OUT EFI_IO_WIDTH *Width,
7198- OUT EFI_ACCESS_TYPE *AccessType,
7199- OUT UINT64 *Address,
7200- OUT UINT64 *Value,
7201- OUT UINTN *Size,
7202- OUT BOOLEAN *Interactive,
7203- OUT CHAR16 **ValueStr
7204+ OUT EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH *Width,
7205+ OUT EFI_ACCESS_TYPE *AccessType,
7206+ OUT UINT64 *Address,
7207+ OUT UINT64 *Value,
7208+ OUT UINTN *Size,
7209+ OUT BOOLEAN *Interactive,
7210+ OUT CHAR16 **ValueStr
7211 );
7212
7213 EFI_STATUS
7214@@ -207,12 +207,11 @@ Notes:
7215 UINT64 PciEAddress;
7216 UINT64 Value;
7217 UINT32 SegmentNumber;
7218- EFI_IO_WIDTH Width;
7219+ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width;
7220 EFI_ACCESS_TYPE AccessType;
7221 UINT64 Buffer;
7222 UINTN Index;
7223 UINTN Size;
7224- CHAR16 *AddressStr;
7225 CHAR16 *ValueStr;
7226 BOOLEAN Complete;
7227 CHAR16 InputStr[80];
7228@@ -261,7 +260,7 @@ Notes:
7229 if (IS_OLD_SHELL) {
7230 Status = OldShellParserMM (&Width, &AccessType, &Address, &Value, &Size, &Interactive, &ValueStr);
7231 if (EFI_ERROR (Status)) {
7232- if (-1 == Status) {
7233+ if ((EFI_STATUS)-1 == Status) {
7234 PrintToken (STRING_TOKEN (STR_HELPINFO_MM_VERBOSEHELP), HiiHandle);
7235 Status = EFI_SUCCESS;
7236 }
7237@@ -274,7 +273,6 @@ Notes:
7238 Width = EfiPciWidthUint8;
7239 Size = 1;
7240 AccessType = EfiMemory;
7241- AddressStr = NULL;
7242 ValueStr = NULL;
7243 Interactive = TRUE;
7244
7245@@ -662,10 +660,10 @@ Done:
7246
7247 VOID
7248 ReadMem (
7249- IN EFI_IO_WIDTH Width,
7250- IN UINT64 Address,
7251- IN UINTN Size,
7252- IN VOID *Buffer
7253+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
7254+ IN UINT64 Address,
7255+ IN UINTN Size,
7256+ IN VOID *Buffer
7257 )
7258 {
7259 do {
7260@@ -694,10 +692,10 @@ ReadMem (
7261
7262 VOID
7263 WriteMem (
7264- IN EFI_IO_WIDTH Width,
7265- IN UINT64 Address,
7266- IN UINTN Size,
7267- IN VOID *Buffer
7268+ IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
7269+ IN UINT64 Address,
7270+ IN UINTN Size,
7271+ IN VOID *Buffer
7272 )
7273 {
7274 do {
7275@@ -750,7 +748,7 @@ GetHex (
7276 }
7277
7278 if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F')) {
7279- u = u << 4 | c - (c >= 'A' ? 'A' - 10 : '0');
7280+ u = (u << 4) | (c - (c >= 'A' ? 'A' - 10 : '0'));
7281
7282 Find = TRUE;
7283 } else {
7284@@ -766,13 +764,13 @@ GetHex (
7285
7286 EFI_STATUS
7287 OldShellParserMM (
7288- OUT EFI_IO_WIDTH *Width,
7289- OUT EFI_ACCESS_TYPE *AccessType,
7290- OUT UINT64 *Address,
7291- OUT UINT64 *Value,
7292- OUT UINTN *Size,
7293- OUT BOOLEAN *Interactive,
7294- OUT CHAR16 **ValueStr
7295+ OUT EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH *Width,
7296+ OUT EFI_ACCESS_TYPE *AccessType,
7297+ OUT UINT64 *Address,
7298+ OUT UINT64 *Value,
7299+ OUT UINTN *Size,
7300+ OUT BOOLEAN *Interactive,
7301+ OUT CHAR16 **ValueStr
7302 )
7303 /*++
7304
7305diff --git a/mm/mm.h b/mm/mm.h
7306index 8306f4c..0890e50 100644
7307--- a/mm/mm.h
7308+++ b/mm/mm.h
7309@@ -33,3 +33,4 @@ Revision History
7310 }
7311
7312 #endif
7313+
7314diff --git a/mm/mm.inf b/mm/mm.inf
7315index 4857d9e..97221eb 100644
7316--- a/mm/mm.inf
7317+++ b/mm/mm.inf
7318@@ -41,23 +41,23 @@ COMPONENT_TYPE = APPLICATION
7319
7320 [sources.common]
7321 MmStrings.uni
7322- ..\ShCommonStrings.uni
7323+ ../ShCommonStrings.uni
7324 mm.c
7325 mm.h
7326
7327 [includes.common]
7328 .
7329- ..\Inc
7330- ..\Library
7331- $(EDK_SOURCE)\Foundation
7332- $(EDK_SOURCE)\Foundation\Include
7333- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7334- $(EDK_SOURCE)\Foundation\Efi
7335- $(EDK_SOURCE)\Foundation\Efi\Include
7336- $(EDK_SOURCE)\Foundation\FrameWork
7337- $(EDK_SOURCE)\Foundation\FrameWork\Include
7338- $(EDK_SOURCE)\Foundation\Core\Dxe
7339- $(DEST_DIR)\
7340+ ../Inc
7341+ ../Library
7342+ $(EDK_SOURCE)/Foundation
7343+ $(EDK_SOURCE)/Foundation/Include
7344+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7345+ $(EDK_SOURCE)/Foundation/Efi
7346+ $(EDK_SOURCE)/Foundation/Efi/Include
7347+ $(EDK_SOURCE)/Foundation/FrameWork
7348+ $(EDK_SOURCE)/Foundation/FrameWork/Include
7349+ $(EDK_SOURCE)/Foundation/Core/Dxe
7350+ $(DEST_DIR./
7351
7352 [libraries.common]
7353 EfiShellLib
7354@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
7355
7356 [nmake.common]
7357 IMAGE_ENTRY_POINT=DumpIoModify
7358+
7359+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
7360 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
7361 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
7362 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
7363
7364+[nmake.ARM, nmake.AARCH64]
7365+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
7366diff --git a/mode/mode.c b/mode/mode.c
7367index becf429..e49df84 100644
7368--- a/mode/mode.c
7369+++ b/mode/mode.c
7370@@ -53,7 +53,7 @@ SHELL_VAR_CHECK_ITEM ModeCheckList[] = {
7371 NULL,
7372 0,
7373 0,
7374- 0
7375+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
7376 }
7377 };
7378
7379diff --git a/mode/mode.h b/mode/mode.h
7380index eadbac1..3c4560b 100644
7381--- a/mode/mode.h
7382+++ b/mode/mode.h
7383@@ -30,3 +30,4 @@ Revision History
7384 }
7385
7386 #endif
7387+
7388diff --git a/mode/mode.inf b/mode/mode.inf
7389index 47e5c80..98ea62e 100644
7390--- a/mode/mode.inf
7391+++ b/mode/mode.inf
7392@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
7393
7394
7395 [sources.common]
7396- ..\ShCommonStrings.uni
7397+ ../ShCommonStrings.uni
7398 ModeStrings.uni
7399 mode.c
7400 mode.h
7401
7402 [includes.common]
7403 .
7404- ..\Inc
7405- ..\Library
7406- $(EDK_SOURCE)\Foundation
7407- $(EDK_SOURCE)\Foundation\Include
7408- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7409- $(EDK_SOURCE)\Foundation\Efi
7410- $(EDK_SOURCE)\Foundation\Efi\Include
7411- $(EDK_SOURCE)\Foundation\FrameWork
7412- $(EDK_SOURCE)\Foundation\FrameWork\Include
7413- $(EDK_SOURCE)\Foundation\Core\Dxe
7414- $(DEST_DIR)\
7415+ ../Inc
7416+ ../Library
7417+ $(EDK_SOURCE)/Foundation
7418+ $(EDK_SOURCE)/Foundation/Include
7419+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7420+ $(EDK_SOURCE)/Foundation/Efi
7421+ $(EDK_SOURCE)/Foundation/Efi/Include
7422+ $(EDK_SOURCE)/Foundation/FrameWork
7423+ $(EDK_SOURCE)/Foundation/FrameWork/Include
7424+ $(EDK_SOURCE)/Foundation/Core/Dxe
7425+ $(DEST_DIR./
7426
7427 [libraries.common]
7428 EfiShellLib
7429@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
7430
7431 [nmake.common]
7432 IMAGE_ENTRY_POINT=InitializeMode
7433+
7434+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
7435 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
7436 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
7437 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
7438
7439+[nmake.ARM, nmake.AARCH64]
7440+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
7441diff --git a/mount/mount.c b/mount/mount.c
7442index fa32b1f..6825511 100644
7443--- a/mount/mount.c
7444+++ b/mount/mount.c
7445@@ -36,7 +36,7 @@ extern UINT8 STRING_ARRAY_NAME[];
7446 //
7447 // Global Variables
7448 //
7449-EFI_HII_HANDLE HiiHandle;
7450+STATIC EFI_HII_HANDLE HiiHandle;
7451 EFI_GUID EfiMountGuid = EFI_MOUNT_GUID;
7452 SHELL_VAR_CHECK_ITEM MountCheckList[] = {
7453 {
7454@@ -55,7 +55,7 @@ SHELL_VAR_CHECK_ITEM MountCheckList[] = {
7455 NULL,
7456 0,
7457 0,
7458- 0
7459+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
7460 }
7461 };
7462
7463diff --git a/mount/mount.h b/mount/mount.h
7464index afd795e..ce65e8e 100644
7465--- a/mount/mount.h
7466+++ b/mount/mount.h
7467@@ -33,3 +33,4 @@ Revision History
7468 }
7469
7470 #endif
7471+
7472diff --git a/mount/mount.inf b/mount/mount.inf
7473index 922c490..e0154e2 100644
7474--- a/mount/mount.inf
7475+++ b/mount/mount.inf
7476@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
7477
7478
7479 [sources.common]
7480- ..\ShCommonStrings.uni
7481+ ../ShCommonStrings.uni
7482 MountStrings.uni
7483 mount.c
7484 mount.h
7485
7486 [includes.common]
7487 .
7488- ..\Inc
7489- ..\Library
7490- $(EDK_SOURCE)\Foundation
7491- $(EDK_SOURCE)\Foundation\Include
7492- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7493- $(EDK_SOURCE)\Foundation\Efi
7494- $(EDK_SOURCE)\Foundation\Efi\Include
7495- $(EDK_SOURCE)\Foundation\FrameWork
7496- $(EDK_SOURCE)\Foundation\FrameWork\Include
7497- $(EDK_SOURCE)\Foundation\Core\Dxe
7498- $(DEST_DIR)\
7499+ ../Inc
7500+ ../Library
7501+ $(EDK_SOURCE)/Foundation
7502+ $(EDK_SOURCE)/Foundation/Include
7503+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7504+ $(EDK_SOURCE)/Foundation/Efi
7505+ $(EDK_SOURCE)/Foundation/Efi/Include
7506+ $(EDK_SOURCE)/Foundation/FrameWork
7507+ $(EDK_SOURCE)/Foundation/FrameWork/Include
7508+ $(EDK_SOURCE)/Foundation/Core/Dxe
7509+ $(DEST_DIR./
7510
7511 [libraries.common]
7512 EfiShellLib
7513@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
7514
7515 [nmake.common]
7516 IMAGE_ENTRY_POINT=MountMain
7517+
7518+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
7519 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
7520 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
7521 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
7522
7523+[nmake.ARM, nmake.AARCH64]
7524+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
7525diff --git a/mv/mv.c b/mv/mv.c
7526index 3b04021..9eefd23 100644
7527--- a/mv/mv.c
7528+++ b/mv/mv.c
7529@@ -36,7 +36,7 @@ extern UINT8 STRING_ARRAY_NAME[];
7530 //
7531 // Global Variables
7532 //
7533-EFI_HII_HANDLE HiiHandle;
7534+STATIC EFI_HII_HANDLE HiiHandle;
7535 EFI_GUID EfiMvGuid = EFI_MV_GUID;
7536 SHELL_VAR_CHECK_ITEM MvCheckList[] = {
7537 {
7538@@ -55,7 +55,7 @@ SHELL_VAR_CHECK_ITEM MvCheckList[] = {
7539 NULL,
7540 0,
7541 0,
7542- 0
7543+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
7544 }
7545 };
7546
7547diff --git a/mv/mv.h b/mv/mv.h
7548index 6ed33eb..2dbf314 100644
7549--- a/mv/mv.h
7550+++ b/mv/mv.h
7551@@ -33,4 +33,4 @@ Revision History
7552
7553 #define EFI_FILE_STRING_SIZE 260
7554
7555-#endif
7556\ No newline at end of file
7557+#endif
7558diff --git a/mv/mv.inf b/mv/mv.inf
7559index b52e28d..46000f0 100644
7560--- a/mv/mv.inf
7561+++ b/mv/mv.inf
7562@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
7563
7564
7565 [sources.common]
7566- ..\ShCommonStrings.uni
7567+ ../ShCommonStrings.uni
7568 MvStrings.uni
7569 mv.c
7570 mv.h
7571
7572 [includes.common]
7573 .
7574- ..\Inc
7575- ..\Library
7576- $(EDK_SOURCE)\Foundation
7577- $(EDK_SOURCE)\Foundation\Include
7578- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7579- $(EDK_SOURCE)\Foundation\Efi
7580- $(EDK_SOURCE)\Foundation\Efi\Include
7581- $(EDK_SOURCE)\Foundation\FrameWork
7582- $(EDK_SOURCE)\Foundation\FrameWork\Include
7583- $(EDK_SOURCE)\Foundation\Core\Dxe
7584- $(DEST_DIR)\
7585+ ../Inc
7586+ ../Library
7587+ $(EDK_SOURCE)/Foundation
7588+ $(EDK_SOURCE)/Foundation/Include
7589+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7590+ $(EDK_SOURCE)/Foundation/Efi
7591+ $(EDK_SOURCE)/Foundation/Efi/Include
7592+ $(EDK_SOURCE)/Foundation/FrameWork
7593+ $(EDK_SOURCE)/Foundation/FrameWork/Include
7594+ $(EDK_SOURCE)/Foundation/Core/Dxe
7595+ $(DEST_DIR./
7596
7597 [libraries.common]
7598 EfiShellLib
7599@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
7600
7601 [nmake.common]
7602 IMAGE_ENTRY_POINT=InitializeMv
7603+
7604+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
7605 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
7606 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
7607 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
7608
7609+[nmake.ARM, nmake.AARCH64]
7610+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
7611diff --git a/newshell/FakeHii.c b/newshell/FakeHii.c
7612index c187b47..5dff3ad 100644
7613--- a/newshell/FakeHii.c
7614+++ b/newshell/FakeHii.c
7615@@ -196,7 +196,7 @@ FakeUninstallHiiDatabase (
7616 Status = BS->HandleProtocol (
7617 mFakeHiiHandle,
7618 &gEfiHiiProtocolGuid,
7619- &FakeHii
7620+ (VOID**)&FakeHii
7621 );
7622 Status = BS->UninstallProtocolInterface (
7623 mFakeHiiHandle,
7624@@ -320,7 +320,7 @@ InsertStringPackage (
7625 if (Language == NULL) {
7626 return EFI_OUT_OF_RESOURCES;
7627 }
7628- strcpya (Language, (UINT8 *) PackageHdr + HeaderSize - LanguageSize);
7629+ strcpya (Language, (CHAR8*) ((UINT8 *) PackageHdr + HeaderSize - LanguageSize));
7630 for (Link = PackageList->StringPkgHdr.Flink; Link != &PackageList->StringPkgHdr; Link = Link->Flink) {
7631 StringPackage = CR (Link, FAKE_HII_STRING_PACKAGE, Entry, FAKE_HII_STRING_PACKAGE_SIGNATURE);
7632 if (CompareLanguage (Language, StringPackage->StringPkgHdr->Language)) {
7633@@ -770,7 +770,7 @@ FakeHiiGetString (
7634 StringPackage = NULL;
7635 for (Link = DatabaseRecord->StringPkgHdr.Flink; Link != &DatabaseRecord->StringPkgHdr; Link = Link->Flink) {
7636 StringPackage = CR (Link, FAKE_HII_STRING_PACKAGE, Entry, FAKE_HII_STRING_PACKAGE_SIGNATURE);
7637- if (CompareLanguage (StringPackage->StringPkgHdr->Language, (UINT8 *) Language)) {
7638+ if (CompareLanguage (StringPackage->StringPkgHdr->Language, (CHAR8 *) Language)) {
7639 Matched = TRUE;
7640 break;
7641 }
7642diff --git a/newshell/FakeHii.h b/newshell/FakeHii.h
7643index a73332b..4c34460 100644
7644--- a/newshell/FakeHii.h
7645+++ b/newshell/FakeHii.h
7646@@ -479,3 +479,4 @@ extern BOOLEAN gHiiInitialized;
7647 #endif
7648
7649 #endif
7650+
7651diff --git a/newshell/init.c b/newshell/init.c
7652index fd4adf6..fe73711 100644
7653--- a/newshell/init.c
7654+++ b/newshell/init.c
7655@@ -23,7 +23,7 @@ Abstract:
7656 #include "nshell.h"
7657
7658 extern UINT8 STRING_ARRAY_NAME[];
7659-extern BOOLEAN gHiiInitialized = FALSE;
7660+BOOLEAN gHiiInitialized = FALSE;
7661
7662 //
7663 // This is the generated header file which includes whatever needs to be exported (strings + IFR)
7664@@ -99,13 +99,13 @@ _GetFsDpOfImg (
7665 Status = BS->HandleProtocol (
7666 ImgHnd,
7667 &gEfiLoadedImageProtocolGuid,
7668- &img
7669+ (VOID**)&img
7670 );
7671 if (!EFI_ERROR (Status)) {
7672 Status = BS->HandleProtocol (
7673 img->DeviceHandle,
7674 &gEfiDevicePathProtocolGuid,
7675- &dp
7676+ (VOID**)&dp
7677 );
7678 if (!EFI_ERROR (Status)) {
7679 *DevPath = DuplicateDevicePath (dp);
7680@@ -220,7 +220,7 @@ _DoInit (
7681 //
7682 Status = LibLocateProtocol (
7683 &gEfiConsoleControlProtocolGuid,
7684- &ConsoleControl
7685+ (VOID**)&ConsoleControl
7686 );
7687 if (!EFI_ERROR (Status)) {
7688 Status = ConsoleControl->GetMode (ConsoleControl, &mOldCurrentMode, NULL, NULL);
7689@@ -342,7 +342,7 @@ _EnableShellEnv (
7690 Status = _ShellLoadEnvDriver (ImageHandle);
7691 )
7692 if (EFI_ERROR (Status)) {
7693- Status = LibLocateProtocol (&ShellEnvProtocol, &SE);
7694+ Status = LibLocateProtocol (&ShellEnvProtocol, (VOID**)&SE);
7695 if (EFI_ERROR (Status)) {
7696 PrintToken (STRING_TOKEN (STR_NSHELL_ENV_DRIVER), HiiNewshellHandle);
7697 return Status;
7698@@ -372,7 +372,7 @@ _InstallShellInterface (
7699 *IsRootInstance = TRUE;
7700 }
7701
7702- Status = LibLocateProtocol (&ShellEnvProtocol, &SE);
7703+ Status = LibLocateProtocol (&ShellEnvProtocol, (VOID**)&SE);
7704 ASSERT (!EFI_ERROR (Status));
7705 SI = SE->NewShell (ImageHandle);
7706
7707@@ -543,7 +543,7 @@ _CleanUpOnExit (
7708 //
7709 ConsoleControlStatus = LibLocateProtocol (
7710 &gEfiConsoleControlProtocolGuid,
7711- &ConsoleControl
7712+ (VOID**)&ConsoleControl
7713 );
7714 if (!EFI_ERROR (ConsoleControlStatus)) {
7715 ConsoleControlStatus = ConsoleControl->GetMode (ConsoleControl, &CurrentMode, NULL, NULL);
7716@@ -709,7 +709,7 @@ Returns:
7717 //
7718 SE2->IncrementShellNestingLevel ();
7719
7720- while (Status != -1) {
7721+ while (Status != (EFI_STATUS) -1) {
7722 Status = NShellPrompt (ImageHandle);
7723 EFI_NT_EMULATOR_CODE (
7724 //
7725@@ -723,7 +723,7 @@ Returns:
7726 Status = BS->HandleProtocol (
7727 ImageHandle,
7728 &ShellInterfaceProtocol,
7729- &SI
7730+ (VOID**)&SI
7731 );
7732 ASSERT (!EFI_ERROR (Status));
7733 }
7734diff --git a/newshell/nshell.h b/newshell/nshell.h
7735index 5c58410..c2a3a9e 100644
7736--- a/newshell/nshell.h
7737+++ b/newshell/nshell.h
7738@@ -58,4 +58,5 @@ extern EFI_SHELL_ENVIRONMENT *SE;
7739 #define EFI_NO_MONOSHELL_CODE(code) code
7740 #endif
7741
7742-#endif
7743\ No newline at end of file
7744+#endif
7745+
7746diff --git a/newshell/nshell.inf b/newshell/nshell.inf
7747index 22479b0..405e23c 100644
7748--- a/newshell/nshell.inf
7749+++ b/newshell/nshell.inf
7750@@ -26,24 +26,24 @@ COMPONENT_TYPE = APPLICATION
7751
7752 [sources.common]
7753 NshellStrings.uni
7754- ..\ShCommonStrings.uni
7755+ ../ShCommonStrings.uni
7756 init.c
7757 nshell.h
7758 fakehii.c
7759
7760 [includes.common]
7761 .
7762- ..\Inc
7763- ..\Library
7764- $(EDK_SOURCE)\Foundation
7765- $(EDK_SOURCE)\Foundation\Include
7766- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7767- $(EDK_SOURCE)\Foundation\Efi
7768- $(EDK_SOURCE)\Foundation\Efi\Include
7769- $(EDK_SOURCE)\Foundation\FrameWork
7770- $(EDK_SOURCE)\Foundation\FrameWork\Include
7771- $(EDK_SOURCE)\Foundation\Core\Dxe
7772- $(DEST_DIR)\
7773+ ../Inc
7774+ ../Library
7775+ $(EDK_SOURCE)/Foundation
7776+ $(EDK_SOURCE)/Foundation/Include
7777+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7778+ $(EDK_SOURCE)/Foundation/Efi
7779+ $(EDK_SOURCE)/Foundation/Efi/Include
7780+ $(EDK_SOURCE)/Foundation/FrameWork
7781+ $(EDK_SOURCE)/Foundation/FrameWork/Include
7782+ $(EDK_SOURCE)/Foundation/Core/Dxe
7783+ $(DEST_DIR./
7784
7785 [libraries.common]
7786 EfiShellLib
7787@@ -63,11 +63,13 @@ COMPONENT_TYPE = APPLICATION
7788 # we will specify some additional DEFINEs on the compile command line.
7789 #
7790 [nmake.common]
7791- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
7792 IMAGE_ENTRY_POINT=InitializeShell
7793+
7794+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
7795+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
7796 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
7797 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
7798- C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_MONOSHELL=2
7799-
7800+ C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
7801
7802-
7803\ No newline at end of file
7804+[nmake.ARM, nmake.AARCH64]
7805+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
7806diff --git a/openinfo/openinfo.c b/openinfo/openinfo.c
7807index 9b3356c..16274fe 100644
7808--- a/openinfo/openinfo.c
7809+++ b/openinfo/openinfo.c
7810@@ -36,7 +36,7 @@ extern UINT8 STRING_ARRAY_NAME[];
7811 //
7812 // Global Variables
7813 //
7814-EFI_HII_HANDLE HiiHandle;
7815+STATIC EFI_HII_HANDLE HiiHandle;
7816 EFI_GUID EfiOpeninfoGuid = EFI_OPENINFO_GUID;
7817 SHELL_VAR_CHECK_ITEM OpeninfoCheckList[] = {
7818 {
7819@@ -55,7 +55,7 @@ SHELL_VAR_CHECK_ITEM OpeninfoCheckList[] = {
7820 NULL,
7821 0,
7822 0,
7823- 0
7824+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
7825 }
7826 };
7827
7828diff --git a/openinfo/openinfo.h b/openinfo/openinfo.h
7829index fdd070d..56ed64a 100644
7830--- a/openinfo/openinfo.h
7831+++ b/openinfo/openinfo.h
7832@@ -33,3 +33,4 @@ Revision History
7833 }
7834
7835 #endif
7836+
7837diff --git a/openinfo/openinfo.inf b/openinfo/openinfo.inf
7838index 638462d..8bc1e18 100644
7839--- a/openinfo/openinfo.inf
7840+++ b/openinfo/openinfo.inf
7841@@ -41,24 +41,24 @@ COMPONENT_TYPE = APPLICATION
7842
7843 [sources.common]
7844 OPeninfoStrings.uni
7845- ..\ShCommonStrings.uni
7846+ ../ShCommonStrings.uni
7847 openinfo.c
7848 openinfo.h
7849
7850
7851 [includes.common]
7852 .
7853- ..\Inc
7854- ..\Library
7855- $(EDK_SOURCE)\Foundation
7856- $(EDK_SOURCE)\Foundation\Include
7857- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7858- $(EDK_SOURCE)\Foundation\Efi
7859- $(EDK_SOURCE)\Foundation\Efi\Include
7860- $(EDK_SOURCE)\Foundation\FrameWork
7861- $(EDK_SOURCE)\Foundation\FrameWork\Include
7862- $(EDK_SOURCE)\Foundation\Core\Dxe
7863- $(DEST_DIR)\
7864+ ../Inc
7865+ ../Library
7866+ $(EDK_SOURCE)/Foundation
7867+ $(EDK_SOURCE)/Foundation/Include
7868+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7869+ $(EDK_SOURCE)/Foundation/Efi
7870+ $(EDK_SOURCE)/Foundation/Efi/Include
7871+ $(EDK_SOURCE)/Foundation/FrameWork
7872+ $(EDK_SOURCE)/Foundation/FrameWork/Include
7873+ $(EDK_SOURCE)/Foundation/Core/Dxe
7874+ $(DEST_DIR./
7875
7876 [libraries.common]
7877 EfiShellLib
7878@@ -73,7 +73,11 @@ COMPONENT_TYPE = APPLICATION
7879
7880 [nmake.common]
7881 IMAGE_ENTRY_POINT=OpeninfoMain
7882+
7883+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
7884 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
7885 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
7886 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
7887
7888+[nmake.ARM, nmake.AARCH64]
7889+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
7890diff --git a/pci/pci.c b/pci/pci.c
7891index 8dc0dba..bb587c9 100644
7892--- a/pci/pci.c
7893+++ b/pci/pci.c
7894@@ -334,7 +334,7 @@ PCIE_EXPLAIN_STRUCT PcieExplainList[] = {
7895 {
7896 0,
7897 0,
7898- 0,
7899+ (PCIE_CAPREG_FIELD_WIDTH)0,
7900 NULL,
7901 PcieExplainTypeMax
7902 }
7903@@ -344,7 +344,7 @@ PCIE_EXPLAIN_STRUCT PcieExplainList[] = {
7904 // Global Variables
7905 //
7906 PCI_CONFIG_SPACE *mConfigSpace;
7907-EFI_HII_HANDLE HiiHandle;
7908+STATIC EFI_HII_HANDLE HiiHandle;
7909 EFI_GUID EfiPciGuid = EFI_PCI_GUID;
7910 SHELL_VAR_CHECK_ITEM PciCheckList[] = {
7911 {
7912@@ -375,7 +375,7 @@ SHELL_VAR_CHECK_ITEM PciCheckList[] = {
7913 NULL,
7914 0,
7915 0,
7916- 0
7917+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
7918 }
7919 };
7920
7921@@ -1034,7 +1034,7 @@ Returns:
7922 Status = BS->HandleProtocol (
7923 Handle,
7924 &gEfiPciRootBridgeIoProtocolGuid,
7925- IoDev
7926+ (VOID**)IoDev
7927 );
7928
7929 if (EFI_ERROR (Status)) {
7930@@ -1043,7 +1043,7 @@ Returns:
7931 //
7932 // Call Configuration() to get address space descriptors
7933 //
7934- Status = (*IoDev)->Configuration (*IoDev, Descriptors);
7935+ Status = (*IoDev)->Configuration (*IoDev, (VOID**)Descriptors);
7936 if (Status == EFI_UNSUPPORTED) {
7937 *Descriptors = NULL;
7938 return EFI_SUCCESS;
7939@@ -1237,7 +1237,7 @@ Returns:
7940 PrintToken (STRING_TOKEN (STR_PCI2_SINGLE_FUNCTION), HiiHandle);
7941 }
7942
7943- HeaderType = (UINT8) (Common->HeaderType & 0x7f);
7944+ HeaderType = (PCI_HEADER_TYPE) (Common->HeaderType & 0x7f);
7945 switch (HeaderType) {
7946 case PciDevice:
7947 PrintToken (STRING_TOKEN (STR_PCI2_PCI_DEVICE), HiiHandle);
7948@@ -1300,6 +1300,9 @@ Returns:
7949 );
7950 CapPtr = ConfigSpace->NonCommon.CardBus.CapabilitiesPtr;
7951 break;
7952+
7953+ default:
7954+ Status = EFI_UNSUPPORTED;
7955 }
7956 //
7957 // If Status bit4 is 1, dump or explain capability structure
7958@@ -1956,7 +1959,7 @@ Returns:
7959 INDEX_OF (&(CardBus->IoBase0)),
7960 Io32Bit ? L" 32 bit" : L" 16 bit",
7961 CardBus->IoBase0 & (Io32Bit ? 0xfffffffc : 0x0000fffc),
7962- CardBus->IoLimit0 & (Io32Bit ? 0xffffffff : 0x0000ffff) | 0x00000003
7963+ (CardBus->IoLimit0 & (Io32Bit ? 0xffffffff : 0x0000ffff)) | 0x00000003
7964 );
7965
7966 Io32Bit = (BOOLEAN) (CardBus->IoBase1 & PCI_BIT_0);
7967@@ -1966,7 +1969,7 @@ Returns:
7968 INDEX_OF (&(CardBus->IoBase1)),
7969 Io32Bit ? L" 32 bit" : L" 16 bit",
7970 CardBus->IoBase1 & (Io32Bit ? 0xfffffffc : 0x0000fffc),
7971- CardBus->IoLimit1 & (Io32Bit ? 0xffffffff : 0x0000ffff) | 0x00000003
7972+ (CardBus->IoLimit1 & (Io32Bit ? 0xffffffff : 0x0000ffff)) | 0x00000003
7973 );
7974
7975 //
7976diff --git a/pci/pci.h b/pci/pci.h
7977index 0716bee..42a5870 100644
7978--- a/pci/pci.h
7979+++ b/pci/pci.h
7980@@ -30,7 +30,7 @@ Revision History
7981 0x388da6c3, 0x3447, 0x4b1f, 0xa0, 0xba, 0xa9, 0xe8, 0xa2, 0x87, 0xf1, 0x76 \
7982 }
7983
7984-#include "TIANO.h"
7985+#include "Tiano.h"
7986
7987 typedef enum {
7988 PciDevice,
7989@@ -477,3 +477,4 @@ typedef struct {
7990 #pragma pack()
7991
7992 #endif // _PCI_H_
7993+
7994diff --git a/pci/pci.inf b/pci/pci.inf
7995index d4499d6..2c559a5 100644
7996--- a/pci/pci.inf
7997+++ b/pci/pci.inf
7998@@ -41,7 +41,7 @@ COMPONENT_TYPE = APPLICATION
7999
8000 [sources.common]
8001 PciStrings.uni
8002- ..\ShCommonStrings.uni
8003+ ../ShCommonStrings.uni
8004 pci.c
8005 pci.h
8006 pci_class.h
8007@@ -49,17 +49,17 @@ COMPONENT_TYPE = APPLICATION
8008
8009 [includes.common]
8010 .
8011- ..\Inc
8012- ..\Library
8013- $(EDK_SOURCE)\Foundation
8014- $(EDK_SOURCE)\Foundation\Include
8015- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
8016- $(EDK_SOURCE)\Foundation\Efi
8017- $(EDK_SOURCE)\Foundation\Efi\Include
8018- $(EDK_SOURCE)\Foundation\FrameWork
8019- $(EDK_SOURCE)\Foundation\FrameWork\Include
8020- $(EDK_SOURCE)\Foundation\Core\Dxe
8021- $(DEST_DIR)\
8022+ ../Inc
8023+ ../Library
8024+ $(EDK_SOURCE)/Foundation
8025+ $(EDK_SOURCE)/Foundation/Include
8026+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
8027+ $(EDK_SOURCE)/Foundation/Efi
8028+ $(EDK_SOURCE)/Foundation/Efi/Include
8029+ $(EDK_SOURCE)/Foundation/FrameWork
8030+ $(EDK_SOURCE)/Foundation/FrameWork/Include
8031+ $(EDK_SOURCE)/Foundation/Core/Dxe
8032+ $(DEST_DIR./
8033
8034 [libraries.common]
8035 EfiShellLib
8036@@ -74,7 +74,11 @@ COMPONENT_TYPE = APPLICATION
8037
8038 [nmake.common]
8039 IMAGE_ENTRY_POINT=PciDump
8040+
8041+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
8042 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
8043 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
8044 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
8045
8046+[nmake.ARM, nmake.AARCH64]
8047+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
8048diff --git a/pci/pci_class.c b/pci/pci_class.c
8049index caffe6d..14aa88d 100644
8050--- a/pci/pci_class.c
8051+++ b/pci/pci_class.c
8052@@ -30,7 +30,7 @@ Revision History
8053 //
8054 // Global Variables
8055 //
8056-EFI_HII_HANDLE HiiHandle;
8057+STATIC EFI_HII_HANDLE HiiHandle;
8058
8059 PCI_CLASS_ENTRY gClassStringList[];
8060
8061diff --git a/pci/pci_class.h b/pci/pci_class.h
8062index c7fff0c..0d6bea6 100644
8063--- a/pci/pci_class.h
8064+++ b/pci/pci_class.h
8065@@ -24,7 +24,7 @@ Revision History
8066 #ifndef _PCI_CLASS_H_
8067 #define _PCI_CLASS_H_
8068
8069-#include "TIANO.h" // for UINT32 etc.
8070+#include "Tiano.h" // for UINT32 etc.
8071 #define PCI_CLASS_STRING_LIMIT 54
8072 //
8073 // Printable strings for Pci class code
8074@@ -58,3 +58,4 @@ PciPrintClassCode (
8075 );
8076
8077 #endif // _PCI_CLASS_H_
8078+
8079diff --git a/reset/reset.c b/reset/reset.c
8080index 497b693..a5208b9 100644
8081--- a/reset/reset.c
8082+++ b/reset/reset.c
8083@@ -61,7 +61,7 @@ SHELL_VAR_CHECK_ITEM ResetCheckList[] = {
8084 NULL,
8085 0,
8086 0,
8087- 0
8088+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8089 }
8090 };
8091
8092diff --git a/reset/reset.h b/reset/reset.h
8093index 737fa11..e81c69a 100644
8094--- a/reset/reset.h
8095+++ b/reset/reset.h
8096@@ -32,3 +32,4 @@ Revision History
8097 }
8098
8099 #endif
8100+
8101diff --git a/reset/reset.inf b/reset/reset.inf
8102index 3af6b2c..5d36446 100644
8103--- a/reset/reset.inf
8104+++ b/reset/reset.inf
8105@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
8106
8107
8108 [sources.common]
8109- ..\ShCommonStrings.uni
8110+ ../ShCommonStrings.uni
8111 ResetStrings.uni
8112 Reset.c
8113 Reset.h
8114
8115 [includes.common]
8116 .
8117- ..\Inc
8118- ..\Library
8119- $(EDK_SOURCE)\Foundation
8120- $(EDK_SOURCE)\Foundation\Include
8121- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
8122- $(EDK_SOURCE)\Foundation\Efi
8123- $(EDK_SOURCE)\Foundation\Efi\Include
8124- $(EDK_SOURCE)\Foundation\FrameWork
8125- $(EDK_SOURCE)\Foundation\FrameWork\Include
8126- $(EDK_SOURCE)\Foundation\Core\Dxe
8127- $(DEST_DIR)\
8128+ ../Inc
8129+ ../Library
8130+ $(EDK_SOURCE)/Foundation
8131+ $(EDK_SOURCE)/Foundation/Include
8132+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
8133+ $(EDK_SOURCE)/Foundation/Efi
8134+ $(EDK_SOURCE)/Foundation/Efi/Include
8135+ $(EDK_SOURCE)/Foundation/FrameWork
8136+ $(EDK_SOURCE)/Foundation/FrameWork/Include
8137+ $(EDK_SOURCE)/Foundation/Core/Dxe
8138+ $(DEST_DIR./
8139
8140 [libraries.common]
8141 EfiShellLib
8142@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
8143
8144 [nmake.common]
8145 IMAGE_ENTRY_POINT=InitializeReset
8146+
8147+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
8148 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
8149 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
8150 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
8151
8152+[nmake.ARM, nmake.AARCH64]
8153+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
8154diff --git a/rm/rm.c b/rm/rm.c
8155index 792a5dc..7d0c2c8 100644
8156--- a/rm/rm.c
8157+++ b/rm/rm.c
8158@@ -54,7 +54,7 @@ SHELL_VAR_CHECK_ITEM RmCheckList[] = {
8159 NULL,
8160 0,
8161 0,
8162- FALSE
8163+ (SHELL_VAR_CHECK_FLAG_TYPE) FALSE
8164 }
8165 };
8166
8167diff --git a/rm/rm.h b/rm/rm.h
8168index 837ca7c..e2d5117 100644
8169--- a/rm/rm.h
8170+++ b/rm/rm.h
8171@@ -59,3 +59,4 @@ RemoveRM (
8172 );
8173
8174 #endif
8175+
8176diff --git a/rm/rm.inf b/rm/rm.inf
8177index 0da05e0..45b5edb 100644
8178--- a/rm/rm.inf
8179+++ b/rm/rm.inf
8180@@ -41,23 +41,23 @@ COMPONENT_TYPE = APPLICATION
8181
8182 [sources.common]
8183 RmStrings.uni
8184- ..\ShCommonStrings.uni
8185+ ../ShCommonStrings.uni
8186 rm.h
8187 rm.c
8188
8189 [includes.common]
8190 .
8191- ..\Inc
8192- ..\Library
8193- $(EDK_SOURCE)\Foundation
8194- $(EDK_SOURCE)\Foundation\Include
8195- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
8196- $(EDK_SOURCE)\Foundation\Efi
8197- $(EDK_SOURCE)\Foundation\Efi\Include
8198- $(EDK_SOURCE)\Foundation\FrameWork
8199- $(EDK_SOURCE)\Foundation\FrameWork\Include
8200- $(EDK_SOURCE)\Foundation\Core\Dxe
8201- $(DEST_DIR)\
8202+ ../Inc
8203+ ../Library
8204+ $(EDK_SOURCE)/Foundation
8205+ $(EDK_SOURCE)/Foundation/Include
8206+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
8207+ $(EDK_SOURCE)/Foundation/Efi
8208+ $(EDK_SOURCE)/Foundation/Efi/Include
8209+ $(EDK_SOURCE)/Foundation/FrameWork
8210+ $(EDK_SOURCE)/Foundation/FrameWork/Include
8211+ $(EDK_SOURCE)/Foundation/Core/Dxe
8212+ $(DEST_DIR./
8213
8214 [libraries.common]
8215 EfiShellLib
8216@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
8217
8218 [nmake.common]
8219 IMAGE_ENTRY_POINT=InitializeRM
8220+
8221+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
8222 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
8223 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
8224 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
8225
8226+[nmake.ARM, nmake.AARCH64]
8227+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
8228diff --git a/sermode/sermode.c b/sermode/sermode.c
8229index b59e801..d03c621 100644
8230--- a/sermode/sermode.c
8231+++ b/sermode/sermode.c
8232@@ -35,7 +35,7 @@ extern UINT8 STRING_ARRAY_NAME[];
8233
8234 #include EFI_PROTOCOL_DEFINITION (SerialIo)
8235
8236-EFI_HII_HANDLE HiiHandle;
8237+STATIC EFI_HII_HANDLE HiiHandle;
8238 EFI_GUID EfiSermodeGuid = EFI_SERMODEB_GUID;
8239 SHELL_VAR_CHECK_ITEM SermodeCheckList[] = {
8240 {
8241@@ -54,7 +54,7 @@ SHELL_VAR_CHECK_ITEM SermodeCheckList[] = {
8242 NULL,
8243 0,
8244 0,
8245- 0
8246+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8247 }
8248 };
8249
8250@@ -104,7 +104,7 @@ iDisplaySettings (
8251
8252 }
8253
8254- Status = BS->HandleProtocol (Handles[Index], &gEfiSerialIoProtocolGuid, &SerialIo);
8255+ Status = BS->HandleProtocol (Handles[Index], &gEfiSerialIoProtocolGuid, (VOID**)&SerialIo);
8256 if (!EFI_ERROR (Status)) {
8257 switch (SerialIo->Mode->Parity) {
8258 case DefaultParity:
8259@@ -454,7 +454,7 @@ Returns:
8260 continue;
8261 }
8262
8263- Status = BS->HandleProtocol (Handles[Index], &gEfiSerialIoProtocolGuid, &SerialIo);
8264+ Status = BS->HandleProtocol (Handles[Index], &gEfiSerialIoProtocolGuid, (VOID**)&SerialIo);
8265 if (!EFI_ERROR (Status)) {
8266 Status = SerialIo->SetAttributes (
8267 SerialIo,
8268diff --git a/sermode/sermode.h b/sermode/sermode.h
8269index 71a719b..7f38d4c 100644
8270--- a/sermode/sermode.h
8271+++ b/sermode/sermode.h
8272@@ -32,3 +32,4 @@ Revision History
8273 }
8274
8275 #endif
8276+
8277diff --git a/sermode/sermode.inf b/sermode/sermode.inf
8278index 71f3c66..4954400 100644
8279--- a/sermode/sermode.inf
8280+++ b/sermode/sermode.inf
8281@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
8282
8283
8284 [sources.common]
8285- ..\ShCommonStrings.uni
8286+ ../ShCommonStrings.uni
8287 SermodeStrings.uni
8288 sermode.c
8289 sermode.h
8290
8291 [includes.common]
8292 .
8293- ..\Inc
8294- ..\Library
8295- $(EDK_SOURCE)\Foundation
8296- $(EDK_SOURCE)\Foundation\Include
8297- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
8298- $(EDK_SOURCE)\Foundation\Efi
8299- $(EDK_SOURCE)\Foundation\Efi\Include
8300- $(EDK_SOURCE)\Foundation\FrameWork
8301- $(EDK_SOURCE)\Foundation\FrameWork\Include
8302- $(EDK_SOURCE)\Foundation\Core\Dxe
8303- $(DEST_DIR)\
8304+ ../Inc
8305+ ../Library
8306+ $(EDK_SOURCE)/Foundation
8307+ $(EDK_SOURCE)/Foundation/Include
8308+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
8309+ $(EDK_SOURCE)/Foundation/Efi
8310+ $(EDK_SOURCE)/Foundation/Efi/Include
8311+ $(EDK_SOURCE)/Foundation/FrameWork
8312+ $(EDK_SOURCE)/Foundation/FrameWork/Include
8313+ $(EDK_SOURCE)/Foundation/Core/Dxe
8314+ $(DEST_DIR./
8315
8316 [libraries.common]
8317 EfiShellLib
8318@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
8319
8320 [nmake.common]
8321 IMAGE_ENTRY_POINT=InitializeSerialMode
8322+
8323+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
8324 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
8325 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
8326 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
8327
8328+[nmake.ARM, nmake.AARCH64]
8329+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
8330diff --git a/shellenv/Connect.c b/shellenv/Connect.c
8331index 71ecf0b..51ec714 100644
8332--- a/shellenv/Connect.c
8333+++ b/shellenv/Connect.c
8334@@ -51,7 +51,7 @@ SHELL_VAR_CHECK_ITEM ConnectCheckList[] = {
8335 NULL,
8336 0,
8337 0,
8338- 0
8339+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8340 }
8341 };
8342
8343@@ -78,7 +78,7 @@ SHELL_VAR_CHECK_ITEM DisconnectCheckList[] = {
8344 NULL,
8345 0,
8346 0,
8347- 0
8348+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8349 }
8350 };
8351
8352@@ -105,7 +105,7 @@ SHELL_VAR_CHECK_ITEM ReconnectCheckList[] = {
8353 NULL,
8354 0,
8355 0,
8356- 0
8357+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8358 }
8359 };
8360
8361@@ -333,7 +333,7 @@ Returns:
8362 Status = BS->HandleProtocol (
8363 HandleBuffer[0],
8364 &gEfiDevicePathProtocolGuid,
8365- &Instance
8366+ (VOID**)&Instance
8367 );
8368 if (EFI_ERROR (Status)) {
8369 DriverBindingHandleCount = 1;
8370@@ -349,7 +349,7 @@ Returns:
8371 Status = BS->HandleProtocol (
8372 HandleBuffer[0],
8373 &gEfiDevicePathProtocolGuid,
8374- &Instance
8375+ (VOID**)&Instance
8376 );
8377 if (EFI_ERROR (Status)) {
8378 PrintToken (
8379@@ -368,7 +368,7 @@ Returns:
8380 Status = BS->HandleProtocol (
8381 HandleBuffer[1],
8382 &gEfiDriverBindingProtocolGuid,
8383- &Instance
8384+ (VOID**)&Instance
8385 );
8386 if (EFI_ERROR (Status)) {
8387 PrintToken (
8388@@ -407,7 +407,7 @@ Returns:
8389 Status = BS->HandleProtocol (
8390 AllHandleBuffer[Index],
8391 &gEfiDriverBindingProtocolGuid,
8392- &Instance
8393+ (VOID**)&Instance
8394 );
8395 if (EFI_ERROR (Status)) {
8396 DeviceHandleBuffer[DeviceHandleCount++] = AllHandleBuffer[Index];
8397@@ -1052,7 +1052,7 @@ SEnvConnectConsole (
8398 Status = BS->HandleProtocol (
8399 *ConsoleHandle,
8400 ConsoleGuid,
8401- &Interface
8402+ (VOID**)&Interface
8403 );
8404 }
8405
8406@@ -1079,7 +1079,7 @@ SEnvConnectConsole (
8407 Status = BS->HandleProtocol (
8408 AllHandleBuffer[Index],
8409 &gEfiDevicePathProtocolGuid,
8410- &Interface
8411+ (VOID**)&Interface
8412 );
8413 if (!EFI_ERROR (Status)) {
8414 ConsoleIndex = Index;
8415@@ -1095,7 +1095,7 @@ SEnvConnectConsole (
8416 BS->HandleProtocol (
8417 *ConsoleHandle,
8418 ConsoleGuid,
8419- ConsoleInterface
8420+ (VOID**)ConsoleInterface
8421 );
8422 }
8423
8424diff --git a/shellenv/ConsoleProxy.c b/shellenv/ConsoleProxy.c
8425index 15e6bfe..0978251 100644
8426--- a/shellenv/ConsoleProxy.c
8427+++ b/shellenv/ConsoleProxy.c
8428@@ -1483,7 +1483,7 @@ ProxyConInFlashState (
8429
8430 if (!EFI_ERROR (TimerStatus)) {
8431 mConInProxy.InputState = INPUT_STATE_DEFAULT;
8432- BS->SetTimer (
8433+ Status = BS->SetTimer (
8434 mConInProxy.TwoSecondTimeOut,
8435 TimerCancel,
8436 0
8437@@ -1496,9 +1496,11 @@ ProxyConInFlashState (
8438 (UINT64) 20000000
8439 );
8440 mConInProxy.InputState = INPUT_STATE_ESC;
8441+ } else {
8442+ Status = EFI_UNSUPPORTED;
8443 }
8444
8445- return EFI_SUCCESS;
8446+ return Status;
8447 }
8448
8449 EFI_STATUS
8450diff --git a/shellenv/batch.c b/shellenv/batch.c
8451index 24fef35..f725630 100644
8452--- a/shellenv/batch.c
8453+++ b/shellenv/batch.c
8454@@ -2388,7 +2388,6 @@ Returns:
8455
8456 --*/
8457 {
8458- BOOLEAN EndOfFile;
8459 EFI_STATUS Status;
8460 UINTN BufSize;
8461 CHAR16 *CommandLine;
8462@@ -2396,7 +2395,6 @@ Returns:
8463 EFI_BATCH_STATEMENT *Stmt;
8464 ENV_SHELL_INTERFACE NewShell;
8465 UINTN GotoTargetStatus;
8466- UINTN SkippedIfCount;
8467 BOOLEAN EchoStateValid;
8468 BOOLEAN EchoState;
8469 EFI_STATUS ExecuteResult;
8470@@ -2409,7 +2407,6 @@ Returns:
8471 // Initialize
8472 //
8473 Status = EFI_SUCCESS;
8474- EndOfFile = FALSE;
8475 BufSize = 0;
8476 EchoStateValid = FALSE;
8477 EchoState = FALSE;
8478@@ -2468,14 +2465,6 @@ Returns:
8479 EFI_BATCH_SCRIPT_SIGNATURE
8480 );
8481
8482- //
8483- // Iterate through the file, reading a line at a time and executing each
8484- // line as a shell command. Nested shell scripts will come through
8485- // this code path recursively.
8486- //
8487- EndOfFile = FALSE;
8488- SkippedIfCount = 0;
8489-
8490 while (1) {
8491 //
8492 // Read a command line from the file
8493@@ -2681,7 +2670,7 @@ Returns:
8494 LastError = ExecuteResult;
8495 }
8496
8497- if (ExecuteResult == -1) {
8498+ if (ExecuteResult == (EFI_STATUS) -1) {
8499 SE2->DecrementShellNestingLevel ();
8500 if (SE2->IsRootShell ()) {
8501 goto Done;
8502@@ -2774,7 +2763,7 @@ Done:
8503 Status = _ResumePreviousMode ();
8504 }
8505
8506- if (LastError == -1) {
8507+ if (LastError == (UINTN) -1) {
8508 return LastError;
8509 } else {
8510 return Status;
8511diff --git a/shellenv/conio.c b/shellenv/conio.c
8512index 2c963f5..8da67a1 100644
8513--- a/shellenv/conio.c
8514+++ b/shellenv/conio.c
8515@@ -889,7 +889,7 @@ Returns:
8516 //
8517 // If we need to update the output do so now
8518 //
8519- if (Update != -1) {
8520+ if (Update != (UINTN) -1) {
8521 if ((ConOut->Mode->CursorColumn != (INT32) Column) || (ConOut->Mode->CursorRow != (INT32) Row)) {
8522 PrintAt (Column, Row, L"%s%.*s", Str + Update, Delete, L"");
8523 } else {
8524diff --git a/shellenv/dprot.c b/shellenv/dprot.c
8525index 91faa50..9042b72 100644
8526--- a/shellenv/dprot.c
8527+++ b/shellenv/dprot.c
8528@@ -23,7 +23,7 @@ Revision History
8529
8530 #include "shelle.h"
8531 #include "shellenvguid.h"
8532-#include "acpi.h"
8533+#include "Acpi.h"
8534
8535 STATIC CHAR16 *SEnvDP_IlleagalStr[] = { L"Illegal" };
8536
8537@@ -328,7 +328,6 @@ Returns:
8538 I2O_DEVICE_PATH *I2ODevicePath;
8539 MAC_ADDR_DEVICE_PATH *MacAddrDevicePath;
8540 IPv4_DEVICE_PATH *IPv4DevicePath;
8541- IPv6_DEVICE_PATH *IPv6DevicePath;
8542 INFINIBAND_DEVICE_PATH *InfinibandDevicePath;
8543 UART_DEVICE_PATH *UartDevicePath;
8544 VENDOR_DEVICE_PATH *VendorDevicePath;
8545@@ -464,7 +463,6 @@ Returns:
8546 break;
8547
8548 case MSG_IPv6_DP:
8549- IPv6DevicePath = (IPv6_DEVICE_PATH *) DevicePath;
8550 PrintToken (STRING_TOKEN (STR_SHELLENV_DPROT_NOT_AVAIL), HiiEnvHandle);
8551 break;
8552
8553@@ -1054,6 +1052,8 @@ Returns:
8554 Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;
8555 } else if (NtHdr->FileHeader.Machine == EFI_IMAGE_MACHINE_X64) {
8556 Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;
8557+ } else if (NtHdr->FileHeader.Machine == EFI_IMAGE_MACHINE_AARCH64) {
8558+ Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;
8559 } else {
8560 Magic = NtHdr->OptionalHeader.Magic;
8561 }
8562@@ -1294,6 +1294,8 @@ Returns:
8563 case EfiIsaAcpiResourceInterrupt:
8564 PrintToken (STRING_TOKEN (STR_SHELLENV_DPROT_INT), HiiEnvHandle);
8565 break;
8566+ case EfiIsaAcpiResourceEndOfList:
8567+ return;
8568 }
8569
8570 if (IsaIo->ResourceList->ResourceItem[Index].StartRange == IsaIo->ResourceList->ResourceItem[Index].EndRange) {
8571diff --git a/shellenv/echo.c b/shellenv/echo.c
8572index 52b5464..9cf3482 100644
8573--- a/shellenv/echo.c
8574+++ b/shellenv/echo.c
8575@@ -52,7 +52,7 @@ SHELL_VAR_CHECK_ITEM EchoCheckList[] = {
8576 NULL,
8577 0,
8578 0,
8579- 0
8580+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8581 }
8582 };
8583
8584diff --git a/shellenv/exec.c b/shellenv/exec.c
8585index a6c1b73..5e4ea8e 100644
8586--- a/shellenv/exec.c
8587+++ b/shellenv/exec.c
8588@@ -105,7 +105,7 @@ SHELL_VAR_CHECK_ITEM RedirCheckList[] = {
8589 NULL,
8590 0,
8591 0,
8592- 0
8593+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8594 }
8595 };
8596
8597@@ -126,7 +126,7 @@ SHELL_VAR_CHECK_ITEM ExitCheckList[] = {
8598 NULL,
8599 0,
8600 0,
8601- 0
8602+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8603 }
8604 };
8605
8606@@ -1270,7 +1270,6 @@ Returns:
8607 SHELLENV_INTERNAL_COMMAND InternalCommand;
8608 EFI_HANDLE NewImage;
8609 EFI_FILE_HANDLE Script;
8610- BOOLEAN ShowHelp;
8611 BOOLEAN ConsoleContextSaved;
8612 EFI_HANDLE SavedConsoleInHandle;
8613 EFI_HANDLE SavedConsoleOutHandle;
8614@@ -1292,7 +1291,6 @@ Returns:
8615 //
8616 Status = EFI_SUCCESS;
8617 ParentShell = NULL;
8618- ShowHelp = FALSE;
8619 ConsoleContextSaved = FALSE;
8620 SavedConIn = NULL;
8621 SavedConOut = NULL;
8622@@ -1557,7 +1555,7 @@ Returns:
8623 );
8624
8625 EFI_SHELL_APP_INIT (ParentImageHandle, ParentSystemTable);
8626- if (-2 == Status) {
8627+ if ((EFI_STATUS) -2 == Status) {
8628 //
8629 // if status = -2 we assume that a nested shell has just exited.
8630 //
8631@@ -1613,7 +1611,9 @@ Returns:
8632 Done:
8633 DEBUG_CODE (
8634 if (EFI_ERROR (Status) && Output) {
8635- if ((Status == -1) || (Status == -2) || (Status == EFI_REDIRECTION_NOT_ALLOWED)
8636+ if ((Status == (EFI_STATUS) -1)
8637+ || (Status == (EFI_STATUS) -2)
8638+ || (Status == EFI_REDIRECTION_NOT_ALLOWED)
8639 || (Status == EFI_REDIRECTION_SAME)) {
8640 } else {
8641 PrintToken (STRING_TOKEN (STR_SHELLENV_EXEC_EXIT_STATUS_CODE), HiiEnvHandle, Status);
8642@@ -1674,7 +1674,7 @@ Done:
8643 PrintToken (STRING_TOKEN (STR_SHELLENV_REDIR_NOT_ALLOWED), HiiEnvHandle);
8644 }
8645
8646- if (Status != -1) {
8647+ if (Status != (EFI_STATUS) -1) {
8648 //
8649 // Don't Print on a "Disconnect All" exit. The ConOut device may not exist
8650 //
8651@@ -1872,7 +1872,7 @@ Returns:
8652 return Status;
8653 }
8654 //
8655- // Processing foo: or foo:\
8656+ // Processing foo:\ or foo:
8657 //
8658 if (PathPos != -1 && Ptr1 == NULL) {
8659 return Status;
8660@@ -2638,7 +2638,6 @@ Returns:
8661 EFI_STATUS Status;
8662 CHAR16 *Alias;
8663 CHAR16 *SubstituteStr;
8664- CHAR16 *OldSubstituteStr;
8665 BOOLEAN Literal;
8666 BOOLEAN Comment;
8667 BOOLEAN IsVariable;
8668@@ -2735,7 +2734,6 @@ Returns:
8669 // Try to find a shell enviroment variable
8670 //
8671 QuoteCount = 0;
8672- OldSubstituteStr = SubstituteStr;
8673 SubstituteStr = Str + 1;
8674 while (*SubstituteStr != '%' && *SubstituteStr != 0 && (!IsWhiteSpace (*SubstituteStr) || ParseState->Quote)) {
8675 if (*SubstituteStr == '"') {
8676diff --git a/shellenv/for.c b/shellenv/for.c
8677index 99664ad..93ab1f2 100644
8678--- a/shellenv/for.c
8679+++ b/shellenv/for.c
8680@@ -24,7 +24,7 @@ Revision History
8681 #include "shelle.h"
8682 #include "shellenvguid.h"
8683
8684-/*
8685+#if 0
8686 BOOLEAN
8687 CheckInterValue (
8688 IN CHAR16 *wszValueStr,
8689@@ -190,7 +190,7 @@ Arguments:
8690 Returns:
8691 EFI_SUCCESS The function finished sucessfully
8692
8693---
8694+--*/
8695 {
8696 EFI_BATCH_STATEMENT *Stmt;
8697 EFI_LIST_ENTRY FileList;
8698@@ -326,7 +326,8 @@ Done:
8699
8700 return Status;
8701 }
8702-*/
8703+#endif
8704+
8705 EFI_STATUS
8706 SEnvCmdForRun (
8707 IN EFI_HANDLE hImageHandle,
8708diff --git a/shellenv/help.c b/shellenv/help.c
8709index b5e1673..ecb52fd 100644
8710--- a/shellenv/help.c
8711+++ b/shellenv/help.c
8712@@ -52,7 +52,7 @@ SHELL_VAR_CHECK_ITEM HelpCheckList[] = {
8713 NULL,
8714 0,
8715 0,
8716- 0
8717+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8718 }
8719 };
8720
8721diff --git a/shellenv/if.c b/shellenv/if.c
8722index c6f0f51..766e6fb 100644
8723--- a/shellenv/if.c
8724+++ b/shellenv/if.c
8725@@ -59,7 +59,6 @@ Returns:
8726 BOOLEAN ExistNot;
8727 UINTN NotPos;
8728 BOOLEAN ExistI;
8729- UINTN IPos;
8730 EFI_STATUS Status;
8731 CHAR16 *FileName;
8732 BOOLEAN FileExists;
8733@@ -122,10 +121,8 @@ Returns:
8734 //
8735 if ((StriCmp (SI->Argv[1], L"/i") == 0)) {
8736 ExistI = TRUE;
8737- IPos = 1;
8738 } else {
8739 ExistI = FALSE;
8740- IPos = 0;
8741 }
8742
8743 NotPos = ExistI ? 2 : 1;
8744diff --git a/shellenv/init.c b/shellenv/init.c
8745index dad9002..458c6eb 100644
8746--- a/shellenv/init.c
8747+++ b/shellenv/init.c
8748@@ -143,7 +143,7 @@ Returns:
8749 Status = BS->HandleProtocol (
8750 mOldSEnv->Handle,
8751 &ShellEnvProtocol,
8752- &(mOldSEnv->Interface)
8753+ (VOID**)&(mOldSEnv->Interface)
8754 );
8755 ASSERT (!EFI_ERROR (Status));
8756 Status = BS->ReinstallProtocolInterface (
8757diff --git a/shellenv/map.c b/shellenv/map.c
8758index 3ebf2b4..a595c41 100644
8759--- a/shellenv/map.c
8760+++ b/shellenv/map.c
8761@@ -185,7 +185,7 @@ SHELL_VAR_CHECK_ITEM MapCheckList[] = {
8762 NULL,
8763 0,
8764 0,
8765- 0
8766+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8767 }
8768 };
8769
8770@@ -206,7 +206,7 @@ SHELL_VAR_CHECK_ITEM CdCheckList[] = {
8771 NULL,
8772 0,
8773 0,
8774- 0
8775+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8776 }
8777 };
8778
8779@@ -2038,13 +2038,13 @@ Returns:
8780 goto Done;
8781 }
8782
8783- Status = BS->HandleProtocol (Handle, &gEfiBlockIoProtocolGuid, &BlockIo);
8784+ Status = BS->HandleProtocol (Handle, &gEfiBlockIoProtocolGuid, (VOID**)&BlockIo);
8785 //
8786 // This is just for NT32, because fsntx has no block io protocol installed
8787 // but fsntx has installed simple file system protocol
8788 //
8789 if (EFI_ERROR (Status)) {
8790- Status = BS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, &BlockIo);
8791+ Status = BS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID**)&BlockIo);
8792 }
8793
8794 if (EFI_ERROR (Status)) {
8795@@ -2630,7 +2630,6 @@ Returns:
8796 UINTN Index;
8797 UINTN HandleNo;
8798 BOOLEAN EchoStatus;
8799- BOOLEAN Same;
8800 CHAR16 MapStr[8];
8801 EFI_LIST_ENTRY *Link;
8802 EFI_LIST_ENTRY *Head;
8803@@ -2729,11 +2728,6 @@ Returns:
8804 }
8805 }
8806 }
8807- //
8808- // New code, try to make mapping list sequence unchanged if current device
8809- // paths and original device paths are the same
8810- //
8811- Same = FALSE;
8812
8813 //
8814 // Load handle table and handle protocol info so that we can get
8815@@ -3410,4 +3404,4 @@ ClearHistoryMapping (
8816 FreePool (HistoryNode->DevicePath);
8817 FreePool (HistoryNode);
8818 }
8819-}
8820\ No newline at end of file
8821+}
8822diff --git a/shellenv/parsecmd.h b/shellenv/parsecmd.h
8823index b14fb80..494e127 100644
8824--- a/shellenv/parsecmd.h
8825+++ b/shellenv/parsecmd.h
8826@@ -103,4 +103,5 @@ DeleteHeadArg (
8827 IN OUT SHELL_PARSED_ARGS *args
8828 );
8829
8830-#endif
8831\ No newline at end of file
8832+#endif
8833+
8834diff --git a/shellenv/pause.c b/shellenv/pause.c
8835index ca67cd3..9088ca6 100644
8836--- a/shellenv/pause.c
8837+++ b/shellenv/pause.c
8838@@ -47,7 +47,7 @@ SHELL_VAR_CHECK_ITEM PauseCheckList[] = {
8839 NULL,
8840 0,
8841 0,
8842- 0
8843+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8844 }
8845 };
8846
8847diff --git a/shellenv/protid.c b/shellenv/protid.c
8848index 3edca2c..88ebb39 100644
8849--- a/shellenv/protid.c
8850+++ b/shellenv/protid.c
8851@@ -628,7 +628,7 @@ SHELL_VAR_CHECK_ITEM DHCheckList[] = {
8852 NULL,
8853 0,
8854 0,
8855- FALSE
8856+ (SHELL_VAR_CHECK_FLAG_TYPE) FALSE
8857 }
8858 };
8859
8860@@ -1183,7 +1183,7 @@ GetDriverName (
8861 *DriverName = LibDevicePathToStr (Image->FilePath);
8862 }
8863 } else {
8864- LibGetDriverName (DriverBindingHandle, Language, DriverName);
8865+ LibGetDriverName (DriverBindingHandle, (CHAR8*)Language, DriverName);
8866 }
8867
8868 return EFI_SUCCESS;
8869@@ -1539,7 +1539,7 @@ Returns:
8870
8871 DevicePath = NULL;
8872 BestDeviceName = NULL;
8873- Status = BS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, &DevicePath);
8874+ Status = BS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, (VOID**)&DevicePath);
8875
8876 Print (L"\n");
8877 PrintToken (STRING_TOKEN (STR_SHELLENV_PROTID_CONTROLLER_NAME), HiiEnvHandle);
8878@@ -1598,14 +1598,14 @@ Returns:
8879 Image = FALSE;
8880 Status = GetDriverName (
8881 DriverBindingHandleBuffer[Index],
8882- Language,
8883+ (UINT8*)Language,
8884 FALSE,
8885 &DriverName
8886 );
8887 if (DriverName == NULL) {
8888 Status = GetDriverName (
8889 DriverBindingHandleBuffer[Index],
8890- Language,
8891+ (UINT8*)Language,
8892 TRUE,
8893 &DriverName
8894 );
8895@@ -1792,7 +1792,7 @@ Returns:
8896
8897 Status = GetDriverName (
8898 Handle,
8899- Language,
8900+ (UINT8*)Language,
8901 FALSE,
8902 &DriverName
8903 );
8904@@ -1806,7 +1806,7 @@ Returns:
8905
8906 Status = GetDriverName (
8907 Handle,
8908- Language,
8909+ (UINT8*)Language,
8910 TRUE,
8911 &DriverName
8912 );
8913@@ -1979,7 +1979,7 @@ Returns:
8914
8915 if (Prot->Handles[Index] == Handle) {
8916 Dump = Verbose ? Prot->DumpInfo : Prot->DumpToken;
8917- Status = BS->HandleProtocol (Handle, &Prot->ProtocolId, &Interface);
8918+ Status = BS->HandleProtocol (Handle, &Prot->ProtocolId, (VOID**)&Interface);
8919 if (!EFI_ERROR (Status)) {
8920 if (Verbose) {
8921 for (Index1 = 0; Index1 < ProtocolBufferCount; Index1++) {
8922@@ -2027,7 +2027,7 @@ Returns:
8923 goto Done;
8924 }
8925
8926- Status = BS->HandleProtocol (Handle, ProtocolBuffer[Index1], &Interface);
8927+ Status = BS->HandleProtocol (Handle, ProtocolBuffer[Index1], (VOID**)&Interface);
8928 if (!EFI_ERROR (Status)) {
8929 PrintToken (
8930 STRING_TOKEN (STR_SHELLENV_PROTID_TWO_VARS_HG_NEW),
8931@@ -2660,8 +2660,6 @@ Returns:
8932
8933 --*/
8934 {
8935- EFI_STATUS Status;
8936-
8937 DEVICEPATH_INFO *DevicePathInfo;
8938
8939 UINTN Index;
8940@@ -2688,7 +2686,7 @@ Returns:
8941 //
8942 // Establish current device path info list
8943 //
8944- Status = LibLocateHandle (
8945+ LibLocateHandle (
8946 ByProtocol,
8947 Protocol,
8948 NULL,
8949diff --git a/shellenv/shelle.h b/shellenv/shelle.h
8950index 4338a21..88cebd5 100644
8951--- a/shellenv/shelle.h
8952+++ b/shellenv/shelle.h
8953@@ -2074,3 +2074,4 @@ SEnvDriverEFIVersionTok (
8954 );
8955
8956 #endif // _SHELLE_H_
8957+
8958diff --git a/shellenv/shellenvguid.h b/shellenv/shellenvguid.h
8959index 6766662..f1a1720 100644
8960--- a/shellenv/shellenvguid.h
8961+++ b/shellenv/shellenvguid.h
8962@@ -37,3 +37,4 @@ Revision History
8963 extern EFI_HII_HANDLE HiiEnvHandle;
8964
8965 #endif
8966+
8967diff --git a/shellenv/var.c b/shellenv/var.c
8968index cd86769..ae37344 100644
8969--- a/shellenv/var.c
8970+++ b/shellenv/var.c
8971@@ -110,7 +110,7 @@ SHELL_VAR_CHECK_ITEM VarCheckList[] = {
8972 NULL,
8973 0,
8974 0,
8975- 0
8976+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
8977 }
8978 };
8979
8980@@ -144,7 +144,6 @@ Returns:
8981 EFI_LIST_ENTRY *ListHead;
8982 VARIABLE_ID *Var;
8983 EFI_STATUS Status;
8984- BOOLEAN IsString;
8985 UINT32 Attributes;
8986
8987 //
8988@@ -175,15 +174,12 @@ Returns:
8989 // See if it's a shellenv variable
8990 //
8991 ListHead = NULL;
8992- IsString = FALSE;
8993 if (CompareGuid (&Id, &SEnvEnvId) == 0) {
8994 ListHead = &SEnvEnv;
8995- IsString = TRUE;
8996 }
8997
8998 if (CompareGuid (&Id, &SEnvAliasId) == 0) {
8999 ListHead = &SEnvAlias;
9000- IsString = TRUE;
9001 }
9002
9003 if (ListHead) {
9004diff --git a/stall/stall.c b/stall/stall.c
9005index ccf7451..b05c3a9 100644
9006--- a/stall/stall.c
9007+++ b/stall/stall.c
9008@@ -50,7 +50,7 @@ SHELL_VAR_CHECK_ITEM StallCheckList[] = {
9009 NULL,
9010 0,
9011 0,
9012- 0
9013+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
9014 }
9015 };
9016
9017diff --git a/stall/stall.h b/stall/stall.h
9018index a326e41..22e2fc1 100644
9019--- a/stall/stall.h
9020+++ b/stall/stall.h
9021@@ -30,3 +30,4 @@ Revision History
9022 }
9023
9024 #endif
9025+
9026diff --git a/stall/stall.inf b/stall/stall.inf
9027index 58545a5..5b08420 100644
9028--- a/stall/stall.inf
9029+++ b/stall/stall.inf
9030@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
9031
9032
9033 [sources.common]
9034- ..\ShCommonStrings.uni
9035+ ../ShCommonStrings.uni
9036 stallStrings.uni
9037 stall.c
9038 stall.h
9039
9040 [includes.common]
9041 .
9042- ..\Inc
9043- ..\Library
9044- $(EDK_SOURCE)\Foundation
9045- $(EDK_SOURCE)\Foundation\Include
9046- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
9047- $(EDK_SOURCE)\Foundation\Efi
9048- $(EDK_SOURCE)\Foundation\Efi\Include
9049- $(EDK_SOURCE)\Foundation\FrameWork
9050- $(EDK_SOURCE)\Foundation\FrameWork\Include
9051- $(EDK_SOURCE)\Foundation\Core\Dxe
9052- $(DEST_DIR)\
9053+ ../Inc
9054+ ../Library
9055+ $(EDK_SOURCE)/Foundation
9056+ $(EDK_SOURCE)/Foundation/Include
9057+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
9058+ $(EDK_SOURCE)/Foundation/Efi
9059+ $(EDK_SOURCE)/Foundation/Efi/Include
9060+ $(EDK_SOURCE)/Foundation/FrameWork
9061+ $(EDK_SOURCE)/Foundation/FrameWork/Include
9062+ $(EDK_SOURCE)/Foundation/Core/Dxe
9063+ $(DEST_DIR./
9064
9065 [libraries.common]
9066 EfiShellLib
9067@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
9068
9069 [nmake.common]
9070 IMAGE_ENTRY_POINT=InitializeStall
9071+
9072+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
9073 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
9074 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
9075 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
9076
9077+[nmake.ARM, nmake.AARCH64]
9078+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
9079diff --git a/time/time.c b/time/time.c
9080index 00dd586..6309963 100644
9081--- a/time/time.c
9082+++ b/time/time.c
9083@@ -49,7 +49,7 @@ SHELL_VAR_CHECK_ITEM TimeCheckList[] = {
9084 NULL,
9085 0,
9086 0,
9087- 0
9088+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
9089 }
9090 };
9091
9092@@ -64,8 +64,8 @@ STATIC
9093 BOOLEAN
9094 GetNumber (
9095 IN CHAR16 *Str,
9096- IN OUT INTN *Offset,
9097- IN OUT INTN *number,
9098+ IN OUT UINTN *Offset,
9099+ IN OUT UINTN *number,
9100 IN BOOLEAN GetSecond
9101 );
9102
9103@@ -296,8 +296,8 @@ STATIC
9104 BOOLEAN
9105 GetNumber (
9106 IN CHAR16 *Str,
9107- IN OUT INTN *Offset,
9108- IN OUT INTN *Number,
9109+ IN OUT UINTN *Offset,
9110+ IN OUT UINTN *Number,
9111 IN BOOLEAN GetSecond
9112 )
9113 {
9114diff --git a/time/time.h b/time/time.h
9115index e9ff6c9..c273c4f 100644
9116--- a/time/time.h
9117+++ b/time/time.h
9118@@ -32,3 +32,4 @@ Revision History
9119 }
9120
9121 #endif
9122+
9123diff --git a/time/time.inf b/time/time.inf
9124index 5181280..ab71d0e 100644
9125--- a/time/time.inf
9126+++ b/time/time.inf
9127@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
9128
9129
9130 [sources.common]
9131- ..\ShCommonStrings.uni
9132+ ../ShCommonStrings.uni
9133 TimeStrings.uni
9134 Time.c
9135 Time.h
9136
9137 [includes.common]
9138 .
9139- ..\Inc
9140- ..\Library
9141- $(EDK_SOURCE)\Foundation
9142- $(EDK_SOURCE)\Foundation\Include
9143- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
9144- $(EDK_SOURCE)\Foundation\Efi
9145- $(EDK_SOURCE)\Foundation\Efi\Include
9146- $(EDK_SOURCE)\Foundation\FrameWork
9147- $(EDK_SOURCE)\Foundation\FrameWork\Include
9148- $(EDK_SOURCE)\Foundation\Core\Dxe
9149- $(DEST_DIR)\
9150+ ../Inc
9151+ ../Library
9152+ $(EDK_SOURCE)/Foundation
9153+ $(EDK_SOURCE)/Foundation/Include
9154+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
9155+ $(EDK_SOURCE)/Foundation/Efi
9156+ $(EDK_SOURCE)/Foundation/Efi/Include
9157+ $(EDK_SOURCE)/Foundation/FrameWork
9158+ $(EDK_SOURCE)/Foundation/FrameWork/Include
9159+ $(EDK_SOURCE)/Foundation/Core/Dxe
9160+ $(DEST_DIR./
9161
9162 [libraries.common]
9163 EfiShellLib
9164@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
9165
9166 [nmake.common]
9167 IMAGE_ENTRY_POINT=InitializeTime
9168+
9169+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
9170 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
9171 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
9172 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
9173
9174+[nmake.ARM, nmake.AARCH64]
9175+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
9176diff --git a/touch/touch.c b/touch/touch.c
9177index 0938d34..a5f61b8 100644
9178--- a/touch/touch.c
9179+++ b/touch/touch.c
9180@@ -64,7 +64,7 @@ TouchFreeFileArg (
9181 //
9182 // Global Variables
9183 //
9184-EFI_HII_HANDLE HiiHandle;
9185+STATIC EFI_HII_HANDLE HiiHandle;
9186 EFI_GUID EfiTouchGuid = EFI_TOUCH_GUID;
9187 SHELL_VAR_CHECK_ITEM TouchCheckList[] = {
9188 {
9189diff --git a/touch/touch.h b/touch/touch.h
9190index 402e7dc..6aceaf5 100644
9191--- a/touch/touch.h
9192+++ b/touch/touch.h
9193@@ -29,4 +29,4 @@ Revision History
9194 0xa16a4695, 0x5815, 0x4d4f, 0xb8, 0xe, 0x6a, 0xf, 0x88, 0xac, 0xdb, 0x6c \
9195 }
9196
9197-#endif
9198\ No newline at end of file
9199+#endif
9200diff --git a/touch/touch.inf b/touch/touch.inf
9201index 5382ff6..8d67f41 100644
9202--- a/touch/touch.inf
9203+++ b/touch/touch.inf
9204@@ -39,23 +39,23 @@ FILE_GUID = 2EBB94E8-3792-47bb-8843-4D5ED5B98F28
9205 COMPONENT_TYPE = APPLICATION
9206
9207 [sources.common]
9208- ..\ShCommonStrings.uni
9209+ ../ShCommonStrings.uni
9210 TouchStrings.uni
9211 touch.c
9212
9213 [includes.common]
9214 .
9215- ..\Inc
9216- ..\Library
9217- $(EDK_SOURCE)\Foundation
9218- $(EDK_SOURCE)\Foundation\Include
9219- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
9220- $(EDK_SOURCE)\Foundation\Efi
9221- $(EDK_SOURCE)\Foundation\Efi\Include
9222- $(EDK_SOURCE)\Foundation\FrameWork
9223- $(EDK_SOURCE)\Foundation\FrameWork\Include
9224- $(EDK_SOURCE)\Foundation\Core\Dxe
9225- $(DEST_DIR)\
9226+ ../Inc
9227+ ../Library
9228+ $(EDK_SOURCE)/Foundation
9229+ $(EDK_SOURCE)/Foundation/Include
9230+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
9231+ $(EDK_SOURCE)/Foundation/Efi
9232+ $(EDK_SOURCE)/Foundation/Efi/Include
9233+ $(EDK_SOURCE)/Foundation/FrameWork
9234+ $(EDK_SOURCE)/Foundation/FrameWork/Include
9235+ $(EDK_SOURCE)/Foundation/Core/Dxe
9236+ $(DEST_DIR./
9237
9238 [libraries.common]
9239 EfiShellLib
9240@@ -70,6 +70,11 @@ COMPONENT_TYPE = APPLICATION
9241
9242 [nmake.common]
9243 IMAGE_ENTRY_POINT=InitializeTouch
9244+
9245+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
9246 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
9247 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
9248 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
9249+
9250+[nmake.ARM, nmake.AARCH64]
9251+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
9252diff --git a/type/type.c b/type/type.c
9253index 129f911..a4cf59d 100644
9254--- a/type/type.c
9255+++ b/type/type.c
9256@@ -59,7 +59,7 @@ BOOLEAN TypeAscii;
9257 BOOLEAN TypeUnicode;
9258 BOOLEAN TypeAuto;
9259
9260-EFI_HII_HANDLE HiiHandle;
9261+STATIC EFI_HII_HANDLE HiiHandle;
9262 EFI_GUID EfiTypeGuid = EFI_TYPE_GUID;
9263 SHELL_VAR_CHECK_ITEM TypeCheckList[] = {
9264 {
9265@@ -90,7 +90,7 @@ SHELL_VAR_CHECK_ITEM TypeCheckList[] = {
9266 NULL,
9267 0,
9268 0,
9269- 0
9270+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
9271 }
9272 };
9273
9274diff --git a/type/type.h b/type/type.h
9275index b3c170c..f22e566 100644
9276--- a/type/type.h
9277+++ b/type/type.h
9278@@ -30,3 +30,4 @@ Revision History
9279 }
9280
9281 #endif
9282+
9283diff --git a/type/type.inf b/type/type.inf
9284index efb0a82..0a8e7eb 100644
9285--- a/type/type.inf
9286+++ b/type/type.inf
9287@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
9288
9289
9290 [sources.common]
9291- ..\ShCommonStrings.uni
9292+ ../ShCommonStrings.uni
9293 TypeStrings.uni
9294 type.c
9295 type.h
9296
9297 [includes.common]
9298 .
9299- ..\Inc
9300- ..\Library
9301- $(EDK_SOURCE)\Foundation
9302- $(EDK_SOURCE)\Foundation\Include
9303- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
9304- $(EDK_SOURCE)\Foundation\Efi
9305- $(EDK_SOURCE)\Foundation\Efi\Include
9306- $(EDK_SOURCE)\Foundation\FrameWork
9307- $(EDK_SOURCE)\Foundation\FrameWork\Include
9308- $(EDK_SOURCE)\Foundation\Core\Dxe
9309- $(DEST_DIR)\
9310+ ../Inc
9311+ ../Library
9312+ $(EDK_SOURCE)/Foundation
9313+ $(EDK_SOURCE)/Foundation/Include
9314+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
9315+ $(EDK_SOURCE)/Foundation/Efi
9316+ $(EDK_SOURCE)/Foundation/Efi/Include
9317+ $(EDK_SOURCE)/Foundation/FrameWork
9318+ $(EDK_SOURCE)/Foundation/FrameWork/Include
9319+ $(EDK_SOURCE)/Foundation/Core/Dxe
9320+ $(DEST_DIR./
9321
9322 [libraries.common]
9323 EfiShellLib
9324@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
9325
9326 [nmake.common]
9327 IMAGE_ENTRY_POINT=InitializeType
9328+
9329+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
9330 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
9331 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
9332 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
9333
9334+[nmake.ARM, nmake.AARCH64]
9335+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
9336diff --git a/tzone/timezone.inf b/tzone/timezone.inf
9337index 57834c6..f0e8c1d 100644
9338--- a/tzone/timezone.inf
9339+++ b/tzone/timezone.inf
9340@@ -25,24 +25,24 @@ FILE_GUID = E27B12B9-2647-4af3-ADBC-B5AB5FB50421
9341 COMPONENT_TYPE = APPLICATION
9342
9343 [sources.common]
9344- ..\ShCommonStrings.uni
9345+ ../ShCommonStrings.uni
9346 TZoneStrings.uni
9347 tzone.c
9348 tzone.h
9349
9350 [includes.common]
9351 .
9352- ..\Inc
9353- ..\Library
9354- $(EDK_SOURCE)\Foundation
9355- $(EDK_SOURCE)\Foundation\Include
9356- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
9357- $(EDK_SOURCE)\Foundation\Efi
9358- $(EDK_SOURCE)\Foundation\Efi\Include
9359- $(EDK_SOURCE)\Foundation\FrameWork
9360- $(EDK_SOURCE)\Foundation\FrameWork\Include
9361- $(EDK_SOURCE)\Foundation\Core\Dxe
9362- $(DEST_DIR)\
9363+ ../Inc
9364+ ../Library
9365+ $(EDK_SOURCE)/Foundation
9366+ $(EDK_SOURCE)/Foundation/Include
9367+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
9368+ $(EDK_SOURCE)/Foundation/Efi
9369+ $(EDK_SOURCE)/Foundation/Efi/Include
9370+ $(EDK_SOURCE)/Foundation/FrameWork
9371+ $(EDK_SOURCE)/Foundation/FrameWork/Include
9372+ $(EDK_SOURCE)/Foundation/Core/Dxe
9373+ $(DEST_DIR./
9374
9375 [libraries.common]
9376 EfiShellLib
9377@@ -62,11 +62,13 @@ COMPONENT_TYPE = APPLICATION
9378 # we will specify some additional DEFINEs on the compile command line.
9379 #
9380 [nmake.common]
9381- C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
9382 IMAGE_ENTRY_POINT=InitializeTZone
9383+
9384+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
9385+ C_PROJ_FLAGS = $(C_PROJ_FLAGS) /Zm500
9386 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
9387 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
9388 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
9389
9390-
9391-
9392\ No newline at end of file
9393+[nmake.ARM, nmake.AARCH64]
9394+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
9395diff --git a/tzone/tzone.c b/tzone/tzone.c
9396index 30cc513..2b6ccdd 100644
9397--- a/tzone/tzone.c
9398+++ b/tzone/tzone.c
9399@@ -65,7 +65,7 @@ SHELL_VAR_CHECK_ITEM TzoneCheckList[] = {
9400 NULL,
9401 0,
9402 0,
9403- 0
9404+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
9405 }
9406 };
9407
9408@@ -258,7 +258,6 @@ InitializeTZone (
9409 BOOLEAN bList;
9410 BOOLEAN bSet;
9411 INT16 nValue;
9412- UINTN uValueSize;
9413 SHELL_VAR_CHECK_CODE RetCode;
9414 CHAR16 *Useful;
9415 SHELL_VAR_CHECK_PACKAGE ChkPck;
9416@@ -269,7 +268,6 @@ InitializeTZone (
9417 bList = FALSE;
9418 bSet = FALSE;
9419 nValue = 0;
9420- uValueSize = sizeof (INTN);
9421 ZeroMem (&ChkPck, sizeof (SHELL_VAR_CHECK_PACKAGE));
9422 ZeroMem (&Time, sizeof (EFI_TIME));
9423 //
9424diff --git a/tzone/tzone.h b/tzone/tzone.h
9425index 08e049f..1cc0c2b 100644
9426--- a/tzone/tzone.h
9427+++ b/tzone/tzone.h
9428@@ -35,3 +35,4 @@ Revision History
9429 }
9430
9431 #endif
9432+
9433diff --git a/unload/unload.c b/unload/unload.c
9434index 100f16b..5aee387 100644
9435--- a/unload/unload.c
9436+++ b/unload/unload.c
9437@@ -66,7 +66,7 @@ SHELL_VAR_CHECK_ITEM UnloadCheckList[] = {
9438 NULL,
9439 0,
9440 0,
9441- 0
9442+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
9443 }
9444 };
9445
9446@@ -110,7 +110,7 @@ _UnloadGetDriverName (
9447 *DriverName = LibDevicePathToStr (Image->FilePath);
9448 }
9449 } else {
9450- LibGetDriverName(DriverBindingHandle, Language, DriverName);
9451+ LibGetDriverName(DriverBindingHandle, (CHAR8*)Language, DriverName);
9452 }
9453
9454 return EFI_SUCCESS;
9455@@ -184,7 +184,7 @@ Returns:
9456
9457 DevicePath = NULL;
9458 BestDeviceName = NULL;
9459- Status = BS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, &DevicePath);
9460+ Status = BS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, (VOID**)&DevicePath);
9461
9462 Print (L"\n");
9463 PrintToken (STRING_TOKEN (STR_UNLOAD_CONTROLLER_NAME), HiiUnloadHandle);
9464@@ -242,14 +242,14 @@ Returns:
9465 Image = FALSE;
9466 Status = _UnloadGetDriverName (
9467 DriverBindingHandleBuffer[Index],
9468- Language,
9469+ (UINT8*)Language,
9470 FALSE,
9471 &DriverName
9472 );
9473 if (DriverName == NULL) {
9474 Status = _UnloadGetDriverName (
9475 DriverBindingHandleBuffer[Index],
9476- Language,
9477+ (UINT8*)Language,
9478 TRUE,
9479 &DriverName
9480 );
9481@@ -436,7 +436,7 @@ Returns:
9482
9483 Status = _UnloadGetDriverName (
9484 Handle,
9485- Language,
9486+ (UINT8*)Language,
9487 FALSE,
9488 &DriverName
9489 );
9490@@ -450,7 +450,7 @@ Returns:
9491
9492 Status = _UnloadGetDriverName (
9493 Handle,
9494- Language,
9495+ (UINT8*)Language,
9496 TRUE,
9497 &DriverName
9498 );
9499@@ -628,7 +628,7 @@ Returns:
9500
9501 if (Prot->Handles[Index] == Handle) {
9502 Dump = Verbose ? Prot->DumpInfo : Prot->DumpToken;
9503- Status = BS->HandleProtocol (Handle, &Prot->ProtocolId, &Interface);
9504+ Status = BS->HandleProtocol (Handle, &Prot->ProtocolId, (VOID**)&Interface);
9505 if (!EFI_ERROR (Status)) {
9506 if (Verbose) {
9507 for (Index1 = 0; Index1 < ProtocolBufferCount; Index1++) {
9508@@ -676,7 +676,7 @@ Returns:
9509 goto Done;
9510 }
9511
9512- Status = BS->HandleProtocol (Handle, ProtocolBuffer[Index1], &Interface);
9513+ Status = BS->HandleProtocol (Handle, ProtocolBuffer[Index1], (VOID**)&Interface);
9514 if (!EFI_ERROR (Status)) {
9515 PrintToken (STRING_TOKEN (STR_UNLOAD_TWO_VARS_HG_NEW), HiiUnloadHandle, ProtocolBuffer[Index1], Interface);
9516 }
9517diff --git a/unload/unload.h b/unload/unload.h
9518index d6da802..4c99c85 100644
9519--- a/unload/unload.h
9520+++ b/unload/unload.h
9521@@ -36,3 +36,4 @@ Revision History
9522 }
9523
9524 #endif
9525+
9526diff --git a/unload/unload.inf b/unload/unload.inf
9527index e91869e..fbc0fb3 100644
9528--- a/unload/unload.inf
9529+++ b/unload/unload.inf
9530@@ -39,23 +39,23 @@ FILE_GUID = 409060F4-3E7B-44cc-9DFD-A8E807474888
9531 COMPONENT_TYPE = APPLICATION
9532
9533 [sources.common]
9534- ..\ShCommonStrings.uni
9535+ ../ShCommonStrings.uni
9536 UnloadStrings.uni
9537 unload.c
9538
9539 [includes.common]
9540 .
9541- ..\Inc
9542- ..\Library
9543- $(EDK_SOURCE)\Foundation
9544- $(EDK_SOURCE)\Foundation\Include
9545- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
9546- $(EDK_SOURCE)\Foundation\Efi
9547- $(EDK_SOURCE)\Foundation\Efi\Include
9548- $(EDK_SOURCE)\Foundation\FrameWork
9549- $(EDK_SOURCE)\Foundation\FrameWork\Include
9550- $(EDK_SOURCE)\Foundation\Core\Dxe
9551- $(DEST_DIR)\
9552+ ../Inc
9553+ ../Library
9554+ $(EDK_SOURCE)/Foundation
9555+ $(EDK_SOURCE)/Foundation/Include
9556+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
9557+ $(EDK_SOURCE)/Foundation/Efi
9558+ $(EDK_SOURCE)/Foundation/Efi/Include
9559+ $(EDK_SOURCE)/Foundation/FrameWork
9560+ $(EDK_SOURCE)/Foundation/FrameWork/Include
9561+ $(EDK_SOURCE)/Foundation/Core/Dxe
9562+ $(DEST_DIR./
9563
9564 [libraries.common]
9565 EfiShellLib
9566@@ -70,6 +70,11 @@ COMPONENT_TYPE = APPLICATION
9567
9568 [nmake.common]
9569 IMAGE_ENTRY_POINT=InitializeUnload
9570+
9571+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
9572 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
9573 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
9574 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
9575+
9576+[nmake.ARM, nmake.AARCH64]
9577+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
9578diff --git a/ver/Ebc/verEbc.c b/ver/Ebc/verEbc.c
9579index 1d7368d..9518e14 100644
9580--- a/ver/Ebc/verEbc.c
9581+++ b/ver/Ebc/verEbc.c
9582@@ -45,7 +45,7 @@ DisplayExtendedVersionInfo (
9583 Status = BS->LocateProtocol (
9584 &gEfiEbcProtocolGuid,
9585 NULL,
9586- &Ebc
9587+ (VOID**)&Ebc
9588 );
9589 if (EFI_ERROR (Status)) {
9590 return ;
9591diff --git a/ver/Ver.inf b/ver/Ver.inf
9592index 56a135d..12ec23e 100644
9593--- a/ver/Ver.inf
9594+++ b/ver/Ver.inf
9595@@ -40,33 +40,33 @@ COMPONENT_TYPE = APPLICATION
9596
9597
9598 [sources.common]
9599- ..\ShCommonStrings.uni
9600+ ../ShCommonStrings.uni
9601 VerStrings.uni
9602 Ver.c
9603 Ver.h
9604
9605-[sources.ia32,sources.x64]
9606- ia32\ver32.c
9607+[sources.ia32,sources.x64,sources.ARM,sources.AARCH64]
9608+ ia32/ver32.c
9609
9610 [sources.ipf]
9611- ipf\ver64.c
9612+ IPF/ver64.c
9613
9614 [sources.ebc]
9615- ebc\verEbc.c
9616+ eb./verEbc.c
9617
9618 [includes.common]
9619 .
9620- ..\Inc
9621- ..\Library
9622- $(EDK_SOURCE)\Foundation
9623- $(EDK_SOURCE)\Foundation\Include
9624- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
9625- $(EDK_SOURCE)\Foundation\Efi
9626- $(EDK_SOURCE)\Foundation\Efi\Include
9627- $(EDK_SOURCE)\Foundation\FrameWork
9628- $(EDK_SOURCE)\Foundation\FrameWork\Include
9629- $(EDK_SOURCE)\Foundation\Core\Dxe
9630- $(DEST_DIR)\
9631+ ../Inc
9632+ ../Library
9633+ $(EDK_SOURCE)/Foundation
9634+ $(EDK_SOURCE)/Foundation/Include
9635+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
9636+ $(EDK_SOURCE)/Foundation/Efi
9637+ $(EDK_SOURCE)/Foundation/Efi/Include
9638+ $(EDK_SOURCE)/Foundation/FrameWork
9639+ $(EDK_SOURCE)/Foundation/FrameWork/Include
9640+ $(EDK_SOURCE)/Foundation/Core/Dxe
9641+ $(DEST_DIR./
9642
9643 [libraries.common]
9644 EfiShellLib
9645@@ -82,7 +82,11 @@ COMPONENT_TYPE = APPLICATION
9646
9647 [nmake.common]
9648 IMAGE_ENTRY_POINT=InitializeVer
9649+
9650+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
9651 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
9652 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
9653 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
9654
9655+[nmake.ARM, nmake.AARCH64]
9656+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
9657diff --git a/ver/ver.c b/ver/ver.c
9658index 76d50ca..56b95d4 100644
9659--- a/ver/ver.c
9660+++ b/ver/ver.c
9661@@ -57,7 +57,7 @@ SHELL_VAR_CHECK_ITEM VerCheckList[] = {
9662 NULL,
9663 0,
9664 0,
9665- 0
9666+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
9667 }
9668 };
9669
9670diff --git a/ver/ver.h b/ver/ver.h
9671index 770e82f..c6adc30 100644
9672--- a/ver/ver.h
9673+++ b/ver/ver.h
9674@@ -37,3 +37,4 @@ DisplayExtendedVersionInfo (
9675 IN EFI_SYSTEM_TABLE *SystemTable
9676 );
9677 #endif
9678+
9679diff --git a/vol/Vol.inf b/vol/Vol.inf
9680index 71d2cb5..cef8462 100644
9681--- a/vol/Vol.inf
9682+++ b/vol/Vol.inf
9683@@ -40,24 +40,24 @@ COMPONENT_TYPE = APPLICATION
9684
9685
9686 [sources.common]
9687- ..\ShCommonStrings.uni
9688+ ../ShCommonStrings.uni
9689 VolStrings.uni
9690 Vol.c
9691 Vol.h
9692
9693 [includes.common]
9694 .
9695- ..\Inc
9696- ..\Library
9697- $(EDK_SOURCE)\Foundation
9698- $(EDK_SOURCE)\Foundation\Include
9699- $(EDK_SOURCE)\Foundation\Include\IndustryStandard
9700- $(EDK_SOURCE)\Foundation\Efi
9701- $(EDK_SOURCE)\Foundation\Efi\Include
9702- $(EDK_SOURCE)\Foundation\FrameWork
9703- $(EDK_SOURCE)\Foundation\FrameWork\Include
9704- $(EDK_SOURCE)\Foundation\Core\Dxe
9705- $(DEST_DIR)\
9706+ ../Inc
9707+ ../Library
9708+ $(EDK_SOURCE)/Foundation
9709+ $(EDK_SOURCE)/Foundation/Include
9710+ $(EDK_SOURCE)/Foundation/Include/IndustryStandard
9711+ $(EDK_SOURCE)/Foundation/Efi
9712+ $(EDK_SOURCE)/Foundation/Efi/Include
9713+ $(EDK_SOURCE)/Foundation/FrameWork
9714+ $(EDK_SOURCE)/Foundation/FrameWork/Include
9715+ $(EDK_SOURCE)/Foundation/Core/Dxe
9716+ $(DEST_DIR./
9717
9718 [libraries.common]
9719 EfiShellLib
9720@@ -72,7 +72,11 @@ COMPONENT_TYPE = APPLICATION
9721
9722 [nmake.common]
9723 IMAGE_ENTRY_POINT=InitializeVol
9724+
9725+[nmake.IA32, nmake.EBC, nmake.X64, nmake.IPF]
9726 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
9727 C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
9728 C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_BOOTSHELL
9729
9730+[nmake.ARM, nmake.AARCH64]
9731+ C_STD_FLAGS = $(C_STD_FLAGS) -DEFI_BOOTSHELL
9732diff --git a/vol/vol.c b/vol/vol.c
9733index 47a4de0..e86b298 100644
9734--- a/vol/vol.c
9735+++ b/vol/vol.c
9736@@ -32,7 +32,7 @@ extern UINT8 STRING_ARRAY_NAME[];
9737 //
9738 #include STRING_DEFINES_FILE
9739
9740-EFI_HII_HANDLE HiiHandle;
9741+STATIC EFI_HII_HANDLE HiiHandle;
9742 EFI_GUID EfiVolGuid = EFI_VOL_GUID;
9743 SHELL_VAR_CHECK_ITEM VolCheckList[] = {
9744 {
9745@@ -63,7 +63,7 @@ SHELL_VAR_CHECK_ITEM VolCheckList[] = {
9746 NULL,
9747 0,
9748 0,
9749- 0
9750+ (SHELL_VAR_CHECK_FLAG_TYPE) 0
9751 }
9752 };
9753
9754diff --git a/vol/vol.h b/vol/vol.h
9755index 0d345dd..a9fe6d7 100644
9756--- a/vol/vol.h
9757+++ b/vol/vol.h
9758@@ -32,3 +32,4 @@ Revision History
9759 }
9760
9761 #endif
9762+
9763--
97641.8.5
9765