• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --ignore-file-name-case -Naur ShellR33/attrib/attrib.c GccShellR33/attrib/attrib.c
2--- ShellR33/attrib/attrib.c	2006-08-07 02:14:38.000000000 -0700
3+++ GccShellR33/attrib/attrib.c	2009-11-05 13:49:56.000000000 -0800
4@@ -57,7 +57,7 @@
5 //
6 // Global Variables
7 //
8-EFI_HII_HANDLE  HiiHandle;
9+static EFI_HII_HANDLE  HiiHandle;
10 EFI_GUID        EfiAttribGuid = EFI_ATTRIB_GUID;
11 SHELL_VAR_CHECK_ITEM    AttribCheckList[] = {
12   {
13@@ -438,7 +438,7 @@
14     //
15     Info = Arg->Info;
16     if (Add || Remove) {
17-      Info->Attribute = Info->Attribute & (~Remove) | Add;
18+      Info->Attribute = (Info->Attribute & (~Remove)) | Add;
19       Status = Arg->Handle->SetInfo (
20                               Arg->Handle,
21                               &gEfiFileInfoGuid,
22diff --ignore-file-name-case -Naur ShellR33/attrib/attrib.h GccShellR33/attrib/attrib.h
23--- ShellR33/attrib/attrib.h	2005-08-23 00:16:36.000000000 -0700
24+++ GccShellR33/attrib/attrib.h	2009-11-05 13:49:56.000000000 -0800
25@@ -29,4 +29,4 @@
26     0xcd691c77, 0xfc45, 0x4d7b, 0xb8, 0x92, 0x92, 0xa, 0x86, 0x2d, 0x67, 0xdc \
27   }
28
29-#endif
30\ No newline at end of file
31+#endif
32diff --ignore-file-name-case -Naur ShellR33/attrib/attrib.inf GccShellR33/attrib/attrib.inf
33--- ShellR33/attrib/attrib.inf	2007-03-15 20:07:49.000000000 -0700
34+++ GccShellR33/attrib/attrib.inf	2009-09-22 15:37:05.000000000 -0700
35@@ -41,24 +41,24 @@
36
37 [sources.common]
38    AttribStrings.uni
39-   ..\ShCommonStrings.uni
40+   ../ShCommonStrings.uni
41    attrib.c
42    attrib.h
43
44
45 [includes.common]
46   .
47-  ..\Inc
48-  ..\Library
49-  $(EDK_SOURCE)\Foundation
50-  $(EDK_SOURCE)\Foundation\Include
51-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
52-  $(EDK_SOURCE)\Foundation\Efi
53-  $(EDK_SOURCE)\Foundation\Efi\Include
54-  $(EDK_SOURCE)\Foundation\FrameWork
55-  $(EDK_SOURCE)\Foundation\FrameWork\Include
56-  $(EDK_SOURCE)\Foundation\Core\Dxe
57-  $(DEST_DIR)\
58+  ../Inc
59+  ../Library
60+  $(EDK_SOURCE)/Foundation
61+  $(EDK_SOURCE)/Foundation/Include
62+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
63+  $(EDK_SOURCE)/Foundation/Efi
64+  $(EDK_SOURCE)/Foundation/Efi/Include
65+  $(EDK_SOURCE)/Foundation/FrameWork
66+  $(EDK_SOURCE)/Foundation/FrameWork/Include
67+  $(EDK_SOURCE)/Foundation/Core/Dxe
68+  $(DEST_DIR)/
69
70 [libraries.common]
71   EfiShellLib
72diff --ignore-file-name-case -Naur ShellR33/cls/cls.c GccShellR33/cls/cls.c
73--- ShellR33/cls/cls.c	2006-08-07 02:14:38.000000000 -0700
74+++ GccShellR33/cls/cls.c	2009-11-05 13:49:56.000000000 -0800
75@@ -30,7 +30,7 @@
76 //
77 #include STRING_DEFINES_FILE
78
79-EFI_HII_HANDLE  HiiHandle;
80+static EFI_HII_HANDLE  HiiHandle;
81 EFI_GUID        EfiClsGuid = EFI_CLS_GUID;
82 SHELL_VAR_CHECK_ITEM    ClsCheckList[] = {
83   {
84diff --ignore-file-name-case -Naur ShellR33/cls/cls.inf GccShellR33/cls/cls.inf
85--- ShellR33/cls/cls.inf	2007-03-15 20:07:49.000000000 -0700
86+++ GccShellR33/cls/cls.inf	2009-09-22 15:37:05.000000000 -0700
87@@ -40,24 +40,24 @@
88
89
90 [sources.common]
91-   ..\ShCommonStrings.uni
92+   ../ShCommonStrings.uni
93    ClsStrings.uni
94    Cls.c
95    Cls.h
96
97 [includes.common]
98   .
99-  ..\Inc
100-  ..\Library
101-  $(EDK_SOURCE)\Foundation
102-  $(EDK_SOURCE)\Foundation\Include
103-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
104-  $(EDK_SOURCE)\Foundation\Efi
105-  $(EDK_SOURCE)\Foundation\Efi\Include
106-  $(EDK_SOURCE)\Foundation\FrameWork
107-  $(EDK_SOURCE)\Foundation\FrameWork\Include
108-  $(EDK_SOURCE)\Foundation\Core\Dxe
109-  $(DEST_DIR)\
110+  ../Inc
111+  ../Library
112+  $(EDK_SOURCE)/Foundation
113+  $(EDK_SOURCE)/Foundation/Include
114+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
115+  $(EDK_SOURCE)/Foundation/Efi
116+  $(EDK_SOURCE)/Foundation/Efi/Include
117+  $(EDK_SOURCE)/Foundation/FrameWork
118+  $(EDK_SOURCE)/Foundation/FrameWork/Include
119+  $(EDK_SOURCE)/Foundation/Core/Dxe
120+  $(DEST_DIR)/
121
122 [libraries.common]
123   EfiShellLib
124diff --ignore-file-name-case -Naur ShellR33/comp/comp.h GccShellR33/comp/comp.h
125--- ShellR33/comp/comp.h	2005-08-23 00:16:36.000000000 -0700
126+++ GccShellR33/comp/comp.h	2009-11-05 13:49:56.000000000 -0800
127@@ -29,4 +29,4 @@
128     0x7761e2c2, 0x7297, 0x434d, 0xb6, 0x52, 0xa9, 0x76, 0x91, 0xb8, 0x66, 0xf3 \
129   }
130
131-#endif
132\ No newline at end of file
133+#endif
134diff --ignore-file-name-case -Naur ShellR33/comp/comp.inf GccShellR33/comp/comp.inf
135--- ShellR33/comp/comp.inf	2007-06-25 02:05:05.000000000 -0700
136+++ GccShellR33/comp/comp.inf	2009-09-22 15:37:05.000000000 -0700
137@@ -28,21 +28,21 @@
138 CompStrings.uni
139 comp.c
140 comp.h
141-..\ShCommonStrings.uni
142+../ShCommonStrings.uni
143
144 [includes.common]
145   .
146-  ..\Inc
147-  ..\Library
148-  $(EDK_SOURCE)\Foundation
149-  $(EDK_SOURCE)\Foundation\Include
150-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
151-  $(EDK_SOURCE)\Foundation\Efi
152-  $(EDK_SOURCE)\Foundation\Efi\Include
153-  $(EDK_SOURCE)\Foundation\FrameWork
154-  $(EDK_SOURCE)\Foundation\FrameWork\Include
155-  $(EDK_SOURCE)\Foundation\Core\Dxe
156-  $(DEST_DIR)\
157+  ../Inc
158+  ../Library
159+  $(EDK_SOURCE)/Foundation
160+  $(EDK_SOURCE)/Foundation/Include
161+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
162+  $(EDK_SOURCE)/Foundation/Efi
163+  $(EDK_SOURCE)/Foundation/Efi/Include
164+  $(EDK_SOURCE)/Foundation/FrameWork
165+  $(EDK_SOURCE)/Foundation/FrameWork/Include
166+  $(EDK_SOURCE)/Foundation/Core/Dxe
167+  $(DEST_DIR)/
168
169 [libraries.common]
170   EfiShellLib
171diff --ignore-file-name-case -Naur ShellR33/cp/cp.c GccShellR33/cp/cp.c
172--- ShellR33/cp/cp.c	2006-08-07 02:14:38.000000000 -0700
173+++ GccShellR33/cp/cp.c	2009-09-22 15:37:05.000000000 -0700
174@@ -578,7 +578,7 @@
175     //
176     if (SrcArg->Status == EFI_SUCCESS &&
177         (SrcArg->Info->Attribute & EFI_FILE_DIRECTORY) &&
178-        (DstArg->Status == EFI_SUCCESS && (DstArg->Info->Attribute & EFI_FILE_DIRECTORY) || DstMustDir && DstHandle)
179+        (DstArg->Status == (EFI_SUCCESS && (DstArg->Info->Attribute & EFI_FILE_DIRECTORY)) || (DstMustDir && DstHandle))
180         ) {
181       if (StrCmp (SrcFilePath, DstFilePath) == 0) {
182         PrintToken (STRING_TOKEN (STR_CP_CANNOT_COPY_ITSELF), HiiCpyHandle, L"cp/copy", SrcArg->FullName);
183@@ -592,7 +592,7 @@
184     // we need to compose a full name of dir\file for the source
185     //
186     if (SrcArg->Status == EFI_SUCCESS &&
187-      (DstArg->Status == EFI_SUCCESS && (DstArg->Info->Attribute & EFI_FILE_DIRECTORY) || DstMustDir && DstHandle)) {
188+      (DstArg->Status == (EFI_SUCCESS && (DstArg->Info->Attribute & EFI_FILE_DIRECTORY)) || (DstMustDir && DstHandle))) {
189       if (DstFullName) {
190         FreePool (DstFullName);
191       }
192@@ -1789,7 +1789,7 @@
193     //
194     if (SrcArg->Status == EFI_SUCCESS &&
195         !(SrcArg->Info->Attribute & EFI_FILE_DIRECTORY) &&
196-        (DstArg->Status == EFI_SUCCESS && (DstArg->Info->Attribute & EFI_FILE_DIRECTORY) || DstDir && DstHandle)
197+        (DstArg->Status == (EFI_SUCCESS && (DstArg->Info->Attribute & EFI_FILE_DIRECTORY)) || (DstDir && DstHandle))
198         ) {
199       if (DstFullName) {
200         FreePool (DstFullName);
201diff --ignore-file-name-case -Naur ShellR33/cp/cp.h GccShellR33/cp/cp.h
202--- ShellR33/cp/cp.h	2005-08-23 00:16:36.000000000 -0700
203+++ GccShellR33/cp/cp.h	2009-11-05 13:49:56.000000000 -0800
204@@ -67,4 +67,4 @@
205   IN EFI_SYSTEM_TABLE     *SystemTable
206   );
207
208-#endif
209\ No newline at end of file
210+#endif
211diff --ignore-file-name-case -Naur ShellR33/cp/cp.inf GccShellR33/cp/cp.inf
212--- ShellR33/cp/cp.inf	2007-03-15 20:07:49.000000000 -0700
213+++ GccShellR33/cp/cp.inf	2009-09-22 15:37:05.000000000 -0700
214@@ -41,23 +41,23 @@
215
216 [sources.common]
217   CpStrings.uni
218-  ..\ShCommonStrings.uni
219+  ../ShCommonStrings.uni
220   cp.h
221   cp.c
222
223 [includes.common]
224   .
225-  ..\Inc
226-  ..\Library
227-  $(EDK_SOURCE)\Foundation
228-  $(EDK_SOURCE)\Foundation\Include
229-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
230-  $(EDK_SOURCE)\Foundation\Efi
231-  $(EDK_SOURCE)\Foundation\Efi\Include
232-  $(EDK_SOURCE)\Foundation\FrameWork
233-  $(EDK_SOURCE)\Foundation\FrameWork\Include
234-  $(EDK_SOURCE)\Foundation\Core\Dxe
235-  $(DEST_DIR)\
236+  ../Inc
237+  ../Library
238+  $(EDK_SOURCE)/Foundation
239+  $(EDK_SOURCE)/Foundation/Include
240+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
241+  $(EDK_SOURCE)/Foundation/Efi
242+  $(EDK_SOURCE)/Foundation/Efi/Include
243+  $(EDK_SOURCE)/Foundation/FrameWork
244+  $(EDK_SOURCE)/Foundation/FrameWork/Include
245+  $(EDK_SOURCE)/Foundation/Core/Dxe
246+  $(DEST_DIR)/
247
248 [libraries.common]
249   EfiShellLib
250diff --ignore-file-name-case -Naur ShellR33/date/date.c GccShellR33/date/date.c
251--- ShellR33/date/date.c	2006-08-07 02:14:38.000000000 -0700
252+++ GccShellR33/date/date.c	2009-09-22 15:37:05.000000000 -0700
253@@ -126,8 +126,8 @@
254 {
255   EFI_STATUS              Status;
256   EFI_TIME                Time;
257-  UINTN                   Offset;
258-  UINTN                   Data;
259+  INTN                    Offset;
260+  INTN                    Data;
261   EFI_HII_HANDLE          HiiHandle;
262   SHELL_VAR_CHECK_PACKAGE ChkPck;
263   CHAR16                  *Useful;
264diff --ignore-file-name-case -Naur ShellR33/date/date.inf GccShellR33/date/date.inf
265--- ShellR33/date/date.inf	2007-03-15 20:07:49.000000000 -0700
266+++ GccShellR33/date/date.inf	2009-09-22 15:37:05.000000000 -0700
267@@ -40,24 +40,24 @@
268
269
270 [sources.common]
271-   ..\ShCommonStrings.uni
272+   ../ShCommonStrings.uni
273    DateStrings.uni
274    Date.c
275    Date.h
276
277 [includes.common]
278   .
279-  ..\Inc
280-  ..\Library
281-  $(EDK_SOURCE)\Foundation
282-  $(EDK_SOURCE)\Foundation\Include
283-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
284-  $(EDK_SOURCE)\Foundation\Efi
285-  $(EDK_SOURCE)\Foundation\Efi\Include
286-  $(EDK_SOURCE)\Foundation\FrameWork
287-  $(EDK_SOURCE)\Foundation\FrameWork\Include
288-  $(EDK_SOURCE)\Foundation\Core\Dxe
289-  $(DEST_DIR)\
290+  ../Inc
291+  ../Library
292+  $(EDK_SOURCE)/Foundation
293+  $(EDK_SOURCE)/Foundation/Include
294+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
295+  $(EDK_SOURCE)/Foundation/Efi
296+  $(EDK_SOURCE)/Foundation/Efi/Include
297+  $(EDK_SOURCE)/Foundation/FrameWork
298+  $(EDK_SOURCE)/Foundation/FrameWork/Include
299+  $(EDK_SOURCE)/Foundation/Core/Dxe
300+  $(DEST_DIR)/
301
302 [libraries.common]
303   EfiShellLib
304diff --ignore-file-name-case -Naur ShellR33/dblk/dblk.h GccShellR33/dblk/dblk.h
305--- ShellR33/dblk/dblk.h	2007-06-25 02:05:05.000000000 -0700
306+++ GccShellR33/dblk/dblk.h	2009-09-22 15:37:05.000000000 -0700
307@@ -33,7 +33,7 @@
308     0xded389c0, 0x956a, 0x4244, 0xae, 0x98, 0xc9, 0x7f, 0xa0, 0x81, 0xca, 0xd8 \
309   }
310
311-#define EFI_PARTITION_SIGNATURE       0x5053595320494249
312+#define EFI_PARTITION_SIGNATURE       0x5053595320494249ULL
313 typedef struct _EFI_PARTITION_HEADER {
314   EFI_TABLE_HEADER  Hdr;
315   UINT32            DirectoryAllocationNumber;
316diff --ignore-file-name-case -Naur ShellR33/dblk/dblk.inf GccShellR33/dblk/dblk.inf
317--- ShellR33/dblk/dblk.inf	2007-06-25 02:05:05.000000000 -0700
318+++ GccShellR33/dblk/dblk.inf	2009-09-22 15:37:05.000000000 -0700
319@@ -26,23 +26,23 @@
320
321 [sources.common]
322   DblkStrings.uni
323-  ..\ShCommonStrings.uni
324+  ../ShCommonStrings.uni
325   dblk.c
326   efidump.c
327
328 [includes.common]
329   .
330-  ..\Inc
331-  ..\Library
332-  $(EDK_SOURCE)\Foundation
333-  $(EDK_SOURCE)\Foundation\Include
334-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
335-  $(EDK_SOURCE)\Foundation\Efi
336-  $(EDK_SOURCE)\Foundation\Efi\Include
337-  $(EDK_SOURCE)\Foundation\FrameWork
338-  $(EDK_SOURCE)\Foundation\FrameWork\Include
339-  $(EDK_SOURCE)\Foundation\Core\Dxe
340-  $(DEST_DIR)\
341+  ../Inc
342+  ../Library
343+  $(EDK_SOURCE)/Foundation
344+  $(EDK_SOURCE)/Foundation/Include
345+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
346+  $(EDK_SOURCE)/Foundation/Efi
347+  $(EDK_SOURCE)/Foundation/Efi/Include
348+  $(EDK_SOURCE)/Foundation/FrameWork
349+  $(EDK_SOURCE)/Foundation/FrameWork/Include
350+  $(EDK_SOURCE)/Foundation/Core/Dxe
351+  $(DEST_DIR)/
352
353 [libraries.common]
354   EfiShellLib
355diff --ignore-file-name-case -Naur ShellR33/dblk/efidump.c GccShellR33/dblk/efidump.c
356--- ShellR33/dblk/efidump.c	2005-08-23 00:16:36.000000000 -0700
357+++ GccShellR33/dblk/efidump.c	2009-09-22 19:19:20.000000000 -0700
358@@ -24,7 +24,7 @@
359 --*/
360
361 #include "dblk.h"
362-#include "Efipart.h"
363+#include "EfiPart.h"
364 #include "EfiShellLib.h"
365
366 #include STRING_DEFINES_FILE
367@@ -352,34 +352,34 @@
368     PrintToken (STRING_TOKEN (STR_DEBUG_STD_ERROR_ON), HiiDblkHandle, LibDevicePathToStr (DevicePath));
369   }
370
371-  PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiDblkHandle, (UINT64) Tbl.Sys->RuntimeServices);
372-  PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiDblkHandle, (UINT64) Tbl.Sys->BootServices);
373+  PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiDblkHandle, (UINT64)(UINTN)Tbl.Sys->RuntimeServices);
374+  PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiDblkHandle, (UINT64)(UINTN)Tbl.Sys->BootServices);
375
376   EFI64_CODE (
377     Status = LibGetSystemConfigurationTable(&gEfiSalSystemTableGuid, &SalSystemTable);
378     if (!EFI_ERROR(Status)) {
379-      PrintToken (STRING_TOKEN(STR_DEBUG_SAL_SYSTEM_TABLE), HiiDblkHandle, (UINT64)SalSystemTable);
380+      PrintToken (STRING_TOKEN(STR_DEBUG_SAL_SYSTEM_TABLE), HiiDblkHandle, (UINT64)(UINTN)SalSystemTable);
381     }
382   )
383
384   Status = LibGetSystemConfigurationTable (&gEfiAcpiTableGuid, &AcpiTable);
385   if (!EFI_ERROR (Status)) {
386-    PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiDblkHandle, (UINT64) AcpiTable);
387+    PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiDblkHandle, (UINT64)(UINTN)AcpiTable);
388   }
389
390   Status = LibGetSystemConfigurationTable (&gEfiAcpi20TableGuid, &Acpi20Table);
391   if (!EFI_ERROR (Status)) {
392-    PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiDblkHandle, (UINT64) Acpi20Table);
393+    PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiDblkHandle, (UINT64)(UINTN)Acpi20Table);
394   }
395
396   Status = LibGetSystemConfigurationTable (&gEfiMpsTableGuid, &MpsTable);
397   if (!EFI_ERROR (Status)) {
398-    PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiDblkHandle, (UINT64) MpsTable);
399+    PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiDblkHandle, (UINT64)(UINTN)MpsTable);
400   }
401
402   Status = LibGetSystemConfigurationTable (&gEfiSmbiosTableGuid, &SMBIOSTable);
403   if (!EFI_ERROR (Status)) {
404-    PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiDblkHandle, (UINT64) SMBIOSTable);
405+    PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiDblkHandle, (UINT64)(UINTN)SMBIOSTable);
406   }
407 }
408
409diff --ignore-file-name-case -Naur ShellR33/devices/devices.c GccShellR33/devices/devices.c
410--- ShellR33/devices/devices.c	2009-05-27 01:55:16.000000000 -0700
411+++ GccShellR33/devices/devices.c	2009-11-05 13:49:56.000000000 -0800
412@@ -36,7 +36,7 @@
413 //
414 // Global Variables
415 //
416-EFI_HII_HANDLE  HiiHandle;
417+static EFI_HII_HANDLE  HiiHandle;
418 EFI_GUID        EfiDevicesGuid = EFI_DEVICES_GUID;
419 SHELL_VAR_CHECK_ITEM    DevicesCheckList[] = {
420   {
421diff --ignore-file-name-case -Naur ShellR33/devices/devices.inf GccShellR33/devices/devices.inf
422--- ShellR33/devices/devices.inf	2007-03-15 20:07:49.000000000 -0700
423+++ GccShellR33/devices/devices.inf	2009-09-22 15:37:05.000000000 -0700
424@@ -41,23 +41,23 @@
425
426 [sources.common]
427   DevicesStrings.uni
428-  ..\ShCommonStrings.uni
429+  ../ShCommonStrings.uni
430   devices.c
431   devices.h
432
433 [includes.common]
434   .
435-  ..\Inc
436-  ..\Library
437-  $(EDK_SOURCE)\Foundation
438-  $(EDK_SOURCE)\Foundation\Include
439-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
440-  $(EDK_SOURCE)\Foundation\Efi
441-  $(EDK_SOURCE)\Foundation\Efi\Include
442-  $(EDK_SOURCE)\Foundation\FrameWork
443-  $(EDK_SOURCE)\Foundation\FrameWork\Include
444-  $(EDK_SOURCE)\Foundation\Core\Dxe
445-  $(DEST_DIR)\
446+  ../Inc
447+  ../Library
448+  $(EDK_SOURCE)/Foundation
449+  $(EDK_SOURCE)/Foundation/Include
450+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
451+  $(EDK_SOURCE)/Foundation/Efi
452+  $(EDK_SOURCE)/Foundation/Efi/Include
453+  $(EDK_SOURCE)/Foundation/FrameWork
454+  $(EDK_SOURCE)/Foundation/FrameWork/Include
455+  $(EDK_SOURCE)/Foundation/Core/Dxe
456+  $(DEST_DIR)/
457
458 [libraries.common]
459   EfiShellLib
460diff --ignore-file-name-case -Naur ShellR33/DeviceTree/devicetree.c GccShellR33/DeviceTree/devicetree.c
461--- ShellR33/DeviceTree/devicetree.c	2009-05-27 01:55:16.000000000 -0700
462+++ GccShellR33/DeviceTree/devicetree.c	2009-11-05 13:49:56.000000000 -0800
463@@ -36,7 +36,7 @@
464 //
465 // Global Variables
466 //
467-EFI_HII_HANDLE  HiiHandle;
468+static EFI_HII_HANDLE  HiiHandle;
469 EFI_GUID        EfiDevicetreeGuid = EFI_DEVICETREE_GUID;
470 SHELL_VAR_CHECK_ITEM    DevicetreeCheckList[] = {
471   {
472diff --ignore-file-name-case -Naur ShellR33/DeviceTree/devicetree.inf GccShellR33/DeviceTree/devicetree.inf
473--- ShellR33/DeviceTree/devicetree.inf	2007-03-15 20:07:49.000000000 -0700
474+++ GccShellR33/DeviceTree/devicetree.inf	2009-09-22 15:37:05.000000000 -0700
475@@ -40,24 +40,24 @@
476
477
478 [sources.common]
479-  ..\ShCommonStrings.uni
480+  ../ShCommonStrings.uni
481   DevicetreeStrings.uni
482   devicetree.c
483   devicetree.h
484
485 [includes.common]
486   .
487-  ..\Inc
488-  ..\Library
489-  $(EDK_SOURCE)\Foundation
490-  $(EDK_SOURCE)\Foundation\Include
491-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
492-  $(EDK_SOURCE)\Foundation\Efi
493-  $(EDK_SOURCE)\Foundation\Efi\Include
494-  $(EDK_SOURCE)\Foundation\FrameWork
495-  $(EDK_SOURCE)\Foundation\FrameWork\Include
496-  $(EDK_SOURCE)\Foundation\Core\Dxe
497-  $(DEST_DIR)\
498+  ../Inc
499+  ../Library
500+  $(EDK_SOURCE)/Foundation
501+  $(EDK_SOURCE)/Foundation/Include
502+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
503+  $(EDK_SOURCE)/Foundation/Efi
504+  $(EDK_SOURCE)/Foundation/Efi/Include
505+  $(EDK_SOURCE)/Foundation/FrameWork
506+  $(EDK_SOURCE)/Foundation/FrameWork/Include
507+  $(EDK_SOURCE)/Foundation/Core/Dxe
508+  $(DEST_DIR)/
509
510 [libraries.common]
511   EfiShellLib
512diff --ignore-file-name-case -Naur ShellR33/dmem/debug.h GccShellR33/dmem/debug.h
513--- ShellR33/dmem/debug.h	2005-08-23 00:16:36.000000000 -0700
514+++ GccShellR33/dmem/debug.h	2009-09-22 15:37:05.000000000 -0700
515@@ -26,7 +26,7 @@
516 #include "EfiShellLib.h"
517 #include EFI_PROTOCOL_DEFINITION (BlockIo)
518
519-#define EFI_PARTITION_SIGNATURE       0x5053595320494249
520+#define EFI_PARTITION_SIGNATURE       0x5053595320494249ULL
521 typedef struct _EFI_PARTITION_HEADER {
522   EFI_TABLE_HEADER  Hdr;
523   UINT32            DirectoryAllocationNumber;
524diff --ignore-file-name-case -Naur ShellR33/dmem/dmem.inf GccShellR33/dmem/dmem.inf
525--- ShellR33/dmem/dmem.inf	2007-06-25 02:05:05.000000000 -0700
526+++ GccShellR33/dmem/dmem.inf	2009-09-22 15:37:05.000000000 -0700
527@@ -25,7 +25,7 @@
528 COMPONENT_TYPE       = APPLICATION
529
530 [sources.common]
531-  ..\ShCommonStrings.uni
532+  ../ShCommonStrings.uni
533   MemStrings.uni
534   DebugStrings.uni
535   mem.c
536@@ -34,17 +34,17 @@
537
538 [includes.common]
539   .
540-  ..\Inc
541-  ..\Library
542-  $(EDK_SOURCE)\Foundation
543-  $(EDK_SOURCE)\Foundation\Include
544-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
545-  $(EDK_SOURCE)\Foundation\Efi
546-  $(EDK_SOURCE)\Foundation\Efi\Include
547-  $(EDK_SOURCE)\Foundation\FrameWork
548-  $(EDK_SOURCE)\Foundation\FrameWork\Include
549-  $(EDK_SOURCE)\Foundation\Core\Dxe
550-  $(DEST_DIR)\
551+  ../Inc
552+  ../Library
553+  $(EDK_SOURCE)/Foundation
554+  $(EDK_SOURCE)/Foundation/Include
555+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
556+  $(EDK_SOURCE)/Foundation/Efi
557+  $(EDK_SOURCE)/Foundation/Efi/Include
558+  $(EDK_SOURCE)/Foundation/FrameWork
559+  $(EDK_SOURCE)/Foundation/FrameWork/Include
560+  $(EDK_SOURCE)/Foundation/Core/Dxe
561+  $(DEST_DIR)/
562
563 [libraries.common]
564   EfiShellLib
565diff --ignore-file-name-case -Naur ShellR33/dmem/efidump.c GccShellR33/dmem/efidump.c
566--- ShellR33/dmem/efidump.c	2005-08-23 00:16:36.000000000 -0700
567+++ GccShellR33/dmem/efidump.c	2009-09-22 19:19:20.000000000 -0700
568@@ -24,7 +24,7 @@
569 --*/
570
571 #include "debug.h"
572-#include "Efipart.h"
573+#include "EfiPart.h"
574 #include "EfiShellLib.h"
575
576 #include STRING_DEFINES_FILE
577@@ -352,34 +352,34 @@
578     PrintToken (STRING_TOKEN (STR_DEBUG_STD_ERROR_ON), HiiDmemHandle, LibDevicePathToStr (DevicePath));
579   }
580
581-  PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiDmemHandle, (UINT64) Tbl.Sys->RuntimeServices);
582-  PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiDmemHandle, (UINT64) Tbl.Sys->BootServices);
583+  PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiDmemHandle, (UINT64)(UINTN)Tbl.Sys->RuntimeServices);
584+  PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiDmemHandle, (UINT64)(UINTN)Tbl.Sys->BootServices);
585
586   EFI64_CODE (
587     Status = LibGetSystemConfigurationTable(&gEfiSalSystemTableGuid, &SalSystemTable);
588     if (!EFI_ERROR(Status)) {
589-      PrintToken (STRING_TOKEN(STR_DEBUG_SAL_SYSTEM_TABLE), HiiDmemHandle, (UINT64)SalSystemTable);
590+      PrintToken (STRING_TOKEN(STR_DEBUG_SAL_SYSTEM_TABLE), HiiDmemHandle, (UINT64)(UINTN)SalSystemTable);
591     }
592   )
593
594   Status = LibGetSystemConfigurationTable (&gEfiAcpiTableGuid, &AcpiTable);
595   if (!EFI_ERROR (Status)) {
596-    PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiDmemHandle, (UINT64) AcpiTable);
597+    PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiDmemHandle, (UINT64)(UINTN)AcpiTable);
598   }
599
600   Status = LibGetSystemConfigurationTable (&gEfiAcpi20TableGuid, &Acpi20Table);
601   if (!EFI_ERROR (Status)) {
602-    PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiDmemHandle, (UINT64) Acpi20Table);
603+    PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiDmemHandle, (UINT64)(UINTN)Acpi20Table);
604   }
605
606   Status = LibGetSystemConfigurationTable (&gEfiMpsTableGuid, &MpsTable);
607   if (!EFI_ERROR (Status)) {
608-    PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiDmemHandle, (UINT64) MpsTable);
609+    PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiDmemHandle, (UINT64)(UINTN)MpsTable);
610   }
611
612   Status = LibGetSystemConfigurationTable (&gEfiSmbiosTableGuid, &SMBIOSTable);
613   if (!EFI_ERROR (Status)) {
614-    PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiDmemHandle, (UINT64) SMBIOSTable);
615+    PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiDmemHandle, (UINT64)(UINTN)SMBIOSTable);
616   }
617 }
618
619diff --ignore-file-name-case -Naur ShellR33/dmem/MemCommonPart.c GccShellR33/dmem/MemCommonPart.c
620--- ShellR33/dmem/MemCommonPart.c	2007-03-15 20:07:49.000000000 -0700
621+++ GccShellR33/dmem/MemCommonPart.c	2009-09-22 15:37:05.000000000 -0700
622@@ -148,7 +148,7 @@
623     return EFI_SUCCESS;
624   }
625
626-  Address = (AddressStr) ? Xtoi (AddressStr) : (UINT64) SystemTable;
627+  Address = (AddressStr) ? Xtoi (AddressStr) : (UINT64)(UINTN)SystemTable;
628   Size    = (SizeStr) ? Xtoi (SizeStr) : 512;
629
630   //
631@@ -156,7 +156,7 @@
632   //
633   PrintToken (STRING_TOKEN (STR_DMEM_MEMORY_ADDR), HiiDmemHandle, 2 * sizeof (UINTN), Address, Size);
634   if (MMIo) {
635-    Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, &PciRootBridgeIo);
636+    Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID **)&PciRootBridgeIo);
637     if (EFI_ERROR (Status)) {
638       PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LOC_PROT_ERR_EX), HiiDmemHandle, L"dmem", L"PciRootBridgeIo");
639       return Status;
640@@ -233,7 +233,7 @@
641   //
642   MMIo                  = FALSE;
643   AddressStr            = SizeStr = NULL;
644-  Address               = (UINT64) SystemTable;
645+  Address               = (UINT64)(UINTN)SystemTable;
646   Size                  = 512;
647   RetCode               = LibCheckVariables (SI, DmemCheckList, &ChkPck, &Useful);
648   if (VarCheckOk != RetCode) {
649@@ -316,7 +316,7 @@
650   //
651   PrintToken (STRING_TOKEN (STR_DMEM_NEW_MEMORY_ADDR), HiiDmemHandle, 2 * sizeof (UINTN), Address, Size);
652   if (MMIo) {
653-    Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, &PciRootBridgeIo);
654+    Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID **)&PciRootBridgeIo);
655     if (EFI_ERROR (Status)) {
656       PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LOC_PROT_ERR_EX), HiiDmemHandle, L"dmem", L"PciRootBridgeIo");
657       return Status;
658diff --ignore-file-name-case -Naur ShellR33/dmem/MemCommonPart.h GccShellR33/dmem/MemCommonPart.h
659--- ShellR33/dmem/MemCommonPart.h	2005-08-23 00:16:36.000000000 -0700
660+++ GccShellR33/dmem/MemCommonPart.h	2009-11-05 13:49:56.000000000 -0800
661@@ -61,4 +61,4 @@
662   IN  EFI_BLOCK_IO_PROTOCOL   *BlkIo
663   );
664
665-#endif
666\ No newline at end of file
667+#endif
668diff --ignore-file-name-case -Naur ShellR33/dmpstore/dmpstore.c GccShellR33/dmpstore/dmpstore.c
669--- ShellR33/dmpstore/dmpstore.c	2009-08-13 22:57:02.000000000 -0700
670+++ GccShellR33/dmpstore/dmpstore.c	2009-11-05 13:49:56.000000000 -0800
671@@ -1,6 +1,6 @@
672 /*++
673
674-Copyright (c) 2005 - 2009, Intel Corporation
675+Copyright (c) 2005 - 2008, Intel Corporation
676 All rights reserved. This program and the accompanying materials
677 are licensed and made available under the terms and conditions of the BSD License
678 which accompanies this distribution. The full text of the license may be found at
679@@ -24,6 +24,7 @@
680 --*/
681
682 #include "EfiShellLib.h"
683+#include "EfiVariable.h"
684 #include "dmpstore.h"
685
686 extern UINT8  STRING_ARRAY_NAME[];
687@@ -33,8 +34,7 @@
688 //
689 #include STRING_DEFINES_FILE
690
691-#define INIT_NAME_BUFFER_SIZE  128
692-#define INIT_DATA_BUFFER_SIZE  1024
693+#define DEBUG_NAME_SIZE MAX_VARIABLE_SIZE
694
695 STATIC CHAR16   *AttrType[] = {
696   L"invalid",   // 000
697@@ -78,14 +78,12 @@
698 EFI_STATUS
699 GetFileVariable (
700   IN EFI_FILE_HANDLE FileHandle,
701-  OUT UINTN          *VariableNameSize,
702-  IN OUT UINTN       *NameBufferSize,
703-  IN OUT CHAR16      **VariableName,
704+  IN OUT UINTN       *VariableNameSize,
705+  IN CHAR16          *VariableName,
706   IN EFI_GUID        *VendorGuid,
707   OUT UINT32         *Attributes,
708-  OUT UINTN          *DataSize,
709-  IN OUT UINTN       *DataBufferSize,
710-  IN OUT VOID        **Data
711+  IN OUT UINTN       *DataSize,
712+  OUT VOID           *Data
713   );
714
715 EFI_STATUS
716@@ -102,7 +100,7 @@
717 //
718 // Global Variables
719 //
720-EFI_HII_HANDLE  HiiHandle;
721+static EFI_HII_HANDLE  HiiHandle;
722 EFI_GUID        EfiDmpstoreGuid = EFI_DMPSTORE_GUID;
723 SHELL_VAR_CHECK_ITEM    DmpstoreCheckList[] = {
724   {
725@@ -316,11 +314,9 @@
726   EFI_FILE_HANDLE    FileHandle;
727   EFI_GUID           Guid;
728   UINT32             Attributes;
729-  CHAR16             *Name;
730-  UINTN              NameBufferSize;
731+  CHAR16             Name[DEBUG_NAME_SIZE / 2];
732   UINTN              NameSize;
733-  VOID               *Data;
734-  UINTN              DataBufferSize;
735+  CHAR16             Data[DEBUG_NAME_SIZE / 2];
736   UINTN              DataSize;
737   BOOLEAN            Found;
738   EFI_FILE_INFO      *FileInfo;
739@@ -328,15 +324,7 @@
740   Found      = FALSE;
741   FileHandle = NULL;
742   FileInfo   = NULL;
743-
744-  NameBufferSize = INIT_NAME_BUFFER_SIZE;
745-  DataBufferSize = INIT_DATA_BUFFER_SIZE;
746-  Name           = AllocateZeroPool (NameBufferSize);
747-  Data           = AllocatePool (DataBufferSize);
748-  if (Name == NULL || Data == NULL) {
749-    Status = EFI_OUT_OF_RESOURCES;
750-    goto Done;
751-  }
752+
753   //
754   // Open the previous saved output file
755   //
756@@ -374,7 +362,9 @@
757       break;
758     }
759
760-    Status = GetFileVariable (FileHandle, &NameSize, &NameBufferSize, &Name, &Guid, &Attributes, &DataSize, &DataBufferSize, &Data);
761+    NameSize = DEBUG_NAME_SIZE;
762+    DataSize = DEBUG_NAME_SIZE;
763+    Status = GetFileVariable (FileHandle, &NameSize, Name, &Guid, &Attributes, &DataSize, Data);
764     if (Status == EFI_NOT_FOUND) {
765       Status = EFI_SUCCESS;
766       break;
767@@ -424,13 +414,7 @@
768   }
769   if (FileHandle != NULL) {
770     LibCloseFile (FileHandle);
771-  }
772-  if (Name != NULL) {
773-    FreePool (Name);
774-  }
775-  if (Data != NULL) {
776-    FreePool (Data);
777-  }
778+  };
779   return Status;
780 }
781
782@@ -444,13 +428,9 @@
783   EFI_STATUS  Status;
784   EFI_GUID    Guid;
785   UINT32      Attributes;
786-  CHAR16      *Name;
787-  UINTN       NameBufferSize; // Allocated Name buffer size
788+  CHAR16      Name[DEBUG_NAME_SIZE / 2];
789   UINTN       NameSize;
790-  CHAR16      *OldName;
791-  UINTN       OldNameBufferSize;
792-  VOID        *Data;
793-  UINTN       DataBufferSize; // Allocated Name buffer size
794+  CHAR16      Data[DEBUG_NAME_SIZE / 2];
795   UINTN       DataSize;
796   BOOLEAN     Found;
797
798@@ -475,14 +455,7 @@
799     }
800   }
801
802-  NameBufferSize = INIT_NAME_BUFFER_SIZE;
803-  DataBufferSize = INIT_DATA_BUFFER_SIZE;
804-  Name           = AllocateZeroPool (NameBufferSize);
805-  Data           = AllocatePool (DataBufferSize);
806-  if (Name == NULL || Data == NULL) {
807-    Status = EFI_OUT_OF_RESOURCES;
808-    goto Done;
809-  }
810+  Name[0] = 0x0000;
811   do {
812     //
813     // Break the execution?
814@@ -491,29 +464,8 @@
815       goto Done;
816     }
817
818-    NameSize  = NameBufferSize;
819+    NameSize  = DEBUG_NAME_SIZE;
820     Status    = RT->GetNextVariableName (&NameSize, Name, &Guid);
821-    if (Status == EFI_BUFFER_TOO_SMALL) {
822-      OldName           = Name;
823-      OldNameBufferSize = NameBufferSize;
824-      //
825-      // Expand at least twice to avoid reallocate many times
826-      //
827-      NameBufferSize = NameSize > NameBufferSize * 2 ? NameSize : NameBufferSize * 2;
828-      Name           = AllocateZeroPool (NameBufferSize);
829-      if (Name == NULL) {
830-        Status = EFI_OUT_OF_RESOURCES;
831-        FreePool (OldName);
832-        goto Done;
833-      }
834-      //
835-      // Preserve the original content to get correct iteration for GetNextVariableName() call
836-      //
837-      CopyMem (Name, OldName, OldNameBufferSize);
838-      FreePool (OldName);
839-      NameSize = NameBufferSize;
840-      Status = RT->GetNextVariableName (&NameSize, Name, &Guid);
841-    }
842     if (!EFI_ERROR (Status)) {
843       if (VarName != NULL) {
844         if (!MetaiMatch (Name, VarName)) {
845@@ -522,22 +474,8 @@
846       }
847
848       Found     = TRUE;
849-      DataSize  = DataBufferSize;
850+      DataSize  = DEBUG_NAME_SIZE;
851       Status    = RT->GetVariable (Name, &Guid, &Attributes, &DataSize, Data);
852-      if (Status == EFI_BUFFER_TOO_SMALL) {
853-        //
854-        // Expand at least twice to avoid reallocate many times
855-        //
856-        FreePool (Data);
857-        DataBufferSize = DataSize > DataBufferSize * 2 ? DataSize : DataBufferSize * 2;
858-        Data           = AllocatePool (DataBufferSize);
859-        if (Data == NULL) {
860-          Status = EFI_OUT_OF_RESOURCES;
861-          goto Done;
862-        }
863-        DataSize = DataBufferSize;
864-        Status   = RT->GetVariable (Name, &Guid, &Attributes, &DataSize, Data);
865-      }
866       if (!EFI_ERROR (Status)) {
867         //
868         // Dump variable name
869@@ -593,12 +531,6 @@
870   }
871
872 Done:
873-  if (Name != NULL) {
874-    FreePool (Name);
875-  }
876-  if (Data != NULL) {
877-    FreePool (Data);
878-  }
879   return Status;
880 }
881
882@@ -662,14 +594,12 @@
883 EFI_STATUS
884 GetFileVariable (
885   IN EFI_FILE_HANDLE FileHandle,
886-  OUT UINTN          *VariableNameSize,
887-  IN OUT UINTN       *NameBufferSize,
888-  IN OUT CHAR16      **VariableName,
889+  IN OUT UINTN       *VariableNameSize,
890+  IN CHAR16          *VariableName,
891   IN EFI_GUID        *VendorGuid,
892   OUT UINT32         *Attributes,
893-  OUT UINTN          *DataSize,
894-  IN OUT UINTN       *DataBufferSize,
895-  IN OUT VOID        **Data
896+  IN OUT UINTN       *DataSize,
897+  OUT VOID           *Data
898   )
899 {
900   EFI_STATUS  Status;
901@@ -683,23 +613,13 @@
902   if (!EFI_ERROR (Status) && (BufferSize == 0)) {
903     return EFI_NOT_FOUND; // End of file
904   }
905-  if (EFI_ERROR (Status) || (BufferSize != sizeof (UINT32))) {
906+  if (EFI_ERROR (Status) || (BufferSize != sizeof (UINT32)) ||
907+      (NameSize > *VariableNameSize)) {
908     return EFI_ABORTED;
909   }
910
911-  if (NameSize > *NameBufferSize) {
912-    //
913-    // Expand at least twice to avoid reallocate many times
914-    //
915-    FreePool (*VariableName);
916-    *NameBufferSize = NameSize > *NameBufferSize * 2 ? NameSize : *NameBufferSize * 2;
917-    *VariableName   = AllocateZeroPool (*NameBufferSize);
918-    if (*VariableName == NULL) {
919-      return EFI_OUT_OF_RESOURCES;
920-    }
921-  }
922   BufferSize = NameSize;
923-  Status     = LibReadFile (FileHandle, &BufferSize, *VariableName);
924+  Status     = LibReadFile (FileHandle, &BufferSize, VariableName);
925   if (EFI_ERROR (Status) || (BufferSize != NameSize)) {
926     return EFI_ABORTED;
927   }
928@@ -719,29 +639,19 @@
929   Size       = 0;
930   BufferSize = sizeof (UINT32);
931   Status     = LibReadFile (FileHandle, &BufferSize, &Size);
932-  if (EFI_ERROR (Status) || (BufferSize != sizeof (UINT32))) {
933+  if (EFI_ERROR (Status) || (BufferSize != sizeof (UINT32)) ||
934+      (Size > *DataSize)) {
935     return EFI_ABORTED;
936   }
937
938-  if (Size > *DataBufferSize) {
939-    //
940-    // Expand at least twice to avoid reallocate many times
941-    //
942-    FreePool (*Data);
943-    *DataBufferSize = Size > *DataBufferSize * 2 ? Size : *DataBufferSize * 2;
944-    *Data           = AllocatePool (*DataBufferSize);
945-    if (*Data == NULL) {
946-      return EFI_OUT_OF_RESOURCES;
947-    }
948-  }
949   BufferSize = Size;
950-  Status     = LibReadFile (FileHandle, &BufferSize, *Data);
951+  Status     = LibReadFile (FileHandle, &BufferSize, Data);
952   if (EFI_ERROR (Status) || (BufferSize != Size)) {
953     return EFI_ABORTED;
954   }
955
956   *VariableNameSize = NameSize;
957-  *DataSize         = Size;
958+  *DataSize = Size;
959   return EFI_SUCCESS;
960 }
961
962diff --ignore-file-name-case -Naur ShellR33/dmpstore/dmpstore.h GccShellR33/dmpstore/dmpstore.h
963--- ShellR33/dmpstore/dmpstore.h	2005-08-23 00:16:36.000000000 -0700
964+++ GccShellR33/dmpstore/dmpstore.h	2009-11-05 13:49:56.000000000 -0800
965@@ -29,4 +29,4 @@
966     0xceba463a, 0xfe43, 0x4138, 0xbe, 0x3d, 0x34, 0xc6, 0xc4, 0xe1, 0x31, 0xdd \
967   }
968
969-#endif
970\ No newline at end of file
971+#endif
972diff --ignore-file-name-case -Naur ShellR33/dmpstore/dmpstore.inf GccShellR33/dmpstore/dmpstore.inf
973--- ShellR33/dmpstore/dmpstore.inf	2007-06-25 02:05:05.000000000 -0700
974+++ GccShellR33/dmpstore/dmpstore.inf	2009-09-22 15:37:05.000000000 -0700
975@@ -25,24 +25,24 @@
976 COMPONENT_TYPE       = APPLICATION
977
978 [sources.common]
979-  ..\ShCommonStrings.uni
980+  ../ShCommonStrings.uni
981   DmpstoreStrings.uni
982   dmpstore.c
983   dmpstore.h
984
985 [includes.common]
986   .
987-  ..\Inc
988-  ..\Library
989-  $(EDK_SOURCE)\Foundation
990-  $(EDK_SOURCE)\Foundation\Include
991-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
992-  $(EDK_SOURCE)\Foundation\Efi
993-  $(EDK_SOURCE)\Foundation\Efi\Include
994-  $(EDK_SOURCE)\Foundation\FrameWork
995-  $(EDK_SOURCE)\Foundation\FrameWork\Include
996-  $(EDK_SOURCE)\Foundation\Core\Dxe
997-  $(DEST_DIR)\
998+  ../Inc
999+  ../Library
1000+  $(EDK_SOURCE)/Foundation
1001+  $(EDK_SOURCE)/Foundation/Include
1002+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1003+  $(EDK_SOURCE)/Foundation/Efi
1004+  $(EDK_SOURCE)/Foundation/Efi/Include
1005+  $(EDK_SOURCE)/Foundation/FrameWork
1006+  $(EDK_SOURCE)/Foundation/FrameWork/Include
1007+  $(EDK_SOURCE)/Foundation/Core/Dxe
1008+  $(DEST_DIR)/
1009
1010 [libraries.common]
1011   EfiShellLib
1012diff --ignore-file-name-case -Naur ShellR33/drivers/drivers.c GccShellR33/drivers/drivers.c
1013--- ShellR33/drivers/drivers.c	2009-05-27 01:55:16.000000000 -0700
1014+++ GccShellR33/drivers/drivers.c	2009-11-05 13:49:56.000000000 -0800
1015@@ -43,7 +43,7 @@
1016 //
1017 // Global Variables
1018 //
1019-EFI_HII_HANDLE  HiiHandle;
1020+static EFI_HII_HANDLE  HiiHandle;
1021 EFI_GUID        EfiDriversGuid = EFI_DRIVERS_GUID;
1022 SHELL_VAR_CHECK_ITEM    DriversCheckList[] = {
1023   {
1024diff --ignore-file-name-case -Naur ShellR33/drivers/drivers.inf GccShellR33/drivers/drivers.inf
1025--- ShellR33/drivers/drivers.inf	2007-03-15 20:07:49.000000000 -0700
1026+++ GccShellR33/drivers/drivers.inf	2009-09-22 15:37:05.000000000 -0700
1027@@ -40,7 +40,7 @@
1028
1029
1030 [sources.common]
1031-  ..\ShCommonStrings.uni
1032+  ../ShCommonStrings.uni
1033   DriversStrings.uni
1034   drivers.c
1035   drivers.h
1036@@ -48,17 +48,17 @@
1037
1038 [includes.common]
1039   .
1040-  ..\Inc
1041-  ..\Library
1042-  $(EDK_SOURCE)\Foundation
1043-  $(EDK_SOURCE)\Foundation\Include
1044-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1045-  $(EDK_SOURCE)\Foundation\Efi
1046-  $(EDK_SOURCE)\Foundation\Efi\Include
1047-  $(EDK_SOURCE)\Foundation\FrameWork
1048-  $(EDK_SOURCE)\Foundation\FrameWork\Include
1049-  $(EDK_SOURCE)\Foundation\Core\Dxe
1050-  $(DEST_DIR)\
1051+  ../Inc
1052+  ../Library
1053+  $(EDK_SOURCE)/Foundation
1054+  $(EDK_SOURCE)/Foundation/Include
1055+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1056+  $(EDK_SOURCE)/Foundation/Efi
1057+  $(EDK_SOURCE)/Foundation/Efi/Include
1058+  $(EDK_SOURCE)/Foundation/FrameWork
1059+  $(EDK_SOURCE)/Foundation/FrameWork/Include
1060+  $(EDK_SOURCE)/Foundation/Core/Dxe
1061+  $(DEST_DIR)/
1062
1063 [libraries.common]
1064   EfiShellLib
1065diff --ignore-file-name-case -Naur ShellR33/drvcfg/drvcfg.c GccShellR33/drvcfg/drvcfg.c
1066--- ShellR33/drvcfg/drvcfg.c	2009-05-27 01:55:16.000000000 -0700
1067+++ GccShellR33/drvcfg/drvcfg.c	2009-11-05 13:49:56.000000000 -0800
1068@@ -38,7 +38,7 @@
1069 //
1070 // Global Variables
1071 //
1072-EFI_HII_HANDLE  HiiHandle;
1073+static EFI_HII_HANDLE  HiiHandle;
1074 EFI_GUID        EfiDrvcfgGuid = EFI_DRVCFG_GUID;
1075 SHELL_VAR_CHECK_ITEM  DrvcfgCheckList[] = {
1076   {
1077diff --ignore-file-name-case -Naur ShellR33/drvcfg/drvcfg.inf GccShellR33/drvcfg/drvcfg.inf
1078--- ShellR33/drvcfg/drvcfg.inf	2007-06-25 02:05:05.000000000 -0700
1079+++ GccShellR33/drvcfg/drvcfg.inf	2009-09-22 15:37:05.000000000 -0700
1080@@ -40,24 +40,24 @@
1081
1082
1083 [sources.common]
1084-  ..\ShCommonStrings.uni
1085+  ../ShCommonStrings.uni
1086   DrvcfgStrings.uni
1087   drvcfg.c
1088   drvcfg.h
1089
1090 [includes.common]
1091   .
1092-  ..\Inc
1093-  ..\Library
1094-  $(EDK_SOURCE)\Foundation
1095-  $(EDK_SOURCE)\Foundation\Include
1096-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1097-  $(EDK_SOURCE)\Foundation\Efi
1098-  $(EDK_SOURCE)\Foundation\Efi\Include
1099-  $(EDK_SOURCE)\Foundation\FrameWork
1100-  $(EDK_SOURCE)\Foundation\FrameWork\Include
1101-  $(EDK_SOURCE)\Foundation\Core\Dxe
1102-  $(DEST_DIR)\
1103+  ../Inc
1104+  ../Library
1105+  $(EDK_SOURCE)/Foundation
1106+  $(EDK_SOURCE)/Foundation/Include
1107+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1108+  $(EDK_SOURCE)/Foundation/Efi
1109+  $(EDK_SOURCE)/Foundation/Efi/Include
1110+  $(EDK_SOURCE)/Foundation/FrameWork
1111+  $(EDK_SOURCE)/Foundation/FrameWork/Include
1112+  $(EDK_SOURCE)/Foundation/Core/Dxe
1113+  $(DEST_DIR)/
1114
1115 [libraries.common]
1116   EfiShellLib
1117diff --ignore-file-name-case -Naur ShellR33/drvdiag/drvdiag.c GccShellR33/drvdiag/drvdiag.c
1118--- ShellR33/drvdiag/drvdiag.c	2009-05-27 01:55:16.000000000 -0700
1119+++ GccShellR33/drvdiag/drvdiag.c	2009-11-05 13:49:56.000000000 -0800
1120@@ -41,7 +41,7 @@
1121 //
1122 // Global Variables
1123 //
1124-EFI_HII_HANDLE  HiiHandle;
1125+static EFI_HII_HANDLE  HiiHandle;
1126 EFI_GUID        EfiDrvdiagGuid = EFI_DRVDIAG_GUID;
1127 SHELL_VAR_CHECK_ITEM  DrvdiagCheckList[] = {
1128   {
1129diff --ignore-file-name-case -Naur ShellR33/drvdiag/drvdiag.inf GccShellR33/drvdiag/drvdiag.inf
1130--- ShellR33/drvdiag/drvdiag.inf	2007-06-25 02:05:05.000000000 -0700
1131+++ GccShellR33/drvdiag/drvdiag.inf	2009-09-22 15:37:05.000000000 -0700
1132@@ -40,7 +40,7 @@
1133
1134
1135 [sources.common]
1136-  ..\ShCommonStrings.uni
1137+  ../ShCommonStrings.uni
1138   DrvdiagStrings.uni
1139   drvdiag.c
1140   drvdiag.h
1141@@ -48,17 +48,17 @@
1142
1143 [includes.common]
1144   .
1145-  ..\Inc
1146-  ..\Library
1147-  $(EDK_SOURCE)\Foundation
1148-  $(EDK_SOURCE)\Foundation\Include
1149-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1150-  $(EDK_SOURCE)\Foundation\Efi
1151-  $(EDK_SOURCE)\Foundation\Efi\Include
1152-  $(EDK_SOURCE)\Foundation\FrameWork
1153-  $(EDK_SOURCE)\Foundation\FrameWork\Include
1154-  $(EDK_SOURCE)\Foundation\Core\Dxe
1155-  $(DEST_DIR)\
1156+  ../Inc
1157+  ../Library
1158+  $(EDK_SOURCE)/Foundation
1159+  $(EDK_SOURCE)/Foundation/Include
1160+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1161+  $(EDK_SOURCE)/Foundation/Efi
1162+  $(EDK_SOURCE)/Foundation/Efi/Include
1163+  $(EDK_SOURCE)/Foundation/FrameWork
1164+  $(EDK_SOURCE)/Foundation/FrameWork/Include
1165+  $(EDK_SOURCE)/Foundation/Core/Dxe
1166+  $(DEST_DIR)/
1167
1168 [libraries.common]
1169   EfiShellLib
1170diff --ignore-file-name-case -Naur ShellR33/edit/edit.inf GccShellR33/edit/edit.inf
1171--- ShellR33/edit/edit.inf	2007-06-25 02:05:05.000000000 -0700
1172+++ GccShellR33/edit/edit.inf	2009-09-22 15:37:05.000000000 -0700
1173@@ -25,7 +25,7 @@
1174 COMPONENT_TYPE       = APPLICATION
1175
1176 [sources.common]
1177- ..\ShCommonStrings.uni
1178+ ../ShCommonStrings.uni
1179  EditStrings.uni
1180  editor.h
1181  editortype.h
1182@@ -41,17 +41,17 @@
1183
1184 [includes.common]
1185   .
1186-  ..\Inc
1187-  ..\Library
1188-  $(EDK_SOURCE)\Foundation
1189-  $(EDK_SOURCE)\Foundation\Include
1190-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1191-  $(EDK_SOURCE)\Foundation\Efi
1192-  $(EDK_SOURCE)\Foundation\Efi\Include
1193-  $(EDK_SOURCE)\Foundation\FrameWork
1194-  $(EDK_SOURCE)\Foundation\FrameWork\Include
1195-  $(EDK_SOURCE)\Foundation\Core\Dxe
1196-  $(DEST_DIR)\
1197+  ../Inc
1198+  ../Library
1199+  $(EDK_SOURCE)/Foundation
1200+  $(EDK_SOURCE)/Foundation/Include
1201+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1202+  $(EDK_SOURCE)/Foundation/Efi
1203+  $(EDK_SOURCE)/Foundation/Efi/Include
1204+  $(EDK_SOURCE)/Foundation/FrameWork
1205+  $(EDK_SOURCE)/Foundation/FrameWork/Include
1206+  $(EDK_SOURCE)/Foundation/Core/Dxe
1207+  $(DEST_DIR)/
1208
1209 [libraries.common]
1210   EfiShellLib
1211diff --ignore-file-name-case -Naur ShellR33/edit/editor.h GccShellR33/edit/editor.h
1212--- ShellR33/edit/editor.h	2008-08-13 23:02:46.000000000 -0700
1213+++ GccShellR33/edit/editor.h	2009-11-05 13:49:56.000000000 -0800
1214@@ -33,7 +33,7 @@
1215 #include "libstatusbar.h"
1216 #include "libinputbar.h"
1217 #include "libmenubar.h"
1218-#include "libmisc.h"
1219+#include "libMisc.h"
1220 //
1221 // This is the generated header file which includes whatever needs to be exported (strings + IFR)
1222 //
1223@@ -43,7 +43,7 @@
1224 extern BOOLEAN                  EditorFirst;
1225 extern BOOLEAN                  EditorExit;
1226
1227-extern EFI_HII_HANDLE           HiiHandle;
1228+extern EFI_HII_HANDLE           gEditHiiHandle;
1229 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
1230 extern EFI_HII_PROTOCOL         *Hii;
1231 #endif
1232diff --ignore-file-name-case -Naur ShellR33/edit/libEditor.c GccShellR33/edit/libEditor.c
1233--- ShellR33/edit/libEditor.c	2009-05-27 01:55:16.000000000 -0700
1234+++ GccShellR33/edit/libEditor.c	2009-11-05 13:49:56.000000000 -0800
1235@@ -123,7 +123,7 @@
1236   Status = BS->HandleProtocol (
1237                 In,
1238                 &gEfiSimplePointerProtocolGuid,
1239-                &MainEditor.MouseInterface
1240+                (VOID **)&MainEditor.MouseInterface
1241                 );
1242   if (EFI_ERROR (Status)) {
1243     //
1244@@ -146,7 +146,7 @@
1245         Status = BS->HandleProtocol (
1246                       HandleBuffer[Index],
1247                       &gEfiSimplePointerProtocolGuid,
1248-                      &MainEditor.MouseInterface
1249+                      (VOID **)&MainEditor.MouseInterface
1250                       );
1251         if (!EFI_ERROR (Status)) {
1252           break;
1253@@ -169,31 +169,31 @@
1254   //
1255   Status = MainTitleBarInit ();
1256   if (EFI_ERROR (Status)) {
1257-    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_TITLEBAR), HiiHandle);
1258+    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_TITLEBAR), gEditHiiHandle);
1259     return EFI_LOAD_ERROR;
1260   }
1261
1262   Status = MainMenuBarInit ();
1263   if (EFI_ERROR (Status)) {
1264-    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_MAINMENU), HiiHandle);
1265+    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_MAINMENU), gEditHiiHandle);
1266     return EFI_LOAD_ERROR;
1267   }
1268
1269   Status = MainStatusBarInit ();
1270   if (EFI_ERROR (Status)) {
1271-    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_STATUSBAR), HiiHandle);
1272+    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_STATUSBAR), gEditHiiHandle);
1273     return EFI_LOAD_ERROR;
1274   }
1275
1276   Status = MainInputBarInit ();
1277   if (EFI_ERROR (Status)) {
1278-    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_INPUTBAR), HiiHandle);
1279+    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_INPUTBAR), gEditHiiHandle);
1280     return EFI_LOAD_ERROR;
1281   }
1282
1283   Status = FileBufferInit ();
1284   if (EFI_ERROR (Status)) {
1285-    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_FILEBUFFER), HiiHandle);
1286+    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_FILEBUFFER), gEditHiiHandle);
1287     return EFI_LOAD_ERROR;
1288   }
1289   //
1290@@ -234,27 +234,27 @@
1291   //
1292   Status = MainTitleBarCleanup ();
1293   if (EFI_ERROR (Status)) {
1294-    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_TILEBAR_CLEANUP), HiiHandle);
1295+    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_TILEBAR_CLEANUP), gEditHiiHandle);
1296   }
1297
1298   Status = MainMenuBarCleanup ();
1299   if (EFI_ERROR (Status)) {
1300-    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_MENUBAR_CLEANUP), HiiHandle);
1301+    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_MENUBAR_CLEANUP), gEditHiiHandle);
1302   }
1303
1304   Status = MainStatusBarCleanup ();
1305   if (EFI_ERROR (Status)) {
1306-    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_STATUSBAR_CLEANUP), HiiHandle);
1307+    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_STATUSBAR_CLEANUP), gEditHiiHandle);
1308   }
1309
1310   Status = MainInputBarCleanup ();
1311   if (EFI_ERROR (Status)) {
1312-    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_INPUTBAR_CLEANUP), HiiHandle);
1313+    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_INPUTBAR_CLEANUP), gEditHiiHandle);
1314   }
1315
1316   Status = FileBufferCleanup ();
1317   if (EFI_ERROR (Status)) {
1318-    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_FILEBUFFER_CLEANUP), HiiHandle);
1319+    PrintToken (STRING_TOKEN (STR_EDIT_LIBEDITOR_FILEBUFFER_CLEANUP), gEditHiiHandle);
1320   }
1321   //
1322   // restore old mode
1323diff --ignore-file-name-case -Naur ShellR33/edit/libInputBar.c GccShellR33/edit/libInputBar.c
1324--- ShellR33/edit/libInputBar.c	2007-03-15 20:07:49.000000000 -0700
1325+++ GccShellR33/edit/libInputBar.c	2009-11-05 13:49:56.000000000 -0800
1326@@ -173,7 +173,7 @@
1327   EditorClearLine (INPUT_BAR_LOCATION);
1328
1329   Out->SetCursorPosition (Out, 0, INPUT_BAR_LOCATION - 1);
1330-  PrintToken (STRING_TOKEN (STR_EDIT_LIBINPUTBAR_MAININPUTBAR), HiiHandle, MainInputBar.Prompt);
1331+  PrintToken (STRING_TOKEN (STR_EDIT_LIBINPUTBAR_MAININPUTBAR), gEditHiiHandle, MainInputBar.Prompt);
1332
1333   //
1334   // that's the maximum input length that can be displayed on screen
1335diff --ignore-file-name-case -Naur ShellR33/edit/libMenuBar.c GccShellR33/edit/libMenuBar.c
1336--- ShellR33/edit/libMenuBar.c	2008-08-13 23:02:46.000000000 -0700
1337+++ GccShellR33/edit/libMenuBar.c	2009-11-05 13:49:56.000000000 -0800
1338@@ -220,9 +220,9 @@
1339     FunctionKeyString = AllocatePool (BufferSize);
1340
1341 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
1342-    Status            = Hii->GetString (Hii, HiiHandle, Item->NameToken, FALSE, NULL, &BufferSize, NameString);
1343+    Status            = Hii->GetString (Hii, gEditHiiHandle, Item->NameToken, FALSE, NULL, &BufferSize, NameString);
1344 #else
1345-    Status            = LibGetString (HiiHandle, Item->NameToken, NameString, &BufferSize);
1346+    Status            = LibGetString (gEditHiiHandle, Item->NameToken, NameString, &BufferSize);
1347 #endif
1348
1349     Width             = max ((StrLen (NameString) + 6), 20);
1350@@ -232,9 +232,9 @@
1351     }
1352
1353 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
1354-    Status = Hii->GetString (Hii, HiiHandle, Item->FunctionKeyToken, FALSE, NULL, &BufferSize, FunctionKeyString);
1355+    Status = Hii->GetString (Hii, gEditHiiHandle, Item->FunctionKeyToken, FALSE, NULL, &BufferSize, FunctionKeyString);
1356 #else
1357-    Status = LibGetString (HiiHandle, Item->FunctionKeyToken, FunctionKeyString, &BufferSize);
1358+    Status = LibGetString (gEditHiiHandle, Item->FunctionKeyToken, FunctionKeyString, &BufferSize);
1359 #endif
1360     PrintAt (Col - 1, Row - 1, L"%E%s%N  %H%s%N  ", FunctionKeyString, NameString);
1361
1362diff --ignore-file-name-case -Naur ShellR33/edit/main.c GccShellR33/edit/main.c
1363--- ShellR33/edit/main.c	2008-08-13 23:02:46.000000000 -0700
1364+++ GccShellR33/edit/main.c	2009-11-05 13:49:56.000000000 -0800
1365@@ -34,7 +34,7 @@
1366 //
1367 // Global Variables
1368 //
1369-EFI_HII_HANDLE    HiiHandle;
1370+EFI_HII_HANDLE    gEditHiiHandle;
1371 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
1372 EFI_HII_PROTOCOL  *Hii;
1373 #endif
1374@@ -127,7 +127,7 @@
1375   }
1376 #endif
1377
1378-  Status = LibInitializeStrings (&HiiHandle, STRING_ARRAY_NAME, &EfiEditGuid);
1379+  Status = LibInitializeStrings (&gEditHiiHandle, STRING_ARRAY_NAME, &EfiEditGuid);
1380
1381   if (EFI_ERROR (Status)) {
1382     return Status;
1383@@ -137,7 +137,7 @@
1384   if (VarCheckOk != RetCode) {
1385     switch (RetCode) {
1386     case VarCheckUnknown:
1387-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), HiiHandle, L"edit", Useful);
1388+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), gEditHiiHandle, L"edit", Useful);
1389       break;
1390
1391     default:
1392@@ -161,10 +161,10 @@
1393         ChkPck.FlagCount > 2 ||
1394         (ChkPck.FlagCount == 2 && LibCheckVarGetFlag (&ChkPck, L"-b") == NULL)
1395         ) {
1396-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"edit");
1397+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gEditHiiHandle, L"edit");
1398       Status = EFI_INVALID_PARAMETER;
1399     } else {
1400-      PrintToken (STRING_TOKEN (STR_EDIT_VERBOSE_HELP), HiiHandle);
1401+      PrintToken (STRING_TOKEN (STR_EDIT_VERBOSE_HELP), gEditHiiHandle);
1402       Status = EFI_SUCCESS;
1403     }
1404
1405@@ -172,21 +172,21 @@
1406   }
1407
1408   if (ChkPck.ValueCount > 1) {
1409-    PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"edit");
1410+    PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gEditHiiHandle, L"edit");
1411     Status = EFI_INVALID_PARAMETER;
1412     goto done;
1413   }
1414
1415   if (ChkPck.ValueCount == 1) {
1416     if (!IsValidFileName (ChkPck.VarList->VarStr)) {
1417-      PrintToken (STRING_TOKEN (STR_EDIT_MAIN_INVALID_FILE_NAME), HiiHandle);
1418+      PrintToken (STRING_TOKEN (STR_EDIT_MAIN_INVALID_FILE_NAME), gEditHiiHandle);
1419       Status = EFI_INVALID_PARAMETER;
1420       goto done;
1421     }
1422   }
1423
1424   if (SI->RedirArgc != 0) {
1425-    PrintToken (STRING_TOKEN (STR_EDIT_NOREDIRECT), HiiHandle);
1426+    PrintToken (STRING_TOKEN (STR_EDIT_NOREDIRECT), gEditHiiHandle);
1427     Status = EFI_INVALID_PARAMETER;
1428     goto done;
1429   }
1430@@ -195,7 +195,7 @@
1431   if (EFI_ERROR (Status)) {
1432     Out->ClearScreen (Out);
1433     Out->EnableCursor (Out, TRUE);
1434-    PrintToken (STRING_TOKEN (STR_EDIT_MAIN_INIT_FAILED), HiiHandle);
1435+    PrintToken (STRING_TOKEN (STR_EDIT_MAIN_INIT_FAILED), gEditHiiHandle);
1436     goto done;
1437   }
1438
1439@@ -240,19 +240,19 @@
1440   //
1441   if (Status == EFI_SUCCESS) {
1442   } else if (Status == EFI_OUT_OF_RESOURCES) {
1443-    PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_OUT_RESOURCE), HiiHandle, L"edit");
1444+    PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_OUT_RESOURCE), gEditHiiHandle, L"edit");
1445   } else {
1446     if (Buffer != NULL) {
1447       if (StrCmp (Buffer, L"") != 0) {
1448         //
1449         // print out the status string
1450         //
1451-        PrintToken (STRING_TOKEN (STR_EDIT_MAIN_BUFFER), HiiHandle, Buffer);
1452+        PrintToken (STRING_TOKEN (STR_EDIT_MAIN_BUFFER), gEditHiiHandle, Buffer);
1453       } else {
1454-        PrintToken (STRING_TOKEN (STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR), HiiHandle);
1455+        PrintToken (STRING_TOKEN (STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR), gEditHiiHandle);
1456       }
1457     } else {
1458-      PrintToken (STRING_TOKEN (STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR), HiiHandle);
1459+      PrintToken (STRING_TOKEN (STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR), gEditHiiHandle);
1460     }
1461   }
1462
1463diff --ignore-file-name-case -Naur ShellR33/EDK_Snapshot.txt GccShellR33/EDK_Snapshot.txt
1464--- ShellR33/EDK_Snapshot.txt	2009-08-13 22:57:02.000000000 -0700
1465+++ GccShellR33/EDK_Snapshot.txt	2009-09-22 15:37:05.000000000 -0700
1466@@ -1,5 +1,5 @@
1467 Notes:
1468-  This EFI Shell release package has been tested on the 2009-08-12's EDK which snapshot
1469-is Edk-Dev-Snapshot-20090812, User can get this version EDK from the following URL:
1470-  https://edk.tianocore.org/files/documents/16/558/Edk-Dev-Snapshot-20090812.zip
1471+  This EFI Shell release package has been tested on the 2009-05-27's EDK which snapshot
1472+is Edk-Dev-Snapshot-20090527, User can get this version EDK from the following URL:
1473+  https://edk.tianocore.org/files/documents/16/526/Edk-Dev-Snapshot-20090527.zip
1474   We don't guarantee this package can work correctly on the other EDK snapshot.
1475\ No newline at end of file
1476diff --ignore-file-name-case -Naur ShellR33/EfiCompress/compress.c GccShellR33/EfiCompress/compress.c
1477--- ShellR33/EfiCompress/compress.c	2007-03-15 20:07:49.000000000 -0700
1478+++ GccShellR33/EfiCompress/compress.c	2009-09-22 15:37:05.000000000 -0700
1479@@ -30,7 +30,11 @@
1480 // Macro Definitions
1481 //
1482 typedef INT16             NODE;
1483-#define UINT8_MAX         0xff
1484+
1485+#ifndef UINT8_MAX
1486+  #define UINT8_MAX         0xff
1487+#endif
1488+
1489 #define UINT8_BIT         8
1490 #define THRESHOLD         3
1491 #define INIT_CRC          0
1492@@ -262,7 +266,7 @@
1493 STATIC UINT32 mCompSize, mOrigSize;
1494
1495 STATIC UINT16 *mFreq, *mSortPtr, mLenCnt[17], mLeft[2 * NC - 1], mRight[2 * NC - 1],
1496-              mCrcTable[UINT8_MAX + 1], mCFreq[2 * NC - 1], mCTable[4096], mCCode[NC],
1497+              mCrcTable[UINT8_MAX + 1], mCFreq[2 * NC - 1], mCCode[NC],
1498               mPFreq[2 * NP - 1], mPTCode[NPT], mTFreq[2 * NT - 1];
1499
1500 STATIC NODE   mPos, mMatchPos, mAvail, *mPosition, *mParent, *mPrev, *mNext = NULL;
1501diff --ignore-file-name-case -Naur ShellR33/EfiCompress/Compress.h GccShellR33/EfiCompress/Compress.h
1502--- ShellR33/EfiCompress/Compress.h	2005-08-23 00:16:36.000000000 -0700
1503+++ GccShellR33/EfiCompress/Compress.h	2009-11-05 13:49:56.000000000 -0800
1504@@ -57,4 +57,4 @@
1505
1506 --*/
1507
1508-#endif
1509\ No newline at end of file
1510+#endif
1511diff --ignore-file-name-case -Naur ShellR33/EfiCompress/compress.inf GccShellR33/EfiCompress/compress.inf
1512--- ShellR33/EfiCompress/compress.inf	2007-06-25 02:05:05.000000000 -0700
1513+++ GccShellR33/EfiCompress/compress.inf	2009-09-22 15:37:05.000000000 -0700
1514@@ -25,7 +25,7 @@
1515 COMPONENT_TYPE       = APPLICATION
1516
1517 [sources.common]
1518-..\ShCommonStrings.uni
1519+../ShCommonStrings.uni
1520 CompressStrings.uni
1521 compressMain.c
1522 compress.c
1523@@ -34,17 +34,17 @@
1524
1525 [includes.common]
1526   .
1527-  ..\Inc
1528-  ..\Library
1529-  $(EDK_SOURCE)\Foundation
1530-  $(EDK_SOURCE)\Foundation\Include
1531-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1532-  $(EDK_SOURCE)\Foundation\Efi
1533-  $(EDK_SOURCE)\Foundation\Efi\Include
1534-  $(EDK_SOURCE)\Foundation\FrameWork
1535-  $(EDK_SOURCE)\Foundation\FrameWork\Include
1536-  $(EDK_SOURCE)\Foundation\Core\Dxe
1537-  $(DEST_DIR)\
1538+  ../Inc
1539+  ../Library
1540+  $(EDK_SOURCE)/Foundation
1541+  $(EDK_SOURCE)/Foundation/Include
1542+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1543+  $(EDK_SOURCE)/Foundation/Efi
1544+  $(EDK_SOURCE)/Foundation/Efi/Include
1545+  $(EDK_SOURCE)/Foundation/FrameWork
1546+  $(EDK_SOURCE)/Foundation/FrameWork/Include
1547+  $(EDK_SOURCE)/Foundation/Core/Dxe
1548+  $(DEST_DIR)/
1549
1550 [libraries.common]
1551   EfiShellLib
1552diff --ignore-file-name-case -Naur ShellR33/EfiDecompress/Decompress.c GccShellR33/EfiDecompress/Decompress.c
1553--- ShellR33/EfiDecompress/Decompress.c	2007-03-15 20:07:49.000000000 -0700
1554+++ GccShellR33/EfiDecompress/Decompress.c	2009-09-22 19:19:20.000000000 -0700
1555@@ -22,7 +22,7 @@
1556 --*/
1557
1558 #include "EfiShellLib.h"
1559-#include "decompress.h"
1560+#include "Decompress.h"
1561
1562 extern UINT8    STRING_ARRAY_NAME[];
1563
1564@@ -31,7 +31,7 @@
1565 //
1566 #include STRING_DEFINES_FILE
1567
1568-#include EFI_PROTOCOL_DEFINITION (decompress)
1569+#include EFI_PROTOCOL_DEFINITION (Decompress)
1570
1571 EFI_HII_HANDLE  HiiDecompressHandle;
1572 EFI_GUID        EfiDecompressGuid = EFI_DECOMPRESS_GUID;
1573@@ -192,7 +192,7 @@
1574   //
1575   //
1576   //
1577-  Status = LibLocateProtocol (&gEfiDecompressProtocolGuid, &Decompress);
1578+  Status = LibLocateProtocol (&gEfiDecompressProtocolGuid, (VOID **)&Decompress);
1579   if (EFI_ERROR (Status)) {
1580     PrintToken (STRING_TOKEN (STR_DECOMPRESS_PROTOCOL_NOT_FOUND), HiiDecompressHandle, L"efidecompress");
1581     Status = EFI_UNSUPPORTED;
1582diff --ignore-file-name-case -Naur ShellR33/EfiDecompress/Decompress.h GccShellR33/EfiDecompress/Decompress.h
1583--- ShellR33/EfiDecompress/Decompress.h	2005-08-23 00:16:36.000000000 -0700
1584+++ GccShellR33/EfiDecompress/Decompress.h	2009-11-05 13:49:56.000000000 -0800
1585@@ -29,4 +29,4 @@
1586     0xe15963a9, 0xa05a, 0x480e, 0x91, 0x49, 0x32, 0xe9, 0x24, 0x5d, 0x98, 0xcb \
1587   }
1588
1589-#endif
1590\ No newline at end of file
1591+#endif
1592diff --ignore-file-name-case -Naur ShellR33/EfiDecompress/Decompress.inf GccShellR33/EfiDecompress/Decompress.inf
1593--- ShellR33/EfiDecompress/Decompress.inf	2007-06-25 02:05:05.000000000 -0700
1594+++ GccShellR33/EfiDecompress/Decompress.inf	2009-09-22 15:37:05.000000000 -0700
1595@@ -25,7 +25,7 @@
1596 COMPONENT_TYPE       = APPLICATION
1597
1598 [sources.common]
1599-..\ShCommonStrings.uni
1600+../ShCommonStrings.uni
1601 DecompressStrings.uni
1602 decompress.c
1603 decompress.h
1604@@ -33,17 +33,17 @@
1605
1606 [includes.common]
1607   .
1608-  ..\Inc
1609-  ..\Library
1610-  $(EDK_SOURCE)\Foundation
1611-  $(EDK_SOURCE)\Foundation\Include
1612-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1613-  $(EDK_SOURCE)\Foundation\Efi
1614-  $(EDK_SOURCE)\Foundation\Efi\Include
1615-  $(EDK_SOURCE)\Foundation\FrameWork
1616-  $(EDK_SOURCE)\Foundation\FrameWork\Include
1617-  $(EDK_SOURCE)\Foundation\Core\Dxe
1618-  $(DEST_DIR)\
1619+  ../Inc
1620+  ../Library
1621+  $(EDK_SOURCE)/Foundation
1622+  $(EDK_SOURCE)/Foundation/Include
1623+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1624+  $(EDK_SOURCE)/Foundation/Efi
1625+  $(EDK_SOURCE)/Foundation/Efi/Include
1626+  $(EDK_SOURCE)/Foundation/FrameWork
1627+  $(EDK_SOURCE)/Foundation/FrameWork/Include
1628+  $(EDK_SOURCE)/Foundation/Core/Dxe
1629+  $(DEST_DIR)/
1630
1631 [libraries.common]
1632   EfiShellLib
1633diff --ignore-file-name-case -Naur ShellR33/err/err.c GccShellR33/err/err.c
1634--- ShellR33/err/err.c	2007-03-15 20:07:49.000000000 -0700
1635+++ GccShellR33/err/err.c	2009-11-05 13:49:56.000000000 -0800
1636@@ -35,7 +35,7 @@
1637 //
1638 // Global Variables
1639 //
1640-EFI_HII_HANDLE  HiiHandle;
1641+static EFI_HII_HANDLE  HiiHandle;
1642 EFI_GUID        EfiErrGuid = EFI_ERR_GUID;
1643 SHELL_VAR_CHECK_ITEM    ErrCheckList[] = {
1644   {
1645@@ -149,7 +149,7 @@
1646   EFI_DEBUG_MASK_PROTOCOL *dmp;
1647   UINTN                   Mask;
1648
1649-  Status = BS->HandleProtocol (Handle, &gEfiDebugMaskProtocolGuid, &dmp);
1650+  Status = BS->HandleProtocol (Handle, &gEfiDebugMaskProtocolGuid, (VOID **)&dmp);
1651   if (!EFI_ERROR (Status)) {
1652     Status = dmp->GetDebugMask (dmp, &Mask);
1653     if (!EFI_ERROR (Status)) {
1654@@ -278,7 +278,7 @@
1655     goto Done;
1656   }
1657
1658-  Status = BS->HandleProtocol (RealHandle, &gEfiDebugMaskProtocolGuid, &dmp);
1659+  Status = BS->HandleProtocol (RealHandle, &gEfiDebugMaskProtocolGuid, (VOID **)&dmp);
1660   if (EFI_ERROR (Status)) {
1661     PrintToken (STRING_TOKEN (STR_ERR_HANDLE_NOT_FOUND), HiiHandle, DrvHandle + 1);
1662     goto Done;
1663@@ -336,7 +336,7 @@
1664   }
1665
1666   for (Index = 0; Index < BufferSize / sizeof(EFI_HANDLE); Index ++) {
1667-    Status = BS->HandleProtocol (Buffer[Index], &gEfiDebugMaskProtocolGuid, &dmp);
1668+    Status = BS->HandleProtocol (Buffer[Index], &gEfiDebugMaskProtocolGuid, (VOID **)&dmp);
1669     Status = dmp->SetDebugMask (dmp, Msk);
1670   }
1671
1672diff --ignore-file-name-case -Naur ShellR33/err/err.h GccShellR33/err/err.h
1673--- ShellR33/err/err.h	2005-08-23 00:16:36.000000000 -0700
1674+++ GccShellR33/err/err.h	2009-11-05 13:49:56.000000000 -0800
1675@@ -29,4 +29,4 @@
1676     0xdaab229b, 0x7883, 0x4f5f, 0xac, 0x6e, 0x15, 0x20, 0xc7, 0xe7, 0x8f, 0xd4 \
1677   }
1678
1679-#endif
1680\ No newline at end of file
1681+#endif
1682diff --ignore-file-name-case -Naur ShellR33/err/err.inf GccShellR33/err/err.inf
1683--- ShellR33/err/err.inf	2007-06-25 02:05:05.000000000 -0700
1684+++ GccShellR33/err/err.inf	2009-09-22 15:37:05.000000000 -0700
1685@@ -25,7 +25,7 @@
1686 COMPONENT_TYPE       = APPLICATION
1687
1688 [sources.common]
1689-..\ShCommonStrings.uni
1690+../ShCommonStrings.uni
1691 ErrStrings.uni
1692 err.c
1693 err.h
1694@@ -33,17 +33,17 @@
1695
1696 [includes.common]
1697   .
1698-  ..\Inc
1699-  ..\Library
1700-  $(EDK_SOURCE)\Foundation
1701-  $(EDK_SOURCE)\Foundation\Include
1702-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1703-  $(EDK_SOURCE)\Foundation\Efi
1704-  $(EDK_SOURCE)\Foundation\Efi\Include
1705-  $(EDK_SOURCE)\Foundation\FrameWork
1706-  $(EDK_SOURCE)\Foundation\FrameWork\Include
1707-  $(EDK_SOURCE)\Foundation\Core\Dxe
1708-  $(DEST_DIR)\
1709+  ../Inc
1710+  ../Library
1711+  $(EDK_SOURCE)/Foundation
1712+  $(EDK_SOURCE)/Foundation/Include
1713+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1714+  $(EDK_SOURCE)/Foundation/Efi
1715+  $(EDK_SOURCE)/Foundation/Efi/Include
1716+  $(EDK_SOURCE)/Foundation/FrameWork
1717+  $(EDK_SOURCE)/Foundation/FrameWork/Include
1718+  $(EDK_SOURCE)/Foundation/Core/Dxe
1719+  $(DEST_DIR)/
1720
1721 [libraries.common]
1722   EfiShellLib
1723diff --ignore-file-name-case -Naur ShellR33/guid/guid.c GccShellR33/guid/guid.c
1724--- ShellR33/guid/guid.c	2006-08-07 02:14:38.000000000 -0700
1725+++ GccShellR33/guid/guid.c	2009-11-05 13:49:56.000000000 -0800
1726@@ -36,7 +36,7 @@
1727 //
1728 // Global Variables
1729 //
1730-EFI_HII_HANDLE  HiiHandle;
1731+static EFI_HII_HANDLE  HiiHandle;
1732 EFI_GUID        EfiGuidGuid = EFI_GUID_GUID;
1733 SHELL_VAR_CHECK_ITEM    GuidCheckList[] = {
1734   {
1735diff --ignore-file-name-case -Naur ShellR33/guid/guid.h GccShellR33/guid/guid.h
1736--- ShellR33/guid/guid.h	2005-08-23 00:16:36.000000000 -0700
1737+++ GccShellR33/guid/guid.h	2009-11-05 13:49:56.000000000 -0800
1738@@ -31,4 +31,4 @@
1739     0x425bff44, 0x1cae, 0x4c27, 0x98, 0x2c, 0x25, 0xc8, 0x74, 0x59, 0xdf, 0xd6 \
1740   }
1741
1742-#endif
1743\ No newline at end of file
1744+#endif
1745diff --ignore-file-name-case -Naur ShellR33/guid/guid.inf GccShellR33/guid/guid.inf
1746--- ShellR33/guid/guid.inf	2007-03-15 20:07:49.000000000 -0700
1747+++ GccShellR33/guid/guid.inf	2009-09-22 15:37:05.000000000 -0700
1748@@ -37,23 +37,23 @@
1749   FILE_GUID            = CBEB01F8-0912-4d87-8A6B-45D02847A405
1750   COMPONENT_TYPE       = APPLICATION
1751 [sources.common]
1752-  ..\ShCommonStrings.uni
1753+  ../ShCommonStrings.uni
1754   GuidStrings.uni
1755   guid.c
1756   guid.h
1757 [includes.common]
1758   .
1759-  ..\Inc
1760-  ..\Library
1761-  $(EDK_SOURCE)\Foundation
1762-  $(EDK_SOURCE)\Foundation\Include
1763-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1764-  $(EDK_SOURCE)\Foundation\Efi
1765-  $(EDK_SOURCE)\Foundation\Efi\Include
1766-  $(EDK_SOURCE)\Foundation\FrameWork
1767-  $(EDK_SOURCE)\Foundation\FrameWork\Include
1768-  $(EDK_SOURCE)\Foundation\Core\Dxe
1769-  $(DEST_DIR)\
1770+  ../Inc
1771+  ../Library
1772+  $(EDK_SOURCE)/Foundation
1773+  $(EDK_SOURCE)/Foundation/Include
1774+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1775+  $(EDK_SOURCE)/Foundation/Efi
1776+  $(EDK_SOURCE)/Foundation/Efi/Include
1777+  $(EDK_SOURCE)/Foundation/FrameWork
1778+  $(EDK_SOURCE)/Foundation/FrameWork/Include
1779+  $(EDK_SOURCE)/Foundation/Core/Dxe
1780+  $(DEST_DIR)/
1781 [libraries.common]
1782   EfiShellLib
1783   EdkProtocolLib
1784diff --ignore-file-name-case -Naur ShellR33/hexedit/heditor.h GccShellR33/hexedit/heditor.h
1785--- ShellR33/hexedit/heditor.h	2008-08-13 23:02:46.000000000 -0700
1786+++ GccShellR33/hexedit/heditor.h	2009-11-05 13:49:56.000000000 -0800
1787@@ -39,7 +39,7 @@
1788 #include "libinputbar.h"
1789 #include "libmenubar.h"
1790
1791-#include "libmisc.h"
1792+#include "libMisc.h"
1793
1794 #include "libclipboard.h"
1795
1796@@ -52,7 +52,7 @@
1797 extern BOOLEAN                    HEditorFirst;
1798 extern BOOLEAN                    HEditorExit;
1799
1800-extern EFI_HII_HANDLE             HiiHandle;
1801+extern EFI_HII_HANDLE             gHexEditHiiHandle;
1802 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
1803 extern EFI_HII_PROTOCOL           *Hii;
1804 #endif
1805diff --ignore-file-name-case -Naur ShellR33/hexedit/hexedit.inf GccShellR33/hexedit/hexedit.inf
1806--- ShellR33/hexedit/hexedit.inf	2007-06-25 02:05:05.000000000 -0700
1807+++ GccShellR33/hexedit/hexedit.inf	2009-09-22 15:37:05.000000000 -0700
1808@@ -25,7 +25,7 @@
1809 COMPONENT_TYPE       = APPLICATION
1810
1811 [sources.common]
1812-  ..\ShCommonStrings.uni
1813+  ../ShCommonStrings.uni
1814   HexeditStrings.uni
1815   heditor.h
1816   heditortype.h
1817@@ -45,17 +45,17 @@
1818
1819 [includes.common]
1820   .
1821-  ..\Inc
1822-  ..\Library
1823-  $(EDK_SOURCE)\Foundation
1824-  $(EDK_SOURCE)\Foundation\Include
1825-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
1826-  $(EDK_SOURCE)\Foundation\Efi
1827-  $(EDK_SOURCE)\Foundation\Efi\Include
1828-  $(EDK_SOURCE)\Foundation\FrameWork
1829-  $(EDK_SOURCE)\Foundation\FrameWork\Include
1830-  $(EDK_SOURCE)\Foundation\Core\Dxe
1831-  $(DEST_DIR)\
1832+  ../Inc
1833+  ../Library
1834+  $(EDK_SOURCE)/Foundation
1835+  $(EDK_SOURCE)/Foundation/Include
1836+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
1837+  $(EDK_SOURCE)/Foundation/Efi
1838+  $(EDK_SOURCE)/Foundation/Efi/Include
1839+  $(EDK_SOURCE)/Foundation/FrameWork
1840+  $(EDK_SOURCE)/Foundation/FrameWork/Include
1841+  $(EDK_SOURCE)/Foundation/Core/Dxe
1842+  $(DEST_DIR)/
1843
1844 [libraries.common]
1845   EfiShellLib
1846diff --ignore-file-name-case -Naur ShellR33/hexedit/libBufferImage.c GccShellR33/hexedit/libBufferImage.c
1847--- ShellR33/hexedit/libBufferImage.c	2005-08-23 00:16:36.000000000 -0700
1848+++ GccShellR33/hexedit/libBufferImage.c	2009-09-22 15:37:05.000000000 -0700
1849@@ -203,6 +203,9 @@
1850   case MEM_BUFFER:
1851     HMemImageBackup ();
1852     break;
1853+
1854+  default:
1855+    break;
1856   }
1857
1858   return EFI_SUCCESS;
1859@@ -980,6 +983,9 @@
1860   case MEM_BUFFER:
1861     Status = HMemImageRead (MemOffset, MemSize, Recover);
1862     break;
1863+
1864+  default:
1865+    break;
1866   }
1867
1868   if (EFI_ERROR (Status)) {
1869@@ -1030,6 +1036,9 @@
1870   case MEM_BUFFER:
1871     Status = HMemImageSave (MemOffset, MemSize);
1872     break;
1873+
1874+  default:
1875+    break;
1876   }
1877
1878   if (EFI_ERROR (Status)) {
1879diff --ignore-file-name-case -Naur ShellR33/hexedit/libdiskimage.c GccShellR33/hexedit/libdiskimage.c
1880--- ShellR33/hexedit/libdiskimage.c	2005-08-23 00:16:36.000000000 -0700
1881+++ GccShellR33/hexedit/libdiskimage.c	2009-09-22 15:37:05.000000000 -0700
1882@@ -246,7 +246,7 @@
1883   Status = LibDevicePathToInterface (
1884             &gEfiBlockIoProtocolGuid,
1885             DevicePath,
1886-            &BlkIo
1887+            (VOID **)&BlkIo
1888             );
1889   if (EFI_ERROR (Status)) {
1890     HMainStatusBarSetStatusString (L"Read Disk Failed");
1891@@ -427,7 +427,7 @@
1892   Status = LibDevicePathToInterface (
1893             &gEfiBlockIoProtocolGuid,
1894             DevicePath,
1895-            &BlkIo
1896+            (VOID **)&BlkIo
1897             );
1898   if (EFI_ERROR (Status)) {
1899     return Status;
1900diff --ignore-file-name-case -Naur ShellR33/hexedit/libEditor.c GccShellR33/hexedit/libEditor.c
1901--- ShellR33/hexedit/libEditor.c	2009-05-27 01:55:16.000000000 -0700
1902+++ GccShellR33/hexedit/libEditor.c	2009-11-05 13:49:56.000000000 -0800
1903@@ -20,7 +20,7 @@
1904
1905 --*/
1906
1907-#include "Heditor.h"
1908+#include "heditor.h"
1909
1910 HEFI_EDITOR_COLOR_ATTRIBUTES    HOriginalColors;
1911 INTN                            HOriginalMode;
1912@@ -136,7 +136,7 @@
1913   Status = BS->HandleProtocol (
1914                 In,
1915                 &gEfiSimplePointerProtocolGuid,
1916-                &HMainEditor.MouseInterface
1917+                (VOID **)&HMainEditor.MouseInterface
1918                 );
1919   if (EFI_ERROR (Status)) {
1920     //
1921@@ -159,7 +159,7 @@
1922         Status = BS->HandleProtocol (
1923                       HandleBuffer[Index],
1924                       &gEfiSimplePointerProtocolGuid,
1925-                      &HMainEditor.MouseInterface
1926+                      (VOID **)&HMainEditor.MouseInterface
1927                       );
1928         if (!EFI_ERROR (Status)) {
1929           break;
1930@@ -182,37 +182,37 @@
1931   //
1932   Status = HMainTitleBarInit ();
1933   if (EFI_ERROR (Status)) {
1934-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_TITLE), HiiHandle);
1935+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_TITLE), gHexEditHiiHandle);
1936     return EFI_LOAD_ERROR;
1937   }
1938
1939   Status = HMainMenuBarInit ();
1940   if (EFI_ERROR (Status)) {
1941-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_MAINMENU), HiiHandle);
1942+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_MAINMENU), gHexEditHiiHandle);
1943     return EFI_LOAD_ERROR;
1944   }
1945
1946   Status = HMainStatusBarInit ();
1947   if (EFI_ERROR (Status)) {
1948-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_STATUS), HiiHandle);
1949+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_STATUS), gHexEditHiiHandle);
1950     return EFI_LOAD_ERROR;
1951   }
1952
1953   Status = HMainInputBarInit ();
1954   if (EFI_ERROR (Status)) {
1955-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_INPUTBAR), HiiHandle);
1956+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_INPUTBAR), gHexEditHiiHandle);
1957     return EFI_LOAD_ERROR;
1958   }
1959
1960   Status = HBufferImageInit ();
1961   if (EFI_ERROR (Status)) {
1962-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_BUFFERIMAGE), HiiHandle);
1963+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_BUFFERIMAGE), gHexEditHiiHandle);
1964     return EFI_LOAD_ERROR;
1965   }
1966
1967   Status = HClipBoardInit ();
1968   if (EFI_ERROR (Status)) {
1969-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_CLIPBOARD), HiiHandle);
1970+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MAINEDITOR_CLIPBOARD), gHexEditHiiHandle);
1971     return EFI_LOAD_ERROR;
1972   }
1973   //
1974@@ -259,32 +259,32 @@
1975   //
1976   Status = HMainTitleBarCleanup ();
1977   if (EFI_ERROR (Status)) {
1978-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_TITLEBAR_CLEAN), HiiHandle);
1979+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_TITLEBAR_CLEAN), gHexEditHiiHandle);
1980   }
1981
1982   Status = HMainMenuBarCleanup ();
1983   if (EFI_ERROR (Status)) {
1984-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MENUBAR_CLEAN), HiiHandle);
1985+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_MENUBAR_CLEAN), gHexEditHiiHandle);
1986   }
1987
1988   Status = HMainStatusBarCleanup ();
1989   if (EFI_ERROR (Status)) {
1990-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_STATUSBAR_CLEAN), HiiHandle);
1991+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_STATUSBAR_CLEAN), gHexEditHiiHandle);
1992   }
1993
1994   Status = HMainInputBarCleanup ();
1995   if (EFI_ERROR (Status)) {
1996-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_INPUTBAR_CLEAN), HiiHandle);
1997+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_INPUTBAR_CLEAN), gHexEditHiiHandle);
1998   }
1999
2000   Status = HBufferImageCleanup ();
2001   if (EFI_ERROR (Status)) {
2002-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_BUFFERIMAGE_CLEAN), HiiHandle);
2003+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_BUFFERIMAGE_CLEAN), gHexEditHiiHandle);
2004   }
2005
2006   Status = HClipBoardCleanup ();
2007   if (EFI_ERROR (Status)) {
2008-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_CLIPBOARD_CLEAN), HiiHandle);
2009+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_CLIPBOARD_CLEAN), gHexEditHiiHandle);
2010   }
2011   //
2012   // restore old mode
2013@@ -732,6 +732,9 @@
2014         case MEM_BUFFER:
2015           OldSize = HBufferImage.MemImage->Size;
2016           break;
2017+
2018+        default:
2019+          break;
2020         }
2021
2022         if (LengthChange == FALSE) {
2023diff --ignore-file-name-case -Naur ShellR33/hexedit/libInputBar.c GccShellR33/hexedit/libInputBar.c
2024--- ShellR33/hexedit/libInputBar.c	2007-03-15 20:07:49.000000000 -0700
2025+++ GccShellR33/hexedit/libInputBar.c	2009-11-05 13:49:56.000000000 -0800
2026@@ -201,7 +201,7 @@
2027   HEditorClearLine (INPUT_BAR_LOCATION);
2028
2029   Out->SetCursorPosition (Out, 0, INPUT_BAR_LOCATION - 1);
2030-  PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBINPUTBAR_MAININPUTBAR), HiiHandle, HMainInputBar.Prompt);
2031+  PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBINPUTBAR_MAININPUTBAR), gHexEditHiiHandle, HMainInputBar.Prompt);
2032
2033   //
2034   // that's the maximum input length that can be displayed on screen
2035diff --ignore-file-name-case -Naur ShellR33/hexedit/libMemImage.c GccShellR33/hexedit/libMemImage.c
2036--- ShellR33/hexedit/libMemImage.c	2007-03-15 20:07:49.000000000 -0700
2037+++ GccShellR33/hexedit/libMemImage.c	2009-09-22 15:37:05.000000000 -0700
2038@@ -91,7 +91,7 @@
2039   Status = BS->LocateProtocol (
2040                 &gEfiPciRootBridgeIoProtocolGuid,
2041                 NULL,
2042-                &HMemImage.IoFncs
2043+                (VOID **)&HMemImage.IoFncs
2044                 );
2045   if (Status == EFI_NOT_FOUND) {
2046     //
2047diff --ignore-file-name-case -Naur ShellR33/hexedit/libMenuBar.c GccShellR33/hexedit/libMenuBar.c
2048--- ShellR33/hexedit/libMenuBar.c	2008-08-13 23:02:46.000000000 -0700
2049+++ GccShellR33/hexedit/libMenuBar.c	2009-11-05 13:49:56.000000000 -0800
2050@@ -255,9 +255,9 @@
2051     FunctionKeyString = AllocatePool (BufferSize);
2052
2053 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
2054-    Status            = Hii->GetString (Hii, HiiHandle, Item->NameToken, FALSE, NULL, &BufferSize, NameString);
2055+    Status            = Hii->GetString (Hii, gHexEditHiiHandle, Item->NameToken, FALSE, NULL, &BufferSize, NameString);
2056 #else
2057-    Status            = LibGetString (HiiHandle, Item->NameToken, NameString, &BufferSize);
2058+    Status            = LibGetString (gHexEditHiiHandle, Item->NameToken, NameString, &BufferSize);
2059 #endif
2060
2061     Width             = max ((StrLen (NameString) + 6), 18);
2062@@ -267,9 +267,9 @@
2063     }
2064
2065 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
2066-    Status = Hii->GetString (Hii, HiiHandle, Item->FunctionKeyToken, FALSE, NULL, &BufferSize, FunctionKeyString);
2067+    Status = Hii->GetString (Hii, gHexEditHiiHandle, Item->FunctionKeyToken, FALSE, NULL, &BufferSize, FunctionKeyString);
2068 #else
2069-    Status = LibGetString (HiiHandle, Item->FunctionKeyToken, FunctionKeyString, &BufferSize);
2070+    Status = LibGetString (gHexEditHiiHandle, Item->FunctionKeyToken, FunctionKeyString, &BufferSize);
2071 #endif
2072     if (Index >= 10) {
2073       PrintAt (Col - 1, Row - 1, L"%E%s%N %H%s%N  ", FunctionKeyString, NameString);
2074diff --ignore-file-name-case -Naur ShellR33/hexedit/libmenubar.h GccShellR33/hexedit/libmenubar.h
2075--- ShellR33/hexedit/libmenubar.h	2005-08-23 00:16:36.000000000 -0700
2076+++ GccShellR33/hexedit/libmenubar.h	2009-09-22 19:19:20.000000000 -0700
2077@@ -20,7 +20,7 @@
2078 #ifndef _LIB_MENU_BAR_H_
2079 #define _LIB_MENU_BAR_H_
2080
2081-#include "Heditortype.h"
2082+#include "heditortype.h"
2083
2084 EFI_STATUS
2085 HMainMenuBarInit (
2086diff --ignore-file-name-case -Naur ShellR33/hexedit/libMisc.h GccShellR33/hexedit/libMisc.h
2087--- ShellR33/hexedit/libMisc.h	2005-08-23 00:16:36.000000000 -0700
2088+++ GccShellR33/hexedit/libMisc.h	2009-09-22 19:19:20.000000000 -0700
2089@@ -20,7 +20,7 @@
2090 #ifndef _LIB_MISC_H_
2091 #define _LIB_MISC_H_
2092
2093-#include "Heditortype.h"
2094+#include "heditortype.h"
2095
2096 VOID
2097 HEditorClearLine (
2098diff --ignore-file-name-case -Naur ShellR33/hexedit/libTitleBar.c GccShellR33/hexedit/libTitleBar.c
2099--- ShellR33/hexedit/libTitleBar.c	2005-08-23 00:16:36.000000000 -0700
2100+++ GccShellR33/hexedit/libTitleBar.c	2009-11-05 13:49:56.000000000 -0800
2101@@ -212,7 +212,7 @@
2102     // the space for file name is 35 characters
2103     //
2104     if (StrLen (FileNameTmp) <= 35) {
2105-      PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR), HiiHandle, FileNameTmp);
2106+      PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR), gHexEditHiiHandle, FileNameTmp);
2107
2108       for (Index = StrLen (FileNameTmp); Index < 35; Index++) {
2109         Print (L" ");
2110@@ -220,7 +220,7 @@
2111
2112     } else {
2113       for (Index = 0; Index < 32; Index++) {
2114-        PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR_C), HiiHandle, FileNameTmp[Index]);
2115+        PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR_C), gHexEditHiiHandle, FileNameTmp[Index]);
2116       }
2117       //
2118       // print "..."
2119@@ -234,14 +234,14 @@
2120     if (StrLen (HMainEditor.BufferImage->DiskImage->Name) <= 9) {
2121       PrintToken (
2122         STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR),
2123-        HiiHandle,
2124+        gHexEditHiiHandle,
2125         HMainEditor.BufferImage->DiskImage->Name
2126         );
2127     } else {
2128       for (Index = 0; Index < 6; Index++) {
2129         PrintToken (
2130           STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR_C),
2131-          HiiHandle,
2132+          gHexEditHiiHandle,
2133           HMainEditor.BufferImage->DiskImage->Name[Index]
2134           );
2135       }
2136@@ -253,7 +253,7 @@
2137
2138     PrintToken (
2139       STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR_TWOVARS),
2140-      HiiHandle,
2141+      gHexEditHiiHandle,
2142       HMainEditor.BufferImage->DiskImage->Offset,
2143       HMainEditor.BufferImage->DiskImage->Offset + HMainEditor.BufferImage->DiskImage->Size - 1
2144       );
2145@@ -269,7 +269,7 @@
2146   case MEM_BUFFER:
2147     PrintToken (
2148       STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MAINEDITOR_TWOVARS),
2149-      HiiHandle,
2150+      gHexEditHiiHandle,
2151       HMainEditor.BufferImage->MemImage->Offset,
2152       HMainEditor.BufferImage->MemImage->Offset + HMainEditor.BufferImage->MemImage->Size - 1
2153       );
2154@@ -280,21 +280,26 @@
2155
2156     break;
2157
2158+  default:
2159+    break;
2160   }
2161   //
2162   // 9 characters
2163   //
2164   switch (HMainEditor.BufferImage->BufferType) {
2165   case FILE_BUFFER:
2166-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_FILE), HiiHandle);
2167+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_FILE), gHexEditHiiHandle);
2168     break;
2169
2170   case DISK_BUFFER:
2171-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_DISK), HiiHandle);
2172+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_DISK), gHexEditHiiHandle);
2173     break;
2174
2175   case MEM_BUFFER:
2176-    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MEM), HiiHandle);
2177+    PrintToken (STRING_TOKEN (STR_HEXEDIT_LIBTITLEBAR_MEM), gHexEditHiiHandle);
2178+    break;
2179+
2180+  default:
2181     break;
2182   }
2183   //
2184diff --ignore-file-name-case -Naur ShellR33/hexedit/main.c GccShellR33/hexedit/main.c
2185--- ShellR33/hexedit/main.c	2008-08-13 23:02:46.000000000 -0700
2186+++ GccShellR33/hexedit/main.c	2009-11-05 13:49:56.000000000 -0800
2187@@ -26,7 +26,7 @@
2188 //
2189 // Global Variables
2190 //
2191-EFI_HII_HANDLE    HiiHandle;
2192+EFI_HII_HANDLE    gHexEditHiiHandle;
2193 #if (EFI_SPECIFICATION_VERSION < 0x0002000A)
2194 EFI_HII_PROTOCOL  *Hii;
2195 #endif
2196@@ -92,10 +92,10 @@
2197   VOID
2198   )
2199 {
2200-  PrintToken (STRING_TOKEN (STR_HEXEDIT_USAGE), HiiHandle);
2201-  PrintToken (STRING_TOKEN (STR_HEXEDIT_FILENAME), HiiHandle);
2202-  PrintToken (STRING_TOKEN (STR_HEXEDIT_DISKNAME), HiiHandle);
2203-  PrintToken (STRING_TOKEN (STR_HEXEDIT_OFFSET_SIZE), HiiHandle);
2204+  PrintToken (STRING_TOKEN (STR_HEXEDIT_USAGE), gHexEditHiiHandle);
2205+  PrintToken (STRING_TOKEN (STR_HEXEDIT_FILENAME), gHexEditHiiHandle);
2206+  PrintToken (STRING_TOKEN (STR_HEXEDIT_DISKNAME), gHexEditHiiHandle);
2207+  PrintToken (STRING_TOKEN (STR_HEXEDIT_OFFSET_SIZE), gHexEditHiiHandle);
2208   Print (L"\n\n");
2209 }
2210
2211@@ -157,12 +157,12 @@
2212   // Register our string package with HII and return the handle to it.
2213   // If previously registered we will simply receive the handle
2214   //
2215-  EFI_SHELL_STR_INIT (HiiHandle, STRING_ARRAY_NAME, EfiHexeditGuid);
2216+  EFI_SHELL_STR_INIT (gHexEditHiiHandle, STRING_ARRAY_NAME, EfiHexeditGuid);
2217
2218   if (!EFI_PROPER_VERSION (1, 10)) {
2219     PrintToken (
2220       STRING_TOKEN (STR_SHELLENV_GNC_COMMAND_NOT_SUPPORT),
2221-      HiiHandle,
2222+      gHexEditHiiHandle,
2223       L"hexedit",
2224       EFI_VERSION_1_10
2225       );
2226@@ -186,17 +186,17 @@
2227     switch (RetCode) {
2228     case VarCheckConflict:
2229
2230-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_FLAG_CONFLICT), HiiHandle, L"hexedit", Useful);
2231+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_FLAG_CONFLICT), gHexEditHiiHandle, L"hexedit", Useful);
2232       break;
2233
2234     case VarCheckDuplicate:
2235
2236-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_DUP_FLAG), HiiHandle, L"hexedit", Useful);
2237+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_DUP_FLAG), gHexEditHiiHandle, L"hexedit", Useful);
2238       break;
2239
2240     case VarCheckUnknown:
2241
2242-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), HiiHandle, L"hexedit", Useful);
2243+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), gHexEditHiiHandle, L"hexedit", Useful);
2244       break;
2245
2246     default:
2247@@ -219,10 +219,10 @@
2248         ChkPck.FlagCount > 2 ||
2249         (ChkPck.FlagCount == 2 && LibCheckVarGetFlag (&ChkPck, L"-b") == NULL)
2250         ) {
2251-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"hexedit");
2252+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gHexEditHiiHandle, L"hexedit");
2253       Status = EFI_INVALID_PARAMETER;
2254     } else {
2255-      PrintToken (STRING_TOKEN (STR_HEXEDIT_VERBOSE_HELP), HiiHandle);
2256+      PrintToken (STRING_TOKEN (STR_HEXEDIT_VERBOSE_HELP), gHexEditHiiHandle);
2257       Status = EFI_SUCCESS;
2258     }
2259
2260@@ -232,13 +232,13 @@
2261   Item = LibCheckVarGetFlag (&ChkPck, L"-d");
2262   if (Item) {
2263     if (3 < ChkPck.ValueCount) {
2264-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"hexedit");
2265+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gHexEditHiiHandle, L"hexedit");
2266       Status = EFI_INVALID_PARAMETER;
2267       goto done;
2268     }
2269
2270     if (3 > ChkPck.ValueCount) {
2271-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), HiiHandle, L"hexedit");
2272+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), gHexEditHiiHandle, L"hexedit");
2273       Status = EFI_INVALID_PARAMETER;
2274       goto done;
2275     }
2276@@ -248,7 +248,7 @@
2277     Item    = Item->Next;
2278     Result  = HXtoi (Item->VarStr, &Offset);
2279     if (EFI_ERROR (Result)) {
2280-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
2281+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
2282       Status = EFI_INVALID_PARAMETER;
2283       goto done;
2284     }
2285@@ -256,13 +256,13 @@
2286     Item    = Item->Next;
2287     Result  = HXtoi (Item->VarStr, &Size);
2288     if (EFI_ERROR (Result)) {
2289-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
2290+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
2291       Status = EFI_INVALID_PARAMETER;
2292       goto done;
2293     }
2294
2295     if (Offset < 0 || Size <= 0) {
2296-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
2297+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
2298       Status = EFI_INVALID_PARAMETER;
2299       goto done;
2300     }
2301@@ -273,13 +273,13 @@
2302   Item = LibCheckVarGetFlag (&ChkPck, L"-m");
2303   if (Item) {
2304     if (2 < ChkPck.ValueCount) {
2305-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"hexedit");
2306+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gHexEditHiiHandle, L"hexedit");
2307       Status = EFI_INVALID_PARAMETER;
2308       goto done;
2309     }
2310
2311     if (2 > ChkPck.ValueCount) {
2312-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), HiiHandle, L"hexedit");
2313+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), gHexEditHiiHandle, L"hexedit");
2314       Status = EFI_INVALID_PARAMETER;
2315       goto done;
2316     }
2317@@ -287,7 +287,7 @@
2318     Item    = ChkPck.VarList;
2319     Result  = HXtoi (Item->VarStr, &Offset);
2320     if (EFI_ERROR (Result)) {
2321-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
2322+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
2323       Status = EFI_INVALID_PARAMETER;
2324       goto done;
2325     }
2326@@ -295,20 +295,20 @@
2327     Item    = Item->Next;
2328     Result  = HXtoi (Item->VarStr, &Size);
2329     if (EFI_ERROR (Result)) {
2330-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
2331+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
2332       Status = EFI_INVALID_PARAMETER;
2333       goto done;
2334     }
2335
2336     if (Offset < 0 || Size <= 0) {
2337-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
2338+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
2339       Status = EFI_INVALID_PARAMETER;
2340       goto done;
2341     }
2342
2343     LastOffset = (UINT64) Offset + (UINT64) Size - (UINT64) 1;
2344     if (LastOffset > 0xffffffff) {
2345-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"hexedit", Item->VarStr);
2346+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gHexEditHiiHandle, L"hexedit", Item->VarStr);
2347       goto done;
2348     }
2349
2350@@ -318,13 +318,13 @@
2351   Item = LibCheckVarGetFlag (&ChkPck, L"-f");
2352   if (Item) {
2353     if (1 < ChkPck.ValueCount) {
2354-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"hexedit");
2355+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gHexEditHiiHandle, L"hexedit");
2356       Status = EFI_INVALID_PARAMETER;
2357       goto done;
2358     }
2359
2360     if (1 > ChkPck.ValueCount) {
2361-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), HiiHandle, L"hexedit");
2362+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_FEW), gHexEditHiiHandle, L"hexedit");
2363       Status = EFI_INVALID_PARAMETER;
2364       goto done;
2365     }
2366@@ -332,7 +332,7 @@
2367     Item  = ChkPck.VarList;
2368     Name  = Item->VarStr;
2369     if (!HIsValidFileName (Name)) {
2370-      PrintToken (STRING_TOKEN (STR_HEXEDIT_FILE_NAME), HiiHandle);
2371+      PrintToken (STRING_TOKEN (STR_HEXEDIT_FILE_NAME), gHexEditHiiHandle);
2372       Status = EFI_INVALID_PARAMETER;
2373       goto done;
2374     }
2375@@ -345,13 +345,13 @@
2376     } else if (1 == ChkPck.ValueCount) {
2377       Name = ChkPck.VarList->VarStr;
2378     } else {
2379-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"hexedit");
2380+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gHexEditHiiHandle, L"hexedit");
2381       Status = EFI_INVALID_PARAMETER;
2382       goto done;
2383     }
2384
2385     if (!HIsValidFileName (Name)) {
2386-      PrintToken (STRING_TOKEN (STR_HEXEDIT_FILE_NAME), HiiHandle);
2387+      PrintToken (STRING_TOKEN (STR_HEXEDIT_FILE_NAME), gHexEditHiiHandle);
2388       Status = EFI_INVALID_PARAMETER;
2389       goto done;
2390     }
2391@@ -360,7 +360,7 @@
2392   }
2393
2394   if (SI->RedirArgc != 0) {
2395-    PrintToken (STRING_TOKEN (STR_HEXEDIT_NOREDIRECT), HiiHandle);
2396+    PrintToken (STRING_TOKEN (STR_HEXEDIT_NOREDIRECT), gHexEditHiiHandle);
2397     Status = EFI_INVALID_PARAMETER;
2398     goto done;
2399   }
2400@@ -369,7 +369,7 @@
2401   if (EFI_ERROR (Status)) {
2402     Out->ClearScreen (Out);
2403     Out->EnableCursor (Out, TRUE);
2404-    PrintToken (STRING_TOKEN (STR_HEXEDIT_INIT_FAILED), HiiHandle);
2405+    PrintToken (STRING_TOKEN (STR_HEXEDIT_INIT_FAILED), gHexEditHiiHandle);
2406     goto done;
2407   }
2408
2409@@ -414,6 +414,10 @@
2410               FALSE
2411               );
2412     break;
2413+
2414+  default:
2415+    ASSERT (FALSE);
2416+    break;
2417
2418   }
2419
2420@@ -446,19 +450,19 @@
2421   //
2422   if (Status == EFI_SUCCESS) {
2423   } else if (Status == EFI_OUT_OF_RESOURCES) {
2424-    PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_OUT_RESOURCE), HiiHandle, L"hexedit");
2425+    PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_OUT_RESOURCE), gHexEditHiiHandle, L"hexedit");
2426   } else {
2427     if (Buffer != NULL) {
2428       if (StrCmp (Buffer, L"") != 0) {
2429         //
2430         // print out the status string
2431         //
2432-        PrintToken (STRING_TOKEN (STR_HEXEDIT_ONE_VAR), HiiHandle, Buffer);
2433+        PrintToken (STRING_TOKEN (STR_HEXEDIT_ONE_VAR), gHexEditHiiHandle, Buffer);
2434       } else {
2435-        PrintToken (STRING_TOKEN (STR_HEXEDIT_UNKNOWN_EDITOR), HiiHandle);
2436+        PrintToken (STRING_TOKEN (STR_HEXEDIT_UNKNOWN_EDITOR), gHexEditHiiHandle);
2437       }
2438     } else {
2439-      PrintToken (STRING_TOKEN (STR_HEXEDIT_UNKNOWN_EDITOR), HiiHandle);
2440+      PrintToken (STRING_TOKEN (STR_HEXEDIT_UNKNOWN_EDITOR), gHexEditHiiHandle);
2441     }
2442   }
2443
2444diff --ignore-file-name-case -Naur ShellR33/IfConfig/IfConfig.c GccShellR33/IfConfig/IfConfig.c
2445--- ShellR33/IfConfig/IfConfig.c	2009-08-13 22:57:02.000000000 -0700
2446+++ GccShellR33/IfConfig/IfConfig.c	2009-11-05 13:49:56.000000000 -0800
2447@@ -26,7 +26,7 @@
2448 #define NET_IFTYPE_ETHERNET    1
2449 #define NIC_ITEM_CONFIG_SIZE   sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE
2450
2451-EFI_HII_HANDLE  HiiHandle;
2452+static EFI_HII_HANDLE  HiiHandle;
2453
2454 EFI_GUID  EfiIfConfigGuid = EFI_IFCONFIG_GUID;
2455
2456@@ -450,7 +450,7 @@
2457   Status = BS->LocateProtocol (
2458                 &gEfiHiiConfigRoutingProtocolGuid,
2459                 NULL,
2460-                &mHiiConfigRouting
2461+                (VOID **)&mHiiConfigRouting
2462                 );
2463   if (EFI_ERROR (Status)) {
2464     return EFI_NOT_FOUND;
2465@@ -1602,7 +1602,7 @@
2466     if ((Name != NULL) && (StrCmp (Name, Info->Name) != 0)) {
2467       continue;
2468     }
2469-
2470+
2471 #if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
2472     if (Info->NicIp4Config == NULL) {
2473       Status = IfconfigSetNicAddrByHii (Info, NULL);
2474@@ -1717,6 +1717,7 @@
2475 #if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
2476   if (EFI_ERROR (Status)) {
2477     Status = IfconfigGetAllNicInfoByHii (ImageHandle);
2478+
2479     if (EFI_ERROR (Status)) {
2480       if (mIp4ConfigExist) {
2481         PrintToken (STRING_TOKEN (STR_IFCONFIG_GET_NIC_FAIL), HiiHandle, Status);
2482@@ -1726,7 +1727,7 @@
2483
2484       return EFI_NOT_FOUND;
2485     }
2486-  }
2487+  }
2488 #else
2489   if (EFI_ERROR (Status)) {
2490     if (mIp4ConfigExist) {
2491diff --ignore-file-name-case -Naur ShellR33/IfConfig/IfConfig.inf GccShellR33/IfConfig/IfConfig.inf
2492--- ShellR33/IfConfig/IfConfig.inf	2007-06-25 02:05:05.000000000 -0700
2493+++ GccShellR33/IfConfig/IfConfig.inf	2009-09-22 15:37:05.000000000 -0700
2494@@ -25,7 +25,7 @@
2495 COMPONENT_TYPE       = APPLICATION
2496
2497 [sources.common]
2498-  ..\ShCommonStrings.uni
2499+  ../ShCommonStrings.uni
2500   IfConfigStrings.uni
2501   IfConfig.c
2502   IfConfig.h
2503@@ -33,25 +33,25 @@
2504   ShellNetHelper.h
2505
2506 [includes.common]
2507-  ..\Inc
2508-  ..\Library
2509-  $(EDK_SOURCE)\Foundation\Efi
2510-  $(EDK_SOURCE)\Foundation
2511-  $(EDK_SOURCE)\Foundation\Efi\Include
2512-  $(EDK_SOURCE)\Foundation\Include
2513-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
2514-  $(EDK_SOURCE)\Foundation\FrameWork
2515-  $(EDK_SOURCE)\Foundation\FrameWork\Include
2516-  $(EDK_SOURCE)\Foundation\Core\Dxe
2517-  $(EDK_SOURCE)\Foundation\Library\Dxe\Include
2518-  $(DEST_DIR)\
2519+  ../Inc
2520+  ../Library
2521+  $(EDK_SOURCE)/Foundation/Efi
2522+  $(EDK_SOURCE)/Foundation
2523+  $(EDK_SOURCE)/Foundation/Efi/Include
2524+  $(EDK_SOURCE)/Foundation/Include
2525+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
2526+  $(EDK_SOURCE)/Foundation/FrameWork
2527+  $(EDK_SOURCE)/Foundation/FrameWork/Include
2528+  $(EDK_SOURCE)/Foundation/Core/Dxe
2529+  $(EDK_SOURCE)/Foundation/Library/Dxe/Include
2530+  $(DEST_DIR)/
2531
2532 [libraries.common]
2533   EfiShellLib
2534   EdkProtocolLib
2535   EfiProtocolLib
2536   EdkGuidLib
2537-  EfiDriverLib
2538+#  EfiDriverLib
2539
2540 [nmake.common]
2541   C_PROJ_FLAGS = $(C_PROJ_FLAGS)
2542diff --ignore-file-name-case -Naur ShellR33/inc/shellenv.h GccShellR33/inc/shellenv.h
2543--- ShellR33/inc/shellenv.h	2005-08-23 00:16:36.000000000 -0700
2544+++ GccShellR33/inc/shellenv.h	2009-09-22 15:37:05.000000000 -0700
2545@@ -122,15 +122,6 @@
2546   IN SHELLCMD_GET_LINE_HELP       GetLineHelp
2547   );
2548
2549-//
2550-// Add to shell environment protocol information & protocol information dump handlers
2551-//
2552-typedef
2553-VOID
2554-(EFIAPI *SHELLENV_DUMP_PROTOCOL_INFO) (
2555-  IN EFI_HANDLE                   Handle,
2556-  IN VOID                         *Interface
2557-  );
2558
2559 typedef
2560 VOID
2561diff --ignore-file-name-case -Naur ShellR33/inc/shelltypes.h GccShellR33/inc/shelltypes.h
2562--- ShellR33/inc/shelltypes.h	2006-02-09 00:05:29.000000000 -0800
2563+++ GccShellR33/inc/shelltypes.h	2009-10-14 16:36:30.000000000 -0700
2564@@ -36,7 +36,7 @@
2565 #endif
2566
2567 #include "Tiano.h"
2568-#include "linkedlist.h"
2569+#include "LinkedList.h"
2570
2571 #include EFI_PROTOCOL_DEFINITION (FileInfo)
2572 #include EFI_PROTOCOL_DEFINITION (SimpleFileSystem)
2573@@ -148,12 +148,6 @@
2574   EFI_FILE_INFO             *Info;
2575 } SHELL_FILE_ARG;
2576
2577-typedef
2578-VOID
2579-(EFIAPI *SHELLENV_DUMP_PROTOCOL_INFO) (
2580-  IN EFI_HANDLE                   Handle,
2581-  IN VOID                         *Interface
2582-  );
2583
2584 typedef
2585 EFI_STATUS
2586diff --ignore-file-name-case -Naur ShellR33/IpConfig/IpConfig.c GccShellR33/IpConfig/IpConfig.c
2587--- ShellR33/IpConfig/IpConfig.c	2006-08-07 02:14:38.000000000 -0700
2588+++ GccShellR33/IpConfig/IpConfig.c	2009-11-05 13:49:56.000000000 -0800
2589@@ -39,7 +39,7 @@
2590 //
2591 // Global Variables
2592 //
2593-EFI_HII_HANDLE  HiiHandle;
2594+static EFI_HII_HANDLE  HiiHandle;
2595 EFI_GUID        EfiIpConfigGuid = EFI_IPCONFIG_GUID;
2596 SHELL_VAR_CHECK_ITEM  IpconfigCheckList[] = {
2597   {
2598diff --ignore-file-name-case -Naur ShellR33/IpConfig/IpConfig.h GccShellR33/IpConfig/IpConfig.h
2599--- ShellR33/IpConfig/IpConfig.h	2005-08-23 00:16:36.000000000 -0700
2600+++ GccShellR33/IpConfig/IpConfig.h	2009-11-05 13:49:56.000000000 -0800
2601@@ -29,4 +29,4 @@
2602     0x8252915c, 0xf1e9, 0x435c, 0x81, 0x91, 0xad, 0x2f, 0x82, 0x62, 0x23, 0x73 \
2603   }
2604
2605-#endif
2606\ No newline at end of file
2607+#endif
2608diff --ignore-file-name-case -Naur ShellR33/IpConfig/IpConfig.inf GccShellR33/IpConfig/IpConfig.inf
2609--- ShellR33/IpConfig/IpConfig.inf	2005-08-23 00:16:36.000000000 -0700
2610+++ GccShellR33/IpConfig/IpConfig.inf	2009-09-22 15:37:05.000000000 -0700
2611@@ -25,24 +25,24 @@
2612 COMPONENT_TYPE       = APPLICATION
2613
2614 [sources.common]
2615-  ..\ShCommonStrings.uni
2616+  ../ShCommonStrings.uni
2617   IpConfigStrings.uni
2618   IpConfig.c
2619   IpConfig.h
2620
2621 [includes.common]
2622   .
2623-  ..\Inc
2624-  ..\Library
2625-  $(EDK_SOURCE)\Foundation
2626-  $(EDK_SOURCE)\Foundation\Include
2627-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
2628-  $(EDK_SOURCE)\Foundation\Efi
2629-  $(EDK_SOURCE)\Foundation\Efi\Include
2630-  $(EDK_SOURCE)\Foundation\FrameWork
2631-  $(EDK_SOURCE)\Foundation\FrameWork\Include
2632-  $(EDK_SOURCE)\Foundation\Core\Dxe
2633-  $(DEST_DIR)\
2634+  ../Inc
2635+  ../Library
2636+  $(EDK_SOURCE)/Foundation
2637+  $(EDK_SOURCE)/Foundation/Include
2638+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
2639+  $(EDK_SOURCE)/Foundation/Efi
2640+  $(EDK_SOURCE)/Foundation/Efi/Include
2641+  $(EDK_SOURCE)/Foundation/FrameWork
2642+  $(EDK_SOURCE)/Foundation/FrameWork/Include
2643+  $(EDK_SOURCE)/Foundation/Core/Dxe
2644+  $(DEST_DIR)/
2645
2646 [libraries.common]
2647   EfiShellLib
2648diff --ignore-file-name-case -Naur ShellR33/Library/Arm/EfiLibPlat.h GccShellR33/Library/Arm/EfiLibPlat.h
2649--- ShellR33/Library/Arm/EfiLibPlat.h	1969-12-31 16:00:00.000000000 -0800
2650+++ GccShellR33/Library/Arm/EfiLibPlat.h	2009-11-05 13:49:56.000000000 -0800
2651@@ -0,0 +1,37 @@
2652+/*++
2653+
2654+Copyright (c) 2005, Intel Corporation
2655+All rights reserved. This program and the accompanying materials
2656+are licensed and made available under the terms and conditions of the BSD License
2657+which accompanies this distribution. The full text of the license may be found at
2658+http://opensource.org/licenses/bsd-license.php
2659+
2660+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
2661+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
2662+
2663+Module Name:
2664+
2665+    efilibplat.h
2666+
2667+Abstract:
2668+
2669+    EFI to compile bindings
2670+
2671+
2672+
2673+
2674+Revision History
2675+
2676+--*/
2677+#ifndef _EFI_LIB_PLAT_H_
2678+#define _EFI_LIB_PLAT_H_
2679+
2680+VOID
2681+InitializeLibPlatform (
2682+  IN EFI_HANDLE           ImageHandle,
2683+  IN EFI_SYSTEM_TABLE     *SystemTable
2684+  );
2685+
2686+#define MIN_ALIGNMENT_SIZE  4
2687+
2688+#endif
2689diff --ignore-file-name-case -Naur ShellR33/Library/ConsistMapping.c GccShellR33/Library/ConsistMapping.c
2690--- ShellR33/Library/ConsistMapping.c	2008-11-24 21:49:58.000000000 -0800
2691+++ GccShellR33/Library/ConsistMapping.c	2009-09-22 19:19:20.000000000 -0700
2692@@ -21,7 +21,7 @@
2693
2694 --*/
2695
2696-#include "EfiShelllib.h"
2697+#include "EfiShellLib.h"
2698
2699 MTD_NAME  mMTDName[] = {
2700   {
2701diff --ignore-file-name-case -Naur ShellR33/Library/ConsistMapping.h GccShellR33/Library/ConsistMapping.h
2702--- ShellR33/Library/ConsistMapping.h	2005-08-23 00:16:36.000000000 -0700
2703+++ GccShellR33/Library/ConsistMapping.h	2009-11-05 13:49:56.000000000 -0800
2704@@ -79,4 +79,4 @@
2705   IN  VOID *Buffer2
2706   );
2707
2708-#endif
2709\ No newline at end of file
2710+#endif
2711diff --ignore-file-name-case -Naur ShellR33/Library/CRC.c GccShellR33/Library/CRC.c
2712--- ShellR33/Library/CRC.c	2005-08-23 00:16:36.000000000 -0700
2713+++ GccShellR33/Library/CRC.c	2009-09-22 19:19:20.000000000 -0700
2714@@ -21,7 +21,7 @@
2715
2716 --*/
2717
2718-#include "EfiShelllib.h"
2719+#include "EfiShellLib.h"
2720
2721 UINT32  CRCTable[256] = {
2722   0x00000000,
2723diff --ignore-file-name-case -Naur ShellR33/Library/CRC.h GccShellR33/Library/CRC.h
2724--- ShellR33/Library/CRC.h	2005-08-23 00:16:36.000000000 -0700
2725+++ GccShellR33/Library/CRC.h	2009-11-05 13:49:56.000000000 -0800
2726@@ -53,4 +53,4 @@
2727   UINTN Size
2728   );
2729
2730-#endif
2731\ No newline at end of file
2732+#endif
2733diff --ignore-file-name-case -Naur ShellR33/Library/Data.c GccShellR33/Library/Data.c
2734--- ShellR33/Library/Data.c	2007-03-15 20:07:49.000000000 -0700
2735+++ GccShellR33/Library/Data.c	2009-09-22 19:19:20.000000000 -0700
2736@@ -21,7 +21,7 @@
2737
2738 --*/
2739
2740-#include "EfiShelllib.h"
2741+#include "EfiShellLib.h"
2742
2743 //
2744 // ShellLibInitialized - TRUE once InitializeShellLib() is called for the first time
2745diff --ignore-file-name-case -Naur ShellR33/Library/DPath.c GccShellR33/Library/DPath.c
2746--- ShellR33/Library/DPath.c	2008-11-24 21:49:58.000000000 -0800
2747+++ GccShellR33/Library/DPath.c	2009-09-22 19:19:20.000000000 -0700
2748@@ -20,7 +20,7 @@
2749
2750 --*/
2751
2752-#include "EfiShelllib.h"
2753+#include "EfiShellLib.h"
2754
2755 EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid = DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL;
2756
2757@@ -1468,7 +1468,7 @@
2758
2759   Status = LibLocateProtocol (
2760              &gEfiDevicePathToTextProtocolGuid,
2761-             &DevPathToText
2762+             (VOID **)&DevPathToText
2763              );
2764   if (!EFI_ERROR (Status)) {
2765     ToText = DevPathToText->ConvertDevicePathToText (
2766diff --ignore-file-name-case -Naur ShellR33/Library/DPath.h GccShellR33/Library/DPath.h
2767--- ShellR33/Library/DPath.h	2008-10-06 00:03:04.000000000 -0700
2768+++ GccShellR33/Library/DPath.h	2009-09-22 15:37:05.000000000 -0700
2769@@ -24,7 +24,7 @@
2770 #ifndef _D_PATH_H
2771 #define _D_PATH_H
2772
2773-#define NextStrA(a) ((UINT8 *) (((UINT8 *) (a)) + strlena (a) + 1))
2774+#define NextStrA(a) ((CHAR8 *) (((UINT8 *) (a)) + strlena (a) + 1))
2775
2776 #include EFI_GUID_DEFINITION (PcAnsi)
2777
2778diff --ignore-file-name-case -Naur ShellR33/Library/EfiShellLib.h GccShellR33/Library/EfiShellLib.h
2779--- ShellR33/Library/EfiShellLib.h	2009-05-27 01:55:16.000000000 -0700
2780+++ GccShellR33/Library/EfiShellLib.h	2009-09-22 16:16:30.000000000 -0700
2781@@ -25,7 +25,7 @@
2782 #define _EFI_SHELL_LIB_INCLUDE_
2783
2784 #include "Tiano.h"
2785-#include "ShellEnv.h"
2786+#include "shellenv.h"
2787 #include "pci22.h"
2788
2789 #include EFI_ARCH_PROTOCOL_DEFINITION (Bds)
2790@@ -51,7 +51,7 @@
2791 #include EFI_GUID_DEFINITION (PrimaryConsoleOutDevice)
2792 #include EFI_GUID_DEFINITION (PrimaryStandardErrorDevice)
2793 #include EFI_GUID_DEFINITION (SalSystemTable)
2794-#include EFI_GUID_DEFINITION (Smbios)
2795+#include EFI_GUID_DEFINITION (SmBios)
2796 #include EFI_GUID_DEFINITION (StandardErrorDevice)
2797 #include EFI_GUID_DEFINITION (FrameworkDevicePath)
2798 #include EFI_PROTOCOL_DEFINITION (AbsolutePointer)
2799@@ -67,7 +67,7 @@
2800 #include EFI_PROTOCOL_DEFINITION (DebugPort)
2801 #include EFI_PROTOCOL_DEFINITION (DebugSupport)
2802 #include EFI_PROTOCOL_DEFINITION (Decompress)
2803-#include EFI_PROTOCOL_DEFINITION (DeviceIO)
2804+#include EFI_PROTOCOL_DEFINITION (DeviceIo)
2805 #include EFI_PROTOCOL_DEFINITION (DevicePath)
2806 #include EFI_PROTOCOL_DEFINITION (DevicePathFromText)
2807 #include EFI_PROTOCOL_DEFINITION (DevicePathToText)
2808@@ -111,7 +111,7 @@
2809 #include EFI_PROTOCOL_DEFINITION (PciRootBridgeIo)
2810 #include EFI_PROTOCOL_DEFINITION (PlatformDriverOverride)
2811 #include EFI_PROTOCOL_DEFINITION (PxeBaseCode)
2812-#include EFI_PROTOCOL_DEFINITION (PxeBaseCodeCallback)
2813+#include EFI_PROTOCOL_DEFINITION (PxeBaseCodeCallBack)
2814 #include EFI_PROTOCOL_DEFINITION (ScsiIo)
2815 #include EFI_PROTOCOL_DEFINITION (ScsiPassThru)
2816 #include EFI_PROTOCOL_DEFINITION (SectionExtraction)
2817@@ -151,8 +151,8 @@
2818 #include EFI_PROTOCOL_DEFINITION (DriverSupportedEfiVersion)
2819 #include EFI_PROTOCOL_DEFINITION (PlatformToDriverConfiguration)
2820
2821-#include "efilibplat.h"
2822-#include "efipart.h"
2823+#include "EfiLibPlat.h"
2824+#include "EfiPart.h"
2825 #include "ShellDebug.h"
2826 #include "CRC.h"
2827 #include "DPath.h"
2828diff --ignore-file-name-case -Naur ShellR33/Library/EfiShellLib.inf GccShellR33/Library/EfiShellLib.inf
2829--- ShellR33/Library/EfiShellLib.inf	2008-08-13 23:02:46.000000000 -0700
2830+++ GccShellR33/Library/EfiShellLib.inf	2009-11-07 12:33:52.000000000 -0800
2831@@ -45,34 +45,42 @@
2832   HiiSupport.c
2833
2834 [sources.ia32]
2835-  ia32\math.c
2836-  ia32\initplat.c
2837+  IA32/math.c
2838+  IA32/initplat.c
2839+  IA32/DivU64x32Remainder.S | GCC
2840+  IA32/LShiftU64.S          | GCC
2841+  IA32/RShiftU64.S          | GCC
2842+  IA32/MultU64x32.S         | GCC
2843
2844 [sources.ipf]
2845-  ipf\math.c
2846-  ipf\initplat.c
2847-  ipf\palproc.s
2848-  ipf\salpal.c
2849+  IPF/math.c
2850+  IPF/initplat.c
2851+  IPF/palproc.s
2852+  IPF/salpal.c
2853
2854 [sources.EBC]
2855-  EBC\math.c
2856-  EBC\initplat.c
2857+  Ebc/math.c
2858+  Ebc/initplat.c
2859
2860 [sources.x64]
2861-  ipf\math.c
2862-  ia32\initplat.c
2863+  IPF/math.c
2864+  IA32/initplat.c
2865+
2866+[sources.ARM]
2867+  IPF/math.c
2868+  IA32/initplat.c
2869
2870 [includes.common]
2871   .
2872-  ..\Inc
2873-  $(EDK_SOURCE)\Foundation
2874-  $(EDK_SOURCE)\Foundation\Include
2875-  $(EDK_SOURCE)\Foundation\Efi
2876-  $(EDK_SOURCE)\Foundation\Efi\Include
2877-  $(EDK_SOURCE)\Foundation\FrameWork
2878-  $(EDK_SOURCE)\Foundation\FrameWork\Include
2879-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
2880-  $(EDK_SOURCE)\Foundation\Core\Dxe
2881+  ../Inc
2882+  $(EDK_SOURCE)/Foundation
2883+  $(EDK_SOURCE)/Foundation/Include
2884+  $(EDK_SOURCE)/Foundation/Efi
2885+  $(EDK_SOURCE)/Foundation/Efi/Include
2886+  $(EDK_SOURCE)/Foundation/FrameWork
2887+  $(EDK_SOURCE)/Foundation/FrameWork/Include
2888+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
2889+  $(EDK_SOURCE)/Foundation/Core/Dxe
2890
2891 [libraries.common]
2892   EdkFrameworkProtocolLib
2893diff --ignore-file-name-case -Naur ShellR33/Library/Event.c GccShellR33/Library/Event.c
2894--- ShellR33/Library/Event.c	2007-03-15 20:07:49.000000000 -0700
2895+++ GccShellR33/Library/Event.c	2009-09-22 19:19:20.000000000 -0700
2896@@ -21,7 +21,7 @@
2897
2898 --*/
2899
2900-#include "EfiShelllib.h"
2901+#include "EfiShellLib.h"
2902
2903 EFI_EVENT
2904 LibCreateProtocolNotifyEvent (
2905diff --ignore-file-name-case -Naur ShellR33/Library/Event.h GccShellR33/Library/Event.h
2906--- ShellR33/Library/Event.h	2007-03-15 20:07:49.000000000 -0700
2907+++ GccShellR33/Library/Event.h	2009-11-05 13:49:56.000000000 -0800
2908@@ -50,4 +50,4 @@
2909   OUT EFI_INPUT_KEY                 *Key
2910   );
2911
2912-#endif
2913\ No newline at end of file
2914+#endif
2915diff --ignore-file-name-case -Naur ShellR33/Library/FileIO.c GccShellR33/Library/FileIO.c
2916--- ShellR33/Library/FileIO.c	2008-08-13 23:02:46.000000000 -0700
2917+++ GccShellR33/Library/FileIO.c	2009-09-22 19:19:20.000000000 -0700
2918@@ -21,7 +21,7 @@
2919
2920 --*/
2921
2922-#include "EfiShelllib.h"
2923+#include "EfiShellLib.h"
2924
2925 typedef struct _PATH_COMPONENTS {
2926   CHAR16                  *Name;
2927diff --ignore-file-name-case -Naur ShellR33/Library/FileIO.h GccShellR33/Library/FileIO.h
2928--- ShellR33/Library/FileIO.h	2005-08-23 00:16:36.000000000 -0700
2929+++ GccShellR33/Library/FileIO.h	2009-11-05 13:49:56.000000000 -0800
2930@@ -208,4 +208,4 @@
2931   IN SIMPLE_READ_FILE               SimpleReadHandle
2932   );
2933
2934-#endif
2935\ No newline at end of file
2936+#endif
2937diff --ignore-file-name-case -Naur ShellR33/Library/Handle.c GccShellR33/Library/Handle.c
2938--- ShellR33/Library/Handle.c	2008-08-13 23:02:46.000000000 -0700
2939+++ GccShellR33/Library/Handle.c	2009-09-22 19:19:20.000000000 -0700
2940@@ -21,7 +21,7 @@
2941
2942 --*/
2943
2944-#include "EfiShelllib.h"
2945+#include "EfiShellLib.h"
2946
2947 EFI_STATUS
2948 LibLocateHandle (
2949diff --ignore-file-name-case -Naur ShellR33/Library/HiiSupport.c GccShellR33/Library/HiiSupport.c
2950--- ShellR33/Library/HiiSupport.c	2008-08-13 23:02:46.000000000 -0700
2951+++ GccShellR33/Library/HiiSupport.c	2009-09-22 19:19:20.000000000 -0700
2952@@ -21,7 +21,7 @@
2953
2954 --*/
2955
2956-#include "EfiShelllib.h"
2957+#include "EfiShellLib.h"
2958
2959 #if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
2960
2961@@ -56,11 +56,11 @@
2962     return EFI_SUCCESS;
2963   }
2964
2965-  Status = LibLocateProtocol (&gEfiHiiDatabaseProtocolGuid, &gLibHiiDatabase);
2966+  Status = LibLocateProtocol (&gEfiHiiDatabaseProtocolGuid, (VOID **)&gLibHiiDatabase);
2967   if (EFI_ERROR (Status)) {
2968     return Status;
2969   }
2970-  Status = LibLocateProtocol (&gEfiHiiStringProtocolGuid, &gLibHiiString);
2971+  Status = LibLocateProtocol (&gEfiHiiStringProtocolGuid, (VOID **)&gLibHiiString);
2972   if (EFI_ERROR (Status)) {
2973     return Status;
2974   }
2975diff --ignore-file-name-case -Naur ShellR33/Library/IA32/efilibplat.h GccShellR33/Library/IA32/efilibplat.h
2976--- ShellR33/Library/IA32/efilibplat.h	2005-08-23 00:16:36.000000000 -0700
2977+++ GccShellR33/Library/IA32/efilibplat.h	1969-12-31 16:00:00.000000000 -0800
2978@@ -1,37 +0,0 @@
2979-/*++
2980-
2981-Copyright (c) 2005, Intel Corporation
2982-All rights reserved. This program and the accompanying materials
2983-are licensed and made available under the terms and conditions of the BSD License
2984-which accompanies this distribution. The full text of the license may be found at
2985-http://opensource.org/licenses/bsd-license.php
2986-
2987-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
2988-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
2989-
2990-Module Name:
2991-
2992-    efilibplat.h
2993-
2994-Abstract:
2995-
2996-    EFI to compile bindings
2997-
2998-
2999-
3000-
3001-Revision History
3002-
3003---*/
3004-#ifndef _EFI_LIB_PLAT_H_
3005-#define _EFI_LIB_PLAT_H_
3006-
3007-VOID
3008-InitializeLibPlatform (
3009-  IN EFI_HANDLE           ImageHandle,
3010-  IN EFI_SYSTEM_TABLE     *SystemTable
3011-  );
3012-
3013-#define MIN_ALIGNMENT_SIZE  4
3014-
3015-#endif
3016\ No newline at end of file
3017diff --ignore-file-name-case -Naur ShellR33/Library/IA32/initplat.c GccShellR33/Library/IA32/initplat.c
3018--- ShellR33/Library/IA32/initplat.c	2005-08-23 00:16:36.000000000 -0700
3019+++ GccShellR33/Library/IA32/initplat.c	1969-12-31 16:00:00.000000000 -0800
3020@@ -1,35 +0,0 @@
3021-/*++
3022-
3023-Copyright (c) 2005, Intel Corporation
3024-All rights reserved. This program and the accompanying materials
3025-are licensed and made available under the terms and conditions of the BSD License
3026-which accompanies this distribution. The full text of the license may be found at
3027-http://opensource.org/licenses/bsd-license.php
3028-
3029-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
3030-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
3031-
3032-Module Name:
3033-
3034-    initplat.c
3035-
3036-Abstract:
3037-
3038-
3039-
3040-
3041-Revision History
3042-
3043---*/
3044-
3045-#include "EfiShellLib.h"
3046-
3047-VOID
3048-InitializeLibPlatform (
3049-  IN EFI_HANDLE           ImageHandle,
3050-  IN EFI_SYSTEM_TABLE     *SystemTable
3051-  )
3052-
3053-{
3054-  return;
3055-}
3056diff --ignore-file-name-case -Naur ShellR33/Library/IA32/math.c GccShellR33/Library/IA32/math.c
3057--- ShellR33/Library/IA32/math.c	2005-08-23 00:16:36.000000000 -0700
3058+++ GccShellR33/Library/IA32/math.c	1969-12-31 16:00:00.000000000 -0800
3059@@ -1,217 +0,0 @@
3060-/*++
3061-
3062-Copyright (c) 2005, Intel Corporation
3063-All rights reserved. This program and the accompanying materials
3064-are licensed and made available under the terms and conditions of the BSD License
3065-which accompanies this distribution. The full text of the license may be found at
3066-http://opensource.org/licenses/bsd-license.php
3067-
3068-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
3069-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
3070-
3071-Module Name:
3072-
3073-    math.c
3074-
3075-Abstract:
3076-
3077-
3078-
3079-
3080-Revision History
3081-
3082---*/
3083-
3084-#include "EfiShellLib.h"
3085-
3086-//
3087-//
3088-//
3089-UINT64
3090-LShiftU64 (
3091-  IN UINT64   Operand,
3092-  IN UINTN    Count
3093-  )
3094-/*++
3095-Routine Description:
3096-
3097-  Left shift 64bit by 32bit and get a 64bit result
3098-
3099-Arguments:
3100-
3101-  Operand - Operand
3102-  Count   - Shift count
3103-
3104-Returns:
3105-
3106---*/
3107-{
3108-  UINT64  Result;
3109-  Result = 0;
3110-
3111-  _asm
3112-  {
3113-    mov ecx, Count
3114-    cmp ecx, 64
3115-    jge exit
3116-
3117-    mov eax, dword ptr Operand[0]
3118-    mov edx, dword ptr Operand[4]
3119-
3120-    shld edx, eax, cl
3121-    shl eax, cl
3122-
3123-    cmp ecx, 32
3124-    jc short ls10
3125-
3126-    mov edx, eax
3127-    xor eax, eax
3128-
3129-    ls10 :
3130-    mov dword ptr Result[0], eax
3131-    mov dword ptr Result[4], edx
3132-    exit :
3133-  }
3134-
3135-  return Result;
3136-}
3137-
3138-UINT64
3139-RShiftU64 (
3140-  IN UINT64   Operand,
3141-  IN UINTN    Count
3142-  )
3143-/*++
3144-Routine Description:
3145-
3146-  Right shift 64bit by 32bit and get a 64bit result
3147-
3148-Arguments:
3149-
3150-  Operand - Operand
3151-  Count   - Shift Count
3152-
3153-Returns:
3154-
3155---*/
3156-{
3157-  UINT64  Result;
3158-  Result = 0;
3159-
3160-  _asm
3161-  {
3162-    mov ecx, Count
3163-    cmp ecx, 64
3164-    jge exit
3165-
3166-    mov eax, dword ptr Operand[0]
3167-    mov edx, dword ptr Operand[4]
3168-
3169-    shrd eax, edx, cl
3170-    shr edx, cl
3171-
3172-    cmp ecx, 32
3173-    jc short rs10
3174-
3175-    mov eax, edx
3176-    xor edx, edx
3177-
3178-    rs10 :
3179-    mov dword ptr Result[0], eax
3180-    mov dword ptr Result[4], edx
3181-    exit :
3182-  }
3183-
3184-  return Result;
3185-}
3186-
3187-UINT64
3188-MultU64x32 (
3189-  IN UINT64   Multiplicand,
3190-  IN UINTN    Multiplier
3191-  )
3192-/*++
3193-Routine Description:
3194-
3195-  Multiple 64bit by 32bit and get a 64bit result
3196-
3197-Arguments:
3198-
3199-  Multiplicand - Multiplicand
3200-  Multiplier   - Multiplier
3201-
3202-Returns:
3203-
3204---*/
3205-{
3206-  UINT64  Result;
3207-
3208-  _asm
3209-  {
3210-    mov eax, dword ptr Multiplicand[0]
3211-    mul Multiplier
3212-    mov dword ptr Result[0], eax
3213-    mov dword ptr Result[4], edx
3214-    mov eax, dword ptr Multiplicand[4]
3215-    mul Multiplier
3216-    add dword ptr Result[4], eax
3217-  }
3218-
3219-  return Result;
3220-}
3221-
3222-UINT64
3223-DivU64x32 (
3224-  IN UINT64   Dividend,
3225-  IN UINTN    Divisor,
3226-  OUT UINTN   *Remainder OPTIONAL
3227-  )
3228-/*++
3229-Routine Description:
3230-
3231-  divide 64bit by 32bit and get a 64bit result
3232-  N.B. only works for 31bit divisors!!
3233-
3234-Arguments:
3235-
3236-  Dividend  - The dividend
3237-  Divisor   - The divisor
3238-  Remainder - The remainder
3239-
3240-Return:
3241-
3242---*/
3243-{
3244-  UINT32  Rem;
3245-  UINT32  bit;
3246-
3247-  ASSERT (Divisor != 0);
3248-  ASSERT ((Divisor >> 31) == 0);
3249-
3250-  //
3251-  // For each bit in the dividend
3252-  //
3253-  Rem = 0;
3254-  for (bit = 0; bit < 64; bit++) {
3255-    _asm
3256-    {
3257-      shl dword ptr Dividend[0], 1    /*  shift rem:dividend left one */
3258-      rcl dword ptr Dividend[4], 1
3259-      rcl dword ptr Rem, 1
3260-
3261-      mov eax, Rem
3262-      cmp eax, Divisor                /*  Is Rem >= Divisor? */
3263-      cmc                             /*  No - do nothing */
3264-      sbb eax, eax                    /*  Else, */
3265-      sub dword ptr Dividend[0], eax  /*    set low bit in dividen */
3266-      and eax, Divisor                /*  and */
3267-      sub Rem, eax                    /*    subtract divisor */
3268-    }
3269-  }
3270-
3271-  if (Remainder) {
3272-    *Remainder = Rem;
3273-  }
3274-
3275-  return Dividend;
3276-}
3277diff --ignore-file-name-case -Naur ShellR33/Library/IA32/DivU64x32Remainder.S GccShellR33/Library/IA32/DivU64x32Remainder.S
3278--- ShellR33/Library/IA32/DivU64x32Remainder.S	1969-12-31 16:00:00.000000000 -0800
3279+++ GccShellR33/Library/IA32/DivU64x32Remainder.S	2009-10-13 20:18:23.000000000 -0700
3280@@ -0,0 +1,58 @@
3281+#------------------------------------------------------------------------------
3282+#
3283+# Copyright (c) 2006, Intel Corporation
3284+# All rights reserved. This program and the accompanying materials
3285+# are licensed and made available under the terms and conditions of the BSD License
3286+# which accompanies this distribution.  The full text of the license may be found at
3287+# http://opensource.org/licenses/bsd-license.php
3288+#
3289+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
3290+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
3291+#
3292+# Module Name:
3293+#
3294+#   DivError.asm
3295+#
3296+# Abstract:
3297+#
3298+#   Set error flag for all division functions
3299+#
3300+#------------------------------------------------------------------------------
3301+
3302+  ///
3303+  /// Private worker functions for ASM_PFX()
3304+  ///
3305+  #define _CONCATENATE(a, b)  __CONCATENATE(a, b)
3306+  #define __CONCATENATE(a, b) a ## b
3307+
3308+  ///
3309+  /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
3310+  /// on symbols in assembly language.
3311+  ///
3312+  #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
3313+
3314+.globl ASM_PFX(InternalMathDivRemU64x32)
3315+
3316+#------------------------------------------------------------------------------
3317+# UINT64
3318+# EFIAPI
3319+# InternalMathDivRemU64x32 (
3320+#   IN      UINT64                    Dividend,
3321+#   IN      UINT32                    Divisor,
3322+#   OUT     UINT32                    *Remainder
3323+#   );
3324+#------------------------------------------------------------------------------
3325+ASM_PFX(InternalMathDivRemU64x32):
3326+    movl    12(%esp), %ecx
3327+    movl    8(%esp), %eax
3328+    xorl    %edx, %edx
3329+    divl    %ecx
3330+    push    %eax
3331+    movl    8(%esp), %eax
3332+    divl    %ecx
3333+    movl    20(%esp), %ecx
3334+    jecxz   L1
3335+    movl    %edx, (%ecx)
3336+L1:
3337+    pop     %edx
3338+    ret
3339diff --ignore-file-name-case -Naur ShellR33/Library/IA32/EfiLibPlat.h GccShellR33/Library/IA32/EfiLibPlat.h
3340--- ShellR33/Library/IA32/EfiLibPlat.h	1969-12-31 16:00:00.000000000 -0800
3341+++ GccShellR33/Library/IA32/EfiLibPlat.h	2009-11-10 11:17:48.000000000 -0800
3342@@ -0,0 +1,37 @@
3343+/*++
3344+
3345+Copyright (c) 2005, Intel Corporation
3346+All rights reserved. This program and the accompanying materials
3347+are licensed and made available under the terms and conditions of the BSD License
3348+which accompanies this distribution. The full text of the license may be found at
3349+http://opensource.org/licenses/bsd-license.php
3350+
3351+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
3352+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
3353+
3354+Module Name:
3355+
3356+    efilibplat.h
3357+
3358+Abstract:
3359+
3360+    EFI to compile bindings
3361+
3362+
3363+
3364+
3365+Revision History
3366+
3367+--*/
3368+#ifndef _EFI_LIB_PLAT_H_
3369+#define _EFI_LIB_PLAT_H_
3370+
3371+VOID
3372+InitializeLibPlatform (
3373+  IN EFI_HANDLE           ImageHandle,
3374+  IN EFI_SYSTEM_TABLE     *SystemTable
3375+  );
3376+
3377+#define MIN_ALIGNMENT_SIZE  4
3378+
3379+#endif
3380\ No newline at end of file
3381diff --ignore-file-name-case -Naur ShellR33/Library/IA32/initplat.c GccShellR33/Library/IA32/initplat.c
3382--- ShellR33/Library/IA32/initplat.c	1969-12-31 16:00:00.000000000 -0800
3383+++ GccShellR33/Library/IA32/initplat.c	2009-09-22 15:37:05.000000000 -0700
3384@@ -0,0 +1,35 @@
3385+/*++
3386+
3387+Copyright (c) 2005, Intel Corporation
3388+All rights reserved. This program and the accompanying materials
3389+are licensed and made available under the terms and conditions of the BSD License
3390+which accompanies this distribution. The full text of the license may be found at
3391+http://opensource.org/licenses/bsd-license.php
3392+
3393+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
3394+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
3395+
3396+Module Name:
3397+
3398+    initplat.c
3399+
3400+Abstract:
3401+
3402+
3403+
3404+
3405+Revision History
3406+
3407+--*/
3408+
3409+#include "EfiShellLib.h"
3410+
3411+VOID
3412+InitializeLibPlatform (
3413+  IN EFI_HANDLE           ImageHandle,
3414+  IN EFI_SYSTEM_TABLE     *SystemTable
3415+  )
3416+
3417+{
3418+  return;
3419+}
3420diff --ignore-file-name-case -Naur ShellR33/Library/IA32/LShiftU64.S GccShellR33/Library/IA32/LShiftU64.S
3421--- ShellR33/Library/IA32/LShiftU64.S	1969-12-31 16:00:00.000000000 -0800
3422+++ GccShellR33/Library/IA32/LShiftU64.S	2009-09-22 15:37:05.000000000 -0700
3423@@ -0,0 +1,53 @@
3424+#------------------------------------------------------------------------------
3425+#
3426+# Copyright (c) 2006, Intel Corporation
3427+# All rights reserved. This program and the accompanying materials
3428+# are licensed and made available under the terms and conditions of the BSD License
3429+# which accompanies this distribution.  The full text of the license may be found at
3430+# http://opensource.org/licenses/bsd-license.php
3431+#
3432+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
3433+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
3434+#
3435+# Module Name:
3436+#
3437+#   LShiftU64.asm
3438+#
3439+# Abstract:
3440+#
3441+#   64-bit left shift function for IA-32
3442+#
3443+#------------------------------------------------------------------------------
3444+
3445+  ///
3446+  /// Private worker functions for ASM_PFX()
3447+  ///
3448+  #define _CONCATENATE(a, b)  __CONCATENATE(a, b)
3449+  #define __CONCATENATE(a, b) a ## b
3450+
3451+  ///
3452+  /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
3453+  /// on symbols in assembly language.
3454+  ///
3455+  #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
3456+
3457+.globl ASM_PFX(InternalMathLShiftU64)
3458+
3459+#------------------------------------------------------------------------------
3460+# UINT64
3461+# EFIAPI
3462+# InternalMathLShiftU64 (
3463+#   IN      UINT64                    Operand,
3464+#   IN      UINTN                     Count
3465+#   );
3466+#------------------------------------------------------------------------------
3467+ASM_PFX(InternalMathLShiftU64):
3468+    movb    12(%esp), %cl
3469+    xorl    %eax, %eax
3470+    movl    4(%esp), %edx
3471+    testb   $32, %cl
3472+    cmovz   %edx, %eax
3473+    cmovz   0x8(%esp), %edx
3474+    shld    %cl, %eax, %edx
3475+    shl     %cl, %eax
3476+    ret
3477diff --ignore-file-name-case -Naur ShellR33/Library/IA32/math.c GccShellR33/Library/IA32/math.c
3478--- ShellR33/Library/IA32/math.c	1969-12-31 16:00:00.000000000 -0800
3479+++ GccShellR33/Library/IA32/math.c	2009-10-10 13:58:07.000000000 -0700
3480@@ -0,0 +1,267 @@
3481+/*++
3482+
3483+Copyright (c) 2005, Intel Corporation
3484+All rights reserved. This program and the accompanying materials
3485+are licensed and made available under the terms and conditions of the BSD License
3486+which accompanies this distribution. The full text of the license may be found at
3487+http://opensource.org/licenses/bsd-license.php
3488+
3489+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
3490+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
3491+
3492+Module Name:
3493+
3494+    math.c
3495+
3496+Abstract:
3497+
3498+
3499+
3500+
3501+Revision History
3502+
3503+--*/
3504+
3505+#include "EfiShellLib.h"
3506+
3507+#if __GNUC__
3508+
3509+UINT64
3510+InternalMathLShiftU64 (
3511+  IN UINT64   Operand,
3512+  IN UINTN    Count
3513+  );
3514+
3515+UINT64
3516+InternalMathRShiftU64 (
3517+  IN UINT64   Operand,
3518+  IN UINTN    Count
3519+  );
3520+
3521+UINT64
3522+InternalMathMultU64x32 (
3523+  IN UINT64   Multiplicand,
3524+  IN UINTN    Multiplier
3525+  );
3526+
3527+UINT64
3528+InternalMathDivRemU64x32 (
3529+  IN UINT64   Dividend,
3530+  IN UINTN    Divisor,
3531+  OUT UINTN   *Remainder OPTIONAL
3532+  );
3533+
3534+#endif
3535+
3536+//
3537+//
3538+//
3539+UINT64
3540+LShiftU64 (
3541+  IN UINT64   Operand,
3542+  IN UINTN    Count
3543+  )
3544+/*++
3545+Routine Description:
3546+
3547+  Left shift 64bit by 32bit and get a 64bit result
3548+
3549+Arguments:
3550+
3551+  Operand - Operand
3552+  Count   - Shift count
3553+
3554+Returns:
3555+
3556+--*/
3557+{
3558+#if __GNUC__
3559+  return InternalMathLShiftU64 (Operand, Count);
3560+#else
3561+  UINT64  Result;
3562+  Result = 0;
3563+
3564+  _asm
3565+  {
3566+    mov ecx, Count
3567+    cmp ecx, 64
3568+    jge exit
3569+
3570+    mov eax, dword ptr Operand[0]
3571+    mov edx, dword ptr Operand[4]
3572+
3573+    shld edx, eax, cl
3574+    shl eax, cl
3575+
3576+    cmp ecx, 32
3577+    jc short ls10
3578+
3579+    mov edx, eax
3580+    xor eax, eax
3581+
3582+    ls10 :
3583+    mov dword ptr Result[0], eax
3584+    mov dword ptr Result[4], edx
3585+    exit :
3586+  }
3587+
3588+  return Result;
3589+#endif
3590+}
3591+
3592+UINT64
3593+RShiftU64 (
3594+  IN UINT64   Operand,
3595+  IN UINTN    Count
3596+  )
3597+/*++
3598+Routine Description:
3599+
3600+  Right shift 64bit by 32bit and get a 64bit result
3601+
3602+Arguments:
3603+
3604+  Operand - Operand
3605+  Count   - Shift Count
3606+
3607+Returns:
3608+
3609+--*/
3610+{
3611+#if __GNUC__
3612+  return InternalMathRShiftU64 (Operand, Count);
3613+#else
3614+  UINT64  Result;
3615+  Result = 0;
3616+
3617+  _asm
3618+  {
3619+    mov ecx, Count
3620+    cmp ecx, 64
3621+    jge exit
3622+
3623+    mov eax, dword ptr Operand[0]
3624+    mov edx, dword ptr Operand[4]
3625+
3626+    shrd eax, edx, cl
3627+    shr edx, cl
3628+
3629+    cmp ecx, 32
3630+    jc short rs10
3631+
3632+    mov eax, edx
3633+    xor edx, edx
3634+
3635+    rs10 :
3636+    mov dword ptr Result[0], eax
3637+    mov dword ptr Result[4], edx
3638+    exit :
3639+  }
3640+
3641+  return Result;
3642+#endif
3643+}
3644+
3645+UINT64
3646+MultU64x32 (
3647+  IN UINT64   Multiplicand,
3648+  IN UINTN    Multiplier
3649+  )
3650+/*++
3651+Routine Description:
3652+
3653+  Multiple 64bit by 32bit and get a 64bit result
3654+
3655+Arguments:
3656+
3657+  Multiplicand - Multiplicand
3658+  Multiplier   - Multiplier
3659+
3660+Returns:
3661+
3662+--*/
3663+{
3664+#if __GNUC__
3665+  return InternalMathMultU64x32 (Multiplicand, Multiplier);
3666+#else
3667+  UINT64  Result;
3668+
3669+  _asm
3670+  {
3671+    mov eax, dword ptr Multiplicand[0]
3672+    mul Multiplier
3673+    mov dword ptr Result[0], eax
3674+    mov dword ptr Result[4], edx
3675+    mov eax, dword ptr Multiplicand[4]
3676+    mul Multiplier
3677+    add dword ptr Result[4], eax
3678+  }
3679+
3680+  return Result;
3681+#endif
3682+}
3683+
3684+UINT64
3685+DivU64x32 (
3686+  IN UINT64   Dividend,
3687+  IN UINTN    Divisor,
3688+  OUT UINTN   *Remainder OPTIONAL
3689+  )
3690+/*++
3691+Routine Description:
3692+
3693+  divide 64bit by 32bit and get a 64bit result
3694+  N.B. only works for 31bit divisors!!
3695+
3696+Arguments:
3697+
3698+  Dividend  - The dividend
3699+  Divisor   - The divisor
3700+  Remainder - The remainder
3701+
3702+Return:
3703+
3704+--*/
3705+{
3706+#if __GNUC__
3707+  ASSERT (Divisor != 0);
3708+  ASSERT ((Divisor >> 31) == 0);
3709+
3710+  return InternalMathDivRemU64x32 (Dividend, Divisor, Remainder);
3711+
3712+#else
3713+  UINT32  Rem;
3714+  UINT32  bit;
3715+
3716+  ASSERT (Divisor != 0);
3717+  ASSERT ((Divisor >> 31) == 0);
3718+
3719+  //
3720+  // For each bit in the dividend
3721+  //
3722+  Rem = 0;
3723+  for (bit = 0; bit < 64; bit++) {
3724+    _asm
3725+    {
3726+      shl dword ptr Dividend[0], 1    /*  shift rem:dividend left one */
3727+      rcl dword ptr Dividend[4], 1
3728+      rcl dword ptr Rem, 1
3729+
3730+      mov eax, Rem
3731+      cmp eax, Divisor                /*  Is Rem >= Divisor? */
3732+      cmc                             /*  No - do nothing */
3733+      sbb eax, eax                    /*  Else, */
3734+      sub dword ptr Dividend[0], eax  /*    set low bit in dividen */
3735+      and eax, Divisor                /*  and */
3736+      sub Rem, eax                    /*    subtract divisor */
3737+    }
3738+  }
3739+
3740+  if (Remainder) {
3741+    *Remainder = Rem;
3742+  }
3743+
3744+  return Dividend;
3745+#endif
3746+}
3747+
3748diff --ignore-file-name-case -Naur ShellR33/Library/IA32/MultU64x32.S GccShellR33/Library/IA32/MultU64x32.S
3749--- ShellR33/Library/IA32/MultU64x32.S	1969-12-31 16:00:00.000000000 -0800
3750+++ GccShellR33/Library/IA32/MultU64x32.S	2009-09-22 15:37:05.000000000 -0700
3751@@ -0,0 +1,53 @@
3752+#------------------------------------------------------------------------------
3753+#
3754+# Copyright (c) 2006, Intel Corporation
3755+# All rights reserved. This program and the accompanying materials
3756+# are licensed and made available under the terms and conditions of the BSD License
3757+# which accompanies this distribution.  The full text of the license may be found at
3758+# http://opensource.org/licenses/bsd-license.php
3759+#
3760+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
3761+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
3762+#
3763+# Module Name:
3764+#
3765+#   MultU64x32.asm
3766+#
3767+# Abstract:
3768+#
3769+#   Calculate the product of a 64-bit integer and a 32-bit integer
3770+#
3771+#------------------------------------------------------------------------------
3772+
3773+  ///
3774+  /// Private worker functions for ASM_PFX()
3775+  ///
3776+  #define _CONCATENATE(a, b)  __CONCATENATE(a, b)
3777+  #define __CONCATENATE(a, b) a ## b
3778+
3779+  ///
3780+  /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
3781+  /// on symbols in assembly language.
3782+  ///
3783+  #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
3784+
3785+    .386:
3786+    .code:
3787+
3788+.globl ASM_PFX(InternalMathMultU64x32)
3789+
3790+#------------------------------------------------------------------------------
3791+# UINT64
3792+# EFIAPI
3793+# InternalMathMultU64x32 (
3794+#   IN      UINT64                    Multiplicand,
3795+#   IN      UINT32                    Multiplier
3796+#   );
3797+#------------------------------------------------------------------------------
3798+ASM_PFX(InternalMathMultU64x32):
3799+    movl    12(%esp), %ecx
3800+    movl    %ecx, %eax
3801+    imull   8(%esp), %ecx
3802+    mull    0x4(%esp)
3803+    addl    %ecx, %edx
3804+    ret
3805diff --ignore-file-name-case -Naur ShellR33/Library/IA32/RShiftU64.S GccShellR33/Library/IA32/RShiftU64.S
3806--- ShellR33/Library/IA32/RShiftU64.S	1969-12-31 16:00:00.000000000 -0800
3807+++ GccShellR33/Library/IA32/RShiftU64.S	2009-09-22 15:37:05.000000000 -0700
3808@@ -0,0 +1,56 @@
3809+#------------------------------------------------------------------------------
3810+#
3811+# Copyright (c) 2006, Intel Corporation
3812+# All rights reserved. This program and the accompanying materials
3813+# are licensed and made available under the terms and conditions of the BSD License
3814+# which accompanies this distribution.  The full text of the license may be found at
3815+# http://opensource.org/licenses/bsd-license.php
3816+#
3817+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
3818+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
3819+#
3820+# Module Name:
3821+#
3822+#   RShiftU64.asm
3823+#
3824+# Abstract:
3825+#
3826+#   64-bit logical right shift function for IA-32
3827+#
3828+#------------------------------------------------------------------------------
3829+
3830+  ///
3831+  /// Private worker functions for ASM_PFX()
3832+  ///
3833+  #define _CONCATENATE(a, b)  __CONCATENATE(a, b)
3834+  #define __CONCATENATE(a, b) a ## b
3835+
3836+  ///
3837+  /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
3838+  /// on symbols in assembly language.
3839+  ///
3840+  #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
3841+
3842+    .686:
3843+    .code:
3844+
3845+.globl ASM_PFX(InternalMathRShiftU64)
3846+
3847+#------------------------------------------------------------------------------
3848+# UINT64
3849+# EFIAPI
3850+# InternalMathRShiftU64 (
3851+#   IN      UINT64                    Operand,
3852+#   IN      UINTN                     Count
3853+#   );
3854+#------------------------------------------------------------------------------
3855+ASM_PFX(InternalMathRShiftU64):
3856+    movb    12(%esp), %cl
3857+    xorl    %edx, %edx
3858+    movl    8(%esp), %eax
3859+    testb   $32, %cl
3860+    cmovz   %eax, %edx
3861+    cmovz   0x4(%esp), %eax
3862+    shrdl   %cl, %edx, %eax
3863+    shr     %cl, %edx
3864+    ret
3865diff --ignore-file-name-case -Naur ShellR33/Library/Init.c GccShellR33/Library/Init.c
3866--- ShellR33/Library/Init.c	2009-05-27 01:55:16.000000000 -0700
3867+++ GccShellR33/Library/Init.c	2009-09-22 19:19:20.000000000 -0700
3868@@ -20,7 +20,7 @@
3869
3870 --*/
3871
3872-#include "EfiShelllib.h"
3873+#include "EfiShellLib.h"
3874
3875 extern EFI_UNICODE_COLLATION_PROTOCOL LibStubUnicodeInterface;
3876
3877diff --ignore-file-name-case -Naur ShellR33/Library/IO.c GccShellR33/Library/IO.c
3878--- ShellR33/Library/IO.c	2008-08-13 23:02:46.000000000 -0700
3879+++ GccShellR33/Library/IO.c	2009-09-22 19:19:20.000000000 -0700
3880@@ -21,7 +21,7 @@
3881
3882 --*/
3883
3884-#include "EfiShelllib.h"
3885+#include "EfiShellLib.h"
3886
3887 #define PRINT_STRING_LEN        1024
3888 #define PRINT_ITEM_BUFFER_LEN   100
3889@@ -1658,7 +1658,7 @@
3890         //
3891         // Adjust the current column and row
3892         //
3893-        ConMoveCursorBackward (LineLength, &Column, &Row);
3894+        ConMoveCursorBackward (LineLength, &Column, (UINTN *)&Row);
3895       }
3896       break;
3897
3898@@ -1708,7 +1708,7 @@
3899         //
3900         if (StrPos) {
3901           StrPos -= 1;
3902-          ConMoveCursorBackward (LineLength, &Column, &Row);
3903+          ConMoveCursorBackward (LineLength, &Column, (UINTN *)&Row);
3904         }
3905         break;
3906
3907@@ -1718,7 +1718,7 @@
3908         //
3909         if (StrPos < Len) {
3910           StrPos += 1;
3911-          ConMoveCursorForward (LineLength, TotalRow, &Column, &Row);
3912+          ConMoveCursorForward (LineLength, TotalRow, &Column, (UINTN *)&Row);
3913         }
3914         break;
3915
3916@@ -1913,8 +1913,8 @@
3917   ST->ConOut->QueryMode (
3918                 ST->ConOut,
3919                 ST->ConOut->Mode->Mode,
3920-                &mPrintMode.MaxColumn,
3921-                &mPrintMode.MaxRow
3922+                (UINTN *)&mPrintMode.MaxColumn,
3923+                (UINTN *)&mPrintMode.MaxRow
3924                 );
3925
3926   mPrintMode.Row = StartRow;
3927@@ -1928,8 +1928,6 @@
3928   return mPrintMode.PageBreak;
3929 }
3930
3931-STATIC
3932-
3933 BOOLEAN
3934 GetOutputPause (
3935   VOID
3936diff --ignore-file-name-case -Naur ShellR33/Library/IO.h GccShellR33/Library/IO.h
3937--- ShellR33/Library/IO.h	2005-08-23 00:16:36.000000000 -0700
3938+++ GccShellR33/Library/IO.h	2009-11-05 13:49:56.000000000 -0800
3939@@ -157,4 +157,4 @@
3940   );
3941
3942
3943-#endif
3944\ No newline at end of file
3945+#endif
3946diff --ignore-file-name-case -Naur ShellR33/Library/IPF/libsalpal.h GccShellR33/Library/IPF/libsalpal.h
3947--- ShellR33/Library/IPF/libsalpal.h	2005-08-23 00:16:36.000000000 -0700
3948+++ GccShellR33/Library/IPF/libsalpal.h	2009-11-05 13:49:56.000000000 -0800
3949@@ -74,4 +74,4 @@
3950   IN  UINT64    Arg8
3951   );
3952
3953-#endif
3954\ No newline at end of file
3955+#endif
3956diff --ignore-file-name-case -Naur ShellR33/Library/Lock.c GccShellR33/Library/Lock.c
3957--- ShellR33/Library/Lock.c	2005-08-23 00:16:36.000000000 -0700
3958+++ GccShellR33/Library/Lock.c	2009-09-22 19:19:20.000000000 -0700
3959@@ -21,7 +21,7 @@
3960
3961 --*/
3962
3963-#include "EfiShelllib.h"
3964+#include "EfiShellLib.h"
3965
3966 VOID
3967 InitializeLock (
3968diff --ignore-file-name-case -Naur ShellR33/Library/Lock.h GccShellR33/Library/Lock.h
3969--- ShellR33/Library/Lock.h	2005-08-23 00:16:36.000000000 -0700
3970+++ GccShellR33/Library/Lock.h	2009-11-05 13:49:56.000000000 -0800
3971@@ -45,4 +45,4 @@
3972   IN FLOCK    *Lock
3973   );
3974
3975-#endif
3976\ No newline at end of file
3977+#endif
3978diff --ignore-file-name-case -Naur ShellR33/Library/Mem.c GccShellR33/Library/Mem.c
3979--- ShellR33/Library/Mem.c	2006-06-12 23:18:21.000000000 -0700
3980+++ GccShellR33/Library/Mem.c	2009-09-22 19:19:20.000000000 -0700
3981@@ -21,7 +21,7 @@
3982
3983 --*/
3984
3985-#include "EfiShelllib.h"
3986+#include "EfiShellLib.h"
3987
3988 VOID
3989 SetMem (
3990diff --ignore-file-name-case -Naur ShellR33/Library/Mem.h GccShellR33/Library/Mem.h
3991--- ShellR33/Library/Mem.h	2005-08-23 00:16:36.000000000 -0700
3992+++ GccShellR33/Library/Mem.h	2009-11-05 13:49:56.000000000 -0800
3993@@ -73,4 +73,4 @@
3994   IN UINTN    Size
3995   );
3996
3997-#endif
3998\ No newline at end of file
3999+#endif
4000diff --ignore-file-name-case -Naur ShellR33/Library/Misc.c GccShellR33/Library/Misc.c
4001--- ShellR33/Library/Misc.c	2009-08-13 22:57:02.000000000 -0700
4002+++ GccShellR33/Library/Misc.c	2009-09-22 19:19:20.000000000 -0700
4003@@ -21,7 +21,7 @@
4004
4005 --*/
4006
4007-#include "EfiShelllib.h"
4008+#include "EfiShellLib.h"
4009
4010 #if (PLATFORM == NT32)
4011 #define LOCAL_EFI_WIN_NT_THUNK_PROTOCOL_GUID \
4012@@ -51,7 +51,309 @@
4013
4014 #define DEFAULT_FORM_BUFFER_SIZE  0xFFFF
4015
4016-STATIC EFI_SHELL_ENVIRONMENT  *mShellEnv = NULL;
4017+struct {
4018+  EFI_GUID  *Guid;
4019+  CHAR16    *GuidName;
4020+}
4021+KnownGuids[] = {
4022+  //
4023+  // Loaded Image
4024+  //
4025+  &gEfiLoadedImageProtocolGuid,
4026+  L"Image",
4027+  //
4028+  // Device Path
4029+  //
4030+  &gEfiDevicePathProtocolGuid,
4031+  L"Dpath",
4032+  &gEfiLoadedImageDevicePathProtocolGuid,
4033+  L"ImageDPath",
4034+  &gEfiDevicePathUtilitiesProtocolGuid,
4035+  L"DpathUtil",
4036+  &gEfiDevicePathToTextProtocolGuid,
4037+  L"DpathToText",
4038+  &gEfiDevicePathFromTextProtocolGuid,
4039+  L"DpathFromText",
4040+  &PcAnsiProtocol,
4041+  L"PcAnsi",
4042+  &Vt100Protocol,
4043+  L"Vt100",
4044+  &Vt100PlusProtocol,
4045+  L"Vt100+",
4046+  &VtUtf8Protocol,
4047+  L"VtUtf8",
4048+  //
4049+  // Driver Model
4050+  //
4051+  &gEfiDriverBindingProtocolGuid,
4052+  L"DriverBinding",
4053+  &gEfiPlatformDriverOverrideProtocolGuid,
4054+  L"PlatformOverride",
4055+  &gEfiBusSpecificDriverOverrideProtocolGuid,
4056+  L"BusSpecificDriverOverride",
4057+  &gEfiDriverDiagnosticsProtocolGuid,
4058+  L"Diagnostics",
4059+  &gEfiDriverDiagnostics2ProtocolGuid,
4060+  L"Diagnostics2",
4061+  &gEfiComponentNameProtocolGuid,
4062+  L"ComponentName",
4063+  &gEfiComponentName2ProtocolGuid,
4064+  L"ComponentName2",
4065+  &gEfiPlatformToDriverConfigurationProtocolGuid,
4066+  L"PlatformDriverConfig",
4067+  &gEfiDriverSupportedEfiVersionProtocolGuid,
4068+  L"DriverEFIVersion",
4069+  //
4070+  // Console Support
4071+  //
4072+  &gEfiSimpleTextInputExProtocolGuid,
4073+  L"TxtinEx",
4074+  &gEfiSimpleTextInProtocolGuid,
4075+  L"Txtin",
4076+  &gEfiSimpleTextOutProtocolGuid,
4077+  L"Txtout",
4078+  &gEfiSimplePointerProtocolGuid,
4079+  L"SimplePointer",
4080+  &gEfiAbsolutePointerProtocolGuid,
4081+  L"AbsolutePointer",
4082+  &gEfiSerialIoProtocolGuid,
4083+  L"SerialIo",
4084+  &gEfiGraphicsOutputProtocolGuid,
4085+  L"GraphicsOutput",
4086+  &gEfiEdidDiscoveredProtocolGuid,
4087+  L"EdidDiscovered",
4088+  &gEfiEdidActiveProtocolGuid,
4089+  L"EdidActive",
4090+  &gEfiEdidOverrideProtocolGuid,
4091+  L"EdidOverride",
4092+  &gEfiConsoleInDeviceGuid,
4093+  L"ConIn",
4094+  &gEfiConsoleOutDeviceGuid,
4095+  L"ConOut",
4096+  &gEfiStandardErrorDeviceGuid,
4097+  L"StdErr",
4098+  //
4099+  // Media Access
4100+  //
4101+  &gEfiLoadFileProtocolGuid,
4102+  L"Load",
4103+  &gEfiLoadFile2ProtocolGuid,
4104+  L"Load2",
4105+  &gEfiSimpleFileSystemProtocolGuid,
4106+  L"Fs",
4107+  &gEfiFileInfoGuid,
4108+  L"GenFileInfo",
4109+  &gEfiFileSystemInfoGuid,
4110+  L"FileSysInfo",
4111+  &gEfiTapeIoProtocolGuid,
4112+  L"TapeIo",
4113+  &gEfiDiskIoProtocolGuid,
4114+  L"DiskIo",
4115+  &gEfiBlockIoProtocolGuid,
4116+  L"BlkIo",
4117+  &gEfiUnicodeCollationProtocolGuid,
4118+  L"UnicodeCollation",
4119+  &gEfiUnicodeCollation2ProtocolGuid,
4120+  L"UnicodeCollation2",
4121+  //
4122+  // PCI Bus Support
4123+  //
4124+  &gEfiPciRootBridgeIoProtocolGuid,
4125+  L"PciRootBridgeIo",
4126+  &gEfiPciIoProtocolGuid,
4127+  L"PciIo",
4128+  //
4129+  // SCSI Bus Support
4130+  //
4131+  &gEfiScsiPassThruProtocolGuid,
4132+  L"ScsiPassThru",
4133+  &gEfiScsiIoProtocolGuid,
4134+  L"ScsiIo",
4135+  &gEfiExtScsiPassThruProtocolGuid,
4136+  L"ExtScsiPassThru",
4137+  //
4138+  // iSCSI
4139+  //
4140+  &gEfiIScsiInitiatorNameProtocolGuid,
4141+  L"IScsiInitName",
4142+  //
4143+  // USB Support
4144+  //
4145+  &gEfiUsbIoProtocolGuid,
4146+  L"UsbIo",
4147+  &gEfiUsb2HcProtocolGuid,
4148+  L"UsbHc",
4149+  &gEfiUsb2HcProtocolGuid,
4150+  L"UsbHc2",
4151+  //
4152+  // Debugger Support
4153+  //
4154+  &gEfiDebugSupportProtocolGuid,
4155+  L"DebugSupport",
4156+  &gEfiDebugPortDevicePathGuid,
4157+  L"DebugPort",
4158+  //
4159+  // Decompression Algorithm
4160+  //
4161+  &gEfiDecompressProtocolGuid,
4162+  L"Decompress",
4163+  //
4164+  // ACPI
4165+  //
4166+  &gEfiAcpiTableProtocolGuid,
4167+  L"AcpiTable",
4168+  // EBC
4169+  //
4170+  &gEfiEbcProtocolGuid,
4171+  L"EbcInterp",
4172+  //
4173+  // SNP, PXE, BIS
4174+  //
4175+  &gEfiSimpleNetworkProtocolGuid,
4176+  L"Net",
4177+  &gEfiNetworkInterfaceIdentifierProtocolGuid,
4178+  L"Nii",
4179+  &gEfiPxeBaseCodeProtocolGuid,
4180+  L"Pxebc",
4181+  &gEfiPxeBaseCodeCallbackProtocolGuid,
4182+  L"PxebcCallback",
4183+  &gEfiBisProtocolGuid,
4184+  L"Bis",
4185+  //
4186+  // Managed Network
4187+  //
4188+  &gEfiManagedNetworkServiceBindingProtocolGuid,
4189+  L"MNPSb",
4190+  &gEfiManagedNetworkProtocolGuid,
4191+  L"MNP",
4192+  //
4193+  // ARP, DHCPv4
4194+  //
4195+  &gEfiArpServiceBindingProtocolGuid,
4196+  L"ARPSb",
4197+  &gEfiArpProtocolGuid,
4198+  L"ARP",
4199+  &gEfiDhcp4ServiceBindingProtocolGuid,
4200+  L"DHCPv4Sb",
4201+  &gEfiDhcp4ProtocolGuid,
4202+  L"DHCPv4",
4203+  //
4204+  // TCPv4, IPv4 and Configuration
4205+  //
4206+  &gEfiTcp4ServiceBindingProtocolGuid,
4207+  L"TCPv4Sb",
4208+  &gEfiTcp4ProtocolGuid,
4209+  L"TCPv4",
4210+  &gEfiIp4ServiceBindingProtocolGuid,
4211+  L"IPv4Sb",
4212+  &gEfiIp4ProtocolGuid,
4213+  L"IPv4",
4214+  &gEfiIp4ConfigProtocolGuid,
4215+  L"IPv4Config",
4216+  //
4217+  // UDPv4, MTFTPv4
4218+  //
4219+  &gEfiUdp4ServiceBindingProtocolGuid,
4220+  L"UDPv4Sb",
4221+  &gEfiUdp4ProtocolGuid,
4222+  L"UDPv4",
4223+  &gEfiMtftp4ServiceBindingProtocolGuid,
4224+  L"MTFTPv4Sb",
4225+  &gEfiMtftp4ProtocolGuid,
4226+  L"MTFTPv4",
4227+  //
4228+  // Security
4229+  //
4230+  &gEfiAuthenticationInfoProtocolGuid,
4231+  L"AuthInfo",
4232+  &gEfiHashServiceBindingProtocolGuid,
4233+  L"HashSb",
4234+  &gEfiHashProtocolGuid,
4235+  L"Hash",
4236+  //
4237+  // HII
4238+  //
4239+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
4240+  &gEfiHiiFontProtocolGuid,
4241+  L"HiiFont",
4242+  &gEfiHiiStringProtocolGuid,
4243+  L"HiiString",
4244+  &gEfiHiiImageProtocolGuid,
4245+  L"HiiImage",
4246+  &gEfiHiiDatabaseProtocolGuid,
4247+  L"HiiDatabase",
4248+  //
4249+  // HII Configuration Processing and Browser
4250+  //
4251+  &gEfiHiiConfigRoutingProtocolGuid,
4252+  L"HiiConfRouting",
4253+  &gEfiHiiConfigAccessProtocolGuid,
4254+  L"HiiConfAccess",
4255+  &gEfiFormBrowser2ProtocolGuid,
4256+  L"FormBrowser2",
4257+#else
4258+  &gEfiHiiProtocolGuid,
4259+  L"Hii",
4260+  &gEfiFormBrowserProtocolGuid,
4261+  L"FormBrowser",
4262+  &gEfiFormCallbackProtocolGuid,
4263+  L"FormCallback",
4264+#endif
4265+  //
4266+  // Shell Specific
4267+  //
4268+  &NullGuid,
4269+  L"G0",
4270+  &ShellInterfaceProtocol,
4271+  L"ShellInt",
4272+  //
4273+  // Deprecated
4274+  //
4275+  &gEfiDeviceIoProtocolGuid,
4276+  L"DevIo",
4277+  &gEfiTcpProtocolGuid,
4278+  L"Tcp",
4279+  &gEfiUgaDrawProtocolGuid,
4280+  L"UgaDraw",
4281+  &gEfiUgaIoProtocolGuid,
4282+  L"UgaIo",
4283+  &gEfiGlobalVariableGuid,
4284+  L"Efi",
4285+  &gEfiFileSystemInfoGuid,
4286+  L"FileSysInfo",
4287+  &gEfiPartTypeSystemPartGuid,
4288+  L"ESP",
4289+  &gEfiPartTypeLegacyMbrGuid,
4290+  L"GPT MBR",
4291+  &gEfiDriverConfigurationProtocolGuid,
4292+  L"Configuration",
4293+  &gEfiDriverConfiguration2ProtocolGuid,
4294+  L"Configuration2",
4295+  &gEfiIsaIoProtocolGuid,
4296+  L"IsaIo",
4297+  &gEfiIsaAcpiProtocolGuid,
4298+  L"IsaAcpi",
4299+  //
4300+  // NT32
4301+  //
4302+#if (PLATFORM == NT32)
4303+  &WinNtThunkProtocolGuid,
4304+  L"WinNtThunk",
4305+  &WinNtIoProtocolGuid,
4306+  L"WinNtDriverIo",
4307+  &WinNtSerialPortGuid,
4308+  L"SerialPrivate",
4309+#endif
4310+  //
4311+  // Misc
4312+  //
4313+  &gEfiVariableStoreProtocolGuid,
4314+  L"varstore",
4315+  &UnknownDeviceGuid,
4316+  L"Unknown Device",
4317+
4318+  NULL
4319+};
4320
4321 STATIC CHAR8  Hex[] = {
4322   '0',
4323@@ -336,23 +638,18 @@
4324
4325 --*/
4326 {
4327-  EFI_STATUS  Status;
4328-  CHAR16      *GuidName;
4329+  UINTN Index;
4330
4331   ASSERT (Guid != NULL);
4332   ASSERT (Buffer != NULL);
4333
4334-  if (mShellEnv == NULL) {
4335-    Status = LibLocateProtocol (&ShellEnvProtocol, &mShellEnv);
4336-    if (EFI_ERROR (Status)) {
4337-      mShellEnv = NULL;
4338-    }
4339-  }
4340-  if (mShellEnv != NULL) {
4341-    GuidName = mShellEnv->GetProt (Guid, FALSE);
4342-    if (GuidName != NULL) {
4343-      SPrint (Buffer, 0, L"%s", GuidName);
4344-      return;
4345+  //
4346+  // Else, (for now) use additional internal function for mapping guids
4347+  //
4348+  for (Index = 0; KnownGuids[Index].Guid; Index++) {
4349+    if (CompareGuid (Guid, KnownGuids[Index].Guid) == 0) {
4350+      SPrint (Buffer, 0, KnownGuids[Index].GuidName);
4351+      return ;
4352     }
4353   }
4354   //
4355@@ -1166,7 +1463,7 @@
4356       Status = BS->HandleProtocol (
4357                     Image->DeviceHandle,
4358                     &gEfiFirmwareVolumeProtocolGuid,
4359-                    &FV
4360+                    (VOID **)&FV
4361                     );
4362       if (!EFI_ERROR (Status)) {
4363         Status = FV->ReadSection (
4364@@ -1187,7 +1484,7 @@
4365         Status = BS->HandleProtocol (
4366                       Image->DeviceHandle,
4367                       &gEfiFirmwareVolume2ProtocolGuid,
4368-                      &FV2
4369+                      (VOID **)&FV2
4370                       );
4371         if (!EFI_ERROR (Status)) {
4372           Status = FV2->ReadSection (
4373diff --ignore-file-name-case -Naur ShellR33/Library/Perf.c GccShellR33/Library/Perf.c
4374--- ShellR33/Library/Perf.c	2005-08-23 00:16:36.000000000 -0700
4375+++ GccShellR33/Library/Perf.c	2009-09-22 19:19:20.000000000 -0700
4376@@ -19,7 +19,7 @@
4377
4378 --*/
4379
4380-#include "EfiShelllib.h"
4381+#include "EfiShellLib.h"
4382
4383 #include EFI_PROTOCOL_DEFINITION (Performance)
4384
4385diff --ignore-file-name-case -Naur ShellR33/Library/RtData.c GccShellR33/Library/RtData.c
4386--- ShellR33/Library/RtData.c	2005-08-23 00:16:36.000000000 -0700
4387+++ GccShellR33/Library/RtData.c	2009-09-22 19:19:20.000000000 -0700
4388@@ -21,7 +21,7 @@
4389
4390 --*/
4391
4392-#include "EfiShelllib.h"
4393+#include "EfiShellLib.h"
4394
4395 //
4396 // RT - pointer to the runtime table
4397diff --ignore-file-name-case -Naur ShellR33/Library/ShellDebug.c GccShellR33/Library/ShellDebug.c
4398--- ShellR33/Library/ShellDebug.c	2007-03-15 20:07:49.000000000 -0700
4399+++ GccShellR33/Library/ShellDebug.c	2009-09-22 16:16:30.000000000 -0700
4400@@ -19,7 +19,7 @@
4401
4402 --*/
4403
4404-#include "EfiShelllib.h"
4405+#include "EfiShellLib.h"
4406 #include EFI_PROTOCOL_DEFINITION (DebugAssert)
4407
4408 EFI_DEBUG_ASSERT_PROTOCOL *mDebugAssert = NULL;
4409@@ -66,6 +66,7 @@
4410   }
4411 }
4412
4413+
4414 VOID
4415 EfiDebugPrint (
4416   IN  UINTN     ErrorLevel,
4417diff --ignore-file-name-case -Naur ShellR33/Library/ShellEnvInt.c GccShellR33/Library/ShellEnvInt.c
4418--- ShellR33/Library/ShellEnvInt.c	2006-08-07 02:14:38.000000000 -0700
4419+++ GccShellR33/Library/ShellEnvInt.c	2009-09-22 19:19:20.000000000 -0700
4420@@ -21,7 +21,7 @@
4421
4422 --*/
4423
4424-#include "EfiShelllib.h"
4425+#include "EfiShellLib.h"
4426
4427 EFI_STATUS
4428 ShellExecute (
4429diff --ignore-file-name-case -Naur ShellR33/Library/ShellEnvInt.h GccShellR33/Library/ShellEnvInt.h
4430--- ShellR33/Library/ShellEnvInt.h	2006-08-07 02:14:38.000000000 -0700
4431+++ GccShellR33/Library/ShellEnvInt.h	2009-11-05 13:49:56.000000000 -0800
4432@@ -196,4 +196,4 @@
4433   VOID
4434   );
4435
4436-#endif
4437\ No newline at end of file
4438+#endif
4439diff --ignore-file-name-case -Naur ShellR33/Library/Str.c GccShellR33/Library/Str.c
4440--- ShellR33/Library/Str.c	2007-06-25 02:05:05.000000000 -0700
4441+++ GccShellR33/Library/Str.c	2009-09-22 19:19:20.000000000 -0700
4442@@ -22,7 +22,7 @@
4443
4444 --*/
4445
4446-#include "EfiShelllib.h"
4447+#include "EfiShellLib.h"
4448
4449 INTN
4450 StrCmp (
4451@@ -421,7 +421,7 @@
4452         return (UINTN) -1;
4453       }
4454
4455-      u = u << 4 | c - (c >= 'A' ? 'A' - 10 : '0');
4456+      u = (u << 4) | (c - (c >= 'A' ? 'A' - 10 : '0'));
4457     } else {
4458       break;
4459     }
4460@@ -472,7 +472,7 @@
4461   c = *(str++);
4462   while (c) {
4463     if (c >= '0' && c <= '9') {
4464-      if (u > m || u == m && c - '0' > (INTN) n) {
4465+      if ((u > m) || ((u == m) && (c - '0' > (INTN) n))) {
4466         return (UINTN) -1;
4467       }
4468
4469diff --ignore-file-name-case -Naur ShellR33/Library/VarCheck.c GccShellR33/Library/VarCheck.c
4470--- ShellR33/Library/VarCheck.c	2005-08-23 00:16:36.000000000 -0700
4471+++ GccShellR33/Library/VarCheck.c	2009-09-22 19:19:20.000000000 -0700
4472@@ -21,7 +21,7 @@
4473
4474 --*/
4475
4476-#include "EfiShelllib.h"
4477+#include "EfiShellLib.h"
4478
4479 VOID
4480 LibCheckVarFreeVarList (
4481diff --ignore-file-name-case -Naur ShellR33/Library/VarCheck.h GccShellR33/Library/VarCheck.h
4482--- ShellR33/Library/VarCheck.h	2005-08-23 00:16:36.000000000 -0700
4483+++ GccShellR33/Library/VarCheck.h	2009-09-22 15:37:05.000000000 -0700
4484@@ -41,7 +41,7 @@
4485   ARG_PARTIALLY_QUOTED  = 0x2,
4486   ARG_FIRST_HALF_QUOTED = 0x4,
4487   ARG_FIRST_CHAR_IS_ESC = 0x8
4488-};
4489+} SHELL_I_NEED_A_NAME;
4490
4491 typedef struct {
4492   CHAR16                    *FlagStr;
4493diff --ignore-file-name-case -Naur ShellR33/load/load.inf GccShellR33/load/load.inf
4494--- ShellR33/load/load.inf	2007-03-15 20:07:49.000000000 -0700
4495+++ GccShellR33/load/load.inf	2009-09-22 15:37:05.000000000 -0700
4496@@ -39,23 +39,23 @@
4497 COMPONENT_TYPE       = APPLICATION
4498
4499 [sources.common]
4500-  ..\ShCommonStrings.uni
4501+  ../ShCommonStrings.uni
4502   LoadStrings.uni
4503   load.c
4504
4505 [includes.common]
4506   .
4507-  ..\Inc
4508-  ..\Library
4509-  $(EDK_SOURCE)\Foundation
4510-  $(EDK_SOURCE)\Foundation\Include
4511-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4512-  $(EDK_SOURCE)\Foundation\Efi
4513-  $(EDK_SOURCE)\Foundation\Efi\Include
4514-  $(EDK_SOURCE)\Foundation\FrameWork
4515-  $(EDK_SOURCE)\Foundation\FrameWork\Include
4516-  $(EDK_SOURCE)\Foundation\Core\Dxe
4517-  $(DEST_DIR)\
4518+  ../Inc
4519+  ../Library
4520+  $(EDK_SOURCE)/Foundation
4521+  $(EDK_SOURCE)/Foundation/Include
4522+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4523+  $(EDK_SOURCE)/Foundation/Efi
4524+  $(EDK_SOURCE)/Foundation/Efi/Include
4525+  $(EDK_SOURCE)/Foundation/FrameWork
4526+  $(EDK_SOURCE)/Foundation/FrameWork/Include
4527+  $(EDK_SOURCE)/Foundation/Core/Dxe
4528+  $(DEST_DIR)/
4529
4530 [libraries.common]
4531   EfiShellLib
4532diff --ignore-file-name-case -Naur ShellR33/LoadPciRom/LoadPciRom.c GccShellR33/LoadPciRom/LoadPciRom.c
4533--- ShellR33/LoadPciRom/LoadPciRom.c	2006-08-07 02:14:38.000000000 -0700
4534+++ GccShellR33/LoadPciRom/LoadPciRom.c	2009-11-05 13:49:56.000000000 -0800
4535@@ -24,7 +24,7 @@
4536
4537 #include "EfiShellLib.h"
4538 #include "LoadPciRom.h"
4539-#include "Pci22.h"
4540+#include "pci22.h"
4541
4542 extern UINT8    STRING_ARRAY_NAME[];
4543
4544@@ -56,7 +56,7 @@
4545   );
4546
4547 EFI_HANDLE      gMyImageHandle;
4548-EFI_HII_HANDLE  HiiHandle;
4549+static EFI_HII_HANDLE  HiiHandle;
4550 EFI_GUID        EfiLoadPciRomGuid = EFI_LOADPCIROM_GUID;
4551 SHELL_VAR_CHECK_ITEM    LPRCheckList[] = {
4552   {
4553@@ -377,7 +377,7 @@
4554         }
4555
4556         if (EfiRomHeader->CompressionType == EFI_PCI_EXPANSION_ROM_HEADER_COMPRESSED) {
4557-          Status = BS->LocateProtocol (&gEfiDecompressProtocolGuid, NULL, &Decompress);
4558+          Status = BS->LocateProtocol (&gEfiDecompressProtocolGuid, NULL, (VOID **)&Decompress);
4559           if (EFI_ERROR (Status)) {
4560             PrintToken (STRING_TOKEN (STR_LOADPCIROM_DECOMP_NOT_FOUND), HiiHandle);
4561             SkipImage = TRUE;
4562diff --ignore-file-name-case -Naur ShellR33/LoadPciRom/LoadPciRom.inf GccShellR33/LoadPciRom/LoadPciRom.inf
4563--- ShellR33/LoadPciRom/LoadPciRom.inf	2007-06-25 02:05:05.000000000 -0700
4564+++ GccShellR33/LoadPciRom/LoadPciRom.inf	2009-09-22 15:37:05.000000000 -0700
4565@@ -41,23 +41,23 @@
4566
4567 [sources.common]
4568   LoadPciRomStrings.uni
4569-  ..\ShCommonStrings.uni
4570+  ../ShCommonStrings.uni
4571   LoadPciRom.c
4572   LoadPciRom.h
4573
4574 [includes.common]
4575   .
4576-  ..\Inc
4577-  ..\Library
4578-  $(EDK_SOURCE)\Foundation
4579-  $(EDK_SOURCE)\Foundation\Include
4580-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4581-  $(EDK_SOURCE)\Foundation\Efi
4582-  $(EDK_SOURCE)\Foundation\Efi\Include
4583-  $(EDK_SOURCE)\Foundation\FrameWork
4584-  $(EDK_SOURCE)\Foundation\FrameWork\Include
4585-  $(EDK_SOURCE)\Foundation\Core\Dxe
4586-  $(DEST_DIR)\
4587+  ../Inc
4588+  ../Library
4589+  $(EDK_SOURCE)/Foundation
4590+  $(EDK_SOURCE)/Foundation/Include
4591+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4592+  $(EDK_SOURCE)/Foundation/Efi
4593+  $(EDK_SOURCE)/Foundation/Efi/Include
4594+  $(EDK_SOURCE)/Foundation/FrameWork
4595+  $(EDK_SOURCE)/Foundation/FrameWork/Include
4596+  $(EDK_SOURCE)/Foundation/Core/Dxe
4597+  $(DEST_DIR)/
4598
4599 [libraries.common]
4600   EfiShellLib
4601diff --ignore-file-name-case -Naur ShellR33/ls/ls.c GccShellR33/ls/ls.c
4602--- ShellR33/ls/ls.c	2006-08-07 02:14:38.000000000 -0700
4603+++ GccShellR33/ls/ls.c	2009-09-22 15:37:05.000000000 -0700
4604@@ -917,7 +917,7 @@
4605
4606   if ((IsMatch && mIgnoreAttribute) ||
4607       (IsMatch && !mAttributes && !(Info->Attribute & EFI_FILE_HIDDEN) && !(Info->Attribute & EFI_FILE_SYSTEM)) ||
4608-      IsMatch &&
4609+      (IsMatch &&
4610       mAttributes &&
4611       (
4612         (mAttribA ? (Info->Attribute & EFI_FILE_ARCHIVE ? TRUE : FALSE) : TRUE) &&
4613@@ -925,7 +925,7 @@
4614       (mAttribR ? (Info->Attribute & EFI_FILE_READ_ONLY ? TRUE : FALSE) : TRUE) &&
4615       (mAttribS ? (Info->Attribute & EFI_FILE_SYSTEM ? TRUE : FALSE) : TRUE) &&
4616       (mAttribD ? (Info->Attribute & EFI_FILE_DIRECTORY ? TRUE : FALSE) : TRUE)
4617-    )
4618+    ))
4619       ) {
4620     IsMatch = TRUE;
4621   } else {
4622diff --ignore-file-name-case -Naur ShellR33/ls/ls.h GccShellR33/ls/ls.h
4623--- ShellR33/ls/ls.h	2007-03-15 20:07:49.000000000 -0700
4624+++ GccShellR33/ls/ls.h	2009-11-05 13:49:56.000000000 -0800
4625@@ -91,4 +91,4 @@
4626   IN UINT16               VHlpToken
4627   );
4628
4629-#endif
4630\ No newline at end of file
4631+#endif
4632diff --ignore-file-name-case -Naur ShellR33/ls/ls.inf GccShellR33/ls/ls.inf
4633--- ShellR33/ls/ls.inf	2007-03-15 20:07:49.000000000 -0700
4634+++ GccShellR33/ls/ls.inf	2009-09-22 15:37:05.000000000 -0700
4635@@ -40,24 +40,24 @@
4636
4637
4638 [sources.common]
4639-   ..\ShCommonStrings.uni
4640+   ../ShCommonStrings.uni
4641    LsStrings.uni
4642    ls.c
4643    ls.h
4644
4645 [includes.common]
4646   .
4647-  ..\Inc
4648-  ..\Library
4649-  $(EDK_SOURCE)\Foundation
4650-  $(EDK_SOURCE)\Foundation\Include
4651-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4652-  $(EDK_SOURCE)\Foundation\Efi
4653-  $(EDK_SOURCE)\Foundation\Efi\Include
4654-  $(EDK_SOURCE)\Foundation\FrameWork
4655-  $(EDK_SOURCE)\Foundation\FrameWork\Include
4656-  $(EDK_SOURCE)\Foundation\Core\Dxe
4657-  $(DEST_DIR)\
4658+  ../Inc
4659+  ../Library
4660+  $(EDK_SOURCE)/Foundation
4661+  $(EDK_SOURCE)/Foundation/Include
4662+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4663+  $(EDK_SOURCE)/Foundation/Efi
4664+  $(EDK_SOURCE)/Foundation/Efi/Include
4665+  $(EDK_SOURCE)/Foundation/FrameWork
4666+  $(EDK_SOURCE)/Foundation/FrameWork/Include
4667+  $(EDK_SOURCE)/Foundation/Core/Dxe
4668+  $(DEST_DIR)/
4669
4670 [libraries.common]
4671   EfiShellLib
4672diff --ignore-file-name-case -Naur ShellR33/mem/debug.h GccShellR33/mem/debug.h
4673--- ShellR33/mem/debug.h	2005-08-23 00:16:36.000000000 -0700
4674+++ GccShellR33/mem/debug.h	2009-09-22 15:37:05.000000000 -0700
4675@@ -26,7 +26,7 @@
4676 #include "EfiShellLib.h"
4677 #include EFI_PROTOCOL_DEFINITION (BlockIo)
4678
4679-#define EFI_PARTITION_SIGNATURE       0x5053595320494249
4680+#define EFI_PARTITION_SIGNATURE       0x5053595320494249ULL
4681 typedef struct _EFI_PARTITION_HEADER {
4682   EFI_TABLE_HEADER  Hdr;
4683   UINT32            DirectoryAllocationNumber;
4684diff --ignore-file-name-case -Naur ShellR33/mem/efidump.c GccShellR33/mem/efidump.c
4685--- ShellR33/mem/efidump.c	2005-08-23 00:16:36.000000000 -0700
4686+++ GccShellR33/mem/efidump.c	2009-09-22 19:19:20.000000000 -0700
4687@@ -24,7 +24,7 @@
4688 --*/
4689
4690 #include "debug.h"
4691-#include "Efipart.h"
4692+#include "EfiPart.h"
4693 #include "EfiShellLib.h"
4694
4695 #include STRING_DEFINES_FILE
4696@@ -352,34 +352,34 @@
4697     PrintToken (STRING_TOKEN (STR_DEBUG_STD_ERROR_ON), HiiMemHandle, LibDevicePathToStr (DevicePath));
4698   }
4699
4700-  PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiMemHandle, (UINT64) Tbl.Sys->RuntimeServices);
4701-  PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiMemHandle, (UINT64) Tbl.Sys->BootServices);
4702+  PrintToken (STRING_TOKEN (STR_DEBUG_RUNTIME_SERVICES), HiiMemHandle, (UINT64)(UINTN) Tbl.Sys->RuntimeServices);
4703+  PrintToken (STRING_TOKEN (STR_DEBUG_BOOT_SERVICES), HiiMemHandle, (UINT64)(UINTN) Tbl.Sys->BootServices);
4704
4705   EFI64_CODE (
4706     Status = LibGetSystemConfigurationTable(&gEfiSalSystemTableGuid, &SalSystemTable);
4707     if (!EFI_ERROR(Status)) {
4708-      PrintToken (STRING_TOKEN(STR_DEBUG_SAL_SYSTEM_TABLE), HiiMemHandle, (UINT64)SalSystemTable);
4709+      PrintToken (STRING_TOKEN(STR_DEBUG_SAL_SYSTEM_TABLE), HiiMemHandle, (UINT64)(UINTN)SalSystemTable);
4710     }
4711   )
4712
4713   Status = LibGetSystemConfigurationTable (&gEfiAcpiTableGuid, &AcpiTable);
4714   if (!EFI_ERROR (Status)) {
4715-    PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiMemHandle, (UINT64) AcpiTable);
4716+    PrintToken (STRING_TOKEN (STR_DEBUG_ACPI_TABLE), HiiMemHandle, (UINT64)(UINTN)AcpiTable);
4717   }
4718
4719   Status = LibGetSystemConfigurationTable (&gEfiAcpi20TableGuid, &Acpi20Table);
4720   if (!EFI_ERROR (Status)) {
4721-    PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiMemHandle, (UINT64) Acpi20Table);
4722+    PrintToken (STRING_TOKEN (STR_DEBUG_APCI_2_TABLE), HiiMemHandle, (UINT64)(UINTN)Acpi20Table);
4723   }
4724
4725   Status = LibGetSystemConfigurationTable (&gEfiMpsTableGuid, &MpsTable);
4726   if (!EFI_ERROR (Status)) {
4727-    PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiMemHandle, (UINT64) MpsTable);
4728+    PrintToken (STRING_TOKEN (STR_DEBUG_MPS_TABLE), HiiMemHandle, (UINT64)(UINTN)MpsTable);
4729   }
4730
4731   Status = LibGetSystemConfigurationTable (&gEfiSmbiosTableGuid, &SMBIOSTable);
4732   if (!EFI_ERROR (Status)) {
4733-    PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiMemHandle, (UINT64) SMBIOSTable);
4734+    PrintToken (STRING_TOKEN (STR_DEBUG_SMBIOS_TABLE), HiiMemHandle, (UINT64)(UINTN)SMBIOSTable);
4735   }
4736 }
4737
4738diff --ignore-file-name-case -Naur ShellR33/mem/mem.inf GccShellR33/mem/mem.inf
4739--- ShellR33/mem/mem.inf	2007-06-25 02:05:05.000000000 -0700
4740+++ GccShellR33/mem/mem.inf	2009-09-22 15:37:05.000000000 -0700
4741@@ -25,7 +25,7 @@
4742 COMPONENT_TYPE       = APPLICATION
4743
4744 [sources.common]
4745-  ..\ShCommonStrings.uni
4746+  ../ShCommonStrings.uni
4747   MemStrings.uni
4748   DebugStrings.uni
4749   mm.c
4750@@ -34,17 +34,17 @@
4751
4752 [includes.common]
4753   .
4754-  ..\Inc
4755-  ..\Library
4756-  $(EDK_SOURCE)\Foundation
4757-  $(EDK_SOURCE)\Foundation\Include
4758-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4759-  $(EDK_SOURCE)\Foundation\Efi
4760-  $(EDK_SOURCE)\Foundation\Efi\Include
4761-  $(EDK_SOURCE)\Foundation\FrameWork
4762-  $(EDK_SOURCE)\Foundation\FrameWork\Include
4763-  $(EDK_SOURCE)\Foundation\Core\Dxe
4764-  $(DEST_DIR)\
4765+  ../Inc
4766+  ../Library
4767+  $(EDK_SOURCE)/Foundation
4768+  $(EDK_SOURCE)/Foundation/Include
4769+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4770+  $(EDK_SOURCE)/Foundation/Efi
4771+  $(EDK_SOURCE)/Foundation/Efi/Include
4772+  $(EDK_SOURCE)/Foundation/FrameWork
4773+  $(EDK_SOURCE)/Foundation/FrameWork/Include
4774+  $(EDK_SOURCE)/Foundation/Core/Dxe
4775+  $(DEST_DIR)/
4776
4777 [libraries.common]
4778   EfiShellLib
4779diff --ignore-file-name-case -Naur ShellR33/mem/MemCommonPart.c GccShellR33/mem/MemCommonPart.c
4780--- ShellR33/mem/MemCommonPart.c	2007-03-15 20:07:49.000000000 -0700
4781+++ GccShellR33/mem/MemCommonPart.c	2009-09-22 15:37:05.000000000 -0700
4782@@ -149,7 +149,7 @@
4783     return EFI_SUCCESS;
4784   }
4785
4786-  Address = (AddressStr) ? Xtoi (AddressStr) : (UINT64) SystemTable;
4787+  Address = (AddressStr) ? Xtoi (AddressStr) : (UINT64)(UINTN)SystemTable;
4788   Size    = (SizeStr) ? Xtoi (SizeStr) : 512;
4789
4790   //
4791@@ -157,7 +157,7 @@
4792   //
4793   PrintToken (STRING_TOKEN (STR_MEM_MEMORY_ADDR), HiiMemHandle, 2 * sizeof (UINTN), Address, Size);
4794   if (MMIo) {
4795-    Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, &PciRootBridgeIo);
4796+    Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID **)&PciRootBridgeIo);
4797     if (EFI_ERROR (Status)) {
4798       PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LOC_PROT_ERR_EX), HiiMemHandle, L"mem", L"PciRootBridgeIo");
4799       return Status;
4800@@ -233,7 +233,7 @@
4801   MMIo                  = FALSE;
4802   AddressStr            = NULL;
4803   SizeStr               = NULL;
4804-  Address               = (UINT64) SystemTable;
4805+  Address               = (UINT64)(UINTN) SystemTable;
4806   Size                  = 512;
4807   RetCode               = LibCheckVariables (SI, MemCheckList, &ChkPck, &Useful);
4808   if (VarCheckOk != RetCode) {
4809@@ -312,7 +312,7 @@
4810   //
4811   PrintToken (STRING_TOKEN (STR_MEM_NEW_MEMORY_ADDR), HiiMemHandle, 2 * sizeof (UINTN), Address, Size);
4812   if (MMIo) {
4813-    Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, &PciRootBridgeIo);
4814+    Status = BS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID **)&PciRootBridgeIo);
4815     if (EFI_ERROR (Status)) {
4816       PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LOC_PROT_ERR_EX), HiiMemHandle, L"mem", L"PciRootBridgeIo");
4817       return Status;
4818diff --ignore-file-name-case -Naur ShellR33/mem/MemCommonPart.h GccShellR33/mem/MemCommonPart.h
4819--- ShellR33/mem/MemCommonPart.h	2005-08-23 00:16:36.000000000 -0700
4820+++ GccShellR33/mem/MemCommonPart.h	2009-11-05 13:49:56.000000000 -0800
4821@@ -62,4 +62,4 @@
4822   IN  EFI_BLOCK_IO_PROTOCOL   *BlkIo
4823   );
4824
4825-#endif
4826\ No newline at end of file
4827+#endif
4828diff --ignore-file-name-case -Naur ShellR33/memmap/memmap.c GccShellR33/memmap/memmap.c
4829--- ShellR33/memmap/memmap.c	2006-08-07 02:14:38.000000000 -0700
4830+++ GccShellR33/memmap/memmap.c	2009-11-05 13:49:56.000000000 -0800
4831@@ -35,7 +35,7 @@
4832 //
4833 // Global Variables
4834 //
4835-EFI_HII_HANDLE  HiiHandle;
4836+static EFI_HII_HANDLE  HiiHandle;
4837 EFI_GUID        EfiMemmapGuid = EFI_MEMMAP_GUID;
4838 SHELL_VAR_CHECK_ITEM    MemmapCheckList[] = {
4839   {
4840diff --ignore-file-name-case -Naur ShellR33/memmap/memmap.inf GccShellR33/memmap/memmap.inf
4841--- ShellR33/memmap/memmap.inf	2007-06-25 02:05:05.000000000 -0700
4842+++ GccShellR33/memmap/memmap.inf	2009-09-22 15:37:05.000000000 -0700
4843@@ -40,7 +40,7 @@
4844
4845
4846 [sources.common]
4847-  ..\ShCommonStrings.uni
4848+  ../ShCommonStrings.uni
4849   memmapStrings.uni
4850   memmap.c
4851   memmap.h
4852@@ -48,17 +48,17 @@
4853
4854 [includes.common]
4855   .
4856-  ..\Inc
4857-  ..\Library
4858-  $(EDK_SOURCE)\Foundation
4859-  $(EDK_SOURCE)\Foundation\Include
4860-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4861-  $(EDK_SOURCE)\Foundation\Efi
4862-  $(EDK_SOURCE)\Foundation\Efi\Include
4863-  $(EDK_SOURCE)\Foundation\FrameWork
4864-  $(EDK_SOURCE)\Foundation\FrameWork\Include
4865-  $(EDK_SOURCE)\Foundation\Core\Dxe
4866-  $(DEST_DIR)\
4867+  ../Inc
4868+  ../Library
4869+  $(EDK_SOURCE)/Foundation
4870+  $(EDK_SOURCE)/Foundation/Include
4871+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4872+  $(EDK_SOURCE)/Foundation/Efi
4873+  $(EDK_SOURCE)/Foundation/Efi/Include
4874+  $(EDK_SOURCE)/Foundation/FrameWork
4875+  $(EDK_SOURCE)/Foundation/FrameWork/Include
4876+  $(EDK_SOURCE)/Foundation/Core/Dxe
4877+  $(DEST_DIR)/
4878
4879 [libraries.common]
4880   EfiShellLib
4881diff --ignore-file-name-case -Naur ShellR33/mkdir/mkdir.c GccShellR33/mkdir/mkdir.c
4882--- ShellR33/mkdir/mkdir.c	2006-08-07 02:14:38.000000000 -0700
4883+++ GccShellR33/mkdir/mkdir.c	2009-11-05 13:49:56.000000000 -0800
4884@@ -49,7 +49,7 @@
4885 //
4886 // Global Variables
4887 //
4888-EFI_HII_HANDLE  HiiHandle;
4889+static EFI_HII_HANDLE  HiiHandle;
4890 EFI_GUID        EfiMkdirGuid = EFI_MKDIR_GUID;
4891 SHELL_VAR_CHECK_ITEM    MkdirCheckList[] = {
4892   {
4893diff --ignore-file-name-case -Naur ShellR33/mkdir/mkdir.h GccShellR33/mkdir/mkdir.h
4894--- ShellR33/mkdir/mkdir.h	2005-08-23 00:16:36.000000000 -0700
4895+++ GccShellR33/mkdir/mkdir.h	2009-11-05 13:49:56.000000000 -0800
4896@@ -29,4 +29,4 @@
4897     0x75ecb57f, 0x4264, 0x49d2, 0x98, 0xe6, 0x39, 0x1a, 0x32, 0x17, 0x9d, 0xf2 \
4898   }
4899
4900-#endif
4901\ No newline at end of file
4902+#endif
4903diff --ignore-file-name-case -Naur ShellR33/mkdir/mkdir.inf GccShellR33/mkdir/mkdir.inf
4904--- ShellR33/mkdir/mkdir.inf	2007-03-15 20:07:49.000000000 -0700
4905+++ GccShellR33/mkdir/mkdir.inf	2009-09-22 15:37:05.000000000 -0700
4906@@ -41,23 +41,23 @@
4907
4908 [sources.common]
4909   MkdirStrings.uni
4910-  ..\ShCommonStrings.uni
4911+  ../ShCommonStrings.uni
4912   mkdir.c
4913   mkdir.h
4914
4915 [includes.common]
4916   .
4917-  ..\Inc
4918-  ..\Library
4919-  $(EDK_SOURCE)\Foundation
4920-  $(EDK_SOURCE)\Foundation\Include
4921-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
4922-  $(EDK_SOURCE)\Foundation\Efi
4923-  $(EDK_SOURCE)\Foundation\Efi\Include
4924-  $(EDK_SOURCE)\Foundation\FrameWork
4925-  $(EDK_SOURCE)\Foundation\FrameWork\Include
4926-  $(EDK_SOURCE)\Foundation\Core\Dxe
4927-  $(DEST_DIR)\
4928+  ../Inc
4929+  ../Library
4930+  $(EDK_SOURCE)/Foundation
4931+  $(EDK_SOURCE)/Foundation/Include
4932+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
4933+  $(EDK_SOURCE)/Foundation/Efi
4934+  $(EDK_SOURCE)/Foundation/Efi/Include
4935+  $(EDK_SOURCE)/Foundation/FrameWork
4936+  $(EDK_SOURCE)/Foundation/FrameWork/Include
4937+  $(EDK_SOURCE)/Foundation/Core/Dxe
4938+  $(DEST_DIR)/
4939
4940 [libraries.common]
4941   EfiShellLib
4942diff --ignore-file-name-case -Naur ShellR33/mm/mm.c GccShellR33/mm/mm.c
4943--- ShellR33/mm/mm.c	2007-03-15 20:07:49.000000000 -0700
4944+++ GccShellR33/mm/mm.c	2009-11-05 13:49:56.000000000 -0800
4945@@ -73,7 +73,7 @@
4946 //
4947 // Global Variables
4948 //
4949-EFI_HII_HANDLE HiiHandle;
4950+static EFI_HII_HANDLE HiiHandle;
4951 EFI_GUID EfiIomodGuid = EFI_IOMOD_GUID;
4952 SHELL_VAR_CHECK_ITEM    IomodCheckList[] = {
4953   {
4954@@ -138,7 +138,7 @@
4955   }
4956 };
4957
4958-UINT64 MaxNum[9]      = { 0xff, 0xffff, 0xffffffff, 0xffffffffffffffff };
4959+UINT64 MaxNum[9]      = { 0xff, 0xffff, 0xffffffff, 0xffffffffffffffffULL };
4960
4961 EFI_BOOTSHELL_CODE(
4962   EFI_APPLICATION_ENTRY_POINT(DumpIoModify)
4963@@ -469,7 +469,7 @@
4964     //
4965     if (AccessType == EfiPciEConfig) {
4966       SegmentNumber = (UINT32) RShiftU64 (Address, 36) & 0xff;
4967-      Address      &= 0xfffffffff;
4968+      Address      &= 0xfffffffffULL;
4969     } else {
4970       if (AccessType == EfiPciConfig) {
4971         SegmentNumber = (UINT32) RShiftU64 (Address, 32) & 0xff;
4972@@ -750,7 +750,7 @@
4973     }
4974
4975     if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F')) {
4976-      u     = u << 4 | c - (c >= 'A' ? 'A' - 10 : '0');
4977+      u     = (u << 4) | (c - (c >= 'A' ? 'A' - 10 : '0'));
4978
4979       Find  = TRUE;
4980     } else {
4981diff --ignore-file-name-case -Naur ShellR33/mm/mm.inf GccShellR33/mm/mm.inf
4982--- ShellR33/mm/mm.inf	2007-06-25 02:05:05.000000000 -0700
4983+++ GccShellR33/mm/mm.inf	2009-09-22 15:37:05.000000000 -0700
4984@@ -41,23 +41,23 @@
4985
4986 [sources.common]
4987   MmStrings.uni
4988-  ..\ShCommonStrings.uni
4989+  ../ShCommonStrings.uni
4990   mm.c
4991   mm.h
4992
4993 [includes.common]
4994   .
4995-  ..\Inc
4996-  ..\Library
4997-  $(EDK_SOURCE)\Foundation
4998-  $(EDK_SOURCE)\Foundation\Include
4999-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
5000-  $(EDK_SOURCE)\Foundation\Efi
5001-  $(EDK_SOURCE)\Foundation\Efi\Include
5002-  $(EDK_SOURCE)\Foundation\FrameWork
5003-  $(EDK_SOURCE)\Foundation\FrameWork\Include
5004-  $(EDK_SOURCE)\Foundation\Core\Dxe
5005-  $(DEST_DIR)\
5006+  ../Inc
5007+  ../Library
5008+  $(EDK_SOURCE)/Foundation
5009+  $(EDK_SOURCE)/Foundation/Include
5010+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
5011+  $(EDK_SOURCE)/Foundation/Efi
5012+  $(EDK_SOURCE)/Foundation/Efi/Include
5013+  $(EDK_SOURCE)/Foundation/FrameWork
5014+  $(EDK_SOURCE)/Foundation/FrameWork/Include
5015+  $(EDK_SOURCE)/Foundation/Core/Dxe
5016+  $(DEST_DIR)/
5017
5018 [libraries.common]
5019   EfiShellLib
5020diff --ignore-file-name-case -Naur ShellR33/mode/mode.inf GccShellR33/mode/mode.inf
5021--- ShellR33/mode/mode.inf	2007-06-25 02:05:05.000000000 -0700
5022+++ GccShellR33/mode/mode.inf	2009-09-22 15:37:05.000000000 -0700
5023@@ -40,24 +40,24 @@
5024
5025
5026 [sources.common]
5027-  ..\ShCommonStrings.uni
5028+  ../ShCommonStrings.uni
5029   ModeStrings.uni
5030   mode.c
5031   mode.h
5032
5033 [includes.common]
5034   .
5035-  ..\Inc
5036-  ..\Library
5037-  $(EDK_SOURCE)\Foundation
5038-  $(EDK_SOURCE)\Foundation\Include
5039-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
5040-  $(EDK_SOURCE)\Foundation\Efi
5041-  $(EDK_SOURCE)\Foundation\Efi\Include
5042-  $(EDK_SOURCE)\Foundation\FrameWork
5043-  $(EDK_SOURCE)\Foundation\FrameWork\Include
5044-  $(EDK_SOURCE)\Foundation\Core\Dxe
5045-  $(DEST_DIR)\
5046+  ../Inc
5047+  ../Library
5048+  $(EDK_SOURCE)/Foundation
5049+  $(EDK_SOURCE)/Foundation/Include
5050+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
5051+  $(EDK_SOURCE)/Foundation/Efi
5052+  $(EDK_SOURCE)/Foundation/Efi/Include
5053+  $(EDK_SOURCE)/Foundation/FrameWork
5054+  $(EDK_SOURCE)/Foundation/FrameWork/Include
5055+  $(EDK_SOURCE)/Foundation/Core/Dxe
5056+  $(DEST_DIR)/
5057
5058 [libraries.common]
5059   EfiShellLib
5060diff --ignore-file-name-case -Naur ShellR33/mount/mount.c GccShellR33/mount/mount.c
5061--- ShellR33/mount/mount.c	2006-08-07 02:14:38.000000000 -0700
5062+++ GccShellR33/mount/mount.c	2009-11-05 13:49:56.000000000 -0800
5063@@ -36,7 +36,7 @@
5064 //
5065 // Global Variables
5066 //
5067-EFI_HII_HANDLE  HiiHandle;
5068+static EFI_HII_HANDLE  HiiHandle;
5069 EFI_GUID        EfiMountGuid = EFI_MOUNT_GUID;
5070 SHELL_VAR_CHECK_ITEM      MountCheckList[] = {
5071   {
5072diff --ignore-file-name-case -Naur ShellR33/mount/mount.inf GccShellR33/mount/mount.inf
5073--- ShellR33/mount/mount.inf	2007-06-25 02:05:05.000000000 -0700
5074+++ GccShellR33/mount/mount.inf	2009-09-22 15:37:05.000000000 -0700
5075@@ -40,24 +40,24 @@
5076
5077
5078 [sources.common]
5079-  ..\ShCommonStrings.uni
5080+  ../ShCommonStrings.uni
5081   MountStrings.uni
5082   mount.c
5083   mount.h
5084
5085 [includes.common]
5086   .
5087-  ..\Inc
5088-  ..\Library
5089-  $(EDK_SOURCE)\Foundation
5090-  $(EDK_SOURCE)\Foundation\Include
5091-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
5092-  $(EDK_SOURCE)\Foundation\Efi
5093-  $(EDK_SOURCE)\Foundation\Efi\Include
5094-  $(EDK_SOURCE)\Foundation\FrameWork
5095-  $(EDK_SOURCE)\Foundation\FrameWork\Include
5096-  $(EDK_SOURCE)\Foundation\Core\Dxe
5097-  $(DEST_DIR)\
5098+  ../Inc
5099+  ../Library
5100+  $(EDK_SOURCE)/Foundation
5101+  $(EDK_SOURCE)/Foundation/Include
5102+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
5103+  $(EDK_SOURCE)/Foundation/Efi
5104+  $(EDK_SOURCE)/Foundation/Efi/Include
5105+  $(EDK_SOURCE)/Foundation/FrameWork
5106+  $(EDK_SOURCE)/Foundation/FrameWork/Include
5107+  $(EDK_SOURCE)/Foundation/Core/Dxe
5108+  $(DEST_DIR)/
5109
5110 [libraries.common]
5111   EfiShellLib
5112diff --ignore-file-name-case -Naur ShellR33/mv/mv.c GccShellR33/mv/mv.c
5113--- ShellR33/mv/mv.c	2006-08-07 02:14:38.000000000 -0700
5114+++ GccShellR33/mv/mv.c	2009-11-05 13:49:56.000000000 -0800
5115@@ -36,7 +36,7 @@
5116 //
5117 // Global Variables
5118 //
5119-EFI_HII_HANDLE  HiiHandle;
5120+static EFI_HII_HANDLE  HiiHandle;
5121 EFI_GUID        EfiMvGuid = EFI_MV_GUID;
5122 SHELL_VAR_CHECK_ITEM      MvCheckList[] = {
5123   {
5124diff --ignore-file-name-case -Naur ShellR33/mv/mv.h GccShellR33/mv/mv.h
5125--- ShellR33/mv/mv.h	2005-08-23 00:16:36.000000000 -0700
5126+++ GccShellR33/mv/mv.h	2009-11-05 13:49:56.000000000 -0800
5127@@ -33,4 +33,4 @@
5128
5129 #define EFI_FILE_STRING_SIZE  260
5130
5131-#endif
5132\ No newline at end of file
5133+#endif
5134diff --ignore-file-name-case -Naur ShellR33/mv/mv.inf GccShellR33/mv/mv.inf
5135--- ShellR33/mv/mv.inf	2007-03-15 20:07:49.000000000 -0700
5136+++ GccShellR33/mv/mv.inf	2009-09-22 15:37:05.000000000 -0700
5137@@ -40,24 +40,24 @@
5138
5139
5140 [sources.common]
5141-   ..\ShCommonStrings.uni
5142+   ../ShCommonStrings.uni
5143    MvStrings.uni
5144    mv.c
5145    mv.h
5146
5147 [includes.common]
5148   .
5149-  ..\Inc
5150-  ..\Library
5151-  $(EDK_SOURCE)\Foundation
5152-  $(EDK_SOURCE)\Foundation\Include
5153-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
5154-  $(EDK_SOURCE)\Foundation\Efi
5155-  $(EDK_SOURCE)\Foundation\Efi\Include
5156-  $(EDK_SOURCE)\Foundation\FrameWork
5157-  $(EDK_SOURCE)\Foundation\FrameWork\Include
5158-  $(EDK_SOURCE)\Foundation\Core\Dxe
5159-  $(DEST_DIR)\
5160+  ../Inc
5161+  ../Library
5162+  $(EDK_SOURCE)/Foundation
5163+  $(EDK_SOURCE)/Foundation/Include
5164+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
5165+  $(EDK_SOURCE)/Foundation/Efi
5166+  $(EDK_SOURCE)/Foundation/Efi/Include
5167+  $(EDK_SOURCE)/Foundation/FrameWork
5168+  $(EDK_SOURCE)/Foundation/FrameWork/Include
5169+  $(EDK_SOURCE)/Foundation/Core/Dxe
5170+  $(DEST_DIR)/
5171
5172 [libraries.common]
5173   EfiShellLib
5174diff --ignore-file-name-case -Naur ShellR33/newshell/DebugAssert.c GccShellR33/newshell/DebugAssert.c
5175--- ShellR33/newshell/DebugAssert.c	1969-12-31 16:00:00.000000000 -0800
5176+++ GccShellR33/newshell/DebugAssert.c	2009-11-09 15:51:54.000000000 -0800
5177@@ -0,0 +1,248 @@
5178+/*++
5179+
5180+Copyright (c) 2004, Intel Corporation
5181+All rights reserved. This program and the accompanying materials
5182+are licensed and made available under the terms and conditions of the BSD License
5183+which accompanies this distribution.  The full text of the license may be found at
5184+http://opensource.org/licenses/bsd-license.php
5185+
5186+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
5187+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
5188+
5189+Module Name:
5190+
5191+  DebugAssert.c
5192+
5193+Abstract:
5194+
5195+  Produce EfiDebugAssertProtocol to enable EfiUtilityLib to function.
5196+  The EfiUtilityLib is used by the EFI shell!
5197+
5198+--*/
5199+#include "nshell.h"
5200+#include EFI_PROTOCOL_DEFINITION (DebugAssert)
5201+
5202+
5203+UINTN gRtErrorLevel = 0;
5204+
5205+EFI_STATUS
5206+EFIAPI
5207+ShellDebugAssert (
5208+  IN EFI_DEBUG_ASSERT_PROTOCOL          *This,
5209+  IN CHAR8                              *FileName,
5210+  IN INTN                               LineNumber,
5211+  IN CHAR8                              *Description
5212+  );
5213+
5214+EFI_STATUS
5215+EFIAPI
5216+ShellDebugPrint (
5217+  IN EFI_DEBUG_ASSERT_PROTOCOL          *This,
5218+  IN UINTN                              ErrorLevel,
5219+  IN CHAR8                              *Format,
5220+  IN VA_LIST                            Marker
5221+  );
5222+
5223+EFI_STATUS
5224+EFIAPI
5225+ShellPostCode (
5226+  IN EFI_DEBUG_ASSERT_PROTOCOL          * This,
5227+  IN  UINT16                            PostCode,
5228+  IN  CHAR8                             *PostCodeString OPTIONAL
5229+  );
5230+
5231+EFI_STATUS
5232+EFIAPI
5233+ShellGetErrorLevel (
5234+  IN EFI_DEBUG_ASSERT_PROTOCOL          *This,
5235+  IN  UINTN                             *ErrorLevel
5236+  );
5237+
5238+EFI_STATUS
5239+EFIAPI
5240+ShellSetErrorLevel (
5241+  IN EFI_DEBUG_ASSERT_PROTOCOL          *This,
5242+  IN  UINTN                             ErrorLevel
5243+  );
5244+
5245+//
5246+// Protocol instance, there can be only one.
5247+//
5248+EFI_HANDLE                mHandle = NULL;
5249+EFI_DEBUG_ASSERT_PROTOCOL mDebugAssertProtocol = {
5250+  ShellDebugAssert,
5251+  ShellDebugPrint,
5252+  ShellPostCode,
5253+  ShellGetErrorLevel,
5254+  ShellSetErrorLevel
5255+};
5256+
5257+//
5258+// Function implementations
5259+//
5260+EFI_STATUS
5261+EFIAPI
5262+ShellDebugAssert (
5263+  IN EFI_DEBUG_ASSERT_PROTOCOL          *This,
5264+  IN CHAR8                              *FileName,
5265+  IN INTN                               LineNumber,
5266+  IN CHAR8                              *Description
5267+  )
5268+/*++
5269+
5270+Routine Description:
5271+
5272+  Worker function for ASSERT (). If Error Logging hub is loaded log ASSERT
5273+  information. If Error Logging hub is not loaded EFI_BREAKPOINT ().
5274+
5275+Arguments:
5276+
5277+  This        - Protocol instance.
5278+  FileName    - File name of failing routine.
5279+  LineNumber  - Line number of failing ASSERT().
5280+  Description - Description, usually the assertion,
5281+
5282+Returns:
5283+
5284+  EFI_SUCCESS   The function always completes successfully.
5285+
5286+--*/
5287+{
5288+  Print (L"\nASSERT (%a): %a:%d\n", Description, FileName, LineNumber);
5289+
5290+  return EFI_SUCCESS;
5291+}
5292+
5293+EFI_STATUS
5294+EFIAPI
5295+ShellDebugPrint (
5296+  IN EFI_DEBUG_ASSERT_PROTOCOL          *This,
5297+  IN UINTN                              ErrorLevel,
5298+  IN CHAR8                              *Format,
5299+  IN VA_LIST                            Marker
5300+  )
5301+/*++
5302+
5303+Routine Description:
5304+
5305+  Worker function for DEBUG (). If Error Logging hub is loaded log ASSERT
5306+  information. If Error Logging hub is not loaded do nothing.
5307+
5308+Arguments:
5309+
5310+  This       - Protocol Instance.
5311+  ErrorLevel - If error level is set do the debug print.
5312+  Format     - String to use for the print, followed by Print arguments.
5313+
5314+Returns:
5315+
5316+  EFI_SUCCESS   The function always completes successfully.
5317+
5318+--*/
5319+{
5320+  CHAR16  Buffer[180];
5321+  CHAR16  UnicodeFormat[180];
5322+  UINTN   Index;
5323+
5324+  if (!(gRtErrorLevel & ErrorLevel)) {
5325+    return EFI_SUCCESS;
5326+  }
5327+
5328+  for (Index = 0; Format[Index] != '\0'; Index++) {
5329+    UnicodeFormat[Index] = (CHAR16)Format[Index];
5330+  }
5331+  Format[Index] = '\0';
5332+
5333+  VSPrint (Buffer, sizeof (Buffer), UnicodeFormat, Marker);
5334+  Print (Buffer);
5335+
5336+  return EFI_SUCCESS;
5337+}
5338+
5339+EFI_STATUS
5340+EFIAPI
5341+ShellPostCode (
5342+  IN EFI_DEBUG_ASSERT_PROTOCOL          * This,
5343+  IN  UINT16                            PostCode,
5344+  IN  CHAR8                             *PostCodeString OPTIONAL
5345+  )
5346+/*++
5347+
5348+Routine Description:
5349+
5350+  Write the code to IO ports 80 and 81.
5351+
5352+Arguments:
5353+
5354+  This            - Protocol Instance.
5355+  PostCode        - Code to write
5356+  PostCodeString  - String, currently ignored.
5357+
5358+Returns:
5359+
5360+  EFI_SUCCESS   The function always completes successfully.
5361+
5362+--*/
5363+{
5364+  return EFI_SUCCESS;
5365+}
5366+
5367+EFI_STATUS
5368+EFIAPI
5369+ShellGetErrorLevel (
5370+  IN EFI_DEBUG_ASSERT_PROTOCOL          *This,
5371+  IN  UINTN                             *ErrorLevel
5372+  )
5373+{
5374+  *ErrorLevel = gRtErrorLevel;
5375+  return EFI_SUCCESS;
5376+}
5377+
5378+EFI_STATUS
5379+EFIAPI
5380+ShellSetErrorLevel (
5381+  IN EFI_DEBUG_ASSERT_PROTOCOL          *This,
5382+  IN  UINTN                             ErrorLevel
5383+  )
5384+{
5385+  gRtErrorLevel = ErrorLevel;
5386+  return EFI_SUCCESS;
5387+}
5388+
5389+EFI_STATUS
5390+InstallShellDebugAssert (
5391+  VOID
5392+  )
5393+/*++
5394+
5395+Routine Description:
5396+
5397+  Install the status code debug assert protocol
5398+
5399+Arguments:
5400+
5401+  None
5402+
5403+Returns:
5404+
5405+  Results of call to InstallProtocolInterface.
5406+
5407+--*/
5408+{
5409+  DEBUG_CODE (
5410+    EFI_STATUS  Status;
5411+    VOID        *Interface;
5412+
5413+    Status = BS->LocateProtocol (&gEfiDebugAssertProtocolGuid, NULL, &Interface);
5414+    if (EFI_ERROR (Status)) {
5415+      BS->InstallProtocolInterface (
5416+            &mHandle,
5417+            &gEfiDebugAssertProtocolGuid,
5418+            EFI_NATIVE_INTERFACE,
5419+            &mDebugAssertProtocol
5420+            );
5421+     }
5422+  );
5423+
5424+  return EFI_SUCCESS;
5425+}
5426diff --ignore-file-name-case -Naur ShellR33/newshell/FakeHii.c GccShellR33/newshell/FakeHii.c
5427--- ShellR33/newshell/FakeHii.c	2008-08-13 23:02:46.000000000 -0700
5428+++ GccShellR33/newshell/FakeHii.c	2009-09-22 15:37:05.000000000 -0700
5429@@ -320,7 +320,7 @@
5430   if (Language == NULL) {
5431     return EFI_OUT_OF_RESOURCES;
5432   }
5433-  strcpya (Language, (UINT8 *) PackageHdr + HeaderSize - LanguageSize);
5434+  strcpya (Language, (CHAR8 *) PackageHdr + HeaderSize - LanguageSize);
5435   for (Link = PackageList->StringPkgHdr.Flink; Link != &PackageList->StringPkgHdr; Link = Link->Flink) {
5436     StringPackage = CR (Link, FAKE_HII_STRING_PACKAGE, Entry, FAKE_HII_STRING_PACKAGE_SIGNATURE);
5437     if (CompareLanguage (Language, StringPackage->StringPkgHdr->Language)) {
5438@@ -770,7 +770,7 @@
5439   StringPackage = NULL;
5440   for (Link = DatabaseRecord->StringPkgHdr.Flink; Link != &DatabaseRecord->StringPkgHdr; Link = Link->Flink) {
5441     StringPackage = CR (Link, FAKE_HII_STRING_PACKAGE, Entry, FAKE_HII_STRING_PACKAGE_SIGNATURE);
5442-    if (CompareLanguage (StringPackage->StringPkgHdr->Language, (UINT8 *) Language)) {
5443+    if (CompareLanguage (StringPackage->StringPkgHdr->Language, (CHAR8 *) Language)) {
5444       Matched = TRUE;
5445       break;
5446     }
5447diff --ignore-file-name-case -Naur ShellR33/newshell/init.c GccShellR33/newshell/init.c
5448--- ShellR33/newshell/init.c	2008-08-13 23:02:46.000000000 -0700
5449+++ GccShellR33/newshell/init.c	2009-11-09 15:51:54.000000000 -0800
5450@@ -23,7 +23,7 @@
5451 #include "nshell.h"
5452
5453 extern UINT8    STRING_ARRAY_NAME[];
5454-extern BOOLEAN  gHiiInitialized = FALSE;
5455+BOOLEAN  gHiiInitialized = FALSE;
5456
5457 //
5458 // This is the generated header file which includes whatever needs to be exported (strings + IFR)
5459@@ -51,6 +51,12 @@
5460   VOID
5461   );
5462
5463+EFI_STATUS
5464+InstallShellDebugAssert (
5465+  VOID
5466+  );
5467+
5468+
5469 EFI_HII_HANDLE      HiiNewshellHandle;
5470
5471 //
5472@@ -99,13 +105,13 @@
5473   Status = BS->HandleProtocol (
5474                 ImgHnd,
5475                 &gEfiLoadedImageProtocolGuid,
5476-                &img
5477+                (VOID **)&img
5478                 );
5479   if (!EFI_ERROR (Status)) {
5480     Status = BS->HandleProtocol (
5481                   img->DeviceHandle,
5482                   &gEfiDevicePathProtocolGuid,
5483-                  &dp
5484+                  (VOID **)&dp
5485                   );
5486     if (!EFI_ERROR (Status)) {
5487       *DevPath  = DuplicateDevicePath (dp);
5488@@ -212,15 +218,18 @@
5489   EFI_STATUS                       Status;
5490   EFI_CONSOLE_CONTROL_PROTOCOL     *ConsoleControl;
5491   EFI_GUID                         EfiLibGuid = EFI_NSHELL_GUID;
5492+
5493   InitializeShellLib (ImageHandle, SystemTable);
5494
5495+  InstallShellDebugAssert ();
5496+
5497   //
5498   // If EFI_CONSOLE_CONTROL_PROTOCOL is available,
5499   // use it to switch to text mode first.
5500   //
5501   Status = LibLocateProtocol (
5502              &gEfiConsoleControlProtocolGuid,
5503-             &ConsoleControl
5504+             (VOID **)&ConsoleControl
5505              );
5506   if (!EFI_ERROR (Status)) {
5507     Status = ConsoleControl->GetMode (ConsoleControl, &mOldCurrentMode, NULL, NULL);
5508@@ -342,7 +351,7 @@
5509       Status = _ShellLoadEnvDriver (ImageHandle);
5510     )
5511     if (EFI_ERROR (Status)) {
5512-      Status = LibLocateProtocol (&ShellEnvProtocol, &SE);
5513+      Status = LibLocateProtocol (&ShellEnvProtocol, (VOID **)&SE);
5514       if (EFI_ERROR (Status)) {
5515         PrintToken (STRING_TOKEN (STR_NSHELL_ENV_DRIVER), HiiNewshellHandle);
5516         return Status;
5517@@ -372,7 +381,7 @@
5518     *IsRootInstance = TRUE;
5519   }
5520
5521-  Status = LibLocateProtocol (&ShellEnvProtocol, &SE);
5522+  Status = LibLocateProtocol (&ShellEnvProtocol, (VOID **)&SE);
5523   ASSERT (!EFI_ERROR (Status));
5524   SI = SE->NewShell (ImageHandle);
5525
5526@@ -543,7 +552,7 @@
5527   //
5528   ConsoleControlStatus = LibLocateProtocol (
5529                            &gEfiConsoleControlProtocolGuid,
5530-                           &ConsoleControl
5531+                           (VOID **)&ConsoleControl
5532                            );
5533   if (!EFI_ERROR (ConsoleControlStatus)) {
5534     ConsoleControlStatus = ConsoleControl->GetMode (ConsoleControl, &CurrentMode, NULL, NULL);
5535@@ -592,7 +601,7 @@
5536   //  3. as a child of a parent shell image
5537   //
5538   IsRootInstance  = FALSE;
5539-
5540+
5541   Status          = _DoInit (ImageHandle, SystemTable);
5542   if (EFI_ERROR (Status)) {
5543     return Status;
5544diff --ignore-file-name-case -Naur ShellR33/newshell/nshell.h GccShellR33/newshell/nshell.h
5545--- ShellR33/newshell/nshell.h	2005-08-23 00:16:36.000000000 -0700
5546+++ GccShellR33/newshell/nshell.h	2009-11-05 13:49:56.000000000 -0800
5547@@ -50,7 +50,7 @@
5548 #undef EFI_MONOSHELL_CODE
5549 #undef EFI_NO_MONOSHELL_CODE
5550
5551-#if EFI_MONOSHELL == 1
5552+#ifdef EFI_MONOSHELL
5553 #define EFI_MONOSHELL_CODE(code)    code
5554 #define EFI_NO_MONOSHELL_CODE(code)
5555 #else
5556@@ -58,4 +58,4 @@
5557 #define EFI_NO_MONOSHELL_CODE(code) code
5558 #endif
5559
5560-#endif
5561\ No newline at end of file
5562+#endif
5563diff --ignore-file-name-case -Naur ShellR33/newshell/nshell.inf GccShellR33/newshell/nshell.inf
5564--- ShellR33/newshell/nshell.inf	2005-08-23 00:16:36.000000000 -0700
5565+++ GccShellR33/newshell/nshell.inf	2009-11-07 12:33:52.000000000 -0800
5566@@ -26,24 +26,25 @@
5567
5568 [sources.common]
5569   NshellStrings.uni
5570-  ..\ShCommonStrings.uni
5571+  ../ShCommonStrings.uni
5572   init.c
5573   nshell.h
5574   fakehii.c
5575+  DebugAssert.c
5576
5577 [includes.common]
5578   .
5579-  ..\Inc
5580-  ..\Library
5581-  $(EDK_SOURCE)\Foundation
5582-  $(EDK_SOURCE)\Foundation\Include
5583-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
5584-  $(EDK_SOURCE)\Foundation\Efi
5585-  $(EDK_SOURCE)\Foundation\Efi\Include
5586-  $(EDK_SOURCE)\Foundation\FrameWork
5587-  $(EDK_SOURCE)\Foundation\FrameWork\Include
5588-  $(EDK_SOURCE)\Foundation\Core\Dxe
5589-  $(DEST_DIR)\
5590+  ../Inc
5591+  ../Library
5592+  $(EDK_SOURCE)/Foundation
5593+  $(EDK_SOURCE)/Foundation/Include
5594+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
5595+  $(EDK_SOURCE)/Foundation/Efi
5596+  $(EDK_SOURCE)/Foundation/Efi/Include
5597+  $(EDK_SOURCE)/Foundation/FrameWork
5598+  $(EDK_SOURCE)/Foundation/FrameWork/Include
5599+  $(EDK_SOURCE)/Foundation/Core/Dxe
5600+  $(DEST_DIR)/
5601
5602 [libraries.common]
5603   EfiShellLib
5604@@ -67,7 +68,7 @@
5605   IMAGE_ENTRY_POINT=InitializeShell
5606   C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
5607   C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
5608-  C_STD_FLAGS = $(C_STD_FLAGS) /DEFI_MONOSHELL=2
5609+  C_STD_FLAGS = $(C_STD_FLAGS)
5610
5611
5612
5613\ No newline at end of file
5614diff --ignore-file-name-case -Naur ShellR33/openinfo/openinfo.c GccShellR33/openinfo/openinfo.c
5615--- ShellR33/openinfo/openinfo.c	2006-08-07 02:14:38.000000000 -0700
5616+++ GccShellR33/openinfo/openinfo.c	2009-11-05 13:49:56.000000000 -0800
5617@@ -36,7 +36,7 @@
5618 //
5619 // Global Variables
5620 //
5621-EFI_HII_HANDLE  HiiHandle;
5622+static EFI_HII_HANDLE  HiiHandle;
5623 EFI_GUID        EfiOpeninfoGuid = EFI_OPENINFO_GUID;
5624 SHELL_VAR_CHECK_ITEM    OpeninfoCheckList[] = {
5625   {
5626diff --ignore-file-name-case -Naur ShellR33/openinfo/openinfo.inf GccShellR33/openinfo/openinfo.inf
5627--- ShellR33/openinfo/openinfo.inf	2007-06-25 02:05:05.000000000 -0700
5628+++ GccShellR33/openinfo/openinfo.inf	2009-09-22 15:37:05.000000000 -0700
5629@@ -41,24 +41,24 @@
5630
5631 [sources.common]
5632   OPeninfoStrings.uni
5633-  ..\ShCommonStrings.uni
5634+  ../ShCommonStrings.uni
5635   openinfo.c
5636   openinfo.h
5637
5638
5639 [includes.common]
5640   .
5641-  ..\Inc
5642-  ..\Library
5643-  $(EDK_SOURCE)\Foundation
5644-  $(EDK_SOURCE)\Foundation\Include
5645-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
5646-  $(EDK_SOURCE)\Foundation\Efi
5647-  $(EDK_SOURCE)\Foundation\Efi\Include
5648-  $(EDK_SOURCE)\Foundation\FrameWork
5649-  $(EDK_SOURCE)\Foundation\FrameWork\Include
5650-  $(EDK_SOURCE)\Foundation\Core\Dxe
5651-  $(DEST_DIR)\
5652+  ../Inc
5653+  ../Library
5654+  $(EDK_SOURCE)/Foundation
5655+  $(EDK_SOURCE)/Foundation/Include
5656+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
5657+  $(EDK_SOURCE)/Foundation/Efi
5658+  $(EDK_SOURCE)/Foundation/Efi/Include
5659+  $(EDK_SOURCE)/Foundation/FrameWork
5660+  $(EDK_SOURCE)/Foundation/FrameWork/Include
5661+  $(EDK_SOURCE)/Foundation/Core/Dxe
5662+  $(DEST_DIR)/
5663
5664 [libraries.common]
5665   EfiShellLib
5666diff --ignore-file-name-case -Naur ShellR33/pci/pci.c GccShellR33/pci/pci.c
5667--- ShellR33/pci/pci.c	2009-05-27 01:55:16.000000000 -0700
5668+++ GccShellR33/pci/pci.c	2009-11-05 13:49:56.000000000 -0800
5669@@ -344,7 +344,7 @@
5670 // Global Variables
5671 //
5672 PCI_CONFIG_SPACE  *mConfigSpace;
5673-EFI_HII_HANDLE    HiiHandle;
5674+EFI_HII_HANDLE    gPciHiiHandle;
5675 EFI_GUID          EfiPciGuid = EFI_PCI_GUID;
5676 SHELL_VAR_CHECK_ITEM    PciCheckList[] = {
5677   {
5678@@ -504,7 +504,7 @@
5679   //
5680   EnableOutputTabPause();
5681
5682-  Status = LibInitializeStrings (&HiiHandle, STRING_ARRAY_NAME, &EfiPciGuid);
5683+  Status = LibInitializeStrings (&gPciHiiHandle, STRING_ARRAY_NAME, &EfiPciGuid);
5684
5685   if (EFI_ERROR (Status)) {
5686     return Status;
5687@@ -513,7 +513,7 @@
5688   if (!EFI_PROPER_VERSION (0, 99)) {
5689     PrintToken (
5690       STRING_TOKEN (STR_SHELLENV_GNC_COMMAND_NOT_SUPPORT),
5691-      HiiHandle,
5692+      gPciHiiHandle,
5693       L"pci",
5694       EFI_VERSION_0_99
5695       );
5696@@ -525,15 +525,15 @@
5697   if (VarCheckOk != RetCode) {
5698     switch (RetCode) {
5699     case VarCheckUnknown:
5700-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), HiiHandle, L"pci", Useful);
5701+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), gPciHiiHandle, L"pci", Useful);
5702       break;
5703
5704     case VarCheckDuplicate:
5705-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_DUP_FLAG), HiiHandle, L"pci", Useful);
5706+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_DUP_FLAG), gPciHiiHandle, L"pci", Useful);
5707       break;
5708
5709     case VarCheckLackValue:
5710-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LACK_ARG), HiiHandle, L"pci", Useful);
5711+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LACK_ARG), gPciHiiHandle, L"pci", Useful);
5712       break;
5713
5714     default:
5715@@ -555,10 +555,10 @@
5716         ChkPck.FlagCount > 2 ||
5717         (2 == ChkPck.FlagCount && !LibCheckVarGetFlag (&ChkPck, L"-b"))
5718         ) {
5719-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"pci");
5720+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gPciHiiHandle, L"pci");
5721       Status = EFI_INVALID_PARAMETER;
5722     } else {
5723-      PrintToken (STRING_TOKEN (STR_HELPINFO_PCI_VERBOSEHELP), HiiHandle);
5724+      PrintToken (STRING_TOKEN (STR_HELPINFO_PCI_VERBOSEHELP), gPciHiiHandle);
5725       Status = EFI_SUCCESS;
5726     }
5727
5728@@ -572,7 +572,7 @@
5729   HandleBufSize = sizeof (EFI_HANDLE);
5730   HandleBuf     = (EFI_HANDLE *) AllocatePool (HandleBufSize);
5731   if (HandleBuf == NULL) {
5732-    PrintToken (STRING_TOKEN (STR_PCI2_OUT_RESOURCES), HiiHandle);
5733+    PrintToken (STRING_TOKEN (STR_PCI2_OUT_RESOURCES), gPciHiiHandle);
5734     Status = EFI_OUT_OF_RESOURCES;
5735     goto Done;
5736   }
5737@@ -588,7 +588,7 @@
5738   if (Status == EFI_BUFFER_TOO_SMALL) {
5739     HandleBuf = ReallocatePool (HandleBuf, sizeof (EFI_HANDLE), HandleBufSize);
5740     if (HandleBuf == NULL) {
5741-      PrintToken (STRING_TOKEN (STR_PCI2_OUT_RESOURCES), HiiHandle);
5742+      PrintToken (STRING_TOKEN (STR_PCI2_OUT_RESOURCES), gPciHiiHandle);
5743       Status = EFI_OUT_OF_RESOURCES;
5744       goto Done;
5745     }
5746@@ -603,7 +603,7 @@
5747   }
5748
5749   if (EFI_ERROR (Status)) {
5750-    PrintToken (STRING_TOKEN (STR_PCI2_LOCATE_HANDLE), HiiHandle, Status);
5751+    PrintToken (STRING_TOKEN (STR_PCI2_LOCATE_HANDLE), gPciHiiHandle, Status);
5752     goto Done;
5753   }
5754
5755@@ -638,7 +638,7 @@
5756                 &Descriptors
5757                 );
5758       if (EFI_ERROR (Status)) {
5759-        PrintToken (STRING_TOKEN (STR_PCI2_HANDLE_PROTOCOL), HiiHandle, Status);
5760+        PrintToken (STRING_TOKEN (STR_PCI2_HANDLE_PROTOCOL), gPciHiiHandle, Status);
5761         goto Done;
5762       }
5763       //
5764@@ -650,7 +650,7 @@
5765         Status = PciGetNextBusRange (&Descriptors, &MinBus, &MaxBus, &IsEnd);
5766
5767         if (EFI_ERROR (Status)) {
5768-          PrintToken (STRING_TOKEN (STR_PCI2_BUS), HiiHandle, Status);
5769+          PrintToken (STRING_TOKEN (STR_PCI2_BUS), gPciHiiHandle, Status);
5770           goto Done;
5771         }
5772
5773@@ -694,7 +694,7 @@
5774               if (PciHeader.VendorId != 0xffff) {
5775
5776                 if (PrintTitle) {
5777-                  PrintToken (STRING_TOKEN (STR_PCI2_SEG_BUS), HiiHandle);
5778+                  PrintToken (STRING_TOKEN (STR_PCI2_SEG_BUS), gPciHiiHandle);
5779                   Print (L"   ---  ---  ---  ----\n");
5780                   PrintTitle = FALSE;
5781                 }
5782@@ -709,7 +709,7 @@
5783
5784                 PrintToken (
5785                   STRING_TOKEN (STR_PCI2_FOUR_VARS),
5786-                  HiiHandle,
5787+                  gPciHiiHandle,
5788                   IoDev->SegmentNumber,
5789                   Bus,
5790                   Device,
5791@@ -719,7 +719,7 @@
5792                 PciPrintClassCode (PciHeader.ClassCode, FALSE);
5793                 PrintToken (
5794                   STRING_TOKEN (STR_PCI2_VENDOR),
5795-                  HiiHandle,
5796+                  gPciHiiHandle,
5797                   PciHeader.VendorId,
5798                   PciHeader.DeviceId,
5799                   PciHeader.ClassCode[0]
5800@@ -760,7 +760,7 @@
5801   }
5802
5803   if (ChkPck.ValueCount == 1) {
5804-    PrintToken (STRING_TOKEN (STR_PCI2_TOO_FEW_ARGS), HiiHandle);
5805+    PrintToken (STRING_TOKEN (STR_PCI2_TOO_FEW_ARGS), gPciHiiHandle);
5806     Status = EFI_INVALID_PARAMETER;
5807     goto Done;
5808   }
5809@@ -768,7 +768,7 @@
5810   // Arg count >= 3, dump binary of specified function, interpret if necessary
5811   //
5812   if (ChkPck.ValueCount > 3) {
5813-    PrintToken (STRING_TOKEN (STR_PCI2_TOO_MANY_ARGS), HiiHandle);
5814+    PrintToken (STRING_TOKEN (STR_PCI2_TOO_MANY_ARGS), gPciHiiHandle);
5815     Status = EFI_INVALID_PARAMETER;
5816     goto Done;
5817   }
5818@@ -786,7 +786,7 @@
5819   if (NULL != Item) {
5820     Segment = (UINT16) StrToUIntegerBase (Item->VarStr, 16, &Status);
5821     if (EFI_ERROR (Status)) {
5822-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"pci", Item->VarStr);
5823+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gPciHiiHandle, L"pci", Item->VarStr);
5824       Status = EFI_INVALID_PARAMETER;
5825       goto Done;
5826     }
5827@@ -800,7 +800,7 @@
5828   if (NULL != Item) {
5829     Bus = (UINT16) StrToUIntegerBase (Item->VarStr, 16, &Status);
5830     if (EFI_ERROR (Status) || Bus > MAX_BUS_NUMBER) {
5831-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"pci", Item->VarStr);
5832+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gPciHiiHandle, L"pci", Item->VarStr);
5833       Status = EFI_INVALID_PARAMETER;
5834       goto Done;
5835     }
5836@@ -811,7 +811,7 @@
5837   if (NULL != Item) {
5838     Device = (UINT16) StrToUIntegerBase (Item->VarStr, 16, &Status);
5839     if (EFI_ERROR (Status) || Device > MAX_DEVICE_NUMBER) {
5840-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"pci", Item->VarStr);
5841+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gPciHiiHandle, L"pci", Item->VarStr);
5842       Status = EFI_INVALID_PARAMETER;
5843       goto Done;
5844     }
5845@@ -822,7 +822,7 @@
5846   if (NULL != Item) {
5847     Func = (UINT16) StrToUIntegerBase (Item->VarStr, 16, &Status);
5848     if (EFI_ERROR (Status) || Func > MAX_FUNCTION_NUMBER) {
5849-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"pci", Item->VarStr);
5850+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gPciHiiHandle, L"pci", Item->VarStr);
5851       Status = EFI_INVALID_PARAMETER;
5852       goto Done;
5853     }
5854@@ -844,7 +844,7 @@
5855   if (EFI_ERROR (Status)) {
5856     PrintToken (
5857       STRING_TOKEN (STR_PCI2_CANNOT_FIND_PROTOCOL),
5858-      HiiHandle,
5859+      gPciHiiHandle,
5860       Segment,
5861       Bus
5862       );
5863@@ -862,14 +862,14 @@
5864                         );
5865
5866   if (EFI_ERROR (Status)) {
5867-    PrintToken (STRING_TOKEN (STR_PCI2_CANNOT_READ_CONFIG), HiiHandle, Status);
5868+    PrintToken (STRING_TOKEN (STR_PCI2_CANNOT_READ_CONFIG), gPciHiiHandle, Status);
5869     goto Done;
5870   }
5871
5872   mConfigSpace = &ConfigSpace;
5873   PrintToken (
5874     STRING_TOKEN (STR_PCI2_SEGMENT_BUS),
5875-    HiiHandle,
5876+    gPciHiiHandle,
5877     Segment,
5878     Bus,
5879     Device,
5880@@ -1031,7 +1031,7 @@
5881   Status = BS->HandleProtocol (
5882                 Handle,
5883                 &gEfiPciRootBridgeIoProtocolGuid,
5884-                IoDev
5885+                (VOID **)IoDev
5886                 );
5887
5888   if (EFI_ERROR (Status)) {
5889@@ -1040,7 +1040,7 @@
5890   //
5891   // Call Configuration() to get address space descriptors
5892   //
5893-  Status = (*IoDev)->Configuration (*IoDev, Descriptors);
5894+  Status = (*IoDev)->Configuration (*IoDev, (VOID **)Descriptors);
5895   if (Status == EFI_UNSUPPORTED) {
5896     *Descriptors = NULL;
5897     return EFI_SUCCESS;
5898@@ -1154,14 +1154,14 @@
5899   //
5900   PrintToken (
5901     STRING_TOKEN (STR_PCI2_VENDOR_ID),
5902-    HiiHandle,
5903+    gPciHiiHandle,
5904     INDEX_OF (&(Common->VendorId)),
5905     Common->VendorId
5906     );
5907
5908   PrintToken (
5909     STRING_TOKEN (STR_PCI2_DEVICE_ID),
5910-    HiiHandle,
5911+    gPciHiiHandle,
5912     INDEX_OF (&(Common->DeviceId)),
5913     Common->DeviceId
5914     );
5915@@ -1181,7 +1181,7 @@
5916   //
5917   PrintToken (
5918     STRING_TOKEN (STR_PCI2_REVISION_ID),
5919-    HiiHandle,
5920+    gPciHiiHandle,
5921     INDEX_OF (&(Common->RevisionId)),
5922     Common->RevisionId
5923     );
5924@@ -1189,19 +1189,19 @@
5925   //
5926   // Print register BIST
5927   //
5928-  PrintToken (STRING_TOKEN (STR_PCI2_BIST), HiiHandle, INDEX_OF (&(Common->BIST)));
5929+  PrintToken (STRING_TOKEN (STR_PCI2_BIST), gPciHiiHandle, INDEX_OF (&(Common->BIST)));
5930   if ((Common->BIST & PCI_BIT_7) != 0) {
5931-    PrintToken (STRING_TOKEN (STR_PCI2_CAPABLE_RETURN), HiiHandle, 0x0f & Common->BIST);
5932+    PrintToken (STRING_TOKEN (STR_PCI2_CAPABLE_RETURN), gPciHiiHandle, 0x0f & Common->BIST);
5933
5934   } else {
5935-    PrintToken (STRING_TOKEN (STR_PCI2_INCAPABLE), HiiHandle);
5936+    PrintToken (STRING_TOKEN (STR_PCI2_INCAPABLE), gPciHiiHandle);
5937   }
5938   //
5939   // Print register Cache Line Size
5940   //
5941   PrintToken (
5942     STRING_TOKEN (STR_PCI2_CACHE_LINE_SIZE),
5943-    HiiHandle,
5944+    gPciHiiHandle,
5945     INDEX_OF (&(Common->CacheLineSize)),
5946     Common->CacheLineSize
5947     );
5948@@ -1211,7 +1211,7 @@
5949   //
5950   PrintToken (
5951     STRING_TOKEN (STR_PCI2_LATENCY_TIMER),
5952-    HiiHandle,
5953+    gPciHiiHandle,
5954     INDEX_OF (&(Common->PrimaryLatencyTimer)),
5955     Common->PrimaryLatencyTimer
5956     );
5957@@ -1221,41 +1221,41 @@
5958   //
5959   PrintToken (
5960     STRING_TOKEN (STR_PCI2_HEADER_TYPE),
5961-    HiiHandle,
5962+    gPciHiiHandle,
5963     INDEX_OF (&(Common->HeaderType)),
5964     Common->HeaderType
5965     );
5966
5967   if ((Common->HeaderType & PCI_BIT_7) != 0) {
5968-    PrintToken (STRING_TOKEN (STR_PCI2_MULTI_FUNCTION), HiiHandle);
5969+    PrintToken (STRING_TOKEN (STR_PCI2_MULTI_FUNCTION), gPciHiiHandle);
5970
5971   } else {
5972-    PrintToken (STRING_TOKEN (STR_PCI2_SINGLE_FUNCTION), HiiHandle);
5973+    PrintToken (STRING_TOKEN (STR_PCI2_SINGLE_FUNCTION), gPciHiiHandle);
5974   }
5975
5976   HeaderType = (UINT8) (Common->HeaderType & 0x7f);
5977   switch (HeaderType) {
5978   case PciDevice:
5979-    PrintToken (STRING_TOKEN (STR_PCI2_PCI_DEVICE), HiiHandle);
5980+    PrintToken (STRING_TOKEN (STR_PCI2_PCI_DEVICE), gPciHiiHandle);
5981     break;
5982
5983   case PciP2pBridge:
5984-    PrintToken (STRING_TOKEN (STR_PCI2_P2P_BRIDGE), HiiHandle);
5985+    PrintToken (STRING_TOKEN (STR_PCI2_P2P_BRIDGE), gPciHiiHandle);
5986     break;
5987
5988   case PciCardBusBridge:
5989-    PrintToken (STRING_TOKEN (STR_PCI2_CARDBUS_BRIDGE), HiiHandle);
5990+    PrintToken (STRING_TOKEN (STR_PCI2_CARDBUS_BRIDGE), gPciHiiHandle);
5991     break;
5992
5993   default:
5994-    PrintToken (STRING_TOKEN (STR_PCI2_RESERVED), HiiHandle);
5995+    PrintToken (STRING_TOKEN (STR_PCI2_RESERVED), gPciHiiHandle);
5996     HeaderType = PciUndefined;
5997   }
5998
5999   //
6000   // Print register Class Code
6001   //
6002-  PrintToken (STRING_TOKEN (STR_PCI2_CLASS), HiiHandle);
6003+  PrintToken (STRING_TOKEN (STR_PCI2_CLASS), gPciHiiHandle);
6004   PciPrintClassCode ((UINT8 *) Common->ClassCode, TRUE);
6005   Print (L"\n");
6006
6007@@ -1296,6 +1296,9 @@
6008               );
6009     CapPtr = ConfigSpace->NonCommon.CardBus.CapabilitiesPtr;
6010     break;
6011+
6012+  default:
6013+    break;
6014   }
6015   //
6016   // If Status bit4 is 1, dump or explain capability structure
6017@@ -1341,7 +1344,7 @@
6018   // exist. If these no Bar for this function, print "none", otherwise
6019   // list detail information about this Bar.
6020   //
6021-  PrintToken (STRING_TOKEN (STR_PCI2_BASE_ADDR), HiiHandle, INDEX_OF (Device->Bar));
6022+  PrintToken (STRING_TOKEN (STR_PCI2_BASE_ADDR), gPciHiiHandle, INDEX_OF (Device->Bar));
6023
6024   BarExist  = FALSE;
6025   BarCount  = sizeof (Device->Bar) / sizeof (Device->Bar[0]);
6026@@ -1352,7 +1355,7 @@
6027
6028     if (!BarExist) {
6029       BarExist = TRUE;
6030-      PrintToken (STRING_TOKEN (STR_PCI2_START_TYPE), HiiHandle);
6031+      PrintToken (STRING_TOKEN (STR_PCI2_START_TYPE), gPciHiiHandle);
6032       Print (L"  --------------------------------------------------------------------------");
6033     }
6034
6035@@ -1370,7 +1373,7 @@
6036   }
6037
6038   if (!BarExist) {
6039-    PrintToken (STRING_TOKEN (STR_PCI2_NONE), HiiHandle);
6040+    PrintToken (STRING_TOKEN (STR_PCI2_NONE), gPciHiiHandle);
6041
6042   } else {
6043     Print (L"\n  --------------------------------------------------------------------------");
6044@@ -1380,12 +1383,12 @@
6045   // Print register Expansion ROM Base Address
6046   //
6047   if ((Device->ROMBar & PCI_BIT_0) == 0) {
6048-    PrintToken (STRING_TOKEN (STR_PCI2_EXPANSION_ROM_DISABLED), HiiHandle, INDEX_OF (&(Device->ROMBar)));
6049+    PrintToken (STRING_TOKEN (STR_PCI2_EXPANSION_ROM_DISABLED), gPciHiiHandle, INDEX_OF (&(Device->ROMBar)));
6050
6051   } else {
6052     PrintToken (
6053       STRING_TOKEN (STR_PCI2_EXPANSION_ROM_BASE),
6054-      HiiHandle,
6055+      gPciHiiHandle,
6056       INDEX_OF (&(Device->ROMBar)),
6057       Device->ROMBar
6058       );
6059@@ -1395,7 +1398,7 @@
6060   //
6061   PrintToken (
6062     STRING_TOKEN (STR_PCI2_CARDBUS_CIS),
6063-    HiiHandle,
6064+    gPciHiiHandle,
6065     INDEX_OF (&(Device->CardBusCISPtr)),
6066     Device->CardBusCISPtr
6067     );
6068@@ -1405,14 +1408,14 @@
6069   //
6070   PrintToken (
6071     STRING_TOKEN (STR_PCI2_SUB_VENDOR_ID),
6072-    HiiHandle,
6073+    gPciHiiHandle,
6074     INDEX_OF (&(Device->SubVendorId)),
6075     Device->SubVendorId
6076     );
6077
6078   PrintToken (
6079     STRING_TOKEN (STR_PCI2_SUBSYSTEM_ID),
6080-    HiiHandle,
6081+    gPciHiiHandle,
6082     INDEX_OF (&(Device->SubSystemId)),
6083     Device->SubSystemId
6084     );
6085@@ -1422,7 +1425,7 @@
6086   //
6087   PrintToken (
6088     STRING_TOKEN (STR_PCI2_CAPABILITIES_PTR),
6089-    HiiHandle,
6090+    gPciHiiHandle,
6091     INDEX_OF (&(Device->CapabilitiesPtr)),
6092     Device->CapabilitiesPtr
6093     );
6094@@ -1432,14 +1435,14 @@
6095   //
6096   PrintToken (
6097     STRING_TOKEN (STR_PCI2_INTERRUPT_LINE),
6098-    HiiHandle,
6099+    gPciHiiHandle,
6100     INDEX_OF (&(Device->InterruptLine)),
6101     Device->InterruptLine
6102     );
6103
6104   PrintToken (
6105     STRING_TOKEN (STR_PCI2_INTERRUPT_PIN),
6106-    HiiHandle,
6107+    gPciHiiHandle,
6108     INDEX_OF (&(Device->InterruptPin)),
6109     Device->InterruptPin
6110     );
6111@@ -1449,14 +1452,14 @@
6112   //
6113   PrintToken (
6114     STRING_TOKEN (STR_PCI2_MIN_GNT),
6115-    HiiHandle,
6116+    gPciHiiHandle,
6117     INDEX_OF (&(Device->MinGnt)),
6118     Device->MinGnt
6119     );
6120
6121   PrintToken (
6122     STRING_TOKEN (STR_PCI2_MAX_LAT),
6123-    HiiHandle,
6124+    gPciHiiHandle,
6125     INDEX_OF (&(Device->MaxLat)),
6126     Device->MaxLat
6127     );
6128@@ -1499,7 +1502,7 @@
6129   // exist. If these no Bar for this function, print "none", otherwise
6130   // list detail information about this Bar.
6131   //
6132-  PrintToken (STRING_TOKEN (STR_PCI2_BASE_ADDRESS), HiiHandle, INDEX_OF (&(Bridge->Bar)));
6133+  PrintToken (STRING_TOKEN (STR_PCI2_BASE_ADDRESS), gPciHiiHandle, INDEX_OF (&(Bridge->Bar)));
6134
6135   BarExist  = FALSE;
6136   BarCount  = sizeof (Bridge->Bar) / sizeof (Bridge->Bar[0]);
6137@@ -1511,7 +1514,7 @@
6138
6139     if (!BarExist) {
6140       BarExist = TRUE;
6141-      PrintToken (STRING_TOKEN (STR_PCI2_START_TYPE_2), HiiHandle);
6142+      PrintToken (STRING_TOKEN (STR_PCI2_START_TYPE_2), gPciHiiHandle);
6143       Print (L"  --------------------------------------------------------------------------");
6144     }
6145
6146@@ -1529,7 +1532,7 @@
6147   }
6148
6149   if (!BarExist) {
6150-    PrintToken (STRING_TOKEN (STR_PCI2_NONE), HiiHandle);
6151+    PrintToken (STRING_TOKEN (STR_PCI2_NONE), gPciHiiHandle);
6152   } else {
6153     Print (L"\n  --------------------------------------------------------------------------");
6154   }
6155@@ -1538,12 +1541,12 @@
6156   // Expansion register ROM Base Address
6157   //
6158   if ((Bridge->ROMBar & PCI_BIT_0) == 0) {
6159-    PrintToken (STRING_TOKEN (STR_PCI2_NO_EXPANSION_ROM), HiiHandle, INDEX_OF (&(Bridge->ROMBar)));
6160+    PrintToken (STRING_TOKEN (STR_PCI2_NO_EXPANSION_ROM), gPciHiiHandle, INDEX_OF (&(Bridge->ROMBar)));
6161
6162   } else {
6163     PrintToken (
6164       STRING_TOKEN (STR_PCI2_EXPANSION_ROM_BASE_2),
6165-      HiiHandle,
6166+      gPciHiiHandle,
6167       INDEX_OF (&(Bridge->ROMBar)),
6168       Bridge->ROMBar
6169       );
6170@@ -1553,7 +1556,7 @@
6171   //
6172   PrintToken (
6173     STRING_TOKEN (STR_PCI2_BUS_NUMBERS),
6174-    HiiHandle,
6175+    gPciHiiHandle,
6176     INDEX_OF (&(Bridge->PrimaryBus)),
6177     INDEX_OF (&(Bridge->SecondaryBus)),
6178     INDEX_OF (&(Bridge->SubordinateBus))
6179@@ -1561,16 +1564,16 @@
6180
6181   Print (L"               ------------------------------------------------------\n");
6182
6183-  PrintToken (STRING_TOKEN (STR_PCI2_BRIDGE), HiiHandle, Bridge->PrimaryBus);
6184-  PrintToken (STRING_TOKEN (STR_PCI2_BRIDGE), HiiHandle, Bridge->SecondaryBus);
6185-  PrintToken (STRING_TOKEN (STR_PCI2_BRIDGE), HiiHandle, Bridge->SubordinateBus);
6186+  PrintToken (STRING_TOKEN (STR_PCI2_BRIDGE), gPciHiiHandle, Bridge->PrimaryBus);
6187+  PrintToken (STRING_TOKEN (STR_PCI2_BRIDGE), gPciHiiHandle, Bridge->SecondaryBus);
6188+  PrintToken (STRING_TOKEN (STR_PCI2_BRIDGE), gPciHiiHandle, Bridge->SubordinateBus);
6189
6190   //
6191   // Print register Secondary Latency Timer
6192   //
6193   PrintToken (
6194     STRING_TOKEN (STR_PCI2_SECONDARY_TIMER),
6195-    HiiHandle,
6196+    gPciHiiHandle,
6197     INDEX_OF (&(Bridge->SecondaryLatencyTimer)),
6198     Bridge->SecondaryLatencyTimer
6199     );
6200@@ -1585,7 +1588,7 @@
6201   // types: I/O, memory, and pre-fetchable memory. For each resource type,
6202   // base and limit address are listed.
6203   //
6204-  PrintToken (STRING_TOKEN (STR_PCI2_RESOURCE_TYPE), HiiHandle);
6205+  PrintToken (STRING_TOKEN (STR_PCI2_RESOURCE_TYPE), gPciHiiHandle);
6206   Print (L"----------------------------------------------------------------------\n");
6207
6208   //
6209@@ -1595,28 +1598,28 @@
6210   IoAddress32 &= 0xfffff000;
6211   PrintToken (
6212     STRING_TOKEN (STR_PCI2_TWO_VARS),
6213-    HiiHandle,
6214+    gPciHiiHandle,
6215     INDEX_OF (&(Bridge->IoBase)),
6216     IoAddress32
6217     );
6218
6219   IoAddress32 = (Bridge->IoLimitUpper << 16 | Bridge->IoLimit << 8);
6220   IoAddress32 |= 0x00000fff;
6221-  PrintToken (STRING_TOKEN (STR_PCI2_ONE_VAR), HiiHandle, IoAddress32);
6222+  PrintToken (STRING_TOKEN (STR_PCI2_ONE_VAR), gPciHiiHandle, IoAddress32);
6223
6224   //
6225   // Memory Base & Limit
6226   //
6227   PrintToken (
6228     STRING_TOKEN (STR_PCI2_MEMORY),
6229-    HiiHandle,
6230+    gPciHiiHandle,
6231     INDEX_OF (&(Bridge->MemoryBase)),
6232     (Bridge->MemoryBase << 16) & 0xfff00000
6233     );
6234
6235   PrintToken (
6236     STRING_TOKEN (STR_PCI2_ONE_VAR),
6237-    HiiHandle,
6238+    gPciHiiHandle,
6239     (Bridge->MemoryLimit << 16) | 0x000fffff
6240     );
6241
6242@@ -1625,7 +1628,7 @@
6243   //
6244   PrintToken (
6245     STRING_TOKEN (STR_PCI2_PREFETCHABLE),
6246-    HiiHandle,
6247+    gPciHiiHandle,
6248     INDEX_OF (&(Bridge->PrefetchableMemBase)),
6249     Bridge->PrefetchableBaseUpper,
6250     (Bridge->PrefetchableMemBase << 16) & 0xfff00000
6251@@ -1633,7 +1636,7 @@
6252
6253   PrintToken (
6254     STRING_TOKEN (STR_PCI2_TWO_VARS_2),
6255-    HiiHandle,
6256+    gPciHiiHandle,
6257     Bridge->PrefetchableLimitUpper,
6258     (Bridge->PrefetchableMemLimit << 16) | 0x000fffff
6259     );
6260@@ -1643,7 +1646,7 @@
6261   //
6262   PrintToken (
6263     STRING_TOKEN (STR_PCI2_CAPABILITIES_PTR_2),
6264-    HiiHandle,
6265+    gPciHiiHandle,
6266     INDEX_OF (&(Bridge->CapabilitiesPtr)),
6267     Bridge->CapabilitiesPtr
6268     );
6269@@ -1658,14 +1661,14 @@
6270   //
6271   PrintToken (
6272     STRING_TOKEN (STR_PCI2_INTERRUPT_LINE_2),
6273-    HiiHandle,
6274+    gPciHiiHandle,
6275     INDEX_OF (&(Bridge->InterruptLine)),
6276     Bridge->InterruptLine
6277     );
6278
6279   PrintToken (
6280     STRING_TOKEN (STR_PCI2_INTERRUPT_PIN),
6281-    HiiHandle,
6282+    gPciHiiHandle,
6283     INDEX_OF (&(Bridge->InterruptPin)),
6284     Bridge->InterruptPin
6285     );
6286@@ -1728,17 +1731,17 @@
6287     IsMem = TRUE;
6288
6289     if ((*Bar & PCI_BIT_1) == 0 && (*Bar & PCI_BIT_2) == 0) {
6290-      PrintToken (STRING_TOKEN (STR_PCI2_BAR), HiiHandle, *Bar & 0xfffffff0);
6291-      PrintToken (STRING_TOKEN (STR_PCI2_MEM), HiiHandle);
6292-      PrintToken (STRING_TOKEN (STR_PCI2_32_BITS), HiiHandle);
6293+      PrintToken (STRING_TOKEN (STR_PCI2_BAR), gPciHiiHandle, *Bar & 0xfffffff0);
6294+      PrintToken (STRING_TOKEN (STR_PCI2_MEM), gPciHiiHandle);
6295+      PrintToken (STRING_TOKEN (STR_PCI2_32_BITS), gPciHiiHandle);
6296
6297     } else if ((*Bar & PCI_BIT_1) == 0 && (*Bar & PCI_BIT_2) != 0) {
6298       Bar64 = 0x0;
6299       CopyMem (&Bar64, Bar, sizeof (UINT32));
6300-      PrintToken (STRING_TOKEN (STR_PCI2_ONE_VAR_2), HiiHandle, RShiftU64 ((Bar64 & 0xfffffffffffffff0), 32));
6301-      PrintToken (STRING_TOKEN (STR_PCI2_ONE_VAR_3), HiiHandle, Bar64 & 0xfffffffffffffff0);
6302-      PrintToken (STRING_TOKEN (STR_PCI2_MEM), HiiHandle);
6303-      PrintToken (STRING_TOKEN (STR_PCI2_64_BITS), HiiHandle);
6304+      PrintToken (STRING_TOKEN (STR_PCI2_ONE_VAR_2), gPciHiiHandle, RShiftU64 ((Bar64 & 0xfffffffffffffff0ULL), 32));
6305+      PrintToken (STRING_TOKEN (STR_PCI2_ONE_VAR_3), gPciHiiHandle, Bar64 & 0xfffffffffffffff0ULL);
6306+      PrintToken (STRING_TOKEN (STR_PCI2_MEM), gPciHiiHandle);
6307+      PrintToken (STRING_TOKEN (STR_PCI2_64_BITS), gPciHiiHandle);
6308       IsBar32 = FALSE;
6309       *Index += 1;
6310
6311@@ -1746,15 +1749,15 @@
6312       //
6313       // Reserved
6314       //
6315-      PrintToken (STRING_TOKEN (STR_PCI2_BAR), HiiHandle, *Bar & 0xfffffff0);
6316-      PrintToken (STRING_TOKEN (STR_PCI2_MEM_2), HiiHandle);
6317+      PrintToken (STRING_TOKEN (STR_PCI2_BAR), gPciHiiHandle, *Bar & 0xfffffff0);
6318+      PrintToken (STRING_TOKEN (STR_PCI2_MEM_2), gPciHiiHandle);
6319     }
6320
6321     if ((*Bar & PCI_BIT_3) == 0) {
6322-      PrintToken (STRING_TOKEN (STR_PCI2_NO), HiiHandle);
6323+      PrintToken (STRING_TOKEN (STR_PCI2_NO), gPciHiiHandle);
6324
6325     } else {
6326-      PrintToken (STRING_TOKEN (STR_PCI2_YES), HiiHandle);
6327+      PrintToken (STRING_TOKEN (STR_PCI2_YES), gPciHiiHandle);
6328     }
6329
6330   } else {
6331@@ -1762,7 +1765,7 @@
6332     // This bar is of io type
6333     //
6334     IsMem = FALSE;
6335-    PrintToken (STRING_TOKEN (STR_PCI2_ONE_VAR_4), HiiHandle, *Bar & 0xfffffffc);
6336+    PrintToken (STRING_TOKEN (STR_PCI2_ONE_VAR_4), gPciHiiHandle, *Bar & 0xfffffffc);
6337     Print (L"I/O                               ");
6338   }
6339
6340@@ -1807,18 +1810,18 @@
6341
6342     OldBar64 = 0x0;
6343     CopyMem (&OldBar64, Bar, sizeof (UINT32));
6344-    NewBar64 = 0xffffffffffffffff;
6345+    NewBar64 = 0xffffffffffffffffULL;
6346
6347     IoDev->Pci.Write (IoDev, EfiPciWidthUint32, RegAddress, 2, &NewBar64);
6348     IoDev->Pci.Read (IoDev, EfiPciWidthUint32, RegAddress, 2, &NewBar64);
6349     IoDev->Pci.Write (IoDev, EfiPciWidthUint32, RegAddress, 2, &OldBar64);
6350
6351     if (IsMem) {
6352-      NewBar64  = NewBar64 & 0xfffffffffffffff0;
6353+      NewBar64  = NewBar64 & 0xfffffffffffffff0ULL;
6354       NewBar64  = (~NewBar64) + 1;
6355
6356     } else {
6357-      NewBar64  = NewBar64 & 0xfffffffffffffffc;
6358+      NewBar64  = NewBar64 & 0xfffffffffffffffcULL;
6359       NewBar64  = (~NewBar64) + 1;
6360       NewBar64  = NewBar64 & 0x000000000000ffff;
6361     }
6362@@ -1831,24 +1834,24 @@
6363
6364   if (IsMem) {
6365     if (IsBar32) {
6366-      PrintToken (STRING_TOKEN (STR_PCI2_NEWBAR_32), HiiHandle, NewBar32);
6367-      PrintToken (STRING_TOKEN (STR_PCI2_NEWBAR_32_2), HiiHandle, NewBar32 + (*Bar & 0xfffffff0) - 1);
6368+      PrintToken (STRING_TOKEN (STR_PCI2_NEWBAR_32), gPciHiiHandle, NewBar32);
6369+      PrintToken (STRING_TOKEN (STR_PCI2_NEWBAR_32_2), gPciHiiHandle, NewBar32 + (*Bar & 0xfffffff0) - 1);
6370
6371     } else {
6372-      PrintToken (STRING_TOKEN (STR_PCI2_RSHIFT), HiiHandle, RShiftU64 (NewBar64, 32));
6373-      PrintToken (STRING_TOKEN (STR_PCI2_RSHIFT), HiiHandle, (UINT32) NewBar64);
6374+      PrintToken (STRING_TOKEN (STR_PCI2_RSHIFT), gPciHiiHandle, RShiftU64 (NewBar64, 32));
6375+      PrintToken (STRING_TOKEN (STR_PCI2_RSHIFT), gPciHiiHandle, (UINT32) NewBar64);
6376       Print (L"  ");
6377       PrintToken (
6378         STRING_TOKEN (STR_PCI2_RSHIFT),
6379-        HiiHandle,
6380-        RShiftU64 ((NewBar64 + (Bar64 & 0xfffffffffffffff0) - 1), 32)
6381+        gPciHiiHandle,
6382+        RShiftU64 ((NewBar64 + (Bar64 & 0xfffffffffffffff0ULL) - 1), 32)
6383         );
6384-      PrintToken (STRING_TOKEN (STR_PCI2_RSHIFT), HiiHandle, (UINT32) (NewBar64 + (Bar64 & 0xfffffffffffffff0) - 1));
6385+      PrintToken (STRING_TOKEN (STR_PCI2_RSHIFT), gPciHiiHandle, (UINT32) (NewBar64 + (Bar64 & 0xfffffffffffffff0ULL) - 1));
6386
6387     }
6388   } else {
6389-    PrintToken (STRING_TOKEN (STR_PCI2_NEWBAR_32_3), HiiHandle, NewBar32);
6390-    PrintToken (STRING_TOKEN (STR_PCI2_NEWBAR_32_4), HiiHandle, NewBar32 + (*Bar & 0xfffffffc) - 1);
6391+    PrintToken (STRING_TOKEN (STR_PCI2_NEWBAR_32_3), gPciHiiHandle, NewBar32);
6392+    PrintToken (STRING_TOKEN (STR_PCI2_NEWBAR_32_4), gPciHiiHandle, NewBar32 + (*Bar & 0xfffffffc) - 1);
6393   }
6394
6395   return EFI_SUCCESS;
6396@@ -1883,7 +1886,7 @@
6397
6398   PrintToken (
6399     STRING_TOKEN (STR_PCI2_CARDBUS_SOCKET),
6400-    HiiHandle,
6401+    gPciHiiHandle,
6402     INDEX_OF (&(CardBus->CardBusSocketReg)),
6403     CardBus->CardBusSocketReg
6404     );
6405@@ -1899,7 +1902,7 @@
6406   //
6407   PrintToken (
6408     STRING_TOKEN (STR_PCI2_BUS_NUMBERS_2),
6409-    HiiHandle,
6410+    gPciHiiHandle,
6411     INDEX_OF (&(CardBus->PciBusNumber)),
6412     INDEX_OF (&(CardBus->CardBusBusNumber)),
6413     INDEX_OF (&(CardBus->SubordinateBusNumber))
6414@@ -1907,16 +1910,16 @@
6415
6416   Print (L"               ------------------------------------------------------\n");
6417
6418-  PrintToken (STRING_TOKEN (STR_PCI2_CARDBUS), HiiHandle, CardBus->PciBusNumber);
6419-  PrintToken (STRING_TOKEN (STR_PCI2_CARDBUS_2), HiiHandle, CardBus->CardBusBusNumber);
6420-  PrintToken (STRING_TOKEN (STR_PCI2_CARDBUS_3), HiiHandle, CardBus->SubordinateBusNumber);
6421+  PrintToken (STRING_TOKEN (STR_PCI2_CARDBUS), gPciHiiHandle, CardBus->PciBusNumber);
6422+  PrintToken (STRING_TOKEN (STR_PCI2_CARDBUS_2), gPciHiiHandle, CardBus->CardBusBusNumber);
6423+  PrintToken (STRING_TOKEN (STR_PCI2_CARDBUS_3), gPciHiiHandle, CardBus->SubordinateBusNumber);
6424
6425   //
6426   // Print CardBus Latency Timer
6427   //
6428   PrintToken (
6429     STRING_TOKEN (STR_PCI2_CARDBUS_LATENCY),
6430-    HiiHandle,
6431+    gPciHiiHandle,
6432     INDEX_OF (&(CardBus->CardBusLatencyTimer)),
6433     CardBus->CardBusLatencyTimer
6434     );
6435@@ -1924,12 +1927,12 @@
6436   //
6437   // Print Memory/Io ranges this cardbus bridge forwards
6438   //
6439-  PrintToken (STRING_TOKEN (STR_PCI2_RESOURCE_TYPE_2), HiiHandle);
6440+  PrintToken (STRING_TOKEN (STR_PCI2_RESOURCE_TYPE_2), gPciHiiHandle);
6441   Print (L"----------------------------------------------------------------------\n");
6442
6443   PrintToken (
6444     STRING_TOKEN (STR_PCI2_MEM_3),
6445-    HiiHandle,
6446+    gPciHiiHandle,
6447     INDEX_OF (&(CardBus->MemoryBase0)),
6448     CardBus->BridgeControl & PCI_BIT_8 ? L"    Prefetchable" : L"Non-Prefetchable",
6449     CardBus->MemoryBase0 & 0xfffff000,
6450@@ -1938,7 +1941,7 @@
6451
6452   PrintToken (
6453     STRING_TOKEN (STR_PCI2_MEM_3),
6454-    HiiHandle,
6455+    gPciHiiHandle,
6456     INDEX_OF (&(CardBus->MemoryBase1)),
6457     CardBus->BridgeControl & PCI_BIT_9 ? L"    Prefetchable" : L"Non-Prefetchable",
6458     CardBus->MemoryBase1 & 0xfffff000,
6459@@ -1948,21 +1951,21 @@
6460   Io32Bit = (BOOLEAN) (CardBus->IoBase0 & PCI_BIT_0);
6461   PrintToken (
6462     STRING_TOKEN (STR_PCI2_IO_2),
6463-    HiiHandle,
6464+    gPciHiiHandle,
6465     INDEX_OF (&(CardBus->IoBase0)),
6466     Io32Bit ? L"          32 bit" : L"          16 bit",
6467     CardBus->IoBase0 & (Io32Bit ? 0xfffffffc : 0x0000fffc),
6468-    CardBus->IoLimit0 & (Io32Bit ? 0xffffffff : 0x0000ffff) | 0x00000003
6469+    (CardBus->IoLimit0 & (Io32Bit ? 0xffffffff : 0x0000ffff)) | 0x00000003
6470     );
6471
6472   Io32Bit = (BOOLEAN) (CardBus->IoBase1 & PCI_BIT_0);
6473   PrintToken (
6474     STRING_TOKEN (STR_PCI2_IO_2),
6475-    HiiHandle,
6476+    gPciHiiHandle,
6477     INDEX_OF (&(CardBus->IoBase1)),
6478     Io32Bit ? L"          32 bit" : L"          16 bit",
6479     CardBus->IoBase1 & (Io32Bit ? 0xfffffffc : 0x0000fffc),
6480-    CardBus->IoLimit1 & (Io32Bit ? 0xffffffff : 0x0000ffff) | 0x00000003
6481+    (CardBus->IoLimit1 & (Io32Bit ? 0xffffffff : 0x0000ffff)) | 0x00000003
6482     );
6483
6484   //
6485@@ -1970,7 +1973,7 @@
6486   //
6487   PrintToken (
6488     STRING_TOKEN (STR_PCI2_INTERRUPT_LINE_3),
6489-    HiiHandle,
6490+    gPciHiiHandle,
6491     INDEX_OF (&(CardBus->InterruptLine)),
6492     CardBus->InterruptLine,
6493     INDEX_OF (&(CardBus->InterruptPin)),
6494@@ -1991,7 +1994,7 @@
6495
6496   PrintToken (
6497     STRING_TOKEN (STR_PCI2_SUB_VENDOR_ID_2),
6498-    HiiHandle,
6499+    gPciHiiHandle,
6500     INDEX_OF (&(CardBusData->SubVendorId)),
6501     CardBusData->SubVendorId,
6502     INDEX_OF (&(CardBusData->SubSystemId)),
6503@@ -2000,7 +2003,7 @@
6504
6505   PrintToken (
6506     STRING_TOKEN (STR_PCI2_OPTIONAL),
6507-    HiiHandle,
6508+    gPciHiiHandle,
6509     INDEX_OF (&(CardBusData->LegacyBase)),
6510     CardBusData->LegacyBase
6511     );
6512@@ -2035,80 +2038,80 @@
6513 --*/
6514 {
6515   if (MainStatus) {
6516-    PrintToken (STRING_TOKEN (STR_PCI2_STATUS), HiiHandle, INDEX_OF (Status), *Status);
6517+    PrintToken (STRING_TOKEN (STR_PCI2_STATUS), gPciHiiHandle, INDEX_OF (Status), *Status);
6518
6519   } else {
6520-    PrintToken (STRING_TOKEN (STR_PCI2_SECONDARY_STATUS), HiiHandle, INDEX_OF (Status), *Status);
6521+    PrintToken (STRING_TOKEN (STR_PCI2_SECONDARY_STATUS), gPciHiiHandle, INDEX_OF (Status), *Status);
6522   }
6523
6524-  PrintToken (STRING_TOKEN (STR_PCI2_NEW_CAPABILITIES), HiiHandle, (*Status & PCI_BIT_4) != 0);
6525+  PrintToken (STRING_TOKEN (STR_PCI2_NEW_CAPABILITIES), gPciHiiHandle, (*Status & PCI_BIT_4) != 0);
6526
6527   //
6528   // Bit 5 is meaningless for CardBus Bridge
6529   //
6530   if (HeaderType == PciCardBusBridge) {
6531-    PrintToken (STRING_TOKEN (STR_PCI2_66_CAPABLE), HiiHandle, (*Status & PCI_BIT_5) != 0);
6532+    PrintToken (STRING_TOKEN (STR_PCI2_66_CAPABLE), gPciHiiHandle, (*Status & PCI_BIT_5) != 0);
6533
6534   } else {
6535-    PrintToken (STRING_TOKEN (STR_PCI2_66_CAPABLE_2), HiiHandle, (*Status & PCI_BIT_5) != 0);
6536+    PrintToken (STRING_TOKEN (STR_PCI2_66_CAPABLE_2), gPciHiiHandle, (*Status & PCI_BIT_5) != 0);
6537   }
6538
6539-  PrintToken (STRING_TOKEN (STR_PCI2_FAST_BACK), HiiHandle, (*Status & PCI_BIT_7) != 0);
6540+  PrintToken (STRING_TOKEN (STR_PCI2_FAST_BACK), gPciHiiHandle, (*Status & PCI_BIT_7) != 0);
6541
6542-  PrintToken (STRING_TOKEN (STR_PCI2_MASTER_DATA), HiiHandle, (*Status & PCI_BIT_8) != 0);
6543+  PrintToken (STRING_TOKEN (STR_PCI2_MASTER_DATA), gPciHiiHandle, (*Status & PCI_BIT_8) != 0);
6544   //
6545   // Bit 9 and bit 10 together decides the DEVSEL timing
6546   //
6547-  PrintToken (STRING_TOKEN (STR_PCI2_DEVSEL_TIMING), HiiHandle);
6548+  PrintToken (STRING_TOKEN (STR_PCI2_DEVSEL_TIMING), gPciHiiHandle);
6549   if ((*Status & PCI_BIT_9) == 0 && (*Status & PCI_BIT_10) == 0) {
6550-    PrintToken (STRING_TOKEN (STR_PCI2_FAST), HiiHandle);
6551+    PrintToken (STRING_TOKEN (STR_PCI2_FAST), gPciHiiHandle);
6552
6553   } else if ((*Status & PCI_BIT_9) != 0 && (*Status & PCI_BIT_10) == 0) {
6554-    PrintToken (STRING_TOKEN (STR_PCI2_MEDIUM), HiiHandle);
6555+    PrintToken (STRING_TOKEN (STR_PCI2_MEDIUM), gPciHiiHandle);
6556
6557   } else if ((*Status & PCI_BIT_9) == 0 && (*Status & PCI_BIT_10) != 0) {
6558-    PrintToken (STRING_TOKEN (STR_PCI2_SLOW), HiiHandle);
6559+    PrintToken (STRING_TOKEN (STR_PCI2_SLOW), gPciHiiHandle);
6560
6561   } else {
6562-    PrintToken (STRING_TOKEN (STR_PCI2_RESERVED_2), HiiHandle);
6563+    PrintToken (STRING_TOKEN (STR_PCI2_RESERVED_2), gPciHiiHandle);
6564   }
6565
6566   PrintToken (
6567     STRING_TOKEN (STR_PCI2_SIGNALED_TARGET),
6568-    HiiHandle,
6569+    gPciHiiHandle,
6570     (*Status & PCI_BIT_11) != 0
6571     );
6572
6573   PrintToken (
6574     STRING_TOKEN (STR_PCI2_RECEIVED_TARGET),
6575-    HiiHandle,
6576+    gPciHiiHandle,
6577     (*Status & PCI_BIT_12) != 0
6578     );
6579
6580   PrintToken (
6581     STRING_TOKEN (STR_PCI2_RECEIVED_MASTER),
6582-    HiiHandle,
6583+    gPciHiiHandle,
6584     (*Status & PCI_BIT_13) != 0
6585     );
6586
6587   if (MainStatus) {
6588     PrintToken (
6589       STRING_TOKEN (STR_PCI2_SIGNALED_ERROR),
6590-      HiiHandle,
6591+      gPciHiiHandle,
6592       (*Status & PCI_BIT_14) != 0
6593       );
6594
6595   } else {
6596     PrintToken (
6597       STRING_TOKEN (STR_PCI2_RECEIVED_ERROR),
6598-      HiiHandle,
6599+      gPciHiiHandle,
6600       (*Status & PCI_BIT_14) != 0
6601       );
6602   }
6603
6604   PrintToken (
6605     STRING_TOKEN (STR_PCI2_DETECTED_ERROR),
6606-    HiiHandle,
6607+    gPciHiiHandle,
6608     (*Status & PCI_BIT_15) != 0
6609     );
6610
6611@@ -2138,68 +2141,68 @@
6612   //
6613   // Print the binary value of register Command
6614   //
6615-  PrintToken (STRING_TOKEN (STR_PCI2_COMMAND), HiiHandle, INDEX_OF (Command), *Command);
6616+  PrintToken (STRING_TOKEN (STR_PCI2_COMMAND), gPciHiiHandle, INDEX_OF (Command), *Command);
6617
6618   //
6619   // Explain register Command bit by bit
6620   //
6621   PrintToken (
6622     STRING_TOKEN (STR_PCI2_SPACE_ACCESS_DENIED),
6623-    HiiHandle,
6624+    gPciHiiHandle,
6625     (*Command & PCI_BIT_0) != 0
6626     );
6627
6628   PrintToken (
6629     STRING_TOKEN (STR_PCI2_MEMORY_SPACE),
6630-    HiiHandle,
6631+    gPciHiiHandle,
6632     (*Command & PCI_BIT_1) != 0
6633     );
6634
6635   PrintToken (
6636     STRING_TOKEN (STR_PCI2_BEHAVE_BUS_MASTER),
6637-    HiiHandle,
6638+    gPciHiiHandle,
6639     (*Command & PCI_BIT_2) != 0
6640     );
6641
6642   PrintToken (
6643     STRING_TOKEN (STR_PCI2_MONITOR_SPECIAL_CYCLE),
6644-    HiiHandle,
6645+    gPciHiiHandle,
6646     (*Command & PCI_BIT_3) != 0
6647     );
6648
6649   PrintToken (
6650     STRING_TOKEN (STR_PCI2_MEM_WRITE_INVALIDATE),
6651-    HiiHandle,
6652+    gPciHiiHandle,
6653     (*Command & PCI_BIT_4) != 0
6654     );
6655
6656   PrintToken (
6657     STRING_TOKEN (STR_PCI2_PALETTE_SNOOPING),
6658-    HiiHandle,
6659+    gPciHiiHandle,
6660     (*Command & PCI_BIT_5) != 0
6661     );
6662
6663   PrintToken (
6664     STRING_TOKEN (STR_PCI2_ASSERT_PERR),
6665-    HiiHandle,
6666+    gPciHiiHandle,
6667     (*Command & PCI_BIT_6) != 0
6668     );
6669
6670   PrintToken (
6671     STRING_TOKEN (STR_PCI2_DO_ADDR_STEPPING),
6672-    HiiHandle,
6673+    gPciHiiHandle,
6674     (*Command & PCI_BIT_7) != 0
6675     );
6676
6677   PrintToken (
6678     STRING_TOKEN (STR_PCI2_SERR_DRIVER),
6679-    HiiHandle,
6680+    gPciHiiHandle,
6681     (*Command & PCI_BIT_8) != 0
6682     );
6683
6684   PrintToken (
6685     STRING_TOKEN (STR_PCI2_FAST_BACK_2),
6686-    HiiHandle,
6687+    gPciHiiHandle,
6688     (*Command & PCI_BIT_9) != 0
6689     );
6690
6691@@ -2230,34 +2233,34 @@
6692 {
6693   PrintToken (
6694     STRING_TOKEN (STR_PCI2_BRIDGE_CONTROL),
6695-    HiiHandle,
6696+    gPciHiiHandle,
6697     INDEX_OF (BridgeControl),
6698     *BridgeControl
6699     );
6700
6701   PrintToken (
6702     STRING_TOKEN (STR_PCI2_PARITY_ERROR),
6703-    HiiHandle,
6704+    gPciHiiHandle,
6705     (*BridgeControl & PCI_BIT_0) != 0
6706     );
6707   PrintToken (
6708     STRING_TOKEN (STR_PCI2_SERR_ENABLE),
6709-    HiiHandle,
6710+    gPciHiiHandle,
6711     (*BridgeControl & PCI_BIT_1) != 0
6712     );
6713   PrintToken (
6714     STRING_TOKEN (STR_PCI2_ISA_ENABLE),
6715-    HiiHandle,
6716+    gPciHiiHandle,
6717     (*BridgeControl & PCI_BIT_2) != 0
6718     );
6719   PrintToken (
6720     STRING_TOKEN (STR_PCI2_VGA_ENABLE),
6721-    HiiHandle,
6722+    gPciHiiHandle,
6723     (*BridgeControl & PCI_BIT_3) != 0
6724     );
6725   PrintToken (
6726     STRING_TOKEN (STR_PCI2_MASTER_ABORT),
6727-    HiiHandle,
6728+    gPciHiiHandle,
6729     (*BridgeControl & PCI_BIT_5) != 0
6730     );
6731
6732@@ -2268,49 +2271,49 @@
6733   if (HeaderType == PciP2pBridge) {
6734     PrintToken (
6735       STRING_TOKEN (STR_PCI2_SECONDARY_BUS_RESET),
6736-      HiiHandle,
6737+      gPciHiiHandle,
6738       (*BridgeControl & PCI_BIT_6) != 0
6739       );
6740     PrintToken (
6741       STRING_TOKEN (STR_PCI2_FAST_ENABLE),
6742-      HiiHandle,
6743+      gPciHiiHandle,
6744       (*BridgeControl & PCI_BIT_7) != 0
6745       );
6746     PrintToken (
6747       STRING_TOKEN (STR_PCI2_PRIMARY_DISCARD_TIMER),
6748-      HiiHandle,
6749+      gPciHiiHandle,
6750       (*BridgeControl & PCI_BIT_8) ? L"2^10" : L"2^15"
6751       );
6752     PrintToken (
6753       STRING_TOKEN (STR_PCI2_SECONDARY_DISCARD_TIMER),
6754-      HiiHandle,
6755+      gPciHiiHandle,
6756       (*BridgeControl & PCI_BIT_9) ? L"2^10" : L"2^15"
6757       );
6758     PrintToken (
6759       STRING_TOKEN (STR_PCI2_DISCARD_TIMER_STATUS),
6760-      HiiHandle,
6761+      gPciHiiHandle,
6762       (*BridgeControl & PCI_BIT_10) != 0
6763       );
6764     PrintToken (
6765       STRING_TOKEN (STR_PCI2_DISCARD_TIMER_SERR),
6766-      HiiHandle,
6767+      gPciHiiHandle,
6768       (*BridgeControl & PCI_BIT_11) != 0
6769       );
6770
6771   } else {
6772     PrintToken (
6773       STRING_TOKEN (STR_PCI2_CARDBUS_RESET),
6774-      HiiHandle,
6775+      gPciHiiHandle,
6776       (*BridgeControl & PCI_BIT_6) != 0
6777       );
6778     PrintToken (
6779       STRING_TOKEN (STR_PCI2_IREQ_ENABLE),
6780-      HiiHandle,
6781+      gPciHiiHandle,
6782       (*BridgeControl & PCI_BIT_7) != 0
6783       );
6784     PrintToken (
6785       STRING_TOKEN (STR_PCI2_WRITE_POSTING_ENABLE),
6786-      HiiHandle,
6787+      gPciHiiHandle,
6788       (*BridgeControl & PCI_BIT_10) != 0
6789       );
6790   }
6791@@ -3077,7 +3080,7 @@
6792     }
6793     PrintToken (
6794       PcieExplainList[Index].Token,
6795-      HiiHandle,
6796+      gPciHiiHandle,
6797       PcieExplainList[Index].Offset,
6798       RegValue
6799       );
6800diff --ignore-file-name-case -Naur ShellR33/pci/pci.h GccShellR33/pci/pci.h
6801--- ShellR33/pci/pci.h	2008-08-13 23:02:46.000000000 -0700
6802+++ GccShellR33/pci/pci.h	2009-09-22 19:19:20.000000000 -0700
6803@@ -30,7 +30,7 @@
6804     0x388da6c3, 0x3447, 0x4b1f, 0xa0, 0xba, 0xa9, 0xe8, 0xa2, 0x87, 0xf1, 0x76 \
6805   }
6806
6807-#include "TIANO.h"
6808+#include "Tiano.h"
6809
6810 typedef enum {
6811   PciDevice,
6812diff --ignore-file-name-case -Naur ShellR33/pci/pci.inf GccShellR33/pci/pci.inf
6813--- ShellR33/pci/pci.inf	2007-06-25 02:05:05.000000000 -0700
6814+++ GccShellR33/pci/pci.inf	2009-09-22 15:37:05.000000000 -0700
6815@@ -41,7 +41,7 @@
6816
6817 [sources.common]
6818   PciStrings.uni
6819-  ..\ShCommonStrings.uni
6820+  ../ShCommonStrings.uni
6821   pci.c
6822   pci.h
6823   pci_class.h
6824@@ -49,17 +49,17 @@
6825
6826 [includes.common]
6827   .
6828-  ..\Inc
6829-  ..\Library
6830-  $(EDK_SOURCE)\Foundation
6831-  $(EDK_SOURCE)\Foundation\Include
6832-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
6833-  $(EDK_SOURCE)\Foundation\Efi
6834-  $(EDK_SOURCE)\Foundation\Efi\Include
6835-  $(EDK_SOURCE)\Foundation\FrameWork
6836-  $(EDK_SOURCE)\Foundation\FrameWork\Include
6837-  $(EDK_SOURCE)\Foundation\Core\Dxe
6838-  $(DEST_DIR)\
6839+  ../Inc
6840+  ../Library
6841+  $(EDK_SOURCE)/Foundation
6842+  $(EDK_SOURCE)/Foundation/Include
6843+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
6844+  $(EDK_SOURCE)/Foundation/Efi
6845+  $(EDK_SOURCE)/Foundation/Efi/Include
6846+  $(EDK_SOURCE)/Foundation/FrameWork
6847+  $(EDK_SOURCE)/Foundation/FrameWork/Include
6848+  $(EDK_SOURCE)/Foundation/Core/Dxe
6849+  $(DEST_DIR)/
6850
6851 [libraries.common]
6852   EfiShellLib
6853diff --ignore-file-name-case -Naur ShellR33/pci/pci_class.c GccShellR33/pci/pci_class.c
6854--- ShellR33/pci/pci_class.c	2005-08-23 00:16:36.000000000 -0700
6855+++ GccShellR33/pci/pci_class.c	2009-11-05 13:49:56.000000000 -0800
6856@@ -27,10 +27,12 @@
6857
6858 #include STRING_DEFINES_FILE
6859
6860+extern EFI_HII_HANDLE    gPciHiiHandle;
6861+
6862+
6863 //
6864 // Global Variables
6865 //
6866-EFI_HII_HANDLE  HiiHandle;
6867
6868 PCI_CLASS_ENTRY gClassStringList[];
6869
6870@@ -1417,7 +1419,7 @@
6871     //
6872     PrintToken (
6873       STRING_TOKEN (STR_PCI_CLASS_THREE_VARS),
6874-      HiiHandle,
6875+      gPciHiiHandle,
6876       ClassStrings.BaseClass,
6877       ClassStrings.SubClass,
6878       ClassStrings.PIFClass
6879@@ -1436,6 +1438,6 @@
6880       );
6881
6882     OutputString[PCI_CLASS_STRING_LIMIT] = 0;
6883-    PrintToken (STRING_TOKEN (STR_PCI_CLASS_ONE_VARS), HiiHandle, OutputString);
6884+    PrintToken (STRING_TOKEN (STR_PCI_CLASS_ONE_VARS), gPciHiiHandle, OutputString);
6885   }
6886 }
6887diff --ignore-file-name-case -Naur ShellR33/pci/pci_class.h GccShellR33/pci/pci_class.h
6888--- ShellR33/pci/pci_class.h	2005-08-23 00:16:36.000000000 -0700
6889+++ GccShellR33/pci/pci_class.h	2009-09-22 19:19:20.000000000 -0700
6890@@ -24,7 +24,7 @@
6891 #ifndef _PCI_CLASS_H_
6892 #define _PCI_CLASS_H_
6893
6894-#include "TIANO.h"  // for UINT32 etc.
6895+#include "Tiano.h"  // for UINT32 etc.
6896 #define PCI_CLASS_STRING_LIMIT  54
6897 //
6898 // Printable strings for Pci class code
6899diff --ignore-file-name-case -Naur ShellR33/Ping/Ping.c GccShellR33/Ping/Ping.c
6900--- ShellR33/Ping/Ping.c	2008-10-06 00:03:04.000000000 -0700
6901+++ GccShellR33/Ping/Ping.c	2009-11-05 13:49:56.000000000 -0800
6902@@ -20,14 +20,14 @@
6903 --*/
6904
6905 #include "EfiShellLib.h"
6906-#include "CpuFuncs.h"
6907+//#include "CpuFuncs.h"
6908 #include EFI_ARCH_PROTOCOL_DEFINITION (Cpu)
6909 #include EFI_PROTOCOL_DEFINITION (Ip4)
6910 #include "Ping.h"
6911 #include STRING_DEFINES_FILE
6912 extern UINT8 STRING_ARRAY_NAME[];
6913
6914-EFI_HII_HANDLE  HiiHandle;
6915+static EFI_HII_HANDLE  HiiHandle;
6916
6917 EFI_GUID  EfiPingGuid = EFI_PING_GUID;
6918 SHELL_VAR_CHECK_ITEM  PingCheckList[] = {
6919@@ -66,6 +66,8 @@
6920 UINT32            RttMin;
6921 UINT32            RttMax;
6922
6923+EFI_CPU_ARCH_PROTOCOL  *gCpu = NULL;
6924+
6925 STATIC
6926 UINT64
6927 GetTimerValue (
6928@@ -87,7 +89,22 @@
6929
6930 --*/
6931 {
6932-  return EfiReadTsc ();
6933+  static UINT64          CurrentTick = 0;
6934+  UINT64                 TimerPeriod;
6935+  EFI_STATUS             Status;
6936+
6937+  ASSERT (gCpu != NULL);
6938+
6939+  Status = gCpu->GetTimerValue (gCpu, 0, &CurrentTick, &TimerPeriod);
6940+  if (EFI_ERROR (Status)) {
6941+    //
6942+    // The WinntGetTimerValue will return EFI_UNSUPPORTED. Set the
6943+    // TimerPeriod by ourselves.
6944+    //
6945+    CurrentTick += 1000000;
6946+  }
6947+
6948+  return CurrentTick;
6949 }
6950
6951 STATIC
6952@@ -113,19 +130,18 @@
6953 --*/
6954 {
6955   EFI_STATUS             Status;
6956-  EFI_CPU_ARCH_PROTOCOL  *Cpu;
6957   UINT64                 CurrentTick;
6958   UINT64                 TimerPeriod;
6959
6960   //
6961   // Locate the Cpu Arch Protocol.
6962   //
6963-  Status = BS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, &Cpu);
6964+  Status = BS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID **)&gCpu);
6965   if (EFI_ERROR (Status)) {
6966     return Status;
6967   }
6968
6969-  Status = Cpu->GetTimerValue (Cpu, 0, &CurrentTick, &TimerPeriod);
6970+  Status = gCpu->GetTimerValue (gCpu, 0, &CurrentTick, &TimerPeriod);
6971   if (EFI_ERROR (Status)) {
6972     //
6973     // The WinntGetTimerValue will return EFI_UNSUPPORTED. Set the
6974@@ -138,7 +154,7 @@
6975   // The TimerPeriod is in femtosecond (1 femtosecond is  1e-15 second), so 1e+12
6976   // is divided by TimerPeriod to produce the Feq in tick/ms.
6977   //
6978-  Frequency = DivU64x32 (1000000000000, (UINTN) TimerPeriod, NULL);
6979+  Frequency = DivU64x32 (1000000000000ULL, (UINTN) TimerPeriod, NULL);
6980
6981   return EFI_SUCCESS;
6982 }
6983@@ -787,7 +803,7 @@
6984   EFI_STATUS                    Status;
6985   EFI_SERVICE_BINDING_PROTOCOL  *Ip4Sb;
6986
6987-  Status = BS->LocateProtocol (&gEfiIp4ServiceBindingProtocolGuid, NULL, &Ip4Sb);
6988+  Status = BS->LocateProtocol (&gEfiIp4ServiceBindingProtocolGuid, NULL, (VOID **)&Ip4Sb);
6989   if (EFI_ERROR (Status)) {
6990     return Status;
6991   }
6992@@ -844,7 +860,7 @@
6993         ChildHandle
6994         );
6995
6996-  BS->LocateProtocol (&gEfiIp4ServiceBindingProtocolGuid, NULL, &Ip4Sb);
6997+  BS->LocateProtocol (&gEfiIp4ServiceBindingProtocolGuid, NULL, (VOID **)&Ip4Sb);
6998
6999   Ip4Sb->DestroyChild (Ip4Sb, ChildHandle);
7000 }
7001diff --ignore-file-name-case -Naur ShellR33/Ping/Ping.inf GccShellR33/Ping/Ping.inf
7002--- ShellR33/Ping/Ping.inf	2007-06-25 02:05:05.000000000 -0700
7003+++ GccShellR33/Ping/Ping.inf	2009-09-22 15:37:05.000000000 -0700
7004@@ -25,24 +25,24 @@
7005 COMPONENT_TYPE       = APPLICATION
7006
7007 [sources.common]
7008-  ..\ShCommonStrings.uni
7009+  ../ShCommonStrings.uni
7010   PingStrings.uni
7011   Ping.h
7012   Ping.c
7013
7014 [includes.common]
7015-  ..\Inc
7016-  ..\Library
7017-  $(EDK_SOURCE)\Foundation\Efi
7018-  $(EDK_SOURCE)\Foundation
7019-  $(EDK_SOURCE)\Foundation\Efi\Include
7020-  $(EDK_SOURCE)\Foundation\Include
7021-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7022-  $(EDK_SOURCE)\Foundation\FrameWork
7023-  $(EDK_SOURCE)\Foundation\FrameWork\Include
7024-  $(EDK_SOURCE)\Foundation\Core\Dxe
7025-  $(EDK_SOURCE)\Foundation\Library\Dxe\Include
7026-  $(DEST_DIR)\
7027+  ../Inc
7028+  ../Library
7029+  $(EDK_SOURCE)/Foundation/Efi
7030+  $(EDK_SOURCE)/Foundation
7031+  $(EDK_SOURCE)/Foundation/Efi/Include
7032+  $(EDK_SOURCE)/Foundation/Include
7033+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7034+  $(EDK_SOURCE)/Foundation/FrameWork
7035+  $(EDK_SOURCE)/Foundation/FrameWork/Include
7036+  $(EDK_SOURCE)/Foundation/Core/Dxe
7037+  $(EDK_SOURCE)/Foundation/Library/Dxe/Include
7038+  $(DEST_DIR)/
7039
7040 [libraries.common]
7041   EfiShellLib
7042@@ -52,7 +52,7 @@
7043   ArchProtocolLib
7044   EdkGuidLib
7045   EdkFrameworkGuidLib
7046-  EfiDriverLib
7047+#  EfiDriverLib
7048
7049 [libraries.IA32]
7050   CpuIA32Lib
7051diff --ignore-file-name-case -Naur ShellR33/reset/reset.inf GccShellR33/reset/reset.inf
7052--- ShellR33/reset/reset.inf	2007-03-15 20:07:49.000000000 -0700
7053+++ GccShellR33/reset/reset.inf	2009-09-22 15:37:05.000000000 -0700
7054@@ -40,24 +40,24 @@
7055
7056
7057 [sources.common]
7058-   ..\ShCommonStrings.uni
7059+   ../ShCommonStrings.uni
7060    ResetStrings.uni
7061    Reset.c
7062    Reset.h
7063
7064 [includes.common]
7065   .
7066-  ..\Inc
7067-  ..\Library
7068-  $(EDK_SOURCE)\Foundation
7069-  $(EDK_SOURCE)\Foundation\Include
7070-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7071-  $(EDK_SOURCE)\Foundation\Efi
7072-  $(EDK_SOURCE)\Foundation\Efi\Include
7073-  $(EDK_SOURCE)\Foundation\FrameWork
7074-  $(EDK_SOURCE)\Foundation\FrameWork\Include
7075-  $(EDK_SOURCE)\Foundation\Core\Dxe
7076-  $(DEST_DIR)\
7077+  ../Inc
7078+  ../Library
7079+  $(EDK_SOURCE)/Foundation
7080+  $(EDK_SOURCE)/Foundation/Include
7081+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7082+  $(EDK_SOURCE)/Foundation/Efi
7083+  $(EDK_SOURCE)/Foundation/Efi/Include
7084+  $(EDK_SOURCE)/Foundation/FrameWork
7085+  $(EDK_SOURCE)/Foundation/FrameWork/Include
7086+  $(EDK_SOURCE)/Foundation/Core/Dxe
7087+  $(DEST_DIR)/
7088
7089 [libraries.common]
7090   EfiShellLib
7091diff --ignore-file-name-case -Naur ShellR33/rm/rm.inf GccShellR33/rm/rm.inf
7092--- ShellR33/rm/rm.inf	2007-06-25 02:05:05.000000000 -0700
7093+++ GccShellR33/rm/rm.inf	2009-09-22 15:37:05.000000000 -0700
7094@@ -41,23 +41,23 @@
7095
7096 [sources.common]
7097    RmStrings.uni
7098-   ..\ShCommonStrings.uni
7099+   ../ShCommonStrings.uni
7100    rm.h
7101    rm.c
7102
7103 [includes.common]
7104   .
7105-  ..\Inc
7106-  ..\Library
7107-  $(EDK_SOURCE)\Foundation
7108-  $(EDK_SOURCE)\Foundation\Include
7109-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7110-  $(EDK_SOURCE)\Foundation\Efi
7111-  $(EDK_SOURCE)\Foundation\Efi\Include
7112-  $(EDK_SOURCE)\Foundation\FrameWork
7113-  $(EDK_SOURCE)\Foundation\FrameWork\Include
7114-  $(EDK_SOURCE)\Foundation\Core\Dxe
7115-  $(DEST_DIR)\
7116+  ../Inc
7117+  ../Library
7118+  $(EDK_SOURCE)/Foundation
7119+  $(EDK_SOURCE)/Foundation/Include
7120+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7121+  $(EDK_SOURCE)/Foundation/Efi
7122+  $(EDK_SOURCE)/Foundation/Efi/Include
7123+  $(EDK_SOURCE)/Foundation/FrameWork
7124+  $(EDK_SOURCE)/Foundation/FrameWork/Include
7125+  $(EDK_SOURCE)/Foundation/Core/Dxe
7126+  $(DEST_DIR)/
7127
7128 [libraries.common]
7129   EfiShellLib
7130diff --ignore-file-name-case -Naur ShellR33/sermode/sermode.c GccShellR33/sermode/sermode.c
7131--- ShellR33/sermode/sermode.c	2006-08-07 02:14:38.000000000 -0700
7132+++ GccShellR33/sermode/sermode.c	2009-11-05 13:49:56.000000000 -0800
7133@@ -35,7 +35,7 @@
7134
7135 #include EFI_PROTOCOL_DEFINITION (SerialIo)
7136
7137-EFI_HII_HANDLE  HiiHandle;
7138+static EFI_HII_HANDLE  HiiHandle;
7139 EFI_GUID        EfiSermodeGuid = EFI_SERMODEB_GUID;
7140 SHELL_VAR_CHECK_ITEM    SermodeCheckList[] = {
7141   {
7142@@ -104,7 +104,7 @@
7143
7144     }
7145
7146-    Status = BS->HandleProtocol (Handles[Index], &gEfiSerialIoProtocolGuid, &SerialIo);
7147+    Status = BS->HandleProtocol (Handles[Index], &gEfiSerialIoProtocolGuid, (VOID **)&SerialIo);
7148     if (!EFI_ERROR (Status)) {
7149       switch (SerialIo->Mode->Parity) {
7150       case DefaultParity:
7151@@ -454,7 +454,7 @@
7152       continue;
7153     }
7154
7155-    Status = BS->HandleProtocol (Handles[Index], &gEfiSerialIoProtocolGuid, &SerialIo);
7156+    Status = BS->HandleProtocol (Handles[Index], &gEfiSerialIoProtocolGuid, (VOID **)&SerialIo);
7157     if (!EFI_ERROR (Status)) {
7158       Status = SerialIo->SetAttributes (
7159                           SerialIo,
7160diff --ignore-file-name-case -Naur ShellR33/sermode/sermode.inf GccShellR33/sermode/sermode.inf
7161--- ShellR33/sermode/sermode.inf	2007-06-25 02:05:05.000000000 -0700
7162+++ GccShellR33/sermode/sermode.inf	2009-09-22 15:37:05.000000000 -0700
7163@@ -40,24 +40,24 @@
7164
7165
7166 [sources.common]
7167-  ..\ShCommonStrings.uni
7168+  ../ShCommonStrings.uni
7169   SermodeStrings.uni
7170   sermode.c
7171   sermode.h
7172
7173 [includes.common]
7174   .
7175-  ..\Inc
7176-  ..\Library
7177-  $(EDK_SOURCE)\Foundation
7178-  $(EDK_SOURCE)\Foundation\Include
7179-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7180-  $(EDK_SOURCE)\Foundation\Efi
7181-  $(EDK_SOURCE)\Foundation\Efi\Include
7182-  $(EDK_SOURCE)\Foundation\FrameWork
7183-  $(EDK_SOURCE)\Foundation\FrameWork\Include
7184-  $(EDK_SOURCE)\Foundation\Core\Dxe
7185-  $(DEST_DIR)\
7186+  ../Inc
7187+  ../Library
7188+  $(EDK_SOURCE)/Foundation
7189+  $(EDK_SOURCE)/Foundation/Include
7190+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7191+  $(EDK_SOURCE)/Foundation/Efi
7192+  $(EDK_SOURCE)/Foundation/Efi/Include
7193+  $(EDK_SOURCE)/Foundation/FrameWork
7194+  $(EDK_SOURCE)/Foundation/FrameWork/Include
7195+  $(EDK_SOURCE)/Foundation/Core/Dxe
7196+  $(DEST_DIR)/
7197
7198 [libraries.common]
7199   EfiShellLib
7200diff --ignore-file-name-case -Naur ShellR33/Shell.inf GccShellR33/Shell.inf
7201--- ShellR33/Shell.inf	2008-08-13 23:02:46.000000000 -0700
7202+++ GccShellR33/Shell.inf	2009-11-07 12:33:52.000000000 -0800
7203@@ -25,179 +25,190 @@
7204 COMPONENT_TYPE       = APPLICATION
7205
7206 [sources.common]
7207-  Library\ShellDebug.c
7208-  Library\DPath.c
7209-  Library\Init.c
7210-  Library\Lock.c
7211-  Library\Str.c
7212-  Library\IO.c
7213-  Library\Mem.c
7214-  Library\Misc.c
7215-  Library\Data.c
7216-  Library\RtData.c
7217-  Library\ShellEnvInt.c
7218-  Library\Handle.c
7219-  Library\FileIO.c
7220-  Library\ConsistMapping.c
7221-  Library\CRC.c
7222-  Library\Event.c
7223-  Library\Perf.c
7224-  Library\VarCheck.c
7225-  Library\HiiSupport.c
7226-
7227-  newshell\NshellStrings.uni
7228-  newshell\init.c
7229-  newshell\nshell.h
7230-  newshell\fakehii.c
7231+  Library/ShellDebug.c
7232+  Library/DPath.c
7233+  Library/Init.c
7234+  Library/Lock.c
7235+  Library/Str.c
7236+  Library/IO.c
7237+  Library/Mem.c
7238+  Library/Misc.c
7239+  Library/Data.c
7240+  Library/RtData.c
7241+  Library/ShellEnvInt.c
7242+  Library/Handle.c
7243+  Library/FileIO.c
7244+  Library/ConsistMapping.c
7245+  Library/CRC.c
7246+  Library/Event.c
7247+  Library/Perf.c
7248+  Library/VarCheck.c
7249+  Library/HiiSupport.c
7250+
7251+  newshell/NshellStrings.uni
7252+  newshell/init.c
7253+  newshell/nshell.h
7254+  newshell/fakehii.c
7255+  newshell/DebugAssert.c
7256+
7257
7258   ShCommonStrings.uni
7259-  shellenv\ShellenvHelpStrings.uni
7260-  shellenv\ShellenvStrings.uni
7261-  shellenv\ScriptCmdStrings.uni
7262-  shellenv\ConnectStrings.uni
7263-  shellenv\EchoStrings.uni
7264-  shellenv\HelpStrings.uni
7265-  shellenv\MapStrings.uni
7266-  shellenv\CdStrings.uni
7267-  shellenv\DhStrings.uni
7268-
7269-  shellenv\cmddisp.c
7270-  shellenv\connect.c
7271-  shellenv\data.c
7272-  shellenv\exec.c
7273-  shellenv\init.c
7274-  shellenv\protid.c
7275-  shellenv\var.c
7276-  shellenv\conio.c
7277-  shellenv\consoleproxy.c
7278-  shellenv\handle.c
7279-  shellenv\dprot.c
7280-  shellenv\map.c
7281-  shellenv\marg.c
7282-  shellenv\batch.c
7283-  shellenv\if.c
7284-  shellenv\goto.c
7285-  shellenv\echo.c
7286-  shellenv\pause.c
7287-  shellenv\for.c
7288-  shellenv\wait.c
7289-  shellenv\help.c
7290-  shellenv\shelle.h
7291-  shellenv\shellenvguid.h
7292-  shellenv\parsecmd.c
7293-  shellenv\shift.c
7294+  shellenv/ShellenvHelpStrings.uni
7295+  shellenv/ShellenvStrings.uni
7296+  shellenv/ScriptCmdStrings.uni
7297+  shellenv/ConnectStrings.uni
7298+  shellenv/EchoStrings.uni
7299+  shellenv/HelpStrings.uni
7300+  shellenv/MapStrings.uni
7301+  shellenv/CdStrings.uni
7302+  shellenv/DhStrings.uni
7303+
7304+  shellenv/cmddisp.c
7305+  shellenv/connect.c
7306+  shellenv/data.c
7307+  shellenv/exec.c
7308+  shellenv/init.c
7309+  shellenv/protid.c
7310+  shellenv/var.c
7311+  shellenv/conio.c
7312+  shellenv/consoleproxy.c
7313+  shellenv/handle.c
7314+  shellenv/dprot.c
7315+  shellenv/map.c
7316+  shellenv/marg.c
7317+  shellenv/batch.c
7318+  shellenv/if.c
7319+  shellenv/goto.c
7320+  shellenv/echo.c
7321+  shellenv/pause.c
7322+  shellenv/for.c
7323+  shellenv/wait.c
7324+  shellenv/help.c
7325+  shellenv/shelle.h
7326+  shellenv/shellenvguid.h
7327+  shellenv/parsecmd.c
7328+  shellenv/shift.c
7329
7330-  unload\UnloadStrings.uni
7331-  unload\unload.c
7332+  unload/UnloadStrings.uni
7333+  unload/unload.c
7334
7335-  attrib\AttribStrings.uni
7336-  attrib\attrib.c
7337-  attrib\attrib.h
7338-
7339-  cls\clsstrings.uni
7340-  cls\cls.c
7341-
7342-  cp\CpStrings.uni
7343-  cp\cp.h
7344-  cp\cp.c
7345+  attrib/AttribStrings.uni
7346+  attrib/attrib.c
7347+  attrib/attrib.h
7348+
7349+  cls/clsstrings.uni
7350+  cls/cls.c
7351+
7352+  cp/CpStrings.uni
7353+  cp/cp.h
7354+  cp/cp.c
7355
7356-  date\DateStrings.uni
7357-  date\date.c
7358-  date\date.h
7359-
7360-  load\LoadStrings.uni
7361-  load\load.c
7362-  load\load.h
7363-
7364-  ls\LsStrings.uni
7365-  ls\ls.h
7366-  ls\ls.c
7367-
7368-  mkdir\MkdirStrings.uni
7369-  mkdir\mkdir.c
7370-  mkdir\mkdir.h
7371-
7372-  mv\MvStrings.uni
7373-  mv\mv.c
7374-  mv\mv.h
7375+  date/DateStrings.uni
7376+  date/date.c
7377+  date/date.h
7378+
7379+  load/LoadStrings.uni
7380+  load/load.c
7381+  load/load.h
7382+
7383+  ls/LsStrings.uni
7384+  ls/ls.h
7385+  ls/ls.c
7386+
7387+  mkdir/MkdirStrings.uni
7388+  mkdir/mkdir.c
7389+  mkdir/mkdir.h
7390+
7391+  mv/MvStrings.uni
7392+  mv/mv.c
7393+  mv/mv.h
7394
7395-  reset\ResetStrings.uni
7396-  reset\reset.c
7397-  reset\reset.h
7398-
7399-  rm\RmStrings.uni
7400-  rm\rm.h
7401-  rm\rm.c
7402-
7403-  type\TypeStrings.uni
7404-  type\type.c
7405-  type\type.h
7406-  time\TimeStrings.uni
7407-  time\time.c
7408-  time\time.h
7409-
7410-  touch\TouchStrings.uni
7411-  touch\touch.c
7412-  touch\touch.h
7413-
7414-  vol\VolStrings.uni
7415-  vol\vol.c
7416-  vol\vol.h
7417-
7418-  ver\VerStrings.uni
7419-  ver\ver.c
7420-  ver\ver.h
7421-
7422-  drivers\driversStrings.uni
7423-  drivers\drivers.c
7424-  drivers\drivers.h
7425-
7426-  drvcfg\DrvcfgStrings.uni
7427-  drvcfg\drvcfg.c
7428-  drvcfg\drvcfg.h
7429+  reset/ResetStrings.uni
7430+  reset/reset.c
7431+  reset/reset.h
7432+
7433+  rm/RmStrings.uni
7434+  rm/rm.h
7435+  rm/rm.c
7436+
7437+  type/TypeStrings.uni
7438+  type/type.c
7439+  type/type.h
7440+  time/TimeStrings.uni
7441+  time/time.c
7442+  time/time.h
7443+
7444+  touch/TouchStrings.uni
7445+  touch/touch.c
7446+  touch/touch.h
7447+
7448+  vol/VolStrings.uni
7449+  vol/vol.c
7450+  vol/vol.h
7451+
7452+  ver/VerStrings.uni
7453+  ver/ver.c
7454+  ver/ver.h
7455+
7456+  drivers/driversStrings.uni
7457+  drivers/drivers.c
7458+  drivers/drivers.h
7459+
7460+  drvcfg/DrvcfgStrings.uni
7461+  drvcfg/drvcfg.c
7462+  drvcfg/drvcfg.h
7463
7464-  drvdiag\DrvdiagStrings.uni
7465-  drvdiag\drvdiag.c
7466-  drvdiag\drvdiag.h
7467+  drvdiag/DrvdiagStrings.uni
7468+  drvdiag/drvdiag.c
7469+  drvdiag/drvdiag.h
7470
7471
7472
7473 [sources.ia32]
7474-  ver\ia32\ver32.c
7475-  Library\ia32\math.c
7476-  Library\ia32\initplat.c
7477+  ver/IA32/ver32.c
7478+  Library/IA32/math.c
7479+  Library/IA32/initplat.c
7480+  Library/IA32/DivU64x32Remainder.S  | GCC
7481+  Library/IA32/LShiftU64.S           | GCC
7482+  Library/IA32/RShiftU64.S           | GCC
7483+  Library/IA32/MultU64x32.S          | GCC
7484
7485
7486 [sources.ipf]
7487-  ver\ipf\ver64.c
7488-  Library\ipf\math.c
7489-  Library\ipf\initplat.c
7490-  Library\ipf\palproc.s
7491-  Library\ipf\salpal.c
7492+  ver/ipf/ver64.c
7493+  Library/ipf/math.c
7494+  Library/ipf/initplat.c
7495+  Library/ipf/palproc.s
7496+  Library/ipf/salpal.c
7497
7498 [sources.EBC]
7499-  ver\ebc\verEbc.c
7500-  Library\EBC\math.c
7501-  Library\EBC\initplat.c
7502+  ver/ebc/verEbc.c
7503+  Library/EBC/math.c
7504+  Library/EBC/initplat.c
7505
7506 [sources.x64]
7507-  ver\ia32\ver32.c
7508-  Library\ipf\math.c
7509-  Library\ia32\initplat.c
7510+  ver/ia32/ver32.c
7511+  Library/ipf/math.c
7512+  Library/ia32/initplat.c
7513+
7514+[sources.ARM]
7515+  ver/ia32/ver32.c
7516+  Library/ipf/math.c
7517+  Library/ia32/initplat.c
7518
7519 [includes.common]
7520   .
7521-  .\Inc
7522-  .\ver
7523-  .\Library
7524-  $(EDK_SOURCE)\Foundation
7525-  $(EDK_SOURCE)\Foundation\Include
7526-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
7527-  $(EDK_SOURCE)\Foundation\Efi
7528-  $(EDK_SOURCE)\Foundation\Efi\Include
7529-  $(EDK_SOURCE)\Foundation\FrameWork
7530-  $(EDK_SOURCE)\Foundation\FrameWork\Include
7531-  $(EDK_SOURCE)\Foundation\Core\Dxe
7532+  ./Inc
7533+  ./ver
7534+  ./Library
7535+  $(EDK_SOURCE)/Foundation
7536+  $(EDK_SOURCE)/Foundation/Include
7537+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
7538+  $(EDK_SOURCE)/Foundation/Efi
7539+  $(EDK_SOURCE)/Foundation/Efi/Include
7540+  $(EDK_SOURCE)/Foundation/FrameWork
7541+  $(EDK_SOURCE)/Foundation/FrameWork/Include
7542+  $(EDK_SOURCE)/Foundation/Core/Dxe
7543   $(DEST_DIR)
7544
7545 [libraries.common]
7546diff --ignore-file-name-case -Naur ShellR33/shellenv/conio.c GccShellR33/shellenv/conio.c
7547--- ShellR33/shellenv/conio.c	2009-08-13 22:57:02.000000000 -0700
7548+++ GccShellR33/shellenv/conio.c	2009-10-14 16:36:30.000000000 -0700
7549@@ -1,6 +1,6 @@
7550 /*++
7551
7552-Copyright (c) 2005 - 2009, Intel Corporation
7553+Copyright (c) 2005 - 2008, Intel Corporation
7554 All rights reserved. This program and the accompanying materials
7555 are licensed and made available under the terms and conditions of the BSD License
7556 which accompanies this distribution. The full text of the license may be found at
7557@@ -890,14 +890,7 @@
7558     // If we need to update the output do so now
7559     //
7560     if (Update != -1) {
7561-      if ((ConOut->Mode->CursorColumn != (INT32) Column) ||  (ConOut->Mode->CursorRow != (INT32) Row)) {
7562-        PrintAt (Column, Row, L"%s%.*s", Str + Update, Delete, L"");
7563-      } else {
7564-        //
7565-        // Don't need to SetCursorPosition() if the current cursor position is not changed
7566-        //
7567-        PrintAt ((UINTN) -1, (UINTN) -1, L"%s%.*s", Str + Update, Delete, L"");
7568-      }
7569+      PrintAt (Column, Row, L"%s%.*s", Str + Update, Delete, L"");
7570       Len = StrLen (Str);
7571
7572       if (Delete) {
7573@@ -953,12 +946,10 @@
7574
7575       Delete = 0;
7576     }
7577-    if ((ConOut->Mode->CursorColumn != (INT32) Column) ||  (ConOut->Mode->CursorRow != (INT32) Row)) {
7578-      //
7579-      // Set the cursor position for this key
7580-      //
7581-      ConOut->SetCursorPosition (ConOut, Column, Row);
7582-    }
7583+    //
7584+    // Set the cursor position for this key
7585+    //
7586+    ConOut->SetCursorPosition (ConOut, Column, Row);
7587   } while (!Done);
7588
7589   //
7590diff --ignore-file-name-case -Naur ShellR33/shellenv/dprot.c GccShellR33/shellenv/dprot.c
7591--- ShellR33/shellenv/dprot.c	2008-11-24 21:49:58.000000000 -0800
7592+++ GccShellR33/shellenv/dprot.c	2009-09-22 19:19:20.000000000 -0700
7593@@ -23,7 +23,7 @@
7594
7595 #include "shelle.h"
7596 #include "shellenvguid.h"
7597-#include "acpi.h"
7598+#include "Acpi.h"
7599
7600 STATIC CHAR16 *SEnvDP_IlleagalStr[] = { L"Illegal" };
7601
7602@@ -1294,6 +1294,9 @@
7603     case EfiIsaAcpiResourceInterrupt:
7604       PrintToken (STRING_TOKEN (STR_SHELLENV_DPROT_INT), HiiEnvHandle);
7605       break;
7606+
7607+    default:
7608+      break;
7609     }
7610
7611     if (IsaIo->ResourceList->ResourceItem[Index].StartRange == IsaIo->ResourceList->ResourceItem[Index].EndRange) {
7612diff --ignore-file-name-case -Naur ShellR33/shellenv/exec.c GccShellR33/shellenv/exec.c
7613--- ShellR33/shellenv/exec.c	2007-03-15 20:07:49.000000000 -0700
7614+++ GccShellR33/shellenv/exec.c	2009-09-22 15:37:05.000000000 -0700
7615@@ -1868,7 +1868,7 @@
7616     return ;
7617   }
7618   //
7619-  // Processing foo: or foo:\
7620+  // Processing foo: or foo:/
7621   //
7622   if (PathPos != -1 && Ptr1 == NULL) {
7623     return ;
7624diff --ignore-file-name-case -Naur ShellR33/shellenv/for.c GccShellR33/shellenv/for.c
7625--- ShellR33/shellenv/for.c	2006-06-12 23:18:21.000000000 -0700
7626+++ GccShellR33/shellenv/for.c	2009-09-22 15:37:05.000000000 -0700
7627@@ -24,309 +24,8 @@
7628 #include "shelle.h"
7629 #include "shellenvguid.h"
7630
7631-/*
7632-BOOLEAN
7633-CheckInterValue (
7634-  IN CHAR16                        *wszValueStr,
7635-  OUT INT32                        *pnValue
7636-  )
7637-{
7638-  UINTN                                    uPos = 0;
7639-  INT32                                    nSign = 0;
7640-  UINTN                                    uDigitStart = 0;
7641-  BOOLEAN                                bDigitFound = FALSE;
7642-
7643-  while (wszValueStr[uPos]) {
7644-    if (L'+' == wszValueStr[uPos] || L'-' == wszValueStr[uPos]) {
7645-      if (0 != nSign) {
7646-        // sign already resolved, error
7647-        return FALSE;
7648-      }
7649-      nSign = (L'+' == wszValueStr[uPos]) ? 1 : -1;
7650-      uDigitStart = uPos + 1;
7651-    } else if (wszValueStr[uPos] < L'0' || wszValueStr[uPos] > L'9') {
7652-      // not digits or sign symbol, error
7653-      return FALSE;
7654-    } else {
7655-      if (0 == nSign) {
7656-      	  // no sign symbol before the first digit, take it as postive
7657-        nSign = 1;
7658-        uDigitStart = uPos;
7659-      }
7660-      bDigitFound = TRUE;
7661-    }
7662-    uPos++;
7663-  } // end of while
7664-
7665-  if (FALSE == bDigitFound) {
7666-    return FALSE;
7667-  }
7668-
7669-  *pnValue = Atoi (wszValueStr + uDigitStart) * nSign;
7670-  return TRUE;
7671-}
7672-
7673-BOOLEAN
7674-ExtractFromArg (
7675-  IN CHAR16                             *wszRng,
7676-  OUT INT32                             *pnStart,
7677-  OUT INT32                             *pnEnd,
7678-  OUT INT32                             *pnStep
7679-  )
7680-{
7681-  UINTN                                     uStrLen = 0;
7682-  UINTN                                     uPos = 1;
7683-  CHAR16                                   *pBreak1 = NULL;
7684-  CHAR16                                   *pBreak2 = NULL;
7685-  INT32                                      nTmp;
7686-
7687-
7688-  uStrLen = StrLen (wszRng);
7689-  // there should be at least 5 characters
7690-  if (uStrLen < 5) {
7691-    return FALSE;
7692-  }
7693-
7694-  if (L'<' != wszRng[0] || L'>' != wszRng[uStrLen - 1]) {
7695-    return FALSE;
7696-  }
7697-
7698-  while (wszRng[uPos] != L'>') {
7699-    if (L',' == wszRng[uPos]) {
7700-      if (NULL == pBreak1) {
7701-        pBreak1 = &wszRng[uPos];
7702-      } else if (NULL == pBreak2) {
7703-        pBreak2 = &wszRng[uPos];
7704-        break;
7705-      }
7706-    }
7707-  } // end of while
7708-
7709-  // no ',' found
7710-  if (NULL == pBreak1) {
7711-    return FALSE;
7712-  } else if (pBreak1 == &wszRng[1]) {
7713-    // nothing between '<' and first ','
7714-    return FALSE;
7715-  } else if (pBreak1 == &wszRng[uStrLen - 2]) {
7716-    // nothing between first ',' and '>'
7717-    return FALSE;
7718-  } else if (pBreak1 - &wszRng[0] > 7) {
7719-    // too big number
7720-    return FALSE;
7721-  }
7722-
7723-  if (NULL != pBreak2) {
7724-    if (pBreak2 = pBreak1 + 1) {
7725-      // nothing between adjacent ','
7726-      return FALSE;
7727-    } else if (pBreak2 == &wszRng[uStrLen - 2]) {
7728-      // nothing between second ',' and '>'
7729-      return FALSE;
7730-    } else if (pBreak2 - pBreak1 > 7) {
7731-      // too big number
7732-      return FALSE;
7733-    }
7734-  }
7735
7736-  *pBreak1 = 0;
7737-  if (FALSE == CheckInterValue(&wszRng[1], &nTmp)) {
7738-    *pBreak1 = L',';
7739-    return FALSE;
7740-  } else {
7741-    *pBreak1 = L',';
7742-    *pnStart = nTmp;
7743-  }
7744-
7745-  if (NULL != pBreak2) {
7746-    *pBreak2 = 0;
7747-    if (FALSE == CheckInterValue(pBreak1 + 1, &nTmp)) {
7748-      *pBreak2 = L',';
7749-      return FALSE;
7750-    } else {
7751-      *pBreak2 = L',';
7752-      *pnEnd = nTmp;
7753-    }
7754-  } else {
7755-    pBreak2 = pBreak1;
7756-  }
7757-
7758-  if (&wszRng[uStrLen - 1] - pBreak2 > 7) {
7759-    // too big number
7760-    return FALSE;
7761-  }
7762-
7763-  wszRng[uStrLen - 1] = 0;
7764-  if (FALSE == CheckInterValue(pBreak2 + 1, &nTmp)) {
7765-    wszRng[uStrLen - 1] = L',';
7766-    return FALSE;
7767-  } else {
7768-    wszRng[uStrLen - 1] = L',';
7769-    if (pBreak1 == pBreak2) {
7770-      *pnEnd = nTmp;
7771-      *pnStep = 1;
7772-    } else {
7773-      *pnStep = nTmp;
7774-    }
7775-  }
7776-  return TRUE;
7777-}
7778-
7779-EFI_STATUS
7780-SEnvBatchPushFor2Stack (
7781-  IN  EFI_BATCH_STMT_TYPE            StmtType,
7782-  IN  BOOLEAN                        PushExtraStack
7783-  )
7784-/*++
7785-
7786-Routine Description:
7787
7788-  Push a node into statement stack.
7789-
7790-Arguments:
7791-  StmtType         Statement type to be pushed
7792-  PushExtraStack   Push into extra statement stack or current statement stack
7793-
7794-Returns:
7795-  EFI_SUCCESS      The function finished sucessfully
7796-
7797---
7798-{
7799-  EFI_BATCH_STATEMENT                *Stmt;
7800-  EFI_LIST_ENTRY                     FileList;
7801-  EFI_LIST_ENTRY                     *Link;
7802-  EFI_BATCH_SCRIPT                   *Script;
7803-  EFI_BATCH_VAR_VALUE                *VarValue;
7804-  SHELL_FILE_ARG                     *Arg;
7805-  INTN                                  Index;
7806-  EFI_STATUS                         Status;
7807-  CHAR16                             Char;
7808-
7809-  INT32                               nStart, nEnd, nStep;
7810-  CHAR16                             wszValue[10];
7811-
7812-  Status   = EFI_SUCCESS;
7813-  VarValue = NULL;
7814-
7815-  // this function only deals with 'for %var run <...>'
7816-  if (StmtFor != StmtType) {
7817-    return EFI_ABORTED;
7818-  }
7819-
7820-  if (IsListEmpty (&ScriptStack.ScriptList)) {
7821-    return EFI_ABORTED;
7822-  }
7823-
7824-  Script = CR (
7825-             ScriptStack.ScriptList.Flink,
7826-             EFI_BATCH_SCRIPT,
7827-             Link,
7828-             EFI_BATCH_SCRIPT_SIGNATURE
7829-             );
7830-
7831-  Stmt = AllocateZeroPool (sizeof (EFI_BATCH_STATEMENT));
7832-  if (Stmt == NULL) {
7833-    return EFI_OUT_OF_RESOURCES;
7834-  }
7835-
7836-  Stmt->Signature    = EFI_BATCH_STMT_SIGNATURE;
7837-  Stmt->StmtType     = StmtType;
7838-  Stmt->BeginFilePos = Script->FilePosition;
7839-  InitializeListHead (&Stmt->StmtInfo.ForInfo.ValueList);
7840-
7841-  //
7842-  // If we're pushing if statement to extra statement stack, set condition
7843-  // to TRUE, for in case we need to jump into this statement later, the
7844-  // condition should be treated as TRUE.
7845-  //
7846-  if (Stmt->StmtType == StmtFor) {
7847-    Stmt->StmtInfo.ForInfo.BeginLineNum = SEnvGetLineNumber();
7848-  }
7849-
7850-  //
7851-  // if we're pushing FOR statement to the current statement stack, expand the
7852-  // command line argument to a list of variable values.
7853-  //
7854-  if (Stmt->StmtType == StmtFor &&
7855-      !PushExtraStack &&
7856-      SEnvBatchGetCondition ()
7857-      ) {
7858-
7859-    if (FALSE == ExtractFromArg(SI->Argv[3], &nStart, &nEnd, &nStep)) {
7860-      Status = EFI_INVALID_PARAMETER;
7861-      goto Done;
7862-    }
7863-
7864-    Stmt->StmtInfo.ForInfo.VariableName[0] = SI->Argv[1][0];
7865-
7866-    for (Index = nStart; Index <= nEnd; Index += nStep) {
7867-        VarValue = AllocateZeroPool (sizeof(EFI_BATCH_VAR_VALUE));
7868-        if (VarValue == NULL) {
7869-          Status = EFI_OUT_OF_RESOURCES;
7870-          goto Done;
7871-        }
7872-
7873-        SPrint (wszValue, sizeof(wszValue), "%d", Index);
7874-        VarValue->Signature = EFI_BATCH_VAR_SIGNATURE;
7875-        VarValue->Value = AllocateZeroPool (StrLen (wszValue));
7876-        if (VarValue->Value == NULL) {
7877-          Status = EFI_OUT_OF_RESOURCES;
7878-          goto Done;
7879-        }
7880-        StrCpy (VarValue->Value, wszValue]);
7881-
7882-        InsertTailList (&Stmt->StmtInfo.ForInfo.ValueList, &VarValue->Link);
7883-    }
7884-  }
7885-
7886-  //
7887-  // Push the node to stack and increment the nest level
7888-  //
7889-  if (PushExtraStack) {
7890-    InsertHeadList (&ExtraStmtStack.StmtList, &Stmt->Link);
7891-    ExtraStmtStack.NestLevel ++;
7892-
7893-  } else {
7894-    InsertHeadList (&Script->StmtStack.StmtList, &Stmt->Link);
7895-    Script->StmtStack.NestLevel ++;
7896-  }
7897-
7898-Done:
7899-  if (EFI_ERROR (Status)) {
7900-    if (VarValue != NULL) {
7901-      if (VarValue->Value != NULL) {
7902-        FreePool (VarValue->Value);
7903-      }
7904-      FreePool (VarValue);
7905-    }
7906-
7907-    if (Stmt->StmtType == StmtFor) {
7908-      while (!IsListEmpty (&Stmt->StmtInfo.ForInfo.ValueList)) {
7909-        Link = Stmt->StmtInfo.ForInfo.ValueList.Flink;
7910-
7911-        VarValue = CR (
7912-                     Link,
7913-                     EFI_BATCH_VAR_VALUE,
7914-                     Link,
7915-                     EFI_BATCH_VAR_SIGNATURE
7916-                     );
7917-
7918-        if (VarValue->Value != NULL) {
7919-          FreePool (VarValue->Value);
7920-        }
7921-
7922-        RemoveEntryList (&VarValue->Link);
7923-        FreePool (VarValue);
7924-      }
7925-    }
7926-
7927-    ShellFreeFileList (&FileList);
7928-    FreePool (Stmt);
7929-  }
7930-
7931-  return Status;
7932-}
7933-*/
7934 EFI_STATUS
7935 SEnvCmdForRun (
7936   IN EFI_HANDLE                         hImageHandle,
7937diff --ignore-file-name-case -Naur ShellR33/shellenv/init.c GccShellR33/shellenv/init.c
7938--- ShellR33/shellenv/init.c	2008-08-13 23:02:46.000000000 -0700
7939+++ GccShellR33/shellenv/init.c	2009-09-22 15:37:05.000000000 -0700
7940@@ -143,7 +143,7 @@
7941     Status = BS->HandleProtocol (
7942                   mOldSEnv->Handle,
7943                   &ShellEnvProtocol,
7944-                  &(mOldSEnv->Interface)
7945+                  (VOID **)&(mOldSEnv->Interface)
7946                   );
7947     ASSERT (!EFI_ERROR (Status));
7948     Status = BS->ReinstallProtocolInterface (
7949diff --ignore-file-name-case -Naur ShellR33/shellenv/map.c GccShellR33/shellenv/map.c
7950--- ShellR33/shellenv/map.c	2009-05-27 01:55:16.000000000 -0700
7951+++ GccShellR33/shellenv/map.c	2009-10-14 16:36:30.000000000 -0700
7952@@ -2038,13 +2038,13 @@
7953     goto Done;
7954   }
7955
7956-  Status = BS->HandleProtocol (Handle, &gEfiBlockIoProtocolGuid, &BlockIo);
7957+  Status = BS->HandleProtocol (Handle, &gEfiBlockIoProtocolGuid, (VOID **)&BlockIo);
7958   //
7959   // This is just for NT32, because fsntx has no block io protocol installed
7960   // but fsntx has installed simple file system protocol
7961   //
7962   if (EFI_ERROR (Status)) {
7963-    Status = BS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, &BlockIo);
7964+    Status = BS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID **)&BlockIo);
7965   }
7966
7967   if (EFI_ERROR (Status)) {
7968diff --ignore-file-name-case -Naur ShellR33/shellenv/parsecmd.h GccShellR33/shellenv/parsecmd.h
7969--- ShellR33/shellenv/parsecmd.h	2006-06-12 23:18:21.000000000 -0700
7970+++ GccShellR33/shellenv/parsecmd.h	2009-11-05 13:49:56.000000000 -0800
7971@@ -103,4 +103,4 @@
7972   IN OUT SHELL_PARSED_ARGS    *args
7973   );
7974
7975-#endif
7976\ No newline at end of file
7977+#endif
7978diff --ignore-file-name-case -Naur ShellR33/shellenv/protid.c GccShellR33/shellenv/protid.c
7979--- ShellR33/shellenv/protid.c	2009-05-27 01:55:16.000000000 -0700
7980+++ GccShellR33/shellenv/protid.c	2009-09-22 15:37:05.000000000 -0700
7981@@ -1146,7 +1146,7 @@
7982 EFI_STATUS
7983 GetDriverName (
7984   EFI_HANDLE  DriverBindingHandle,
7985-  UINT8       *Language,
7986+  CHAR8       *Language,
7987   BOOLEAN     ImageName,
7988   CHAR16      **DriverName
7989   )
7990@@ -1539,7 +1539,7 @@
7991
7992     DevicePath      = NULL;
7993     BestDeviceName  = NULL;
7994-    Status          = BS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, &DevicePath);
7995+    Status          = BS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, (VOID **)&DevicePath);
7996
7997     Print (L"\n");
7998     PrintToken (STRING_TOKEN (STR_SHELLENV_PROTID_CONTROLLER_NAME), HiiEnvHandle);
7999diff --ignore-file-name-case -Naur ShellR33/ShellFull.inf GccShellR33/ShellFull.inf
8000--- ShellR33/ShellFull.inf	2008-08-13 23:02:46.000000000 -0700
8001+++ GccShellR33/ShellFull.inf	2009-11-07 12:33:52.000000000 -0800
8002@@ -20,300 +20,310 @@
8003 #--*/
8004
8005 [defines]
8006-BASE_NAME            = Shell
8007-FILE_GUID            = c57ad6b7-0515-40a8-9d21-551652854e37
8008+BASE_NAME            = ShellFull
8009+FILE_GUID            = 1903FB23-E526-4BDA-85E4-D68F2EEF0C20
8010 COMPONENT_TYPE       = APPLICATION
8011
8012 [sources.common]
8013-  Library\ShellDebug.c
8014-  Library\DPath.c
8015-  Library\Init.c
8016-  Library\Lock.c
8017-  Library\Str.c
8018-  Library\IO.c
8019-  Library\Mem.c
8020-  Library\Misc.c
8021-  Library\Data.c
8022-  Library\RtData.c
8023-  Library\ShellEnvInt.c
8024-  Library\Handle.c
8025-  Library\FileIO.c
8026-  Library\ConsistMapping.c
8027-  Library\CRC.c
8028-  Library\Event.c
8029-  Library\Perf.c
8030-  Library\VarCheck.c
8031-  Library\HiiSupport.c
8032-
8033-  newshell\NshellStrings.uni
8034-  newshell\init.c
8035-  newshell\nshell.h
8036-  newshell\fakehii.c
8037+  Library/ShellDebug.c
8038+  Library/DPath.c
8039+  Library/Init.c
8040+  Library/Lock.c
8041+  Library/Str.c
8042+  Library/IO.c
8043+  Library/Mem.c
8044+  Library/Misc.c
8045+  Library/Data.c
8046+  Library/RtData.c
8047+  Library/ShellEnvInt.c
8048+  Library/Handle.c
8049+  Library/FileIO.c
8050+  Library/ConsistMapping.c
8051+  Library/CRC.c
8052+  Library/Event.c
8053+  Library/Perf.c
8054+  Library/VarCheck.c
8055+  Library/HiiSupport.c
8056+
8057+  newshell/NshellStrings.uni
8058+  newshell/init.c
8059+  newshell/nshell.h
8060+  newshell/fakehii.c
8061+  newshell/DebugAssert.c
8062
8063   ShCommonStrings.uni
8064-  shellenv\ShellenvHelpStrings.uni
8065-  shellenv\ShellenvStrings.uni
8066-  shellenv\ScriptCmdStrings.uni
8067-  shellenv\ConnectStrings.uni
8068-  shellenv\EchoStrings.uni
8069-  shellenv\HelpStrings.uni
8070-  shellenv\MapStrings.uni
8071-  shellenv\CdStrings.uni
8072-  shellenv\DhStrings.uni
8073-
8074-  shellenv\cmddisp.c
8075-  shellenv\connect.c
8076-  shellenv\data.c
8077-  shellenv\exec.c
8078-  shellenv\init.c
8079-  shellenv\protid.c
8080-  shellenv\var.c
8081-  shellenv\conio.c
8082-  shellenv\consoleproxy.c
8083-  shellenv\handle.c
8084-  shellenv\dprot.c
8085-  shellenv\map.c
8086-  shellenv\marg.c
8087-  shellenv\batch.c
8088-  shellenv\if.c
8089-  shellenv\goto.c
8090-  shellenv\echo.c
8091-  shellenv\pause.c
8092-  shellenv\for.c
8093-  shellenv\wait.c
8094-  shellenv\help.c
8095-  shellenv\shelle.h
8096-  shellenv\shellenvguid.h
8097-  shellenv\parsecmd.c
8098-  shellenv\shift.c
8099+  shellenv/ShellenvHelpStrings.uni
8100+  shellenv/ShellenvStrings.uni
8101+  shellenv/ScriptCmdStrings.uni
8102+  shellenv/ConnectStrings.uni
8103+  shellenv/EchoStrings.uni
8104+  shellenv/HelpStrings.uni
8105+  shellenv/MapStrings.uni
8106+  shellenv/CdStrings.uni
8107+  shellenv/DhStrings.uni
8108+
8109+  shellenv/cmddisp.c
8110+  shellenv/connect.c
8111+  shellenv/data.c
8112+  shellenv/exec.c
8113+  shellenv/init.c
8114+  shellenv/protid.c
8115+  shellenv/var.c
8116+  shellenv/conio.c
8117+  shellenv/consoleproxy.c
8118+  shellenv/handle.c
8119+  shellenv/dprot.c
8120+  shellenv/map.c
8121+  shellenv/marg.c
8122+  shellenv/batch.c
8123+  shellenv/if.c
8124+  shellenv/goto.c
8125+  shellenv/echo.c
8126+  shellenv/pause.c
8127+  shellenv/for.c
8128+  shellenv/wait.c
8129+  shellenv/help.c
8130+  shellenv/shelle.h
8131+  shellenv/shellenvguid.h
8132+  shellenv/parsecmd.c
8133+  shellenv/shift.c
8134
8135-  unload\UnloadStrings.uni
8136-  unload\unload.c
8137+  unload/UnloadStrings.uni
8138+  unload/unload.c
8139
8140-  attrib\AttribStrings.uni
8141-  attrib\attrib.c
8142-  attrib\attrib.h
8143-
8144-  cls\clsstrings.uni
8145-  cls\cls.c
8146-
8147-  cp\CpStrings.uni
8148-  cp\cp.h
8149-  cp\cp.c
8150+  attrib/AttribStrings.uni
8151+  attrib/attrib.c
8152+  attrib/attrib.h
8153+
8154+  cls/clsstrings.uni
8155+  cls/cls.c
8156+
8157+  cp/CpStrings.uni
8158+  cp/cp.h
8159+  cp/cp.c
8160
8161-  date\DateStrings.uni
8162-  date\date.c
8163-  date\date.h
8164-
8165-  load\LoadStrings.uni
8166-  load\load.c
8167-  load\load.h
8168-
8169-  ls\LsStrings.uni
8170-  ls\ls.h
8171-  ls\ls.c
8172-
8173-  mkdir\MkdirStrings.uni
8174-  mkdir\mkdir.c
8175-  mkdir\mkdir.h
8176-
8177-  mv\MvStrings.uni
8178-  mv\mv.c
8179-  mv\mv.h
8180+  date/DateStrings.uni
8181+  date/date.c
8182+  date/date.h
8183+
8184+  load/LoadStrings.uni
8185+  load/load.c
8186+  load/load.h
8187+
8188+  ls/LsStrings.uni
8189+  ls/ls.h
8190+  ls/ls.c
8191+
8192+  mkdir/MkdirStrings.uni
8193+  mkdir/mkdir.c
8194+  mkdir/mkdir.h
8195+
8196+  mv/MvStrings.uni
8197+  mv/mv.c
8198+  mv/mv.h
8199
8200-  reset\ResetStrings.uni
8201-  reset\reset.c
8202-  reset\reset.h
8203-
8204-  rm\RmStrings.uni
8205-  rm\rm.h
8206-  rm\rm.c
8207-
8208-  type\TypeStrings.uni
8209-  type\type.c
8210-  type\type.h
8211-  time\TimeStrings.uni
8212-  time\time.c
8213-  time\time.h
8214-
8215-  touch\TouchStrings.uni
8216-  touch\touch.c
8217-  touch\touch.h
8218-
8219-  vol\VolStrings.uni
8220-  vol\vol.c
8221-  vol\vol.h
8222-
8223-  ver\VerStrings.uni
8224-  ver\ver.c
8225-  ver\ver.h
8226-
8227-  drivers\driversStrings.uni
8228-  drivers\drivers.c
8229-  drivers\drivers.h
8230-
8231-  drvcfg\DrvcfgStrings.uni
8232-  drvcfg\drvcfg.c
8233-  drvcfg\drvcfg.h
8234+  reset/ResetStrings.uni
8235+  reset/reset.c
8236+  reset/reset.h
8237+
8238+  rm/RmStrings.uni
8239+  rm/rm.h
8240+  rm/rm.c
8241+
8242+  type/TypeStrings.uni
8243+  type/type.c
8244+  type/type.h
8245+  time/TimeStrings.uni
8246+  time/time.c
8247+  time/time.h
8248+
8249+  touch/TouchStrings.uni
8250+  touch/touch.c
8251+  touch/touch.h
8252+
8253+  vol/VolStrings.uni
8254+  vol/vol.c
8255+  vol/vol.h
8256+
8257+  ver/VerStrings.uni
8258+  ver/ver.c
8259+  ver/ver.h
8260+
8261+  drivers/driversStrings.uni
8262+  drivers/drivers.c
8263+  drivers/drivers.h
8264+
8265+  drvcfg/DrvcfgStrings.uni
8266+  drvcfg/drvcfg.c
8267+  drvcfg/drvcfg.h
8268
8269-  drvdiag\DrvdiagStrings.uni
8270-  drvdiag\drvdiag.c
8271-  drvdiag\drvdiag.h
8272-
8273-  comp\CompStrings.uni
8274-  comp\comp.c
8275-
8276-  dblk\dblkStrings.uni
8277-  dblk\dblk.c
8278-  dblk\efidump.c
8279+  drvdiag/DrvdiagStrings.uni
8280+  drvdiag/drvdiag.c
8281+  drvdiag/drvdiag.h
8282+
8283+  comp/CompStrings.uni
8284+  comp/comp.c
8285+
8286+  dblk/dblkStrings.uni
8287+  dblk/dblk.c
8288+  dblk/efidump.c
8289
8290-  devices\DevicesStrings.uni
8291-  devices\devices.c
8292+  devices/DevicesStrings.uni
8293+  devices/devices.c
8294
8295-  devicetree\DevicetreeStrings.uni
8296-  devicetree\devicetree.c
8297+  devicetree/DevicetreeStrings.uni
8298+  devicetree/devicetree.c
8299
8300-  dmem\MemStrings.uni
8301-  dmem\DebugStrings.uni
8302-  dmem\mem.c
8303-  dmem\MemCommonPart.c
8304-  dmem\efidump.c
8305-
8306-  dmpstore\DmpstoreStrings.uni
8307-  dmpstore\dmpstore.c
8308-
8309-  edit\EditStrings.uni
8310-  edit\main.c
8311-  edit\libFileBuffer.c
8312-  edit\libEditor.c
8313-  edit\libTitleBar.c
8314-  edit\libStatusBar.c
8315-  edit\libInputBar.c
8316-  edit\libMenuBar.c
8317-  edit\libMisc.c
8318-
8319-  eficompress\CompressStrings.uni
8320-  eficompress\compressMain.c
8321-  eficompress\compress.c
8322-
8323-  efidecompress\DecompressStrings.uni
8324-  efidecompress\decompress.c
8325-
8326-  err\ErrStrings.uni
8327-  err\err.c
8328-
8329-  guid\GuidStrings.uni
8330-  guid\guid.c
8331-
8332-  hexedit\HexeditStrings.uni
8333-  hexedit\main.c
8334-  hexedit\libBufferImage.c
8335-  hexedit\libFileImage.c
8336-  hexedit\libDiskImage.c
8337-  hexedit\libMemImage.c
8338-  hexedit\libEditor.c
8339-  hexedit\libTitleBar.c
8340-  hexedit\libStatusBar.c
8341-  hexedit\libInputBar.c
8342-  hexedit\libMenuBar.c
8343-  hexedit\libClipBoard.c
8344-  hexedit\libMisc.c
8345-
8346-  IfConfig\IfConfigStrings.uni
8347-  IfConfig\IfConfig.c
8348-  IfConfig\IfConfig.h
8349-  IfConfig\ShellNetHelper.c
8350-
8351-  ipconfig\IpConfigStrings.uni
8352-  ipconfig\IpConfig.c
8353-
8354-  loadpcirom\LoadPciRomStrings.uni
8355-  loadpcirom\LoadPciRom.c
8356-
8357-  mem\MemStrings.uni
8358-  mem\DebugStrings.uni
8359-  mem\mm.c
8360-  mem\MemCommonPart.c
8361-  mem\efidump.c
8362-
8363-  memmap\memmapStrings.uni
8364-  memmap\memmap.c
8365-
8366-  mm\MmStrings.uni
8367-  mm\mm.c
8368-
8369-  mode\ModeStrings.uni
8370-  mode\mode.c
8371-
8372-  mount\MountStrings.uni
8373-  mount\mount.c
8374-
8375-  openinfo\OPeninfoStrings.uni
8376-  openinfo\openinfo.c
8377-
8378-  Ping\PingStrings.uni
8379-  Ping\Ping.c
8380-
8381-  pci\PciStrings.uni
8382-  pci\pci.c
8383-  pci\pci_class.c
8384-
8385-  sermode\SermodeStrings.uni
8386-  sermode\sermode.c
8387-
8388-  smbiosview\SmBiosViewStrings.uni
8389-  smbiosview\QueryTable.c
8390-  smbiosview\EventLogInfo.c
8391-  smbiosview\PrintInfo.c
8392-  smbiosview\LibSmbiosView.c
8393-  smbiosview\smbiosview.c
8394-  smbiosview\smbios.c
8395+  dmem/MemStrings.uni
8396+  dmem/DebugStrings.uni
8397+  dmem/mem.c
8398+  dmem/MemCommonPart.c
8399+  dmem/efidump.c
8400+
8401+  dmpstore/DmpstoreStrings.uni
8402+  dmpstore/dmpstore.c
8403+
8404+  edit/EditStrings.uni
8405+  edit/main.c
8406+  edit/libFileBuffer.c
8407+  edit/libEditor.c
8408+  edit/libTitleBar.c
8409+  edit/libStatusBar.c
8410+  edit/libInputBar.c
8411+  edit/libMenuBar.c
8412+  edit/libMisc.c
8413+
8414+  eficompress/CompressStrings.uni
8415+  eficompress/compressMain.c
8416+  eficompress/compress.c
8417+
8418+  efidecompress/DecompressStrings.uni
8419+  efidecompress/decompress.c
8420+
8421+  err/ErrStrings.uni
8422+  err/err.c
8423+
8424+  guid/GuidStrings.uni
8425+  guid/guid.c
8426+
8427+  hexedit/HexeditStrings.uni
8428+  hexedit/main.c
8429+  hexedit/libBufferImage.c
8430+  hexedit/libFileImage.c
8431+  hexedit/libDiskImage.c
8432+  hexedit/libMemImage.c
8433+  hexedit/libEditor.c
8434+  hexedit/libTitleBar.c
8435+  hexedit/libStatusBar.c
8436+  hexedit/libInputBar.c
8437+  hexedit/libMenuBar.c
8438+  hexedit/libClipBoard.c
8439+  hexedit/libMisc.c
8440+
8441+  IfConfig/IfConfigStrings.uni
8442+  IfConfig/IfConfig.c
8443+  IfConfig/IfConfig.h
8444+  IfConfig/ShellNetHelper.c
8445+
8446+  ipconfig/IpConfigStrings.uni
8447+  ipconfig/IpConfig.c
8448+
8449+  loadpcirom/LoadPciRomStrings.uni
8450+  loadpcirom/LoadPciRom.c
8451+
8452+  mem/MemStrings.uni
8453+  mem/DebugStrings.uni
8454+  mem/mm.c
8455+  mem/MemCommonPart.c
8456+  mem/efidump.c
8457+
8458+  memmap/memmapStrings.uni
8459+  memmap/memmap.c
8460+
8461+  mm/MmStrings.uni
8462+  mm/mm.c
8463+
8464+  mode/ModeStrings.uni
8465+  mode/mode.c
8466+
8467+  mount/MountStrings.uni
8468+  mount/mount.c
8469+
8470+  openinfo/OPeninfoStrings.uni
8471+  openinfo/openinfo.c
8472+
8473+  Ping/PingStrings.uni
8474+  Ping/Ping.c
8475+
8476+  pci/PciStrings.uni
8477+  pci/pci.c
8478+  pci/pci_class.c
8479+
8480+  sermode/SermodeStrings.uni
8481+  sermode/sermode.c
8482+
8483+  smbiosview/SmBiosViewStrings.uni
8484+  smbiosview/QueryTable.c
8485+  smbiosview/EventLogInfo.c
8486+  smbiosview/PrintInfo.c
8487+  smbiosview/LibSmbiosView.c
8488+  smbiosview/smbiosview.c
8489+  smbiosview/smbios.c
8490
8491-  stall\stallStrings.uni
8492-  stall\stall.c
8493+  stall/stallStrings.uni
8494+  stall/stall.c
8495
8496-  telnetmgmt\TelnetMgmtStrings.uni
8497-  telnetmgmt\TelnetMgmt.c
8498+  telnetmgmt/TelnetMgmtStrings.uni
8499+  telnetmgmt/TelnetMgmt.c
8500
8501-  tzone\TZoneStrings.uni
8502-  tzone\tzone.c
8503+  tzone/TZoneStrings.uni
8504+  tzone/tzone.c
8505
8506 [sources.ia32]
8507-  ver\ia32\ver32.c
8508-  Library\ia32\math.c
8509-  Library\ia32\initplat.c
8510+  ver/ia32/ver32.c
8511+  Library/IA32/math.c
8512+  Library/IA32/initplat.c
8513+  Library/IA32/DivU64x32Remainder.S  | GCC
8514+  Library/IA32/LShiftU64.S           | GCC
8515+  Library/IA32/RShiftU64.S           | GCC
8516+  Library/IA32/MultU64x32.S          | GCC
8517
8518 [sources.ipf]
8519-  ver\ipf\ver64.c
8520-  Library\ipf\math.c
8521-  Library\ipf\initplat.c
8522-  Library\ipf\palproc.s
8523-  Library\ipf\salpal.c
8524+  ver/ipf/ver64.c
8525+  Library/ipf/math.c
8526+  Library/ipf/initplat.c
8527+  Library/ipf/palproc.s
8528+  Library/ipf/salpal.c
8529
8530 [sources.EBC]
8531-  ver\ebc\verEbc.c
8532-  Library\EBC\math.c
8533-  Library\EBC\initplat.c
8534+  ver/ebc/verEbc.c
8535+  Library/EBC/math.c
8536+  Library/EBC/initplat.c
8537
8538 [sources.x64]
8539-  ver\ia32\ver32.c
8540-  Library\ipf\math.c
8541-  Library\ia32\initplat.c
8542+  ver/ia32/ver32.c
8543+  Library/ipf/math.c
8544+  Library/ia32/initplat.c
8545+
8546+[sources.ARM]
8547+  ver/ia32/ver32.c
8548+  Library/ipf/math.c
8549+  Library/ia32/initplat.c
8550
8551 [includes.common]
8552   .
8553-  .\Inc
8554-  .\ver
8555-  .\Library
8556-  $(EDK_SOURCE)\Foundation
8557-  $(EDK_SOURCE)\Foundation\Include
8558-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
8559-  $(EDK_SOURCE)\Foundation\Efi
8560-  $(EDK_SOURCE)\Foundation\Efi\Include
8561-  $(EDK_SOURCE)\Foundation\FrameWork
8562-  $(EDK_SOURCE)\Foundation\FrameWork\Include
8563-  $(EDK_SOURCE)\Foundation\Core\Dxe
8564-  $(EDK_SOURCE)\Foundation\Library\Dxe\Include
8565+  ./Inc
8566+  ./ver
8567+  ./Library
8568+  $(EDK_SOURCE)/Foundation
8569+  $(EDK_SOURCE)/Foundation/Include
8570+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
8571+  $(EDK_SOURCE)/Foundation/Efi
8572+  $(EDK_SOURCE)/Foundation/Efi/Include
8573+  $(EDK_SOURCE)/Foundation/FrameWork
8574+  $(EDK_SOURCE)/Foundation/FrameWork/Include
8575+  $(EDK_SOURCE)/Foundation/Core/Dxe
8576+  $(EDK_SOURCE)/Foundation/Library/Dxe/Include
8577   $(DEST_DIR)
8578
8579 [libraries.common]
8580diff --ignore-file-name-case -Naur ShellR33/SmbiosView/EventLogInfo.c GccShellR33/SmbiosView/EventLogInfo.c
8581--- ShellR33/SmbiosView/EventLogInfo.c	2005-08-23 00:16:36.000000000 -0700
8582+++ GccShellR33/SmbiosView/EventLogInfo.c	2009-11-05 13:49:56.000000000 -0800
8583@@ -25,7 +25,7 @@
8584 #include "PrintInfo.h"
8585 #include "QueryTable.h"
8586 #include "EventLogInfo.h"
8587-#include "smbios.h"
8588+#include "Smbios.h"
8589 #include STRING_DEFINES_FILE
8590
8591 VOID
8592@@ -37,7 +37,7 @@
8593   //
8594   // Print prompt
8595   //
8596-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ACCESS_METHOD), HiiHandle);
8597+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ACCESS_METHOD), gSmbiosHiiHandle);
8598   PRINT_INFO_OPTION (Key, Option);
8599
8600   //
8601@@ -45,30 +45,30 @@
8602   //
8603   switch (Key) {
8604   case 0:
8605-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ONE_EIGHT_BIT), HiiHandle);
8606+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ONE_EIGHT_BIT), gSmbiosHiiHandle);
8607     break;
8608
8609   case 1:
8610-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_TWO_EIGHT_BITS), HiiHandle);
8611+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_TWO_EIGHT_BITS), gSmbiosHiiHandle);
8612     break;
8613
8614   case 2:
8615-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ONE_SIXTEEN_BIT), HiiHandle);
8616+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ONE_SIXTEEN_BIT), gSmbiosHiiHandle);
8617     break;
8618
8619   case 3:
8620-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MEM_MAPPED_PHYS), HiiHandle);
8621+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MEM_MAPPED_PHYS), gSmbiosHiiHandle);
8622     break;
8623
8624   case 4:
8625-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_AVAIL_VIA_GENERAL), HiiHandle);
8626+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_AVAIL_VIA_GENERAL), gSmbiosHiiHandle);
8627     break;
8628
8629   default:
8630     if (Key <= 0x7f) {
8631-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_AVAIL_FOR_FUTURE_ASSIGN), HiiHandle);
8632+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_AVAIL_FOR_FUTURE_ASSIGN), gSmbiosHiiHandle);
8633     } else {
8634-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_BIOS_VENDOR_OEM), HiiHandle);
8635+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_BIOS_VENDOR_OEM), gSmbiosHiiHandle);
8636     }
8637   }
8638 }
8639@@ -82,26 +82,26 @@
8640   //
8641   // Print prompt
8642   //
8643-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_STATUS), HiiHandle);
8644+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_STATUS), gSmbiosHiiHandle);
8645   PRINT_INFO_OPTION (Key, Option);
8646
8647   //
8648   // Print value info
8649   //
8650   if ((Key & 0x01) != 0) {
8651-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_AREA_VALID), HiiHandle);
8652+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_AREA_VALID), gSmbiosHiiHandle);
8653   } else {
8654-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_AREA_VALID), HiiHandle);
8655+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_AREA_VALID), gSmbiosHiiHandle);
8656   }
8657
8658   if ((Key & 0x02) != 0) {
8659-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_AREA_FULL), HiiHandle);
8660+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_AREA_FULL), gSmbiosHiiHandle);
8661   } else {
8662-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_AREA_NOT_FULL), HiiHandle);
8663+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_AREA_NOT_FULL), gSmbiosHiiHandle);
8664   }
8665
8666   if ((Key & 0xFC) != 0) {
8667-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_RES_BITS_NOT_ZERO), HiiHandle, Key & 0xFC);
8668+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_RES_BITS_NOT_ZERO), gSmbiosHiiHandle, Key & 0xFC);
8669   }
8670 }
8671
8672@@ -114,20 +114,20 @@
8673   //
8674   // Print prompt
8675   //
8676-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_HEADER_FORMAT), HiiHandle);
8677+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_HEADER_FORMAT), gSmbiosHiiHandle);
8678   PRINT_INFO_OPTION (Key, Option);
8679
8680   //
8681   // Print value info
8682   //
8683   if (Key == 0x00) {
8684-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_NO_HEADER), HiiHandle);
8685+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_NO_HEADER), gSmbiosHiiHandle);
8686   } else if (Key == 0x01) {
8687-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_TYPE_LOG_HEADER), HiiHandle);
8688+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_TYPE_LOG_HEADER), gSmbiosHiiHandle);
8689   } else if (Key <= 0x7f) {
8690-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_AVAIL_FOR_FUTURE), HiiHandle);
8691+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_AVAIL_FOR_FUTURE), gSmbiosHiiHandle);
8692   } else {
8693-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_BIOS_VENDOR), HiiHandle);
8694+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_BIOS_VENDOR), gSmbiosHiiHandle);
8695   }
8696 }
8697
8698@@ -137,19 +137,19 @@
8699   UINT8 Option
8700   )
8701 {
8702-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_HEADER_LEN), HiiHandle);
8703+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_HEADER_LEN), gSmbiosHiiHandle);
8704   PRINT_INFO_OPTION (Key, Option);
8705
8706-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ONE_VAR_D), HiiHandle, Key & 0x7F);
8707+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ONE_VAR_D), gSmbiosHiiHandle, Key & 0x7F);
8708
8709   //
8710   // The most-significant bit of the field specifies
8711   // whether (0) or not (1) the record has been read
8712   //
8713   if ((Key & 0x80) != 0) {
8714-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_THIS_RECORD_READ), HiiHandle);
8715+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_THIS_RECORD_READ), gSmbiosHiiHandle);
8716   } else {
8717-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_THIS_RECORD_NOT_READ), HiiHandle);
8718+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_THIS_RECORD_NOT_READ), gSmbiosHiiHandle);
8719   }
8720 }
8721
8722@@ -160,7 +160,7 @@
8723 {
8724   LOG_HEADER_TYPE1_FORMAT *Header;
8725
8726-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_SYSTEM_EVENT_LOG), HiiHandle);
8727+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_SYSTEM_EVENT_LOG), gSmbiosHiiHandle);
8728
8729   //
8730   // Print Log Header Type1 Format info
8731@@ -169,27 +169,27 @@
8732
8733   PrintToken (
8734     STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_OEM_RESERVED),
8735-    HiiHandle,
8736+    gSmbiosHiiHandle,
8737     Header->OEMReserved[0],
8738     Header->OEMReserved[1],
8739     Header->OEMReserved[2],
8740     Header->OEMReserved[3],
8741     Header->OEMReserved[4]
8742     );
8743-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_TIME), HiiHandle, Header->METW);
8744-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_COUNT), HiiHandle, Header->MECI);
8745-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_PREBOOT_ADDRESS), HiiHandle, Header->CMOSAddress);
8746-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_PREBOOT_INDEX), HiiHandle, Header->CMOSBitIndex);
8747-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_CHECKSUM_STARTING_OFF), HiiHandle, Header->StartingOffset);
8748-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_CHECKSUN_BYTE_COUNT), HiiHandle, Header->ChecksumOffset);
8749+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_TIME), gSmbiosHiiHandle, Header->METW);
8750+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULTIPLE_EVENT_COUNT), gSmbiosHiiHandle, Header->MECI);
8751+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_PREBOOT_ADDRESS), gSmbiosHiiHandle, Header->CMOSAddress);
8752+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_PREBOOT_INDEX), gSmbiosHiiHandle, Header->CMOSBitIndex);
8753+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_CHECKSUM_STARTING_OFF), gSmbiosHiiHandle, Header->StartingOffset);
8754+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_CHECKSUN_BYTE_COUNT), gSmbiosHiiHandle, Header->ChecksumOffset);
8755   PrintToken (
8756     STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_RESERVED),
8757-    HiiHandle,
8758+    gSmbiosHiiHandle,
8759     Header->OEMReserved[0],
8760     Header->OEMReserved[1],
8761     Header->OEMReserved[2]
8762     );
8763-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_HEADER_REVISION), HiiHandle, Header->HeaderRevision);
8764+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_HEADER_REVISION), gSmbiosHiiHandle, Header->HeaderRevision);
8765 }
8766
8767 VOID
8768@@ -201,20 +201,20 @@
8769   //
8770   // Print prompt
8771   //
8772-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_HEADER), HiiHandle);
8773+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_LOG_HEADER), gSmbiosHiiHandle);
8774
8775   //
8776   // Print value info
8777   //
8778   if (LogHeaderFormat == 0x00) {
8779-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_NO_HEADER), HiiHandle);
8780+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_NO_HEADER), gSmbiosHiiHandle);
8781   } else if (LogHeaderFormat == 0x01) {
8782-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_TYPE_LOG_HEADER), HiiHandle);
8783+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_TYPE_LOG_HEADER), gSmbiosHiiHandle);
8784     DisplaySysEventLogHeaderType1 (LogHeader);
8785   } else if (LogHeaderFormat <= 0x7f) {
8786-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_AVAIL_FUTURE_ASSIGN), HiiHandle);
8787+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_AVAIL_FUTURE_ASSIGN), gSmbiosHiiHandle);
8788   } else {
8789-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_BIOS_VENDOR), HiiHandle);
8790+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_BIOS_VENDOR), gSmbiosHiiHandle);
8791   }
8792 }
8793
8794@@ -237,29 +237,29 @@
8795   //
8796   switch (ElVdfType) {
8797   case 0:
8798-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_NO_STD_FORMAT), HiiHandle);
8799+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_NO_STD_FORMAT), gSmbiosHiiHandle);
8800     break;
8801
8802   case 1:
8803     Word = (UINT16 *) (VarData + 1);
8804-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_SMBIOS_STRUCT_ASSOC), HiiHandle);
8805-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_STRUCT_HANDLE), HiiHandle, *Word);
8806+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_SMBIOS_STRUCT_ASSOC), gSmbiosHiiHandle);
8807+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_STRUCT_HANDLE), gSmbiosHiiHandle, *Word);
8808     break;
8809
8810   case 2:
8811     Dword = (UINT32 *) (VarData + 1);
8812-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULT_EVENT_COUNTER), HiiHandle, *Dword);
8813+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULT_EVENT_COUNTER), gSmbiosHiiHandle, *Dword);
8814     break;
8815
8816   case 3:
8817     Word = (UINT16 *) (VarData + 1);
8818-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_SMBIOS_STRUCT_ASSOC), HiiHandle);
8819-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_STRUCT_HANDLE), HiiHandle, *Word);
8820+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_SMBIOS_STRUCT_ASSOC), gSmbiosHiiHandle);
8821+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_STRUCT_HANDLE), gSmbiosHiiHandle, *Word);
8822     //
8823     // Followed by a multiple-event counter
8824     //
8825     Dword = (UINT32 *) (VarData + 1);
8826-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULT_EVENT_COUNTER), HiiHandle, *Dword);
8827+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULT_EVENT_COUNTER), gSmbiosHiiHandle, *Dword);
8828     break;
8829
8830   case 4:
8831@@ -281,14 +281,14 @@
8832     // Followed by a multiple-event counter
8833     //
8834     Dword = (UINT32 *) (VarData + 1);
8835-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULT_EVENT_COUNTER), HiiHandle, *Dword);
8836+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_MULT_EVENT_COUNTER), gSmbiosHiiHandle, *Dword);
8837     break;
8838
8839   default:
8840     if (ElVdfType <= 0x7F) {
8841-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_UNUSED_AVAIL_FOR_ASSIGN), HiiHandle);
8842+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_UNUSED_AVAIL_FOR_ASSIGN), gSmbiosHiiHandle);
8843     } else {
8844-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_AVAIL_FOR_SYSTEM), HiiHandle);
8845+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_AVAIL_FOR_SYSTEM), gSmbiosHiiHandle);
8846     }
8847   }
8848 }
8849@@ -309,7 +309,7 @@
8850   //
8851   // Print prompt
8852   //
8853-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_SYSTEM_EVENT_LOG_2), HiiHandle);
8854+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_SYSTEM_EVENT_LOG_2), gSmbiosHiiHandle);
8855
8856   //
8857   // Print Log info
8858@@ -336,19 +336,19 @@
8859     // (as read from CMOS) of the occurrence of the event
8860     // So Print as hex and represent decimal
8861     //
8862-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_DATE), HiiHandle);
8863+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_DATE), gSmbiosHiiHandle);
8864     if (Log->Year >= 80 && Log->Year <= 99) {
8865       Print (L"19");
8866-    } else if (Log->Year >= 0 && Log->Year <= 79) {
8867+    } else if (Log->Year <= 79) {
8868       Print (L"20");
8869     } else {
8870-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ERROR), HiiHandle);
8871+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_ERROR), gSmbiosHiiHandle);
8872       continue;
8873     }
8874
8875     PrintToken (
8876       STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_TIME_SIX_VARS),
8877-      HiiHandle,
8878+      gSmbiosHiiHandle,
8879       Log->Year,
8880       Log->Month,
8881       Log->Day,
8882diff --ignore-file-name-case -Naur ShellR33/SmbiosView/LibSmbiosView.c GccShellR33/SmbiosView/LibSmbiosView.c
8883--- ShellR33/SmbiosView/LibSmbiosView.c	2007-03-15 20:07:49.000000000 -0700
8884+++ GccShellR33/SmbiosView/LibSmbiosView.c	2009-11-05 13:49:56.000000000 -0800
8885@@ -22,10 +22,10 @@
8886 --*/
8887
8888 #include "EfiShellLib.h"
8889-#include "LIbSmbios.h"
8890+#include "LibSmbios.h"
8891 #include "LibSmbiosView.h"
8892 #include "smbiosview.h"
8893-#include "smbios.h"
8894+#include "Smbios.h"
8895 #include STRING_DEFINES_FILE
8896
8897 STATIC UINT8                    mInit         = 0;
8898@@ -62,15 +62,15 @@
8899   //
8900   // Get SMBIOS table from System Configure table
8901   //
8902-  Status = LibGetSystemConfigurationTable (&gEfiSmbiosTableGuid, &mSmbiosTable);
8903+  Status = LibGetSystemConfigurationTable (&gEfiSmbiosTableGuid, (VOID **)&mSmbiosTable);
8904
8905   if (mSmbiosTable == NULL) {
8906-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_CANNOT_GET_TABLE), HiiHandle);
8907+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_CANNOT_GET_TABLE), gSmbiosHiiHandle);
8908     return EFI_NOT_FOUND;
8909   }
8910
8911   if (EFI_ERROR (Status)) {
8912-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_GET_TABLE_ERROR), HiiHandle, Status);
8913+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_GET_TABLE_ERROR), gSmbiosHiiHandle, Status);
8914     return Status;
8915   }
8916   //
8917@@ -200,7 +200,7 @@
8918   }
8919
8920   if (Buffer == NULL) {
8921-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_NO_BUFF_SPEC), HiiHandle);
8922+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_NO_BUFF_SPEC), gSmbiosHiiHandle);
8923     return DMI_INVALID_HANDLE;
8924   }
8925
8926@@ -342,7 +342,7 @@
8927 {
8928   CHAR8 *String;
8929   if (Buffer == NULL) {
8930-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_NO_BUF_SPEC_WHEN_STRUCT), HiiHandle);
8931+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_NO_BUF_SPEC_WHEN_STRUCT), gSmbiosHiiHandle);
8932     return ;
8933   }
8934   //
8935diff --ignore-file-name-case -Naur ShellR33/SmbiosView/PrintInfo.c GccShellR33/SmbiosView/PrintInfo.c
8936--- ShellR33/SmbiosView/PrintInfo.c	2008-10-06 00:03:04.000000000 -0700
8937+++ GccShellR33/SmbiosView/PrintInfo.c	2009-11-05 13:49:56.000000000 -0800
8938@@ -26,7 +26,7 @@
8939 #include "LibSmbiosView.h"
8940 #include "QueryTable.h"
8941 #include "EventLogInfo.h"
8942-#include "smbios.h"
8943+#include "Smbios.h"
8944 #include STRING_DEFINES_FILE
8945
8946 //
8947@@ -70,17 +70,17 @@
8948
8949 #define PrintBitField(pStruct, type, element, size) \
8950   do { \
8951-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), HiiHandle); \
8952+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), gSmbiosHiiHandle); \
8953     APrint (#element); \
8954-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SIZE), HiiHandle, size); \
8955+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SIZE), gSmbiosHiiHandle, size); \
8956     DumpHex (0, 0, size, &(pStruct->type->element)); \
8957   } while (0);
8958
8959 #define PrintSmbiosBitField(pStruct, startaddress, element, size) \
8960   do { \
8961-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), HiiHandle); \
8962+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), gSmbiosHiiHandle); \
8963     APrint (#element); \
8964-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SIZE), HiiHandle, size); \
8965+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SIZE), gSmbiosHiiHandle, size); \
8966     DumpHex (0, 0, size, startaddress); \
8967   } while (0);
8968
8969@@ -153,7 +153,7 @@
8970   UINT8 InAnchor[6];
8971
8972   if (SmbiosTable == NULL) {
8973-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMBIOSTABLE_NULL), HiiHandle);
8974+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMBIOSTABLE_NULL), gSmbiosHiiHandle);
8975     return ;
8976   }
8977
8978@@ -162,29 +162,29 @@
8979   }
8980
8981   if (Option >= SHOW_NORMAL) {
8982-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_SIGN), HiiHandle);
8983+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_SIGN), gSmbiosHiiHandle);
8984     MemToString (Anchor, SmbiosTable->AnchorString, 4);
8985-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ANCHOR_STR), HiiHandle, Anchor);
8986+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ANCHOR_STR), gSmbiosHiiHandle, Anchor);
8987     PrintToken (
8988       STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EPS_CHECKSUM),
8989-      HiiHandle,
8990+      gSmbiosHiiHandle,
8991       SmbiosTable->EntryPointStructureChecksum
8992       );
8993-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_LEN), HiiHandle, SmbiosTable->EntryPointLength);
8994+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_LEN), gSmbiosHiiHandle, SmbiosTable->EntryPointLength);
8995     PrintToken (
8996       STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VERSION),
8997-      HiiHandle,
8998+      gSmbiosHiiHandle,
8999       SmbiosTable->MajorVersion,
9000       SmbiosTable->MinorVersion
9001       );
9002     PrintToken (
9003       STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NUMBER_STRUCT),
9004-      HiiHandle,
9005+      gSmbiosHiiHandle,
9006       SmbiosTable->NumberOfSmbiosStructures
9007       );
9008-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MAX_STRUCT_SIZE), HiiHandle, SmbiosTable->MaxStructureSize);
9009-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TABLE_ADDR), HiiHandle, SmbiosTable->TableAddress);
9010-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TABLE_LENGTH), HiiHandle, SmbiosTable->TableLength);
9011+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MAX_STRUCT_SIZE), gSmbiosHiiHandle, SmbiosTable->MaxStructureSize);
9012+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TABLE_ADDR), gSmbiosHiiHandle, SmbiosTable->TableAddress);
9013+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TABLE_LENGTH), gSmbiosHiiHandle, SmbiosTable->TableLength);
9014
9015   }
9016   //
9017@@ -193,17 +193,17 @@
9018   if (Option >= SHOW_DETAIL) {
9019     PrintToken (
9020       STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_REVISION),
9021-      HiiHandle,
9022+      gSmbiosHiiHandle,
9023       SmbiosTable->EntryPointRevision
9024       );
9025-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BCD_REVISION), HiiHandle, SmbiosTable->SmbiosBcdRevision);
9026+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BCD_REVISION), gSmbiosHiiHandle, SmbiosTable->SmbiosBcdRevision);
9027     //
9028     // Since raw data is not string, add a NULL terminater.
9029     //
9030     MemToString (InAnchor, SmbiosTable->IntermediateAnchorString, 5);
9031-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTER_ACHOR), HiiHandle, InAnchor);
9032-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTER_CHECKSUM), HiiHandle, SmbiosTable->IntermediateChecksum);
9033-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FORMATTED_AREA), HiiHandle);
9034+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTER_ACHOR), gSmbiosHiiHandle, InAnchor);
9035+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTER_CHECKSUM), gSmbiosHiiHandle, SmbiosTable->IntermediateChecksum);
9036+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FORMATTED_AREA), gSmbiosHiiHandle);
9037     DumpHex (2, 0, 5, SmbiosTable->FormattedArea);
9038   }
9039
9040@@ -247,8 +247,8 @@
9041   // Display structure header
9042   //
9043   DisplayStructureTypeInfo (pStruct->Hdr->Type, SHOW_DETAIL);
9044-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FORMAT_PART_LEN), HiiHandle, pStruct->Hdr->Length);
9045-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_HANDLE), HiiHandle, pStruct->Hdr->Handle);
9046+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FORMAT_PART_LEN), gSmbiosHiiHandle, pStruct->Hdr->Length);
9047+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_HANDLE), gSmbiosHiiHandle, pStruct->Hdr->Handle);
9048
9049   if (Option == SHOW_OUTLINE) {
9050     return EFI_SUCCESS;
9051@@ -263,7 +263,7 @@
9052     PrintPendingString (pStruct, Type0, BiosVersion);
9053     PrintStructValue (pStruct, Type0, BiosSegment);
9054     PrintPendingString (pStruct, Type0, BiosReleaseDate);
9055-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), HiiHandle, 64 * (pStruct->Type0->BiosSize + 1));
9056+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gSmbiosHiiHandle, 64 * (pStruct->Type0->BiosSize + 1));
9057
9058     if (Option < SHOW_DETAIL) {
9059       PrintStructValueH (pStruct, Type0, BiosCharacteristics);
9060@@ -325,13 +325,13 @@
9061     PrintPendingString (pStruct, Type3, Version);
9062     PrintPendingString (pStruct, Type3, SerialNumber);
9063     PrintPendingString (pStruct, Type3, AssetTag);
9064-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOTUP_STATE), HiiHandle);
9065+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOTUP_STATE), gSmbiosHiiHandle);
9066     DisplaySystemEnclosureStatus (pStruct->Type3->BootupState, Option);
9067-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_STATE), HiiHandle);
9068+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_STATE), gSmbiosHiiHandle);
9069     DisplaySystemEnclosureStatus (pStruct->Type3->PowerSupplyState, Option);
9070-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_THERMAL_STATE), HiiHandle);
9071+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_THERMAL_STATE), gSmbiosHiiHandle);
9072     DisplaySystemEnclosureStatus (pStruct->Type3->ThermalState, Option);
9073-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS), HiiHandle);
9074+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS), gSmbiosHiiHandle);
9075     DisplaySESecurityStatus (pStruct->Type3->SecurityStatus, Option);
9076     PrintBitField (pStruct, Type3, OemDefined, 4);
9077     break;
9078@@ -384,9 +384,9 @@
9079
9080       DisplayMcErrorDetectMethod (pStruct->Type5->ErrDetectMethod, Option);
9081       DisplayMcErrorCorrectCapability (pStruct->Type5->ErrCorrectCapability, Option);
9082-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SUPOPRT), HiiHandle);
9083+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SUPOPRT), gSmbiosHiiHandle);
9084       DisplayMcInterleaveSupport (pStruct->Type5->SupportInterleave, Option);
9085-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CURRENT), HiiHandle);
9086+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CURRENT), gSmbiosHiiHandle);
9087       DisplayMcInterleaveSupport (pStruct->Type5->CurrentInterleave, Option);
9088       DisplayMaxMemoryModuleSize (pStruct->Type5->MaxMemoryModuleSize, SlotNum, Option);
9089       DisplayMcMemorySpeeds (pStruct->Type5->SupportSpeed, Option);
9090@@ -409,9 +409,9 @@
9091     DisplayMmBankConnections (pStruct->Type6->BankConnections, Option);
9092     PrintStructValue (pStruct, Type6, CurrentSpeed);
9093     DisplayMmMemoryType (pStruct->Type6->CurrentMemoryType, Option);
9094-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INSTALLED), HiiHandle);
9095+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INSTALLED), gSmbiosHiiHandle);
9096     DisplayMmMemorySize (pStruct->Type6->InstalledSize, Option);
9097-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED), HiiHandle);
9098+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED), gSmbiosHiiHandle);
9099     DisplayMmMemorySize (pStruct->Type6->EnabledSize, Option);
9100     DisplayMmErrorStatus (pStruct->Type6->ErrorStatus, Option);
9101     break;
9102@@ -441,7 +441,7 @@
9103     Print (L"Internal ");
9104     DisplayPortConnectorType (pStruct->Type8->InternalConnectorType, Option);
9105     PrintPendingString (pStruct, Type8, ExternalReferenceDesignator);
9106-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EXTERNAL), HiiHandle);
9107+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EXTERNAL), gSmbiosHiiHandle);
9108     DisplayPortConnectorType (pStruct->Type8->ExternalConnectorType, Option);
9109     DisplayPortType (pStruct->Type8->PortType, Option);
9110     break;
9111@@ -478,7 +478,7 @@
9112       NumOfDevice = (pStruct->Type10->Hdr.Length - sizeof (SMBIOS_HEADER)) / (2 * sizeof (UINT8));
9113       for (Index = 0; Index < NumOfDevice; Index++) {
9114         DisplayOnboardDeviceTypes (pStruct->Type10->Device[Index].DeviceType, Option);
9115-        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DESC_STRING), HiiHandle);
9116+        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DESC_STRING), gSmbiosHiiHandle);
9117         APrint (LibGetSmbiosString (pStruct, pStruct->Type10->Device[Index].DescriptionString));
9118       }
9119     }
9120@@ -539,7 +539,7 @@
9121         // Display all Event Log type descriptors supported by system
9122         //
9123         for (Index = 0; Index < Count; Index++, Ptr++) {
9124-          PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SUPOPRTED_EVENT), HiiHandle, Index + 1);
9125+          PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SUPOPRTED_EVENT), gSmbiosHiiHandle, Index + 1);
9126           DisplaySELTypes (Ptr->LogType, Option);
9127           DisplaySELVarDataFormatType (Ptr->DataFormatType, Option);
9128         }
9129@@ -557,7 +557,7 @@
9130           default:
9131             PrintToken (
9132               STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACCESS_METHOD_NOT_SUPOPRTED),
9133-              HiiHandle,
9134+              gSmbiosHiiHandle,
9135               pStruct->Type15->AccessMethod
9136               );
9137             return EFI_UNSUPPORTED;
9138@@ -788,7 +788,7 @@
9139     break;
9140
9141   case 31:
9142-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_TYPE31), HiiHandle);
9143+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_TYPE31), gSmbiosHiiHandle);
9144     break;
9145
9146   case 32:
9147@@ -849,9 +849,9 @@
9148       Count = pStruct->Type37->MemoryDeviceCount;
9149       Ptr   = pStruct->Type37->MemoryDevice;
9150       for (Index = 0; Index < Count; Index++) {
9151-        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_DEVICE), HiiHandle, Index + 1);
9152-        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_LOAD), HiiHandle, Ptr->DeviceLoad);
9153-        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_HANDLE), HiiHandle, Ptr->DeviceHandle);
9154+        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_DEVICE), gSmbiosHiiHandle, Index + 1);
9155+        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_LOAD), gSmbiosHiiHandle, Ptr->DeviceLoad);
9156+        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DEV_HANDLE), gSmbiosHiiHandle, Ptr->DeviceHandle);
9157       }
9158     }
9159     break;
9160@@ -906,9 +906,9 @@
9161
9162       for (Index = 0; Index < NumberOfEntries; Index++) {
9163         EntryLength = Entries->EntryLength;
9164-        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTRYLEN), HiiHandle, EntryLength);
9165-        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDHANDLE), HiiHandle, Entries->ReferencedHandle);
9166-        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDOFFSET), HiiHandle, Entries->ReferencedOffset);
9167+        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTRYLEN), gSmbiosHiiHandle, EntryLength);
9168+        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDHANDLE), gSmbiosHiiHandle, Entries->ReferencedHandle);
9169+        PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDOFFSET), gSmbiosHiiHandle, Entries->ReferencedOffset);
9170         PrintSmbiosString (pStruct, Entries->EntryString, String);
9171         PrintSmbiosBitField (pStruct, Entries->Value, Value, EntryLength - 5);
9172         Entries = (ADDITIONAL_INFORMATION_ENTRY *) ((UINT8 *)Entries + EntryLength);
9173@@ -929,15 +929,15 @@
9174     break;
9175
9176   case 126:
9177-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INACTIVE_STRUCT), HiiHandle);
9178+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INACTIVE_STRUCT), gSmbiosHiiHandle);
9179     break;
9180
9181   case 127:
9182-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_THIS_STRUCT_END_TABLE), HiiHandle);
9183+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_THIS_STRUCT_END_TABLE), gSmbiosHiiHandle);
9184     break;
9185
9186   default:
9187-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_TYPE_UNDEFINED), HiiHandle);
9188+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STRUCT_TYPE_UNDEFINED), gSmbiosHiiHandle);
9189     break;
9190   }
9191
9192@@ -953,7 +953,7 @@
9193   //
9194   // Print header
9195   //
9196-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR), HiiHandle);
9197+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR), gSmbiosHiiHandle);
9198   //
9199   // print option
9200   //
9201@@ -965,137 +965,137 @@
9202   //   are designed not to deal with UINT64
9203   //
9204   if (BIT (chara, 0) != 0) {
9205-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), HiiHandle);
9206+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gSmbiosHiiHandle);
9207   }
9208
9209   if (BIT (chara, 1) != 0) {
9210-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), HiiHandle);
9211+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_BIT), gSmbiosHiiHandle);
9212   }
9213
9214   if (BIT (chara, 2) != 0) {
9215-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN_BIT), HiiHandle);
9216+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN_BIT), gSmbiosHiiHandle);
9217   }
9218
9219   if (BIT (chara, 3) != 0) {
9220-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_NOT_SUPPORTED), HiiHandle);
9221+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_NOT_SUPPORTED), gSmbiosHiiHandle);
9222   }
9223
9224   if (BIT (chara, 4) != 0) {
9225-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ISA_SUPPORTED), HiiHandle);
9226+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ISA_SUPPORTED), gSmbiosHiiHandle);
9227   }
9228
9229   if (BIT (chara, 5) != 0) {
9230-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MSA_SUPPORTED), HiiHandle);
9231+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MSA_SUPPORTED), gSmbiosHiiHandle);
9232   }
9233
9234   if (BIT (chara, 6) != 0) {
9235-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EISA_SUPPORTED), HiiHandle);
9236+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EISA_SUPPORTED), gSmbiosHiiHandle);
9237   }
9238
9239   if (BIT (chara, 7) != 0) {
9240-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PCI_SUPPORTED), HiiHandle);
9241+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PCI_SUPPORTED), gSmbiosHiiHandle);
9242   }
9243
9244   if (BIT (chara, 8) != 0) {
9245-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PC_CARD_SUPPORTED), HiiHandle);
9246+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PC_CARD_SUPPORTED), gSmbiosHiiHandle);
9247   }
9248
9249   if (BIT (chara, 9) != 0) {
9250-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PLUG_PLAY_SUPPORTED), HiiHandle);
9251+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PLUG_PLAY_SUPPORTED), gSmbiosHiiHandle);
9252   }
9253
9254   if (BIT (chara, 10) != 0) {
9255-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_APM_SUPPORTED), HiiHandle);
9256+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_APM_SUPPORTED), gSmbiosHiiHandle);
9257   }
9258
9259   if (BIT (chara, 11) != 0) {
9260-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_UPGRADEABLE), HiiHandle);
9261+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_UPGRADEABLE), gSmbiosHiiHandle);
9262   }
9263
9264   if (BIT (chara, 12) != 0) {
9265-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SHADOWING), HiiHandle);
9266+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_SHADOWING), gSmbiosHiiHandle);
9267   }
9268
9269   if (BIT (chara, 13) != 0) {
9270-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VESA_SUPPORTED), HiiHandle);
9271+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VESA_SUPPORTED), gSmbiosHiiHandle);
9272   }
9273
9274   if (BIT (chara, 14) != 0) {
9275-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ECSD_SUPPORT), HiiHandle);
9276+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ECSD_SUPPORT), gSmbiosHiiHandle);
9277   }
9278
9279   if (BIT (chara, 15) != 0) {
9280-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FORM_CD_SUPPORTED), HiiHandle);
9281+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FORM_CD_SUPPORTED), gSmbiosHiiHandle);
9282   }
9283
9284   if (BIT (chara, 16) != 0) {
9285-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SELECTED_BOOT_SUPPORTED), HiiHandle);
9286+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SELECTED_BOOT_SUPPORTED), gSmbiosHiiHandle);
9287   }
9288
9289   if (BIT (chara, 17) != 0) {
9290-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_ROM_SOCKETED), HiiHandle);
9291+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_ROM_SOCKETED), gSmbiosHiiHandle);
9292   }
9293
9294   if (BIT (chara, 18) != 0) {
9295-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_PC_CARD), HiiHandle);
9296+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_PC_CARD), gSmbiosHiiHandle);
9297   }
9298
9299   if (BIT (chara, 19) != 0) {
9300-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER), HiiHandle);
9301+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER), gSmbiosHiiHandle);
9302   }
9303
9304   if (BIT (chara, 20) != 0) {
9305-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_NEC), HiiHandle);
9306+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_NEC), gSmbiosHiiHandle);
9307   }
9308
9309   if (BIT (chara, 21) != 0) {
9310-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_TOSHIBA), HiiHandle);
9311+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_TOSHIBA), gSmbiosHiiHandle);
9312   }
9313
9314   if (BIT (chara, 22) != 0) {
9315-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FLOPPY_SERVICES_SUPPORTED), HiiHandle);
9316+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FLOPPY_SERVICES_SUPPORTED), gSmbiosHiiHandle);
9317   }
9318
9319   if (BIT (chara, 23) != 0) {
9320-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_POINT_TWO_MB), HiiHandle);
9321+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_POINT_TWO_MB), gSmbiosHiiHandle);
9322   }
9323
9324   if (BIT (chara, 24) != 0) {
9325-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_720_KB), HiiHandle);
9326+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_720_KB), gSmbiosHiiHandle);
9327   }
9328
9329   if (BIT (chara, 25) != 0) {
9330-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TWO_POINT_EIGHT_EIGHT_MB), HiiHandle);
9331+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TWO_POINT_EIGHT_EIGHT_MB), gSmbiosHiiHandle);
9332   }
9333
9334   if (BIT (chara, 26) != 0) {
9335-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINT_SCREEN_SUPPORT), HiiHandle);
9336+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINT_SCREEN_SUPPORT), gSmbiosHiiHandle);
9337   }
9338
9339   if (BIT (chara, 27) != 0) {
9340-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_KEYBOARD_SERV_SUPPORT), HiiHandle);
9341+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_KEYBOARD_SERV_SUPPORT), gSmbiosHiiHandle);
9342   }
9343
9344   if (BIT (chara, 28) != 0) {
9345-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SERIAL_SERVICES_SUPPORT), HiiHandle);
9346+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SERIAL_SERVICES_SUPPORT), gSmbiosHiiHandle);
9347   }
9348
9349   if (BIT (chara, 29) != 0) {
9350-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINTER_SERVICES_SUPPORT), HiiHandle);
9351+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRINTER_SERVICES_SUPPORT), gSmbiosHiiHandle);
9352   }
9353
9354   if (BIT (chara, 30) != 0) {
9355-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONO_VIDEO_SUPPORT), HiiHandle);
9356+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONO_VIDEO_SUPPORT), gSmbiosHiiHandle);
9357   }
9358
9359   if (BIT (chara, 31) != 0) {
9360-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NEC_PC_98), HiiHandle);
9361+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NEC_PC_98), gSmbiosHiiHandle);
9362   }
9363   //
9364   // Just print the reserved
9365   //
9366-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_32_47), HiiHandle);
9367-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_48_64), HiiHandle);
9368+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_32_47), gSmbiosHiiHandle);
9369+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_48_64), gSmbiosHiiHandle);
9370 }
9371
9372 VOID
9373@@ -1104,7 +1104,7 @@
9374   UINT8 Option
9375   )
9376 {
9377-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION), HiiHandle);
9378+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION), gSmbiosHiiHandle);
9379   //
9380   // Print option
9381   //
9382@@ -1114,35 +1114,35 @@
9383   // check bit and print
9384   //
9385   if (BIT (byte1, 0) != 0) {
9386-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACPI_SUPPORTED), HiiHandle);
9387+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ACPI_SUPPORTED), gSmbiosHiiHandle);
9388   }
9389
9390   if (BIT (byte1, 1) != 0) {
9391-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_USB_LEGACY_SUPPORTED), HiiHandle);
9392+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_USB_LEGACY_SUPPORTED), gSmbiosHiiHandle);
9393   }
9394
9395   if (BIT (byte1, 2) != 0) {
9396-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AGP_SUPPORTED), HiiHandle);
9397+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AGP_SUPPORTED), gSmbiosHiiHandle);
9398   }
9399
9400   if (BIT (byte1, 3) != 0) {
9401-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_I2O_BOOT_SUPPORTED), HiiHandle);
9402+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_I2O_BOOT_SUPPORTED), gSmbiosHiiHandle);
9403   }
9404
9405   if (BIT (byte1, 4) != 0) {
9406-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LS_120_BOOT_SUPPORTED), HiiHandle);
9407+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LS_120_BOOT_SUPPORTED), gSmbiosHiiHandle);
9408   }
9409
9410   if (BIT (byte1, 5) != 0) {
9411-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ATAPI_ZIP_DRIVE), HiiHandle);
9412+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ATAPI_ZIP_DRIVE), gSmbiosHiiHandle);
9413   }
9414
9415   if (BIT (byte1, 6) != 0) {
9416-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_1394_BOOT_SUPPORTED), HiiHandle);
9417+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_1394_BOOT_SUPPORTED), gSmbiosHiiHandle);
9418   }
9419
9420   if (BIT (byte1, 7) != 0) {
9421-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMART_BATTERY_SUPPORTED), HiiHandle);
9422+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMART_BATTERY_SUPPORTED), gSmbiosHiiHandle);
9423   }
9424 }
9425
9426@@ -1152,21 +1152,21 @@
9427   UINT8 Option
9428   )
9429 {
9430-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION_2), HiiHandle);
9431+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_CHAR_EXTENSION_2), gSmbiosHiiHandle);
9432   //
9433   // Print option
9434   //
9435   PRINT_INFO_OPTION (byte2, Option);
9436
9437   if (BIT (byte2, 0) != 0) {
9438-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_BOOT_SPEC_SUPP), HiiHandle);
9439+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIOS_BOOT_SPEC_SUPP), gSmbiosHiiHandle);
9440   }
9441
9442   if (BIT (byte2, 1) != 0) {
9443-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FUNCTION_KEY_INIT), HiiHandle);
9444+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FUNCTION_KEY_INIT), gSmbiosHiiHandle);
9445   }
9446
9447-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), HiiHandle);
9448+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RSVD_FOR_FUTURE), gSmbiosHiiHandle);
9449 }
9450
9451 VOID
9452@@ -1178,7 +1178,7 @@
9453   //
9454   // Print prompt message
9455   //
9456-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROCESSOR_FAMILY), HiiHandle);
9457+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROCESSOR_FAMILY), gSmbiosHiiHandle);
9458   //
9459   // Print option
9460   //
9461@@ -1189,11 +1189,11 @@
9462   //
9463   switch (Family) {
9464   case 0x01:
9465-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER), HiiHandle);
9466+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER), gSmbiosHiiHandle);
9467     break;
9468
9469   case 0x02:
9470-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), HiiHandle);
9471+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gSmbiosHiiHandle);
9472     break;
9473
9474   case 0x03:
9475@@ -1205,11 +1205,11 @@
9476     break;
9477
9478   case 0x05:
9479-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL386_PROCESSOR), HiiHandle);
9480+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL386_PROCESSOR), gSmbiosHiiHandle);
9481     break;
9482
9483   case 0x06:
9484-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL486_PROCESSOR), HiiHandle);
9485+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INTEL486_PROCESSOR), gSmbiosHiiHandle);
9486     break;
9487
9488   case 0x07:
9489@@ -1229,35 +1229,35 @@
9490     break;
9491
9492   case 0x0B:
9493-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PROC_FAMILY), HiiHandle);
9494+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PROC_FAMILY), gSmbiosHiiHandle);
9495     break;
9496
9497   case 0x0C:
9498-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PRO_PROC), HiiHandle);
9499+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PRO_PROC), gSmbiosHiiHandle);
9500     break;
9501
9502   case 0x0D:
9503-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_II_PROC), HiiHandle);
9504+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_II_PROC), gSmbiosHiiHandle);
9505     break;
9506
9507   case 0x0E:
9508-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PROC_MMX), HiiHandle);
9509+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_PROC_MMX), gSmbiosHiiHandle);
9510     break;
9511
9512   case 0x0F:
9513-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CELERON_PROC), HiiHandle);
9514+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CELERON_PROC), gSmbiosHiiHandle);
9515     break;
9516
9517   case 0x10:
9518-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_XEON_PROC), HiiHandle);
9519+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_XEON_PROC), gSmbiosHiiHandle);
9520     break;
9521
9522   case 0x11:
9523-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_III_PROC), HiiHandle);
9524+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_III_PROC), gSmbiosHiiHandle);
9525     break;
9526
9527   case 0x12:
9528-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_M1_FAMILY), HiiHandle);
9529+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_M1_FAMILY), gSmbiosHiiHandle);
9530     break;
9531
9532   case 0x18:
9533@@ -1265,27 +1265,27 @@
9534     break;
9535
9536   case 0x19:
9537-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_K5_FAMILY), HiiHandle);
9538+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_K5_FAMILY), gSmbiosHiiHandle);
9539     break;
9540
9541   case 0x20:
9542-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_FAMILY), HiiHandle);
9543+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_FAMILY), gSmbiosHiiHandle);
9544     break;
9545
9546   case 0x21:
9547-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_601), HiiHandle);
9548+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_601), gSmbiosHiiHandle);
9549     break;
9550
9551   case 0x22:
9552-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_603), HiiHandle);
9553+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_603), gSmbiosHiiHandle);
9554     break;
9555
9556   case 0x23:
9557-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_603_PLUS), HiiHandle);
9558+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_603_PLUS), gSmbiosHiiHandle);
9559     break;
9560
9561   case 0x24:
9562-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_604), HiiHandle);
9563+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_PC_604), gSmbiosHiiHandle);
9564     break;
9565
9566   case 0x25:
9567@@ -1301,7 +1301,7 @@
9568     break;
9569
9570   case 0x30:
9571-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ALPHA_FAMILY_2), HiiHandle);
9572+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ALPHA_FAMILY_2), gSmbiosHiiHandle);
9573     break;
9574
9575   case 0x31:
9576@@ -1333,7 +1333,7 @@
9577     break;
9578
9579   case 0x40:
9580-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MIPS_FAMILY), HiiHandle);
9581+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MIPS_FAMILY), gSmbiosHiiHandle);
9582     break;
9583
9584   case 0x41:
9585@@ -1357,7 +1357,7 @@
9586     break;
9587
9588   case 0x50:
9589-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SPARC_FAMILY), HiiHandle);
9590+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SPARC_FAMILY), gSmbiosHiiHandle);
9591     break;
9592
9593   case 0x51:
9594@@ -1393,7 +1393,7 @@
9595     break;
9596
9597   case 0x60:
9598-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_68040_FAMILY), HiiHandle);
9599+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_68040_FAMILY), gSmbiosHiiHandle);
9600     break;
9601
9602   case 0x61:
9603@@ -1417,7 +1417,7 @@
9604     break;
9605
9606   case 0x70:
9607-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HOBBIT_FAMILY), HiiHandle);
9608+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HOBBIT_FAMILY), gSmbiosHiiHandle);
9609     break;
9610
9611   case 0x78:
9612@@ -1433,7 +1433,7 @@
9613     break;
9614
9615   case 0x80:
9616-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WEITEK), HiiHandle);
9617+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WEITEK), gSmbiosHiiHandle);
9618     break;
9619
9620   case 0x82:
9621@@ -1469,15 +1469,15 @@
9622     break;
9623
9624   case 0x90:
9625-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PA_RISC_FAMILY), HiiHandle);
9626+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PA_RISC_FAMILY), gSmbiosHiiHandle);
9627     break;
9628
9629   case 0xA0:
9630-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_V30_FAMILY), HiiHandle);
9631+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_V30_FAMILY), gSmbiosHiiHandle);
9632     break;
9633
9634   case 0xB0:
9635-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_III_XEON), HiiHandle);
9636+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PENTIUM_III_XEON), gSmbiosHiiHandle);
9637     break;
9638
9639   case 0xC8:
9640@@ -1532,13 +1532,13 @@
9641     // use if/else to check value.
9642     //
9643     if (Family >= 0x13 && Family <= 0x17) {
9644-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RSVD_FOR_SPEC_M1), HiiHandle);
9645+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RSVD_FOR_SPEC_M1), gSmbiosHiiHandle);
9646     } else if (Family >= 0x1A && Family <= 0x1F) {
9647-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RSVD_FOR_SPEC_K5), HiiHandle);
9648+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RSVD_FOR_SPEC_K5), gSmbiosHiiHandle);
9649     } else if (Family >= 0xB1 && Family <= 0xBF) {
9650-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RSVD_FOR_SPEC_PENTIUM), HiiHandle);
9651+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RSVD_FOR_SPEC_PENTIUM), gSmbiosHiiHandle);
9652     } else {
9653-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_PROC_FAMILY), HiiHandle);
9654+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_PROC_FAMILY), gSmbiosHiiHandle);
9655     }
9656   }
9657   //
9658@@ -1555,7 +1555,7 @@
9659   //
9660   // Print prompt message
9661   //
9662-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROCESSOR_FAMILY), HiiHandle);
9663+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROCESSOR_FAMILY), gSmbiosHiiHandle);
9664
9665   //
9666   // Print option
9667@@ -1607,7 +1607,7 @@
9668       break;
9669
9670     default:
9671-     PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_PROC_FAMILY), HiiHandle);
9672+     PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_PROC_FAMILY), gSmbiosHiiHandle);
9673   }
9674
9675 }
9676@@ -1643,43 +1643,43 @@
9677
9678 --*/
9679 {
9680-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_INFO), HiiHandle);
9681+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_INFO), gSmbiosHiiHandle);
9682   //
9683   // Print option
9684   //
9685   PRINT_INFO_OPTION (Voltage, Option);
9686
9687   if (BIT (Voltage, 7) != 0) {
9688-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_CURRENT_VOLTAGE), HiiHandle, (Voltage - 0x80));
9689+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_CURRENT_VOLTAGE), gSmbiosHiiHandle, (Voltage - 0x80));
9690   } else {
9691     if (BIT (Voltage, 0) != 0) {
9692-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_5V_SUPOPRTED), HiiHandle);
9693+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_5V_SUPOPRTED), gSmbiosHiiHandle);
9694     }
9695
9696     if (BIT (Voltage, 1) != 0) {
9697-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_33V_SUPPORTED), HiiHandle);
9698+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_33V_SUPPORTED), gSmbiosHiiHandle);
9699     }
9700
9701     if (BIT (Voltage, 2) != 0) {
9702-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_29V_SUPPORTED), HiiHandle);
9703+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_29V_SUPPORTED), gSmbiosHiiHandle);
9704     }
9705     //
9706     // check the reserved zero bits:
9707     //
9708     if (BIT (Voltage, 3) != 0) {
9709-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT3_NOT_ZERO), HiiHandle);
9710+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT3_NOT_ZERO), gSmbiosHiiHandle);
9711     }
9712
9713     if (BIT (Voltage, 4) != 0) {
9714-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT4_NOT_ZERO), HiiHandle);
9715+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT4_NOT_ZERO), gSmbiosHiiHandle);
9716     }
9717
9718     if (BIT (Voltage, 5) != 0) {
9719-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT5_NOT_ZERO), HiiHandle);
9720+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT5_NOT_ZERO), gSmbiosHiiHandle);
9721     }
9722
9723     if (BIT (Voltage, 6) != 0) {
9724-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT6_NOT_ZERO), HiiHandle);
9725+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BIT6_NOT_ZERO), gSmbiosHiiHandle);
9726     }
9727   }
9728 }
9729@@ -1714,56 +1714,56 @@
9730
9731 --*/
9732 {
9733-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_STATUS), HiiHandle);
9734+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PROC_STATUS), gSmbiosHiiHandle);
9735   PRINT_INFO_OPTION (Status, Option);
9736
9737   if (BIT (Status, 7) != 0) {
9738-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_BIT7), HiiHandle);
9739+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_BIT7), gSmbiosHiiHandle);
9740   } else if (BIT (Status, 5) != 0) {
9741-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_BIT5), HiiHandle);
9742+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_BIT5), gSmbiosHiiHandle);
9743   } else if (BIT (Status, 4) != 0) {
9744-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_BIT4), HiiHandle);
9745+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_BIT4), gSmbiosHiiHandle);
9746   } else if (BIT (Status, 3) != 0) {
9747-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_BIT3), HiiHandle);
9748+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_BIT3), gSmbiosHiiHandle);
9749   }
9750   //
9751   // Check BIT 6
9752   //
9753   if (BIT (Status, 6) != 0) {
9754-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_POPULATED), HiiHandle);
9755+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_POPULATED), gSmbiosHiiHandle);
9756   } else {
9757-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_UNPOPULATED), HiiHandle);
9758+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_SOCKET_UNPOPULATED), gSmbiosHiiHandle);
9759   }
9760   //
9761   // Check BITs 2:0
9762   //
9763   switch (Status & 0x07) {
9764   case 0:
9765-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), HiiHandle);
9766+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gSmbiosHiiHandle);
9767     break;
9768
9769   case 1:
9770-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_ENABLED), HiiHandle);
9771+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_ENABLED), gSmbiosHiiHandle);
9772     break;
9773
9774   case 2:
9775-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_DISABLED_BY_USER), HiiHandle);
9776+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_DISABLED_BY_USER), gSmbiosHiiHandle);
9777     break;
9778
9779   case 3:
9780-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_DIABLED_BY_BIOS), HiiHandle);
9781+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_DIABLED_BY_BIOS), gSmbiosHiiHandle);
9782     break;
9783
9784   case 4:
9785-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_IDLE), HiiHandle);
9786+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CPU_IDLE), gSmbiosHiiHandle);
9787     break;
9788
9789   case 7:
9790-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHERS), HiiHandle);
9791+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHERS), gSmbiosHiiHandle);
9792     break;
9793
9794   default:
9795-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), HiiHandle);
9796+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), gSmbiosHiiHandle);
9797   }
9798 }
9799
9800@@ -1775,16 +1775,16 @@
9801   )
9802 {
9803   UINTN MaxSize;
9804-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SIZE_LARGEST_MEM), HiiHandle);
9805+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SIZE_LARGEST_MEM), gSmbiosHiiHandle);
9806   //
9807   // MaxSize is determined by follow formula
9808   //
9809   MaxSize = (UINTN) 1 << Size;
9810-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_MB), HiiHandle, MaxSize);
9811+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_MB), gSmbiosHiiHandle, MaxSize);
9812
9813   if (Option >= SHOW_DETAIL) {
9814-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MAX_AMOUNT_MEM), HiiHandle);
9815-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_MB), HiiHandle, MaxSize, SlotNum, MaxSize * SlotNum);
9816+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MAX_AMOUNT_MEM), gSmbiosHiiHandle);
9817+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_MB), gSmbiosHiiHandle, MaxSize, SlotNum, MaxSize * SlotNum);
9818   }
9819 }
9820
9821@@ -1796,7 +1796,7 @@
9822   )
9823 {
9824   UINT8 Index;
9825-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLES_CONTROLLED), HiiHandle, SlotNum);
9826+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLES_CONTROLLED), gSmbiosHiiHandle, SlotNum);
9827
9828   if (Option >= SHOW_DETAIL) {
9829     //
9830@@ -1806,9 +1806,9 @@
9831       return ;
9832     }
9833
9834-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLES_LIST_CONTROLLED), HiiHandle);
9835+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLES_LIST_CONTROLLED), gSmbiosHiiHandle);
9836     for (Index = 0; Index < SlotNum; Index++) {
9837-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLE), HiiHandle, Index + 1, Handles[Index]);
9838+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HANDLE), gSmbiosHiiHandle, Index + 1, Handles[Index]);
9839     }
9840   }
9841 }
9842@@ -1824,7 +1824,7 @@
9843   UINT8 High;
9844   UINT8 Low;
9845
9846-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_CONNECTIONS), HiiHandle);
9847+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_CONNECTIONS), gSmbiosHiiHandle);
9848   //
9849   // Print option
9850   //
9851@@ -1837,15 +1837,15 @@
9852   Low   = (UINT8) (BankConnections & 0x0F);
9853   if (High != 0xF) {
9854     if (Low != 0xF) {
9855-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS), HiiHandle, High, Low, High, Low);
9856+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS), gSmbiosHiiHandle, High, Low, High, Low);
9857     } else {
9858-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS_2), HiiHandle, High, High);
9859+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS_2), gSmbiosHiiHandle, High, High);
9860     }
9861   } else {
9862     if (Low != 0xF) {
9863-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS_2), HiiHandle, Low, Low);
9864+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BANK_RAS_2), gSmbiosHiiHandle, Low, Low);
9865     } else {
9866-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NO_BANKS_CONNECTED), HiiHandle);
9867+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NO_BANKS_CONNECTED), gSmbiosHiiHandle);
9868     }
9869   }
9870 }
9871@@ -1874,7 +1874,7 @@
9872 --*/
9873 {
9874   UINT8 Value;
9875-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEMORY_SIZE), HiiHandle);
9876+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEMORY_SIZE), gSmbiosHiiHandle);
9877   //
9878   // Print option
9879   //
9880@@ -1885,19 +1885,19 @@
9881   //
9882   Value = (UINT8) (Size & 0x7F);
9883   if (Value == 0x7D) {
9884-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_SIZE_NOT_DETERMINABLE), HiiHandle);
9885+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_SIZE_NOT_DETERMINABLE), gSmbiosHiiHandle);
9886   } else if (Value == 0x7E) {
9887-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MODULE_INSTALLED), HiiHandle);
9888+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MODULE_INSTALLED), gSmbiosHiiHandle);
9889   } else if (Value == 0x7F) {
9890-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_INSTALLED), HiiHandle);
9891+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_INSTALLED), gSmbiosHiiHandle);
9892   } else {
9893-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_SIZE), HiiHandle, 1 << Value);
9894+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_SIZE), gSmbiosHiiHandle, 1 << Value);
9895   }
9896
9897   if (BIT (Size, 7) != 0) {
9898-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_DOUBLE_BANK), HiiHandle);
9899+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_DOUBLE_BANK), gSmbiosHiiHandle);
9900   } else {
9901-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_SINGLE_BANK), HiiHandle);
9902+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MEM_MODULE_SINGLE_BANK), gSmbiosHiiHandle);
9903   }
9904 }
9905
9906@@ -1929,7 +1929,7 @@
9907   //
9908   DisplaySystemSlotType (SlotType, Option);
9909
9910-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SLOT_ID), HiiHandle);
9911+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SLOT_ID), gSmbiosHiiHandle);
9912   //
9913   // print option
9914   //
9915@@ -1940,11 +1940,11 @@
9916   // Slot Type: MCA
9917   //
9918   case 0x04:
9919-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LOGICAL_MICRO_CHAN), HiiHandle);
9920+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LOGICAL_MICRO_CHAN), gSmbiosHiiHandle);
9921     if (SlotId > 0 && SlotId < 15) {
9922-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_D), HiiHandle, SlotId);
9923+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_D), gSmbiosHiiHandle, SlotId);
9924     } else {
9925-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_NOT_1_15), HiiHandle);
9926+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_NOT_1_15), gSmbiosHiiHandle);
9927     }
9928     break;
9929
9930@@ -1952,11 +1952,11 @@
9931   // EISA
9932   //
9933   case 0x05:
9934-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LOGICAL_EISA_NUM), HiiHandle);
9935+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LOGICAL_EISA_NUM), gSmbiosHiiHandle);
9936     if (SlotId > 0 && SlotId < 15) {
9937-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_D), HiiHandle, SlotId);
9938+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_D), gSmbiosHiiHandle, SlotId);
9939     } else {
9940-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_NOT_1_15), HiiHandle);
9941+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_NOT_1_15), gSmbiosHiiHandle);
9942     }
9943     break;
9944
9945@@ -1964,28 +1964,28 @@
9946   // Slot Type: PCI
9947   //
9948   case 0x06:
9949-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VALUE_PRESENT), HiiHandle, SlotId);
9950+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VALUE_PRESENT), gSmbiosHiiHandle, SlotId);
9951     break;
9952
9953   //
9954   // PCMCIA
9955   //
9956   case 0x07:
9957-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_IDENTIFIES_ADAPTER_NUM), HiiHandle, SlotId);
9958+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_IDENTIFIES_ADAPTER_NUM), gSmbiosHiiHandle, SlotId);
9959     break;
9960
9961   //
9962   // Slot Type: PCI-E
9963   //
9964   case 0xA5:
9965-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VALUE_PRESENT), HiiHandle, SlotId);
9966+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VALUE_PRESENT), gSmbiosHiiHandle, SlotId);
9967     break;
9968
9969   default:
9970     if (SlotType >= 0x0E && SlotType <= 0x12) {
9971-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VALUE_PRESENT), HiiHandle, SlotId);
9972+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VALUE_PRESENT), gSmbiosHiiHandle, SlotId);
9973     } else {
9974-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_SLOT_ID), HiiHandle);
9975+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_SLOT_ID), gSmbiosHiiHandle);
9976     }
9977   }
9978 }
9979@@ -1996,7 +1996,7 @@
9980   UINT8 Option
9981   )
9982 {
9983-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_BOOT_STATUS), HiiHandle);
9984+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_BOOT_STATUS), gSmbiosHiiHandle);
9985   //
9986   // Print option
9987   //
9988@@ -2006,31 +2006,31 @@
9989   // Check value and print
9990   //
9991   if (Parameter == 0) {
9992-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NO_ERRORS_DETECTED), HiiHandle);
9993+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NO_ERRORS_DETECTED), gSmbiosHiiHandle);
9994   } else if (Parameter == 1) {
9995-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NO_BOOTABLE_MEDIA), HiiHandle);
9996+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NO_BOOTABLE_MEDIA), gSmbiosHiiHandle);
9997   } else if (Parameter == 2) {
9998-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NORMAL_OP_SYSTEM), HiiHandle);
9999+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NORMAL_OP_SYSTEM), gSmbiosHiiHandle);
10000   } else if (Parameter == 3) {
10001-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FIRMWARE_DETECTED), HiiHandle);
10002+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FIRMWARE_DETECTED), gSmbiosHiiHandle);
10003   } else if (Parameter == 4) {
10004-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OP_SYSTEM), HiiHandle);
10005+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OP_SYSTEM), gSmbiosHiiHandle);
10006   } else if (Parameter == 5) {
10007-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_USER_REQUESTED_BOOT), HiiHandle);
10008+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_USER_REQUESTED_BOOT), gSmbiosHiiHandle);
10009   } else if (Parameter == 6) {
10010-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_SECURITY_VIOLATION), HiiHandle);
10011+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_SECURITY_VIOLATION), gSmbiosHiiHandle);
10012   } else if (Parameter == 7) {
10013-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PREV_REQ_IMAGE), HiiHandle);
10014+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PREV_REQ_IMAGE), gSmbiosHiiHandle);
10015   } else if (Parameter == 8) {
10016-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WATCHDOG_TIMER), HiiHandle);
10017+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WATCHDOG_TIMER), gSmbiosHiiHandle);
10018   } else if (Parameter >= 9 && Parameter <= 127) {
10019-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RSVD_FUTURE_ASSIGNMENT), HiiHandle);
10020+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RSVD_FUTURE_ASSIGNMENT), gSmbiosHiiHandle);
10021   } else if (Parameter >= 128 && Parameter <= 191) {
10022-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VENDOR_OEM_SPECIFIC), HiiHandle);
10023-  } else if (Parameter >= 192 && Parameter <= 255) {
10024-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRODUCT_SPEC_IMPLMENTATION), HiiHandle);
10025+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VENDOR_OEM_SPECIFIC), gSmbiosHiiHandle);
10026+  } else if (Parameter >= 192) {
10027+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_PRODUCT_SPEC_IMPLMENTATION), gSmbiosHiiHandle);
10028   } else {
10029-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_VALUE), HiiHandle);
10030+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ERROR_VALUE), gSmbiosHiiHandle);
10031   }
10032 }
10033 //
10034@@ -2062,7 +2062,7 @@
10035   UINTN Month;
10036   UINTN Year;
10037
10038-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SBDS_MANUFACTURE_DATE), HiiHandle);
10039+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SBDS_MANUFACTURE_DATE), gSmbiosHiiHandle);
10040   PRINT_INFO_OPTION (Date, Option);
10041   //
10042   // Print date
10043@@ -2070,7 +2070,7 @@
10044   Day   = Date & 0x001F;
10045   Month = (Date & 0x00E0) >> 5;
10046   Year  = ((Date & 0xFF00) >> 8) + 1980;
10047-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONTH_DAY_YEAR), HiiHandle, Day, Month, Year);
10048+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MONTH_DAY_YEAR), gSmbiosHiiHandle, Day, Month, Year);
10049
10050 }
10051 //
10052@@ -2111,65 +2111,65 @@
10053 {
10054   UINTN Temp;
10055
10056-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_RESET_CAPABILITIES), HiiHandle);
10057+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_RESET_CAPABILITIES), gSmbiosHiiHandle);
10058   PRINT_INFO_OPTION (Reset, Option);
10059
10060   //
10061   // Check reserved bits 7:6
10062   //
10063   if ((Reset & 0xC0) != 0) {
10064-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RESERVED_ZERO), HiiHandle);
10065+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RESERVED_ZERO), gSmbiosHiiHandle);
10066   }
10067   //
10068   // Watch dog
10069   //
10070   if (BIT (Reset, 5) != 0) {
10071-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WATCHDOG_TIMER_2), HiiHandle);
10072+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WATCHDOG_TIMER_2), gSmbiosHiiHandle);
10073   } else {
10074-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_NOT_CONTAIN_TIMER), HiiHandle);
10075+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_NOT_CONTAIN_TIMER), gSmbiosHiiHandle);
10076   }
10077   //
10078   // Boot Option on Limit
10079   //
10080   Temp = (Reset & 0x18) >> 3;
10081-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_OPTION_LIMIT), HiiHandle);
10082+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_OPTION_LIMIT), gSmbiosHiiHandle);
10083   switch (Temp) {
10084   case 0:
10085-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), HiiHandle);
10086+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), gSmbiosHiiHandle);
10087     break;
10088
10089   case 1:
10090-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OP_SYSTEM_2), HiiHandle);
10091+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OP_SYSTEM_2), gSmbiosHiiHandle);
10092     break;
10093
10094   case 2:
10095-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_UTIL), HiiHandle);
10096+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_UTIL), gSmbiosHiiHandle);
10097     break;
10098
10099   case 3:
10100-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DO_NOT_REBOOT_BITS), HiiHandle);
10101+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DO_NOT_REBOOT_BITS), gSmbiosHiiHandle);
10102     break;
10103   }
10104   //
10105   // Boot Option
10106   //
10107   Temp = (Reset & 0x06) >> 1;
10108-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_OPTION), HiiHandle);
10109+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BOOT_OPTION), gSmbiosHiiHandle);
10110   switch (Temp) {
10111   case 0:
10112-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), HiiHandle);
10113+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED), gSmbiosHiiHandle);
10114     break;
10115
10116   case 1:
10117-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OP_SYSTEM_2), HiiHandle);
10118+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OP_SYSTEM_2), gSmbiosHiiHandle);
10119     break;
10120
10121   case 2:
10122-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_UTIL), HiiHandle);
10123+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SYSTEM_UTIL), gSmbiosHiiHandle);
10124     break;
10125
10126   case 3:
10127-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DO_NOT_REBOOT), HiiHandle);
10128+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DO_NOT_REBOOT), gSmbiosHiiHandle);
10129     break;
10130   }
10131   //
10132@@ -2224,95 +2224,95 @@
10133 {
10134   UINTN Temp;
10135
10136-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HARDWARE_SECURITY_SET), HiiHandle);
10137+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HARDWARE_SECURITY_SET), gSmbiosHiiHandle);
10138   PRINT_INFO_OPTION (Settings, Option);
10139
10140   //
10141   // Power-on Password Status
10142   //
10143   Temp = (Settings & 0xC0) >> 6;
10144-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_ON_PASSWORD), HiiHandle);
10145+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_ON_PASSWORD), gSmbiosHiiHandle);
10146   switch (Temp) {
10147   case 0:
10148-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), HiiHandle);
10149+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), gSmbiosHiiHandle);
10150     break;
10151
10152   case 1:
10153-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), HiiHandle);
10154+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), gSmbiosHiiHandle);
10155     break;
10156
10157   case 2:
10158-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), HiiHandle);
10159+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), gSmbiosHiiHandle);
10160     break;
10161
10162   case 3:
10163-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), HiiHandle);
10164+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gSmbiosHiiHandle);
10165     break;
10166   }
10167   //
10168   // Keyboard Password Status
10169   //
10170   Temp = (Settings & 0x30) >> 4;
10171-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_KEYBOARD_PASSWORD), HiiHandle);
10172+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_KEYBOARD_PASSWORD), gSmbiosHiiHandle);
10173   switch (Temp) {
10174   case 0:
10175-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), HiiHandle);
10176+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), gSmbiosHiiHandle);
10177     break;
10178
10179   case 1:
10180-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), HiiHandle);
10181+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), gSmbiosHiiHandle);
10182     break;
10183
10184   case 2:
10185-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), HiiHandle);
10186+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), gSmbiosHiiHandle);
10187     break;
10188
10189   case 3:
10190-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), HiiHandle);
10191+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gSmbiosHiiHandle);
10192     break;
10193   }
10194   //
10195   // Administrator Password Status
10196   //
10197   Temp = (Settings & 0x0C) >> 2;
10198-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ADMIN_PASSWORD_STATUS), HiiHandle);
10199+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ADMIN_PASSWORD_STATUS), gSmbiosHiiHandle);
10200   switch (Temp) {
10201   case 0:
10202-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), HiiHandle);
10203+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), gSmbiosHiiHandle);
10204     break;
10205
10206   case 1:
10207-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), HiiHandle);
10208+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), gSmbiosHiiHandle);
10209     break;
10210
10211   case 2:
10212-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), HiiHandle);
10213+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), gSmbiosHiiHandle);
10214     break;
10215
10216   case 3:
10217-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), HiiHandle);
10218+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gSmbiosHiiHandle);
10219     break;
10220   }
10221   //
10222   // Front Panel Reset Status
10223   //
10224   Temp = Settings & 0x3;
10225-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FRONT_PANEL_RESET), HiiHandle);
10226+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_FRONT_PANEL_RESET), gSmbiosHiiHandle);
10227   switch (Temp) {
10228   case 0:
10229-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), HiiHandle);
10230+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DISABLED), gSmbiosHiiHandle);
10231     break;
10232
10233   case 1:
10234-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), HiiHandle);
10235+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENABLED_NEWLINE), gSmbiosHiiHandle);
10236     break;
10237
10238   case 2:
10239-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), HiiHandle);
10240+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_IMPLEMENTED), gSmbiosHiiHandle);
10241     break;
10242
10243   case 3:
10244-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), HiiHandle);
10245+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gSmbiosHiiHandle);
10246     break;
10247   }
10248 }
10249@@ -2325,30 +2325,30 @@
10250   UINT8   Option
10251   )
10252 {
10253-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CONNECTIONS), HiiHandle);
10254+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CONNECTIONS), gSmbiosHiiHandle);
10255   PRINT_INFO_OPTION (Connections, Option);
10256
10257   //
10258   // Check reserved bits 7:2
10259   //
10260   if ((Connections & 0xFC) != 0) {
10261-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RESERVED_ZERO_2), HiiHandle);
10262+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_RESERVED_ZERO_2), gSmbiosHiiHandle);
10263   }
10264   //
10265   // Outbound Connection
10266   //
10267   if (BIT (Connections, 1) != 0) {
10268-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OUTBOUND_CONN_ENABLED), HiiHandle);
10269+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OUTBOUND_CONN_ENABLED), gSmbiosHiiHandle);
10270   } else {
10271-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTUBOUND_CONN_DISABLED), HiiHandle);
10272+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTUBOUND_CONN_DISABLED), gSmbiosHiiHandle);
10273   }
10274   //
10275   // Inbound Connection
10276   //
10277   if (BIT (Connections, 0) != 0) {
10278-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INBOIUND_CONN_ENABLED), HiiHandle);
10279+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INBOIUND_CONN_ENABLED), gSmbiosHiiHandle);
10280   } else {
10281-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INBOUND_CONN_DISABLED), HiiHandle);
10282+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INBOUND_CONN_DISABLED), gSmbiosHiiHandle);
10283   }
10284 }
10285 //
10286@@ -2362,141 +2362,141 @@
10287 {
10288   UINTN Temp;
10289
10290-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_CHAR), HiiHandle);
10291+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_CHAR), gSmbiosHiiHandle);
10292   PRINT_INFO_OPTION (Characteristics, Option);
10293
10294   //
10295   // Check reserved bits 15:14
10296   //
10297   if ((Characteristics & 0xC000) != 0) {
10298-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_15_14_RSVD), HiiHandle);
10299+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BITS_15_14_RSVD), gSmbiosHiiHandle);
10300   }
10301   //
10302   // Bits 13:10 - DMTF Power Supply Type
10303   //
10304-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TYPE), HiiHandle);
10305+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TYPE), gSmbiosHiiHandle);
10306   Temp = (Characteristics & 0x1C00) << 10;
10307   switch (Temp) {
10308   case 1:
10309-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), HiiHandle);
10310+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gSmbiosHiiHandle);
10311     break;
10312
10313   case 2:
10314-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), HiiHandle);
10315+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gSmbiosHiiHandle);
10316     break;
10317
10318   case 3:
10319-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LINEAR), HiiHandle);
10320+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_LINEAR), gSmbiosHiiHandle);
10321     break;
10322
10323   case 4:
10324-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SWITCHING), HiiHandle);
10325+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SWITCHING), gSmbiosHiiHandle);
10326     break;
10327
10328   case 5:
10329-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BATTERY), HiiHandle);
10330+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_BATTERY), gSmbiosHiiHandle);
10331     break;
10332
10333   case 6:
10334-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UPS), HiiHandle);
10335+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UPS), gSmbiosHiiHandle);
10336     break;
10337
10338   case 7:
10339-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CONVERTER), HiiHandle);
10340+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CONVERTER), gSmbiosHiiHandle);
10341     break;
10342
10343   case 8:
10344-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_REGULATOR), HiiHandle);
10345+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_REGULATOR), gSmbiosHiiHandle);
10346     break;
10347
10348   default:
10349-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_2), HiiHandle);
10350+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_2), gSmbiosHiiHandle);
10351   }
10352   //
10353   // Bits 9:7 - Status
10354   //
10355-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STATUS_DASH), HiiHandle);
10356+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STATUS_DASH), gSmbiosHiiHandle);
10357   Temp = (Characteristics & 0x380) << 7;
10358   switch (Temp) {
10359   case 1:
10360-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), HiiHandle);
10361+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gSmbiosHiiHandle);
10362     break;
10363
10364   case 2:
10365-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), HiiHandle);
10366+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gSmbiosHiiHandle);
10367     break;
10368
10369   case 3:
10370-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OK), HiiHandle);
10371+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OK), gSmbiosHiiHandle);
10372     break;
10373
10374   case 4:
10375-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NON_CRITICAL), HiiHandle);
10376+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NON_CRITICAL), gSmbiosHiiHandle);
10377     break;
10378
10379   case 5:
10380-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CRITICAL_POWER_SUPPLY), HiiHandle);
10381+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_CRITICAL_POWER_SUPPLY), gSmbiosHiiHandle);
10382     break;
10383
10384   default:
10385-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED), HiiHandle);
10386+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNDEFINED), gSmbiosHiiHandle);
10387   }
10388   //
10389   // Bits 6:3 - DMTF Input Voltage Range Switching
10390   //
10391-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INPUT_VOLTAGE_RANGE), HiiHandle);
10392+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INPUT_VOLTAGE_RANGE), gSmbiosHiiHandle);
10393   Temp = (Characteristics & 0x78) << 3;
10394   switch (Temp) {
10395   case 1:
10396-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), HiiHandle);
10397+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gSmbiosHiiHandle);
10398     break;
10399
10400   case 2:
10401-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), HiiHandle);
10402+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_UNKNOWN), gSmbiosHiiHandle);
10403     break;
10404
10405   case 3:
10406-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MANUAL), HiiHandle);
10407+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_MANUAL), gSmbiosHiiHandle);
10408     break;
10409
10410   case 4:
10411-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AUTO_SWITCH), HiiHandle);
10412+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_AUTO_SWITCH), gSmbiosHiiHandle);
10413     break;
10414
10415   case 5:
10416-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WIDE_RANGE), HiiHandle);
10417+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_WIDE_RANGE), gSmbiosHiiHandle);
10418     break;
10419
10420   case 6:
10421-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_APPLICABLE), HiiHandle);
10422+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_NOT_APPLICABLE), gSmbiosHiiHandle);
10423     break;
10424
10425   default:
10426-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_3), HiiHandle);
10427+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_RESERVED_3), gSmbiosHiiHandle);
10428     break;
10429   }
10430   //
10431   // Power supply is unplugged from the wall
10432   //
10433   if (BIT (Characteristics, 2) != 0) {
10434-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_UNPLUGGED), HiiHandle);
10435+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_UNPLUGGED), gSmbiosHiiHandle);
10436   } else {
10437-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_PLUGGED), HiiHandle);
10438+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_PLUGGED), gSmbiosHiiHandle);
10439   }
10440   //
10441   // Power supply is present
10442   //
10443   if (BIT (Characteristics, 1) != 0) {
10444-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_PRESENT), HiiHandle);
10445+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_PRESENT), gSmbiosHiiHandle);
10446   } else {
10447-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_NOT_PRESENT), HiiHandle);
10448+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_NOT_PRESENT), gSmbiosHiiHandle);
10449   }
10450   //
10451   // hot replaceable
10452   //
10453   if (BIT (Characteristics, 0) != 0) {
10454-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_REPLACE), HiiHandle);
10455+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_REPLACE), gSmbiosHiiHandle);
10456   } else {
10457-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_NOT_REPLACE), HiiHandle);
10458+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_NOT_REPLACE), gSmbiosHiiHandle);
10459   }
10460 }
10461diff --ignore-file-name-case -Naur ShellR33/SmbiosView/QueryTable.c GccShellR33/SmbiosView/QueryTable.c
10462--- ShellR33/SmbiosView/QueryTable.c	2008-08-13 23:02:46.000000000 -0700
10463+++ GccShellR33/SmbiosView/QueryTable.c	2009-11-05 13:49:56.000000000 -0800
10464@@ -23,7 +23,7 @@
10465 #include "EfiShellLib.h"
10466 #include "QueryTable.h"
10467 #include "PrintInfo.h"
10468-#include "smbios.h"
10469+#include "Smbios.h"
10470
10471 #include STRING_DEFINES_FILE
10472
10473@@ -2977,13 +2977,13 @@
10474   }
10475
10476   if (NoInfo == TRUE) {
10477-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_NO_INFO), HiiHandle);
10478+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_NO_INFO), gSmbiosHiiHandle);
10479   }
10480
10481   if (Value != 0) {
10482     PrintToken (
10483       STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_BITS_SET),
10484-      HiiHandle,
10485+      gSmbiosHiiHandle,
10486       Value
10487       );
10488   }
10489@@ -3025,7 +3025,7 @@
10490   UINT8 Option
10491   )
10492 {
10493-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_WAKEUP_TYPE), HiiHandle);
10494+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_WAKEUP_TYPE), gSmbiosHiiHandle);
10495   PRINT_INFO_OPTION (Type, Option);
10496   PRINT_TABLE_ITEM (SystemWakeupTypeTable, Type);
10497 }
10498@@ -3038,7 +3038,7 @@
10499   UINT8 Option
10500   )
10501 {
10502-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_TYPE), HiiHandle);
10503+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_TYPE), gSmbiosHiiHandle);
10504   PRINT_INFO_OPTION (Type, Option);
10505   //
10506   // query table and print info
10507@@ -3046,7 +3046,7 @@
10508   PRINT_TABLE_ITEM (SystemEnclosureTypeTable, Type);
10509
10510   if (BIT (Type, 7) != 0) {
10511-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CHASSIS_LOCK_PRESENT), HiiHandle);
10512+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CHASSIS_LOCK_PRESENT), gSmbiosHiiHandle);
10513   }
10514 }
10515
10516@@ -3056,7 +3056,7 @@
10517   UINT8 Option
10518   )
10519 {
10520-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_STATUS), HiiHandle);
10521+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_STATUS), gSmbiosHiiHandle);
10522   PRINT_INFO_OPTION (Status, Option);
10523   PRINT_TABLE_ITEM (SystemEnclosureStatusTable, Status);
10524 }
10525@@ -3067,7 +3067,7 @@
10526   UINT8 Option
10527   )
10528 {
10529-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_SECURITY), HiiHandle);
10530+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_CHASSIS_SECURITY), gSmbiosHiiHandle);
10531   PRINT_INFO_OPTION (Status, Option);
10532   PRINT_TABLE_ITEM (SESecurityStatusTable, Status);
10533 }
10534@@ -3080,7 +3080,7 @@
10535   UINT8 Option
10536   )
10537 {
10538-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_TYPE), HiiHandle);
10539+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_TYPE), gSmbiosHiiHandle);
10540   PRINT_INFO_OPTION (Type, Option);
10541   PRINT_TABLE_ITEM (ProcessorTypeTable, Type);
10542 }
10543@@ -3091,7 +3091,7 @@
10544   UINT8 Option
10545   )
10546 {
10547-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_UPDATE), HiiHandle);
10548+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PROC_UPDATE), gSmbiosHiiHandle);
10549   PRINT_INFO_OPTION (Upgrade, Option);
10550   PRINT_TABLE_ITEM (ProcessorUpgradeTable, Upgrade);
10551 }
10552@@ -3104,7 +3104,7 @@
10553   UINT8 Option
10554   )
10555 {
10556-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DETECTMETHOD), HiiHandle);
10557+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DETECTMETHOD), gSmbiosHiiHandle);
10558   PRINT_INFO_OPTION (Method, Option);
10559   PRINT_TABLE_ITEM (McErrorDetectMethodTable, Method);
10560 }
10561@@ -3115,7 +3115,7 @@
10562   UINT8 Option
10563   )
10564 {
10565-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CORRECT_CAPABILITY), HiiHandle);
10566+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CORRECT_CAPABILITY), gSmbiosHiiHandle);
10567   PRINT_INFO_OPTION (Capability, Option);
10568   PRINT_BITS_INFO (McErrorCorrectCapabilityTable, Capability);
10569 }
10570@@ -3126,7 +3126,7 @@
10571   UINT8 Option
10572   )
10573 {
10574-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_INTERLEAVE_SUPPORT), HiiHandle);
10575+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_INTERLEAVE_SUPPORT), gSmbiosHiiHandle);
10576   PRINT_INFO_OPTION (Support, Option);
10577   PRINT_TABLE_ITEM (McInterleaveSupportTable, Support);
10578 }
10579@@ -3137,7 +3137,7 @@
10580   UINT8   Option
10581   )
10582 {
10583-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MEMORY_SPEED), HiiHandle);
10584+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MEMORY_SPEED), gSmbiosHiiHandle);
10585   PRINT_INFO_OPTION (Speed, Option);
10586   PRINT_BITS_INFO (McMemorySpeedsTable, Speed);
10587 }
10588@@ -3148,7 +3148,7 @@
10589   UINT8 Option
10590   )
10591 {
10592-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_REQUIRED_VOLTAGES), HiiHandle);
10593+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_REQUIRED_VOLTAGES), gSmbiosHiiHandle);
10594   PRINT_INFO_OPTION (Voltage, Option);
10595   PRINT_BITS_INFO (MemoryModuleVoltageTable, Voltage);
10596 }
10597@@ -3161,7 +3161,7 @@
10598   UINT8   Option
10599   )
10600 {
10601-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_TYPE), HiiHandle);
10602+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_TYPE), gSmbiosHiiHandle);
10603   PRINT_INFO_OPTION (Type, Option);
10604   PRINT_BITS_INFO (MmMemoryTypeTable, Type);
10605 }
10606@@ -3172,7 +3172,7 @@
10607   UINT8 Option
10608   )
10609 {
10610-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_ERROR_STATUS), HiiHandle);
10611+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_MODULE_ERROR_STATUS), gSmbiosHiiHandle);
10612   PRINT_INFO_OPTION (Status, Option);
10613   PRINT_BITS_INFO (MmErrorStatusTable, Status);
10614 }
10615@@ -3185,7 +3185,7 @@
10616   UINT8   Option
10617   )
10618 {
10619-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SRAM_TYPE), HiiHandle);
10620+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SRAM_TYPE), gSmbiosHiiHandle);
10621   PRINT_INFO_OPTION ((UINT8) Type, Option);
10622   PRINT_BITS_INFO (CacheSRAMTypeTable, (UINT8) Type);
10623 }
10624@@ -3196,7 +3196,7 @@
10625   UINT8 Option
10626   )
10627 {
10628-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ERROR_CORRECTING), HiiHandle);
10629+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ERROR_CORRECTING), gSmbiosHiiHandle);
10630   PRINT_INFO_OPTION (Type, Option);
10631   PRINT_TABLE_ITEM (CacheErrCorrectingTypeTable, Type);
10632 }
10633@@ -3207,7 +3207,7 @@
10634   UINT8 Option
10635   )
10636 {
10637-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SYSTEM_TYPE), HiiHandle);
10638+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_SYSTEM_TYPE), gSmbiosHiiHandle);
10639   PRINT_INFO_OPTION (Type, Option);
10640   PRINT_TABLE_ITEM (CacheSystemCacheTypeTable, Type);
10641 }
10642@@ -3218,7 +3218,7 @@
10643   UINT8 Option
10644   )
10645 {
10646-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ASSOCIATIVITY), HiiHandle);
10647+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_CACHE_ASSOCIATIVITY), gSmbiosHiiHandle);
10648   PRINT_INFO_OPTION (Associativity, Option);
10649   PRINT_TABLE_ITEM (CacheAssociativityTable, Associativity);
10650 }
10651@@ -3231,7 +3231,7 @@
10652   UINT8 Option
10653   )
10654 {
10655-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_CONNECTOR_TYPE), HiiHandle);
10656+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_CONNECTOR_TYPE), gSmbiosHiiHandle);
10657   PRINT_INFO_OPTION (Type, Option);
10658   PRINT_TABLE_ITEM (PortConnectorTypeTable, Type);
10659 }
10660@@ -3242,7 +3242,7 @@
10661   UINT8 Option
10662   )
10663 {
10664-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_TYPE), HiiHandle);
10665+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORT_TYPE), gSmbiosHiiHandle);
10666   PRINT_INFO_OPTION (Type, Option);
10667   PRINT_TABLE_ITEM (PortTypeTable, Type);
10668 }
10669@@ -3255,7 +3255,7 @@
10670   UINT8 Option
10671   )
10672 {
10673-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_TYPE), HiiHandle);
10674+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_TYPE), gSmbiosHiiHandle);
10675   PRINT_INFO_OPTION (Type, Option);
10676   PRINT_TABLE_ITEM (SystemSlotTypeTable, Type);
10677 }
10678@@ -3266,7 +3266,7 @@
10679   UINT8 Option
10680   )
10681 {
10682-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_DATA), HiiHandle);
10683+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_DATA), gSmbiosHiiHandle);
10684   PRINT_INFO_OPTION (Width, Option);
10685   PRINT_TABLE_ITEM (SystemSlotDataBusWidthTable, Width);
10686 }
10687@@ -3277,7 +3277,7 @@
10688   UINT8 Option
10689   )
10690 {
10691-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_CURRENT_USAGE), HiiHandle);
10692+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_CURRENT_USAGE), gSmbiosHiiHandle);
10693   PRINT_INFO_OPTION (Usage, Option);
10694   PRINT_TABLE_ITEM (SystemSlotCurrentUsageTable, Usage);
10695 }
10696@@ -3288,7 +3288,7 @@
10697   UINT8 Option
10698   )
10699 {
10700-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_LENGTH), HiiHandle);
10701+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_LENGTH), gSmbiosHiiHandle);
10702   PRINT_INFO_OPTION (Length, Option);
10703   PRINT_TABLE_ITEM (SystemSlotLengthTable, Length);
10704 }
10705@@ -3299,7 +3299,7 @@
10706   UINT8 Option
10707   )
10708 {
10709-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS), HiiHandle);
10710+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS), gSmbiosHiiHandle);
10711   PRINT_INFO_OPTION (Chara1, Option);
10712   PRINT_BITS_INFO (SlotCharacteristics1Table, Chara1);
10713 }
10714@@ -3310,7 +3310,7 @@
10715   UINT8 Option
10716   )
10717 {
10718-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS_2), HiiHandle);
10719+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SLOT_CHARACTERISTICS_2), gSmbiosHiiHandle);
10720   PRINT_INFO_OPTION (Chara2, Option);
10721   PRINT_BITS_INFO (SlotCharacteristics2Table, Chara2);
10722 }
10723@@ -3323,7 +3323,7 @@
10724   UINT8 Option
10725   )
10726 {
10727-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ONBOARD_DEVICE_TYPE), HiiHandle);
10728+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ONBOARD_DEVICE_TYPE), gSmbiosHiiHandle);
10729   PRINT_INFO_OPTION (Type, Option);
10730   PRINT_TABLE_ITEM (OnboardDeviceTypesTable, Type);
10731 }
10732@@ -3336,7 +3336,7 @@
10733   UINT8 Option
10734   )
10735 {
10736-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_EVENT_LOG_TYPE), HiiHandle);
10737+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_EVENT_LOG_TYPE), gSmbiosHiiHandle);
10738   PRINT_INFO_OPTION (Type, Option);
10739   PRINT_TABLE_ITEM (SELTypesTable, Type);
10740 }
10741@@ -3347,7 +3347,7 @@
10742   UINT8 Option
10743   )
10744 {
10745-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_EVENT_LOG_VAR_DATA_FORMAT), HiiHandle);
10746+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_EVENT_LOG_VAR_DATA_FORMAT), gSmbiosHiiHandle);
10747   PRINT_INFO_OPTION (Type, Option);
10748   PRINT_TABLE_ITEM (SELVarDataFormatTypeTable, Type);
10749 }
10750@@ -3358,7 +3358,7 @@
10751   UINT8   Option
10752   )
10753 {
10754-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_BITMAP), HiiHandle);
10755+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_BITMAP), gSmbiosHiiHandle);
10756   PRINT_INFO_OPTION (Key, Option);
10757   PRINT_BITS_INFO (PostResultsBitmapDw1Table, Key);
10758 }
10759@@ -3369,7 +3369,7 @@
10760   UINT8   Option
10761   )
10762 {
10763-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_SECOND_DWORD), HiiHandle);
10764+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POST_RESULTS_SECOND_DWORD), gSmbiosHiiHandle);
10765   PRINT_INFO_OPTION (Key, Option);
10766   PRINT_BITS_INFO (PostResultsBitmapDw2Table, Key);
10767 }
10768@@ -3382,20 +3382,20 @@
10769 {
10770   UINT8       Temp;
10771
10772-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_MANAGEMENT_TYPES), HiiHandle);
10773+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_MANAGEMENT_TYPES), gSmbiosHiiHandle);
10774   PRINT_INFO_OPTION (SMType, Option);
10775
10776   //
10777   // Deal with wide range Value
10778   //
10779   if (SMType >= 0x80000000) {
10780-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_OEM_ASSIGNED), HiiHandle);
10781+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_OEM_ASSIGNED), gSmbiosHiiHandle);
10782   } else if (SMType >= 0x00020000) {
10783-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_FOR_FUTURE_ASSIGN), HiiHandle);
10784+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_FOR_FUTURE_ASSIGN), gSmbiosHiiHandle);
10785   } else if (SMType >= 0x00010000) {
10786-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_MANAGEMENT_PROBE), HiiHandle);
10787+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_MANAGEMENT_PROBE), gSmbiosHiiHandle);
10788   } else if (SMType >= 0x31) {
10789-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_FOR_FUTURE_ASSIGN), HiiHandle);
10790+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_RSVD_FOR_FUTURE_ASSIGN), gSmbiosHiiHandle);
10791   } else {
10792     //
10793     // Deal with One byte data
10794@@ -3413,7 +3413,7 @@
10795   UINT8 Option
10796   )
10797 {
10798-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION), HiiHandle);
10799+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION), gSmbiosHiiHandle);
10800   PRINT_INFO_OPTION (Location, Option);
10801   PRINT_TABLE_ITEM (PMALocationTable, Location);
10802 }
10803@@ -3424,7 +3424,7 @@
10804   UINT8 Option
10805   )
10806 {
10807-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION), HiiHandle);
10808+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_LOCATION), gSmbiosHiiHandle);
10809   PRINT_INFO_OPTION (Use, Option);
10810   PRINT_TABLE_ITEM (PMAUseTable, Use);
10811 }
10812@@ -3435,7 +3435,7 @@
10813   UINT8 Option
10814   )
10815 {
10816-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_ERROR), HiiHandle);
10817+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PHYS_MEM_ARRAY_ERROR), gSmbiosHiiHandle);
10818   PRINT_INFO_OPTION (Type, Option);
10819   PRINT_TABLE_ITEM (PMAErrorCorrectionTypesTable, Type);
10820 }
10821@@ -3448,7 +3448,7 @@
10822   UINT8 Option
10823   )
10824 {
10825-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_FORM_FACTOR), HiiHandle);
10826+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_FORM_FACTOR), gSmbiosHiiHandle);
10827   PRINT_INFO_OPTION (FormFactor, Option);
10828   PRINT_TABLE_ITEM (MemoryDeviceFormFactorTable, FormFactor);
10829 }
10830@@ -3459,7 +3459,7 @@
10831   UINT8 Option
10832   )
10833 {
10834-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE), HiiHandle);
10835+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE), gSmbiosHiiHandle);
10836   PRINT_INFO_OPTION (Type, Option);
10837   PRINT_TABLE_ITEM (MemoryDeviceTypeTable, Type);
10838 }
10839@@ -3470,7 +3470,7 @@
10840   UINT8   Option
10841   )
10842 {
10843-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE_DETAIL), HiiHandle);
10844+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_DEVICE_TYPE_DETAIL), gSmbiosHiiHandle);
10845   PRINT_INFO_OPTION (para, Option);
10846   PRINT_BITS_INFO (MemoryDeviceTypeDetailTable, para);
10847 }
10848@@ -3483,7 +3483,7 @@
10849   UINT8 Option
10850   )
10851 {
10852-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_INFO), HiiHandle);
10853+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_INFO), gSmbiosHiiHandle);
10854   PRINT_INFO_OPTION (ErrorType, Option);
10855   PRINT_TABLE_ITEM (MemoryErrorTypeTable, ErrorType);
10856 }
10857@@ -3494,7 +3494,7 @@
10858   UINT8 Option
10859   )
10860 {
10861-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_GRANULARITY), HiiHandle);
10862+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_GRANULARITY), gSmbiosHiiHandle);
10863   PRINT_INFO_OPTION (Granularity, Option);
10864   PRINT_TABLE_ITEM (MemoryErrorGranularityTable, Granularity);
10865 }
10866@@ -3505,7 +3505,7 @@
10867   UINT8 Option
10868   )
10869 {
10870-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_OP), HiiHandle);
10871+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_ERROR_OP), gSmbiosHiiHandle);
10872   PRINT_INFO_OPTION (Operation, Option);
10873   PRINT_TABLE_ITEM (MemoryErrorOperationTable, Operation);
10874 }
10875@@ -3518,7 +3518,7 @@
10876   UINT8 Option
10877   )
10878 {
10879-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_TYPE), HiiHandle);
10880+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_TYPE), gSmbiosHiiHandle);
10881   PRINT_INFO_OPTION (Type, Option);
10882   PRINT_TABLE_ITEM (PointingDeviceTypeTable, Type);
10883 }
10884@@ -3529,7 +3529,7 @@
10885   UINT8   Option
10886   )
10887 {
10888-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_INTERFACE), HiiHandle);
10889+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_POINTING_DEVICE_INTERFACE), gSmbiosHiiHandle);
10890   PRINT_INFO_OPTION (Interface, Option);
10891   PRINT_TABLE_ITEM (PointingDeviceInterfaceTable, Interface);
10892 }
10893@@ -3542,7 +3542,7 @@
10894   UINT8 Option
10895   )
10896 {
10897-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORTABLE_BATT_DEV_CHEM), HiiHandle);
10898+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_PORTABLE_BATT_DEV_CHEM), gSmbiosHiiHandle);
10899   PRINT_INFO_OPTION (Key, Option);
10900   PRINT_TABLE_ITEM (PBDeviceChemistryTable, Key);
10901 }
10902@@ -3558,7 +3558,7 @@
10903   UINT8       Loc;
10904
10905   Loc = (UINT8) ((Key & 0xE0) >> 5);
10906-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_LOC), HiiHandle);
10907+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_LOC), gSmbiosHiiHandle);
10908   PRINT_INFO_OPTION (Loc, Option);
10909   PRINT_TABLE_ITEM (VPLocationTable, Loc);
10910 }
10911@@ -3572,7 +3572,7 @@
10912   UINT8       Status;
10913
10914   Status = (UINT8) (Key & 0x1F);
10915-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_STATUS), HiiHandle);
10916+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_STATUS), gSmbiosHiiHandle);
10917   PRINT_INFO_OPTION (Status, Option);
10918   PRINT_TABLE_ITEM (VPStatusTable, Status);
10919 }
10920@@ -3588,7 +3588,7 @@
10921   UINT8       Status;
10922
10923   Status = (UINT8) ((Key & 0xE0) >> 5);
10924-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_COOLING_DEV_STATUS), HiiHandle);
10925+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_COOLING_DEV_STATUS), gSmbiosHiiHandle);
10926   PRINT_INFO_OPTION (Status, Option);
10927   PRINT_TABLE_ITEM (CoolingDeviceStatusTable, Status);
10928 }
10929@@ -3602,7 +3602,7 @@
10930   UINT8       Type;
10931
10932   Type = (UINT8) (Key & 0x1F);
10933-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_COOLING_DEV_TYPE), HiiHandle);
10934+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_COOLING_DEV_TYPE), gSmbiosHiiHandle);
10935   PRINT_INFO_OPTION (Type, Option);
10936   PRINT_TABLE_ITEM (CoolingDeviceTypeTable, Type);
10937 }
10938@@ -3618,7 +3618,7 @@
10939   UINT8       Status;
10940
10941   Status = (UINT8) ((Key & 0xE0) >> 5);
10942-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_TEMP_PROBE), HiiHandle);
10943+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_TEMP_PROBE), gSmbiosHiiHandle);
10944   PRINT_INFO_OPTION (Status, Option);
10945   PRINT_TABLE_ITEM (TemperatureProbeStatusTable, Status);
10946 }
10947@@ -3632,7 +3632,7 @@
10948   UINT8       Loc;
10949
10950   Loc = (UINT8) (Key & 0x1F);
10951-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_LOC), HiiHandle);
10952+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_VOLTAGE_PROBE_LOC), gSmbiosHiiHandle);
10953   PRINT_INFO_OPTION (Loc, Option);
10954   PRINT_TABLE_ITEM (TemperatureProbeLocTable, Loc);
10955 }
10956@@ -3648,7 +3648,7 @@
10957   UINT8       Status;
10958
10959   Status = (UINT8) ((Key & 0xE0) >> 5);
10960-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ELEC_PROBE_STATUS), HiiHandle);
10961+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ELEC_PROBE_STATUS), gSmbiosHiiHandle);
10962   PRINT_INFO_OPTION (Status, Option);
10963   PRINT_TABLE_ITEM (ECPStatusTable, Status);
10964 }
10965@@ -3662,7 +3662,7 @@
10966   UINT8       Loc;
10967
10968   Loc = (UINT8) (Key & 0x1F);
10969-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ELEC_PROBE_LOC), HiiHandle);
10970+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_ELEC_PROBE_LOC), gSmbiosHiiHandle);
10971   PRINT_INFO_OPTION (Loc, Option);
10972   PRINT_TABLE_ITEM (ECPLocTable, Loc);
10973 }
10974@@ -3675,7 +3675,7 @@
10975   UINT8 Option
10976   )
10977 {
10978-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_TYPE), HiiHandle);
10979+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_TYPE), gSmbiosHiiHandle);
10980   PRINT_INFO_OPTION (Key, Option);
10981   PRINT_TABLE_ITEM (MDTypeTable, Key);
10982 }
10983@@ -3686,7 +3686,7 @@
10984   UINT8 Option
10985   )
10986 {
10987-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_ADDR_TYPE), HiiHandle);
10988+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_ADDR_TYPE), gSmbiosHiiHandle);
10989   PRINT_INFO_OPTION (Key, Option);
10990   PRINT_TABLE_ITEM (MDAddressTypeTable, Key);
10991 }
10992@@ -3699,7 +3699,7 @@
10993   UINT8 Option
10994   )
10995 {
10996-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CHANNEL_TYPE), HiiHandle);
10997+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MEM_CHANNEL_TYPE), gSmbiosHiiHandle);
10998   PRINT_INFO_OPTION (Key, Option);
10999   PRINT_TABLE_ITEM (MemoryChannelTypeTable, Key);
11000 }
11001@@ -3712,7 +3712,7 @@
11002   UINT8 Option
11003   )
11004 {
11005-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_BMC_INTERFACE_TYPE), HiiHandle);
11006+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_BMC_INTERFACE_TYPE), gSmbiosHiiHandle);
11007   PRINT_INFO_OPTION (Key, Option);
11008   PRINT_TABLE_ITEM (IPMIDIBMCInterfaceTypeTable, Key);
11009 }
11010@@ -3726,7 +3726,7 @@
11011   //
11012   // display
11013   //
11014-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_STRUCT_TYPE), HiiHandle);
11015+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_STRUCT_TYPE), gSmbiosHiiHandle);
11016   PRINT_INFO_OPTION (Key, Option);
11017   PRINT_TABLE_ITEM (StructureTypeInfoTable, Key);
11018 }
11019diff --ignore-file-name-case -Naur ShellR33/SmbiosView/Smbios.h GccShellR33/SmbiosView/Smbios.h
11020--- ShellR33/SmbiosView/Smbios.h	2008-10-06 00:03:04.000000000 -0700
11021+++ GccShellR33/SmbiosView/Smbios.h	2009-11-05 13:49:56.000000000 -0800
11022@@ -32,7 +32,7 @@
11023     0xda4ccda5, 0xe09d, 0x4f89, 0xb0, 0xf2, 0xdf, 0x84, 0x5c, 0xbb, 0x92, 0x80 \
11024   }
11025
11026-extern EFI_HII_HANDLE HiiHandle;
11027+extern EFI_HII_HANDLE gSmbiosHiiHandle;
11028
11029
11030
11031diff --ignore-file-name-case -Naur ShellR33/SmbiosView/smbiosview.c GccShellR33/SmbiosView/smbiosview.c
11032--- ShellR33/SmbiosView/smbiosview.c	2008-08-13 23:02:46.000000000 -0700
11033+++ GccShellR33/SmbiosView/smbiosview.c	2009-11-05 13:49:56.000000000 -0800
11034@@ -26,7 +26,7 @@
11035 #include "smbiosview.h"
11036 #include "PrintInfo.h"
11037 #include "QueryTable.h"
11038-#include "smbios.h"
11039+#include "Smbios.h"
11040
11041 extern UINT8                STRING_ARRAY_NAME[];
11042
11043@@ -45,7 +45,7 @@
11044 //
11045 // Global Variables
11046 //
11047-EFI_HII_HANDLE              HiiHandle;
11048+EFI_HII_HANDLE              gSmbiosHiiHandle;
11049 EFI_GUID                    EfiSmbiosViewGuid = EFI_SMBIOS_GUID;
11050 SHELL_VAR_CHECK_ITEM        SmbiosviewCheckList[] = {
11051   {
11052@@ -147,7 +147,7 @@
11053   //
11054   EnableOutputTabPause();
11055
11056-  Status = LibInitializeStrings (&HiiHandle, STRING_ARRAY_NAME, &EfiSmbiosViewGuid);
11057+  Status = LibInitializeStrings (&gSmbiosHiiHandle, STRING_ARRAY_NAME, &EfiSmbiosViewGuid);
11058
11059   if (EFI_ERROR (Status)) {
11060     return Status;
11061@@ -157,19 +157,19 @@
11062   if (VarCheckOk != RetCode) {
11063     switch (RetCode) {
11064     case VarCheckLackValue:
11065-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LACK_ARG), HiiHandle, L"smbiosview", Useful);
11066+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_LACK_ARG), gSmbiosHiiHandle, L"smbiosview", Useful);
11067       break;
11068
11069     case VarCheckConflict:
11070-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_FLAG_CONFLICT), HiiHandle, L"smbiosview", Useful);
11071+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_FLAG_CONFLICT), gSmbiosHiiHandle, L"smbiosview", Useful);
11072       break;
11073
11074     case VarCheckDuplicate:
11075-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_DUP_FLAG), HiiHandle, L"smbiosview", Useful);
11076+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_DUP_FLAG), gSmbiosHiiHandle, L"smbiosview", Useful);
11077       break;
11078
11079     case VarCheckUnknown:
11080-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), HiiHandle, L"smbiosview", Useful);
11081+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_UNKNOWN_FLAG), gSmbiosHiiHandle, L"smbiosview", Useful);
11082       break;
11083
11084     default:
11085@@ -191,10 +191,10 @@
11086         ChkPck.FlagCount > 2 ||
11087         (2 == ChkPck.FlagCount && !LibCheckVarGetFlag (&ChkPck, L"-b"))
11088         ) {
11089-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"smbiosview");
11090+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gSmbiosHiiHandle, L"smbiosview");
11091       Status = EFI_INVALID_PARAMETER;
11092     } else {
11093-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_VERBOSE_HELP), HiiHandle);
11094+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_VERBOSE_HELP), gSmbiosHiiHandle);
11095       Status = EFI_SUCCESS;
11096     }
11097
11098@@ -202,7 +202,7 @@
11099   }
11100
11101   if (ChkPck.ValueCount > 0) {
11102-    PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), HiiHandle, L"smbiosview");
11103+    PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_TOO_MANY), gSmbiosHiiHandle, L"smbiosview");
11104     Status = EFI_INVALID_PARAMETER;
11105     goto Done;
11106   }
11107@@ -233,7 +233,7 @@
11108   if (Item) {
11109     StructType = (UINT8) StrToUInteger (Item->VarStr, &Status);
11110     if (EFI_ERROR (Status)) {
11111-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"smbiosview", Item->VarStr);
11112+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gSmbiosHiiHandle, L"smbiosview", Item->VarStr);
11113       Status = EFI_INVALID_PARAMETER;
11114       goto Done;
11115     }
11116@@ -244,7 +244,7 @@
11117     RandomView   = FALSE;
11118     StructHandle = (UINT16) (StrToUIntegerBase (Item->VarStr, 16, &Status));
11119     if (EFI_ERROR (Status)) {
11120-      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"smbiosview", Item->VarStr);
11121+      PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), gSmbiosHiiHandle, L"smbiosview", Item->VarStr);
11122       Status = EFI_INVALID_PARAMETER;
11123       goto Done;
11124     }
11125@@ -324,7 +324,7 @@
11126   SMBiosTable = NULL;
11127   LibSmbiosGetEPS (&SMBiosTable);
11128   if (SMBiosTable == NULL) {
11129-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_TABLE), HiiHandle);
11130+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_TABLE), gSmbiosHiiHandle);
11131     return EFI_BAD_BUFFER_SIZE;
11132   }
11133
11134@@ -338,21 +338,21 @@
11135     SmbiosMinorVersion = SMBiosTable->MinorVersion;
11136
11137     Print (L"=========================================================\n");
11138-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERY_STRUCT_COND), HiiHandle);
11139+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERY_STRUCT_COND), gSmbiosHiiHandle);
11140
11141     if (QueryType == STRUCTURE_TYPE_RANDOM) {
11142-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYTYPE_RANDOM), HiiHandle);
11143+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYTYPE_RANDOM), gSmbiosHiiHandle);
11144     } else {
11145-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYTYPE), HiiHandle, QueryType);
11146+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYTYPE), gSmbiosHiiHandle, QueryType);
11147     }
11148
11149     if (RandomView) {
11150-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYHANDLE_RANDOM), HiiHandle);
11151+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYHANDLE_RANDOM), gSmbiosHiiHandle);
11152     } else {
11153-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYHANDLE), HiiHandle, QueryHandle);
11154+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYHANDLE), gSmbiosHiiHandle, QueryHandle);
11155     }
11156
11157-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOWTYPE), HiiHandle);
11158+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOWTYPE), gSmbiosHiiHandle);
11159     Print (GetShowTypeString (gShowType));
11160     Print (L"\n\n");
11161
11162@@ -401,15 +401,15 @@
11163       Print (L"\n=========================================================\n");
11164       PrintToken (
11165         STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE_HANDLE_DUMP_STRUCT),
11166-        HiiHandle,
11167+        gSmbiosHiiHandle,
11168         pStruct.Hdr->Type,
11169         pStruct.Hdr->Handle
11170         );
11171-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX_LENGTH), HiiHandle, Index, Length);
11172+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX_LENGTH), gSmbiosHiiHandle, Index, Length);
11173       //
11174       // Addr of structure in structure in table
11175       //
11176-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ADDR), HiiHandle, TableHead + Offset);
11177+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ADDR), gSmbiosHiiHandle, TableHead + Offset);
11178       DumpHex (0, 0, Length, Buffer);
11179
11180       //
11181@@ -473,7 +473,7 @@
11182     return EFI_SUCCESS;
11183   }
11184
11185-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTER_Q), HiiHandle);
11186+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTER_Q), gSmbiosHiiHandle);
11187   Input (L"$", InputStr, 3);
11188
11189   //
11190@@ -507,7 +507,7 @@
11191       //
11192       gShowType = (UINT8) (InputStr[Index] - (CHAR16) (L'0'));
11193     } else {
11194-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_UNKNOWN_INTERNAL_COMMAND), HiiHandle);
11195+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_UNKNOWN_INTERNAL_COMMAND), gSmbiosHiiHandle);
11196     }
11197   } else if (InputStr[Index] == '/') {
11198     Index++;
11199@@ -521,7 +521,7 @@
11200         return Status;
11201       }
11202     } else {
11203-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_UNKNOWN_INTERNAL_COMMAND), HiiHandle);
11204+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_UNKNOWN_INTERNAL_COMMAND), gSmbiosHiiHandle);
11205     }
11206   } else {
11207     Print (L"");
11208@@ -539,25 +539,25 @@
11209   // print help info
11210   //
11211   Print (L"\n============================================================\n");
11212-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SMBIOS_UTILITY), HiiHandle);
11213-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_USAGE), HiiHandle);
11214-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_HSMBIOSVIEW), HiiHandle);
11215-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_EXAMPLES), HiiHandle);
11216-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOW_STAT_INFO), HiiHandle);
11217-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOW_ALL_STRUCT_TYPE), HiiHandle);
11218-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOW_STRUCT_HANDLE), HiiHandle);
11219-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOW_ALL_OUTPUT_TO_FILE), HiiHandle);
11220+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SMBIOS_UTILITY), gSmbiosHiiHandle);
11221+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_USAGE), gSmbiosHiiHandle);
11222+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_HSMBIOSVIEW), gSmbiosHiiHandle);
11223+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_EXAMPLES), gSmbiosHiiHandle);
11224+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOW_STAT_INFO), gSmbiosHiiHandle);
11225+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOW_ALL_STRUCT_TYPE), gSmbiosHiiHandle);
11226+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOW_STRUCT_HANDLE), gSmbiosHiiHandle);
11227+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOW_ALL_OUTPUT_TO_FILE), gSmbiosHiiHandle);
11228   Print (L"\n");
11229   //
11230   // Internal command
11231   //
11232-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INTERNAL_COMMANDS), HiiHandle);
11233-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUIT_SMBIOSVIEW), HiiHandle);
11234-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CHANGE_DISPLAY_NONE), HiiHandle);
11235-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CHANGE_DISPLAY_OUTLINE), HiiHandle);
11236-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CHANGE_DISPLAY_NORMAL), HiiHandle);
11237-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CHANGE_DISPLAY_DETAIL), HiiHandle);
11238-  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOW_HELP), HiiHandle);
11239+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INTERNAL_COMMANDS), gSmbiosHiiHandle);
11240+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUIT_SMBIOSVIEW), gSmbiosHiiHandle);
11241+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CHANGE_DISPLAY_NONE), gSmbiosHiiHandle);
11242+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CHANGE_DISPLAY_OUTLINE), gSmbiosHiiHandle);
11243+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CHANGE_DISPLAY_NORMAL), gSmbiosHiiHandle);
11244+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CHANGE_DISPLAY_DETAIL), gSmbiosHiiHandle);
11245+  PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SHOW_HELP), gSmbiosHiiHandle);
11246   Print (L"\n============================================================\n");
11247 }
11248
11249@@ -603,12 +603,12 @@
11250   SMBiosTable = NULL;
11251   LibSmbiosGetEPS (&SMBiosTable);
11252   if (SMBiosTable == NULL) {
11253-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_TABLE), HiiHandle);
11254+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_TABLE), gSmbiosHiiHandle);
11255     return EFI_NOT_FOUND;
11256   }
11257
11258   if (CompareMem (SMBiosTable->AnchorString, "_SM_", 4) != 0) {
11259-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SMBIOS_TABLE), HiiHandle);
11260+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SMBIOS_TABLE), gSmbiosHiiHandle);
11261     return EFI_INVALID_PARAMETER;
11262   }
11263   //
11264@@ -622,7 +622,7 @@
11265   mStatisticsTable = (STRUCTURE_STATISTICS *) AllocatePool (SMBiosTable->NumberOfSmbiosStructures * sizeof (STRUCTURE_STATISTICS));
11266
11267   if (mStatisticsTable == NULL) {
11268-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OUT_OF_MEM), HiiHandle);
11269+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OUT_OF_MEM), gSmbiosHiiHandle);
11270     return EFI_OUT_OF_RESOURCES;
11271   }
11272
11273@@ -686,7 +686,7 @@
11274   //
11275   LibSmbiosGetEPS (&SMBiosTable);
11276   if (SMBiosTable == NULL) {
11277-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_TABLE), HiiHandle);
11278+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_TABLE), gSmbiosHiiHandle);
11279     return EFI_UNSUPPORTED;
11280   }
11281
11282@@ -698,7 +698,7 @@
11283   }
11284
11285   if (mStatisticsTable == NULL) {
11286-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_STATS), HiiHandle);
11287+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_CANNOT_ACCESS_STATS), gSmbiosHiiHandle);
11288     return EFI_NOT_FOUND;
11289   }
11290
11291@@ -709,12 +709,12 @@
11292   // display statistics table content
11293   //
11294   for (Index = 1; Index <= Num; Index++) {
11295-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX), HiiHandle, pStatistics->Index);
11296-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE), HiiHandle, pStatistics->Type);
11297-    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_HANDLE), HiiHandle, pStatistics->Handle);
11298+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_INDEX), gSmbiosHiiHandle, pStatistics->Index);
11299+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE), gSmbiosHiiHandle, pStatistics->Type);
11300+    PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_HANDLE), gSmbiosHiiHandle, pStatistics->Handle);
11301     if (Option >= SHOW_DETAIL) {
11302-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OFFSET), HiiHandle, pStatistics->Addr);
11303-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_LENGTH), HiiHandle, pStatistics->Length);
11304+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OFFSET), gSmbiosHiiHandle, pStatistics->Addr);
11305+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_LENGTH), gSmbiosHiiHandle, pStatistics->Length);
11306     }
11307
11308     Print (L"\n");
11309@@ -723,7 +723,7 @@
11310     // Display 20 lines and wait for a page break
11311     //
11312     if (Index % 20 == 0) {
11313-      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTER_CONTINUE), HiiHandle);
11314+      PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_ENTER_CONTINUE), gSmbiosHiiHandle);
11315       Status = WaitEnter ();
11316       if (EFI_ERROR (Status)) {
11317         if (Status == EFI_ABORTED) {
11318diff --ignore-file-name-case -Naur ShellR33/SmbiosView/Smbiosview.inf GccShellR33/SmbiosView/Smbiosview.inf
11319--- ShellR33/SmbiosView/Smbiosview.inf	2007-03-15 20:07:49.000000000 -0700
11320+++ GccShellR33/SmbiosView/Smbiosview.inf	2009-09-22 15:37:05.000000000 -0700
11321@@ -25,7 +25,7 @@
11322 COMPONENT_TYPE       = APPLICATION
11323
11324 [sources.common]
11325-  ..\ShCommonStrings.uni
11326+  ../ShCommonStrings.uni
11327   SmBiosViewStrings.uni
11328   QueryTable.c
11329   EventLogInfo.c
11330@@ -36,19 +36,19 @@
11331
11332 [includes.common]
11333   .
11334-  ..\Inc
11335-  ..\Library
11336-  $(EDK_SOURCE)\Foundation
11337-  $(EDK_SOURCE)\Foundation\Include
11338-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
11339-  $(EDK_SOURCE)\Foundation\Efi
11340-  $(EDK_SOURCE)\Foundation\Efi\Include
11341-  $(EDK_SOURCE)\Foundation\FrameWork
11342-  $(EDK_SOURCE)\Foundation\FrameWork\Include
11343-  $(EDK_SOURCE)\Foundation\Core\Dxe
11344-  $(DEST_DIR)\
11345-  $(EFI_SOURCE)\Application\Shell\Inc
11346-  $(EFI_SOURCE)\Application\Shell\Library
11347+  ../Inc
11348+  ../Library
11349+  $(EDK_SOURCE)/Foundation
11350+  $(EDK_SOURCE)/Foundation/Include
11351+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
11352+  $(EDK_SOURCE)/Foundation/Efi
11353+  $(EDK_SOURCE)/Foundation/Efi/Include
11354+  $(EDK_SOURCE)/Foundation/FrameWork
11355+  $(EDK_SOURCE)/Foundation/FrameWork/Include
11356+  $(EDK_SOURCE)/Foundation/Core/Dxe
11357+  $(DEST_DIR)/
11358+  $(EFI_SOURCE)/Application/Shell/Inc
11359+  $(EFI_SOURCE)/Application/Shell/Library
11360
11361 [libraries.common]
11362   EfiShellLib
11363diff --ignore-file-name-case -Naur ShellR33/stall/stall.inf GccShellR33/stall/stall.inf
11364--- ShellR33/stall/stall.inf	2007-06-25 02:05:05.000000000 -0700
11365+++ GccShellR33/stall/stall.inf	2009-09-22 15:37:05.000000000 -0700
11366@@ -40,24 +40,24 @@
11367
11368
11369 [sources.common]
11370-  ..\ShCommonStrings.uni
11371+  ../ShCommonStrings.uni
11372   stallStrings.uni
11373   stall.c
11374   stall.h
11375
11376 [includes.common]
11377   .
11378-  ..\Inc
11379-  ..\Library
11380-  $(EDK_SOURCE)\Foundation
11381-  $(EDK_SOURCE)\Foundation\Include
11382-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
11383-  $(EDK_SOURCE)\Foundation\Efi
11384-  $(EDK_SOURCE)\Foundation\Efi\Include
11385-  $(EDK_SOURCE)\Foundation\FrameWork
11386-  $(EDK_SOURCE)\Foundation\FrameWork\Include
11387-  $(EDK_SOURCE)\Foundation\Core\Dxe
11388-  $(DEST_DIR)\
11389+  ../Inc
11390+  ../Library
11391+  $(EDK_SOURCE)/Foundation
11392+  $(EDK_SOURCE)/Foundation/Include
11393+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
11394+  $(EDK_SOURCE)/Foundation/Efi
11395+  $(EDK_SOURCE)/Foundation/Efi/Include
11396+  $(EDK_SOURCE)/Foundation/FrameWork
11397+  $(EDK_SOURCE)/Foundation/FrameWork/Include
11398+  $(EDK_SOURCE)/Foundation/Core/Dxe
11399+  $(DEST_DIR)/
11400
11401 [libraries.common]
11402   EfiShellLib
11403diff --ignore-file-name-case -Naur ShellR33/TelnetMgmt/TelnetMgmt.c GccShellR33/TelnetMgmt/TelnetMgmt.c
11404--- ShellR33/TelnetMgmt/TelnetMgmt.c	2006-08-07 02:14:38.000000000 -0700
11405+++ GccShellR33/TelnetMgmt/TelnetMgmt.c	2009-11-05 13:49:56.000000000 -0800
11406@@ -32,7 +32,7 @@
11407 //
11408 #include STRING_DEFINES_FILE
11409
11410-EFI_HII_HANDLE  HiiHandle;
11411+static EFI_HII_HANDLE  HiiHandle;
11412 EFI_GUID        EfiTelnetMgmtGuid = EFI_TELNETMGMT_GUID;
11413 EFI_GUID        mEfiTelnetServerGuid = EFI_TELNET_SERVER_PROTOCOL_GUID;
11414 SHELL_VAR_CHECK_ITEM        TelnetmgmtCheckList[] = {
11415diff --ignore-file-name-case -Naur ShellR33/TelnetMgmt/TelnetMgmt.h GccShellR33/TelnetMgmt/TelnetMgmt.h
11416--- ShellR33/TelnetMgmt/TelnetMgmt.h	2005-08-23 00:16:36.000000000 -0700
11417+++ GccShellR33/TelnetMgmt/TelnetMgmt.h	2009-11-05 13:49:56.000000000 -0800
11418@@ -29,4 +29,4 @@
11419     0x55d41b9a, 0x954d, 0x4fbb, 0x8d, 0x6d, 0x24, 0x75, 0xf5, 0x30, 0x9d, 0x37 \
11420   }
11421
11422-#endif
11423\ No newline at end of file
11424+#endif
11425diff --ignore-file-name-case -Naur ShellR33/TelnetMgmt/TelnetMgmt.inf GccShellR33/TelnetMgmt/TelnetMgmt.inf
11426--- ShellR33/TelnetMgmt/TelnetMgmt.inf	2005-08-23 00:16:36.000000000 -0700
11427+++ GccShellR33/TelnetMgmt/TelnetMgmt.inf	2009-09-22 15:37:05.000000000 -0700
11428@@ -25,23 +25,23 @@
11429 COMPONENT_TYPE       = APPLICATION
11430
11431 [sources.common]
11432-  ..\ShCommonStrings.uni
11433+  ../ShCommonStrings.uni
11434   TelnetMgmtStrings.uni
11435   TelnetMgmt.c
11436
11437 [includes.common]
11438   .
11439-  ..\Inc
11440-  ..\Library
11441-  $(EDK_SOURCE)\Foundation
11442-  $(EDK_SOURCE)\Foundation\Include
11443-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
11444-  $(EDK_SOURCE)\Foundation\Efi
11445-  $(EDK_SOURCE)\Foundation\Efi\Include
11446-  $(EDK_SOURCE)\Foundation\FrameWork
11447-  $(EDK_SOURCE)\Foundation\FrameWork\Include
11448-  $(EDK_SOURCE)\Foundation\Core\Dxe
11449-  $(DEST_DIR)\
11450+  ../Inc
11451+  ../Library
11452+  $(EDK_SOURCE)/Foundation
11453+  $(EDK_SOURCE)/Foundation/Include
11454+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
11455+  $(EDK_SOURCE)/Foundation/Efi
11456+  $(EDK_SOURCE)/Foundation/Efi/Include
11457+  $(EDK_SOURCE)/Foundation/FrameWork
11458+  $(EDK_SOURCE)/Foundation/FrameWork/Include
11459+  $(EDK_SOURCE)/Foundation/Core/Dxe
11460+  $(DEST_DIR)/
11461
11462 [libraries.common]
11463   EfiShellLib
11464diff --ignore-file-name-case -Naur ShellR33/TelnetMgmt/TelnetServer.h GccShellR33/TelnetMgmt/TelnetServer.h
11465--- ShellR33/TelnetMgmt/TelnetServer.h	2005-08-23 00:16:36.000000000 -0700
11466+++ GccShellR33/TelnetMgmt/TelnetServer.h	2009-09-22 15:37:05.000000000 -0700
11467@@ -69,11 +69,11 @@
11468 //
11469 #define EFI_TELNET_SERVER_REVISION  0x00010000
11470
11471-typedef struct _EFI_TELNET_SERVER_PROTOCOL {
11472+struct _EFI_TELNET_SERVER_PROTOCOL {
11473   UINT64                        Revision;
11474   UINT8                         TerminalType;
11475   EFI_TELNET_SERVER_SET_OPTION  SetOption;
11476-} EFI_TELNET_SERVER_PROTOCOL;
11477+};
11478
11479 //
11480 // Global Variables
11481diff --ignore-file-name-case -Naur ShellR33/time/time.c GccShellR33/time/time.c
11482--- ShellR33/time/time.c	2007-03-15 20:07:49.000000000 -0700
11483+++ GccShellR33/time/time.c	2009-09-22 15:37:05.000000000 -0700
11484@@ -93,8 +93,8 @@
11485 {
11486   EFI_STATUS              Status;
11487   EFI_TIME                Time;
11488-  UINTN                   Offset;
11489-  UINTN                   Data;
11490+  INTN                    Offset;
11491+  INTN                    Data;
11492   EFI_HII_HANDLE          HiiHandle;
11493   INTN                    nValue;
11494   UINTN                   uValueSize;
11495diff --ignore-file-name-case -Naur ShellR33/time/time.inf GccShellR33/time/time.inf
11496--- ShellR33/time/time.inf	2007-03-15 20:07:49.000000000 -0700
11497+++ GccShellR33/time/time.inf	2009-09-22 15:37:05.000000000 -0700
11498@@ -40,24 +40,24 @@
11499
11500
11501 [sources.common]
11502-   ..\ShCommonStrings.uni
11503+   ../ShCommonStrings.uni
11504    TimeStrings.uni
11505    Time.c
11506    Time.h
11507
11508 [includes.common]
11509   .
11510-  ..\Inc
11511-  ..\Library
11512-  $(EDK_SOURCE)\Foundation
11513-  $(EDK_SOURCE)\Foundation\Include
11514-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
11515-  $(EDK_SOURCE)\Foundation\Efi
11516-  $(EDK_SOURCE)\Foundation\Efi\Include
11517-  $(EDK_SOURCE)\Foundation\FrameWork
11518-  $(EDK_SOURCE)\Foundation\FrameWork\Include
11519-  $(EDK_SOURCE)\Foundation\Core\Dxe
11520-  $(DEST_DIR)\
11521+  ../Inc
11522+  ../Library
11523+  $(EDK_SOURCE)/Foundation
11524+  $(EDK_SOURCE)/Foundation/Include
11525+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
11526+  $(EDK_SOURCE)/Foundation/Efi
11527+  $(EDK_SOURCE)/Foundation/Efi/Include
11528+  $(EDK_SOURCE)/Foundation/FrameWork
11529+  $(EDK_SOURCE)/Foundation/FrameWork/Include
11530+  $(EDK_SOURCE)/Foundation/Core/Dxe
11531+  $(DEST_DIR)/
11532
11533 [libraries.common]
11534   EfiShellLib
11535diff --ignore-file-name-case -Naur ShellR33/touch/touch.c GccShellR33/touch/touch.c
11536--- ShellR33/touch/touch.c	2006-08-07 02:14:38.000000000 -0700
11537+++ GccShellR33/touch/touch.c	2009-11-05 13:49:56.000000000 -0800
11538@@ -64,8 +64,8 @@
11539 //
11540 // Global Variables
11541 //
11542-EFI_HII_HANDLE  HiiHandle;
11543-EFI_GUID        EfiTouchGuid = EFI_TOUCH_GUID;
11544+static EFI_HII_HANDLE   HiiHandle;
11545+EFI_GUID                EfiTouchGuid = EFI_TOUCH_GUID;
11546 SHELL_VAR_CHECK_ITEM    TouchCheckList[] = {
11547   {
11548     L"-r",
11549diff --ignore-file-name-case -Naur ShellR33/touch/touch.h GccShellR33/touch/touch.h
11550--- ShellR33/touch/touch.h	2005-08-23 00:16:36.000000000 -0700
11551+++ GccShellR33/touch/touch.h	2009-11-05 13:49:56.000000000 -0800
11552@@ -29,4 +29,4 @@
11553     0xa16a4695, 0x5815, 0x4d4f, 0xb8, 0xe, 0x6a, 0xf, 0x88, 0xac, 0xdb, 0x6c \
11554   }
11555
11556-#endif
11557\ No newline at end of file
11558+#endif
11559diff --ignore-file-name-case -Naur ShellR33/touch/touch.inf GccShellR33/touch/touch.inf
11560--- ShellR33/touch/touch.inf	2007-03-15 20:07:49.000000000 -0700
11561+++ GccShellR33/touch/touch.inf	2009-09-22 15:37:05.000000000 -0700
11562@@ -39,23 +39,23 @@
11563 COMPONENT_TYPE       = APPLICATION
11564
11565 [sources.common]
11566-  ..\ShCommonStrings.uni
11567+  ../ShCommonStrings.uni
11568   TouchStrings.uni
11569   touch.c
11570
11571 [includes.common]
11572   .
11573-  ..\Inc
11574-  ..\Library
11575-  $(EDK_SOURCE)\Foundation
11576-  $(EDK_SOURCE)\Foundation\Include
11577-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
11578-  $(EDK_SOURCE)\Foundation\Efi
11579-  $(EDK_SOURCE)\Foundation\Efi\Include
11580-  $(EDK_SOURCE)\Foundation\FrameWork
11581-  $(EDK_SOURCE)\Foundation\FrameWork\Include
11582-  $(EDK_SOURCE)\Foundation\Core\Dxe
11583-  $(DEST_DIR)\
11584+  ../Inc
11585+  ../Library
11586+  $(EDK_SOURCE)/Foundation
11587+  $(EDK_SOURCE)/Foundation/Include
11588+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
11589+  $(EDK_SOURCE)/Foundation/Efi
11590+  $(EDK_SOURCE)/Foundation/Efi/Include
11591+  $(EDK_SOURCE)/Foundation/FrameWork
11592+  $(EDK_SOURCE)/Foundation/FrameWork/Include
11593+  $(EDK_SOURCE)/Foundation/Core/Dxe
11594+  $(DEST_DIR)/
11595
11596 [libraries.common]
11597   EfiShellLib
11598diff --ignore-file-name-case -Naur ShellR33/type/type.c GccShellR33/type/type.c
11599--- ShellR33/type/type.c	2006-08-07 02:14:38.000000000 -0700
11600+++ GccShellR33/type/type.c	2009-11-05 13:49:56.000000000 -0800
11601@@ -59,7 +59,7 @@
11602 BOOLEAN         TypeUnicode;
11603 BOOLEAN         TypeAuto;
11604
11605-EFI_HII_HANDLE  HiiHandle;
11606+static EFI_HII_HANDLE  HiiHandle;
11607 EFI_GUID        EfiTypeGuid = EFI_TYPE_GUID;
11608 SHELL_VAR_CHECK_ITEM    TypeCheckList[] = {
11609   {
11610diff --ignore-file-name-case -Naur ShellR33/type/type.inf GccShellR33/type/type.inf
11611--- ShellR33/type/type.inf	2007-06-25 02:05:05.000000000 -0700
11612+++ GccShellR33/type/type.inf	2009-09-22 15:37:05.000000000 -0700
11613@@ -40,24 +40,24 @@
11614
11615
11616 [sources.common]
11617-   ..\ShCommonStrings.uni
11618+   ../ShCommonStrings.uni
11619    TypeStrings.uni
11620    type.c
11621    type.h
11622
11623 [includes.common]
11624   .
11625-  ..\Inc
11626-  ..\Library
11627-  $(EDK_SOURCE)\Foundation
11628-  $(EDK_SOURCE)\Foundation\Include
11629-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
11630-  $(EDK_SOURCE)\Foundation\Efi
11631-  $(EDK_SOURCE)\Foundation\Efi\Include
11632-  $(EDK_SOURCE)\Foundation\FrameWork
11633-  $(EDK_SOURCE)\Foundation\FrameWork\Include
11634-  $(EDK_SOURCE)\Foundation\Core\Dxe
11635-  $(DEST_DIR)\
11636+  ../Inc
11637+  ../Library
11638+  $(EDK_SOURCE)/Foundation
11639+  $(EDK_SOURCE)/Foundation/Include
11640+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
11641+  $(EDK_SOURCE)/Foundation/Efi
11642+  $(EDK_SOURCE)/Foundation/Efi/Include
11643+  $(EDK_SOURCE)/Foundation/FrameWork
11644+  $(EDK_SOURCE)/Foundation/FrameWork/Include
11645+  $(EDK_SOURCE)/Foundation/Core/Dxe
11646+  $(DEST_DIR)/
11647
11648 [libraries.common]
11649   EfiShellLib
11650diff --ignore-file-name-case -Naur ShellR33/tzone/timezone.inf GccShellR33/tzone/timezone.inf
11651--- ShellR33/tzone/timezone.inf	2007-06-25 02:05:05.000000000 -0700
11652+++ GccShellR33/tzone/timezone.inf	2009-09-22 15:37:05.000000000 -0700
11653@@ -25,24 +25,24 @@
11654 COMPONENT_TYPE       = APPLICATION
11655
11656 [sources.common]
11657-  ..\ShCommonStrings.uni
11658+  ../ShCommonStrings.uni
11659   TZoneStrings.uni
11660   tzone.c
11661   tzone.h
11662
11663 [includes.common]
11664   .
11665-  ..\Inc
11666-  ..\Library
11667-  $(EDK_SOURCE)\Foundation
11668-  $(EDK_SOURCE)\Foundation\Include
11669-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
11670-  $(EDK_SOURCE)\Foundation\Efi
11671-  $(EDK_SOURCE)\Foundation\Efi\Include
11672-  $(EDK_SOURCE)\Foundation\FrameWork
11673-  $(EDK_SOURCE)\Foundation\FrameWork\Include
11674-  $(EDK_SOURCE)\Foundation\Core\Dxe
11675-  $(DEST_DIR)\
11676+  ../Inc
11677+  ../Library
11678+  $(EDK_SOURCE)/Foundation
11679+  $(EDK_SOURCE)/Foundation/Include
11680+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
11681+  $(EDK_SOURCE)/Foundation/Efi
11682+  $(EDK_SOURCE)/Foundation/Efi/Include
11683+  $(EDK_SOURCE)/Foundation/FrameWork
11684+  $(EDK_SOURCE)/Foundation/FrameWork/Include
11685+  $(EDK_SOURCE)/Foundation/Core/Dxe
11686+  $(DEST_DIR)/
11687
11688 [libraries.common]
11689   EfiShellLib
11690diff --ignore-file-name-case -Naur ShellR33/unload/unload.c GccShellR33/unload/unload.c
11691--- ShellR33/unload/unload.c	2009-05-27 01:55:16.000000000 -0700
11692+++ GccShellR33/unload/unload.c	2009-09-22 15:37:05.000000000 -0700
11693@@ -73,7 +73,7 @@
11694 EFI_STATUS
11695 _UnloadGetDriverName (
11696   EFI_HANDLE                        DriverBindingHandle,
11697-  UINT8                             *Language,
11698+  CHAR8                             *Language,
11699   BOOLEAN                           ImageName,
11700   CHAR16                            **DriverName
11701   )
11702@@ -184,7 +184,7 @@
11703
11704     DevicePath      = NULL;
11705     BestDeviceName  = NULL;
11706-    Status          = BS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, &DevicePath);
11707+    Status          = BS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, (VOID **)&DevicePath);
11708
11709     Print (L"\n");
11710     PrintToken (STRING_TOKEN (STR_UNLOAD_CONTROLLER_NAME), HiiUnloadHandle);
11711diff --ignore-file-name-case -Naur ShellR33/unload/unload.inf GccShellR33/unload/unload.inf
11712--- ShellR33/unload/unload.inf	2007-03-15 20:07:49.000000000 -0700
11713+++ GccShellR33/unload/unload.inf	2009-09-22 15:37:05.000000000 -0700
11714@@ -39,23 +39,23 @@
11715 COMPONENT_TYPE       = APPLICATION
11716
11717 [sources.common]
11718-  ..\ShCommonStrings.uni
11719+  ../ShCommonStrings.uni
11720   UnloadStrings.uni
11721   unload.c
11722
11723 [includes.common]
11724   .
11725-  ..\Inc
11726-  ..\Library
11727-  $(EDK_SOURCE)\Foundation
11728-  $(EDK_SOURCE)\Foundation\Include
11729-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
11730-  $(EDK_SOURCE)\Foundation\Efi
11731-  $(EDK_SOURCE)\Foundation\Efi\Include
11732-  $(EDK_SOURCE)\Foundation\FrameWork
11733-  $(EDK_SOURCE)\Foundation\FrameWork\Include
11734-  $(EDK_SOURCE)\Foundation\Core\Dxe
11735-  $(DEST_DIR)\
11736+  ../Inc
11737+  ../Library
11738+  $(EDK_SOURCE)/Foundation
11739+  $(EDK_SOURCE)/Foundation/Include
11740+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
11741+  $(EDK_SOURCE)/Foundation/Efi
11742+  $(EDK_SOURCE)/Foundation/Efi/Include
11743+  $(EDK_SOURCE)/Foundation/FrameWork
11744+  $(EDK_SOURCE)/Foundation/FrameWork/Include
11745+  $(EDK_SOURCE)/Foundation/Core/Dxe
11746+  $(DEST_DIR)/
11747
11748 [libraries.common]
11749   EfiShellLib
11750diff --ignore-file-name-case -Naur ShellR33/ver/Ver.inf GccShellR33/ver/Ver.inf
11751--- ShellR33/ver/Ver.inf	2008-08-13 23:02:46.000000000 -0700
11752+++ GccShellR33/ver/Ver.inf	2009-11-04 15:23:34.000000000 -0800
11753@@ -40,33 +40,35 @@
11754
11755
11756 [sources.common]
11757-   ..\ShCommonStrings.uni
11758+   ../ShCommonStrings.uni
11759    VerStrings.uni
11760    Ver.c
11761    Ver.h
11762
11763-[sources.ia32,sources.x64]
11764-   ia32\ver32.c
11765+[sources.ia32,sources.x64,sources.ARM]
11766+   ia32/ver32.c
11767
11768 [sources.ipf]
11769-   ipf\ver64.c
11770+   ipf/ver64.c
11771
11772 [sources.ebc]
11773-   ebc\verEbc.c
11774+   ebc/verEbc.c
11775+
11776+
11777
11778 [includes.common]
11779   .
11780-  ..\Inc
11781-  ..\Library
11782-  $(EDK_SOURCE)\Foundation
11783-  $(EDK_SOURCE)\Foundation\Include
11784-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
11785-  $(EDK_SOURCE)\Foundation\Efi
11786-  $(EDK_SOURCE)\Foundation\Efi\Include
11787-  $(EDK_SOURCE)\Foundation\FrameWork
11788-  $(EDK_SOURCE)\Foundation\FrameWork\Include
11789-  $(EDK_SOURCE)\Foundation\Core\Dxe
11790-  $(DEST_DIR)\
11791+  ../Inc
11792+  ../Library
11793+  $(EDK_SOURCE)/Foundation
11794+  $(EDK_SOURCE)/Foundation/Include
11795+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
11796+  $(EDK_SOURCE)/Foundation/Efi
11797+  $(EDK_SOURCE)/Foundation/Efi/Include
11798+  $(EDK_SOURCE)/Foundation/FrameWork
11799+  $(EDK_SOURCE)/Foundation/FrameWork/Include
11800+  $(EDK_SOURCE)/Foundation/Core/Dxe
11801+  $(DEST_DIR)/
11802
11803 [libraries.common]
11804   EfiShellLib
11805diff --ignore-file-name-case -Naur ShellR33/vol/vol.c GccShellR33/vol/vol.c
11806--- ShellR33/vol/vol.c	2006-08-07 02:14:38.000000000 -0700
11807+++ GccShellR33/vol/vol.c	2009-11-05 13:49:56.000000000 -0800
11808@@ -32,7 +32,7 @@
11809 //
11810 #include STRING_DEFINES_FILE
11811
11812-EFI_HII_HANDLE  HiiHandle;
11813+static EFI_HII_HANDLE  HiiHandle;
11814 EFI_GUID        EfiVolGuid = EFI_VOL_GUID;
11815 SHELL_VAR_CHECK_ITEM    VolCheckList[] = {
11816   {
11817diff --ignore-file-name-case -Naur ShellR33/vol/Vol.inf GccShellR33/vol/Vol.inf
11818--- ShellR33/vol/Vol.inf	2007-06-25 02:05:05.000000000 -0700
11819+++ GccShellR33/vol/Vol.inf	2009-09-22 15:37:05.000000000 -0700
11820@@ -40,24 +40,24 @@
11821
11822
11823 [sources.common]
11824-   ..\ShCommonStrings.uni
11825+   ../ShCommonStrings.uni
11826    VolStrings.uni
11827    Vol.c
11828    Vol.h
11829
11830 [includes.common]
11831   .
11832-  ..\Inc
11833-  ..\Library
11834-  $(EDK_SOURCE)\Foundation
11835-  $(EDK_SOURCE)\Foundation\Include
11836-  $(EDK_SOURCE)\Foundation\Include\IndustryStandard
11837-  $(EDK_SOURCE)\Foundation\Efi
11838-  $(EDK_SOURCE)\Foundation\Efi\Include
11839-  $(EDK_SOURCE)\Foundation\FrameWork
11840-  $(EDK_SOURCE)\Foundation\FrameWork\Include
11841-  $(EDK_SOURCE)\Foundation\Core\Dxe
11842-  $(DEST_DIR)\
11843+  ../Inc
11844+  ../Library
11845+  $(EDK_SOURCE)/Foundation
11846+  $(EDK_SOURCE)/Foundation/Include
11847+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard
11848+  $(EDK_SOURCE)/Foundation/Efi
11849+  $(EDK_SOURCE)/Foundation/Efi/Include
11850+  $(EDK_SOURCE)/Foundation/FrameWork
11851+  $(EDK_SOURCE)/Foundation/FrameWork/Include
11852+  $(EDK_SOURCE)/Foundation/Core/Dxe
11853+  $(DEST_DIR)/
11854
11855 [libraries.common]
11856   EfiShellLib
11857