From 5be55e874c10defeead7f7b3f541b1c6d6255ab4 Mon Sep 17 00:00:00 2001 From: hfang Date: Fri, 16 Mar 2007 03:07:49 +0000 Subject: [PATCH] SHEL8 git-svn-id: https://svn.code.sf.net/p/efi-shell/code/trunk/Shell@24 98faeb64-521c-4ab6-bae1-df9f193a316f --- DeviceTree/DevicetreeStrings.uni | Bin 7168 -> 7010 bytes DeviceTree/devicetree.inf | 1 - EDK_Snapshot.txt | 6 +- EfiCompress/CompressMain.c | 36 +-- EfiCompress/CompressStrings.uni | Bin 5694 -> 5702 bytes EfiCompress/compress.c | 144 +++++----- EfiDecompress/Decompress.c | 5 +- EfiDecompress/DecompressStrings.uni | Bin 5806 -> 5706 bytes IpConfig/IpConfigStrings.uni | Bin 8546 -> 8562 bytes Library/ConsistMapping.c | 48 ++-- Library/DPath.c | 422 ++++++++++++++++++++-------- Library/DPath.h | 41 ++- Library/Data.c | 2 - Library/EfiShellLib.h | 15 +- Library/EfiShellLib.inf | 5 +- Library/Event.c | 4 +- Library/Event.h | 4 +- Library/Misc.c | 283 ++++++++++++++----- Library/Misc.h | 15 +- Library/ShellDebug.c | 4 +- Library/ShellDebug.h | 4 +- Library/Str.c | 2 +- LoadPciRom/LoadPciRom.inf | 1 - LoadPciRom/LoadPciRomStrings.uni | Bin 6034 -> 5850 bytes ShCommonStrings.uni | Bin 8644 -> 8648 bytes Shell.inf | 32 +-- ShellFull.inf | 31 +- SmbiosView/LibSmbiosView.c | 26 +- SmbiosView/SmBiosViewStrings.uni | Bin 97354 -> 99344 bytes SmbiosView/Smbiosview.inf | 1 - SmbiosView/smbiosview.c | 30 +- SmbiosView/smbiosview.h | 4 +- TelnetMgmt/TelnetMgmtStrings.uni | Bin 7942 -> 7872 bytes attrib/AttribStrings.uni | Bin 10844 -> 10866 bytes attrib/attrib.inf | 1 - cls/cls.inf | 1 - cls/clsstrings.uni | Bin 7420 -> 7472 bytes comp/CompStrings.uni | Bin 13118 -> 13096 bytes cp/CpStrings.uni | Bin 40532 -> 40544 bytes cp/cp.inf | 1 - date/DateStrings.uni | Bin 7352 -> 7644 bytes date/date.inf | 1 - dblk/DblkStrings.uni | Bin 27152 -> 27000 bytes devices/DevicesStrings.uni | Bin 8324 -> 8100 bytes devices/devices.inf | 1 - dmem/DebugStrings.uni | Bin 10082 -> 10094 bytes dmem/MemCommonPart.c | 4 +- dmem/MemStrings.uni | Bin 22206 -> 21236 bytes dmpstore/DmpstoreStrings.uni | Bin 12776 -> 13980 bytes drivers/DriversStrings.uni | Bin 11968 -> 13814 bytes drivers/drivers.c | 7 +- drivers/drivers.inf | 1 - drvcfg/drvcfg.inf | 1 - drvcfg/drvcfgStrings.uni | Bin 25184 -> 25814 bytes drvdiag/drvdiag.inf | 1 - drvdiag/drvdiagStrings.uni | Bin 15168 -> 15054 bytes edit/EditStrings.uni | Bin 9876 -> 9888 bytes edit/libFileBuffer.c | 73 ++++- edit/libInputBar.c | 1 + edit/libfilebuffer.h | 5 + edit/main.c | 13 +- err/ErrStrings.uni | Bin 22862 -> 22462 bytes err/err.c | 6 +- guid/GuidStrings.uni | Bin 8118 -> 8010 bytes guid/guid.inf | 1 - hexedit/HexeditStrings.uni | Bin 14564 -> 15158 bytes hexedit/libInputBar.c | 1 + hexedit/libMemImage.c | 55 ++++ hexedit/libMisc.c | 2 +- hexedit/main.c | 91 +++++- load/LoadStrings.uni | Bin 9124 -> 9602 bytes load/load.c | 2 + load/load.inf | 1 - ls/LsStrings.uni | Bin 33376 -> 35578 bytes ls/ls.h | 2 +- ls/ls.inf | 1 - mem/DebugStrings.uni | Bin 8944 -> 8956 bytes mem/MemCommonPart.c | 4 +- mem/MemStrings.uni | Bin 22112 -> 21198 bytes memmap/MemmapStrings.uni | Bin 10792 -> 10994 bytes memmap/memmap.inf | 1 - mkdir/MkdirStrings.uni | Bin 10556 -> 10504 bytes mkdir/mkdir.inf | 1 - mm/mm.c | 62 +++- mm/mm.inf | 1 - mm/mmStrings.uni | Bin 28290 -> 28622 bytes mode/ModeStrings.uni | Bin 8330 -> 7740 bytes mode/mode.inf | 1 - mount/MountStrings.uni | Bin 8566 -> 8736 bytes mount/mount.inf | 1 - mv/MvStrings.uni | Bin 15682 -> 15624 bytes mv/mv.inf | 1 - newshell/FakeHii.c | 365 +----------------------- newshell/FakeHii.h | 60 ---- newshell/init.c | 49 +++- openinfo/OpeninfoStrings.uni | Bin 8886 -> 9120 bytes openinfo/openinfo.inf | 1 - pci/PciStrings.uni | Bin 61124 -> 60692 bytes pci/pci.c | 2 +- pci/pci.inf | 1 - reset/ResetStrings.uni | Bin 4864 -> 4592 bytes reset/reset.inf | 1 - rm/RmStrings.uni | Bin 29070 -> 27778 bytes rm/rm.inf | 1 - sermode/SermodeStrings.uni | Bin 12902 -> 13510 bytes sermode/sermode.inf | 1 - shellenv/ConnectStrings.uni | Bin 29870 -> 31368 bytes shellenv/MapStrings.uni | Bin 6384 -> 6382 bytes shellenv/ScriptCmdStrings.uni | Bin 8658 -> 8672 bytes shellenv/ShellenvHelpStrings.uni | Bin 114892 -> 114198 bytes shellenv/ShellenvStrings.uni | Bin 49140 -> 52940 bytes shellenv/dprot.c | 227 ++++++++++++++- shellenv/exec.c | 82 ++++-- shellenv/init.c | 2 +- shellenv/map.c | 28 +- shellenv/protid.c | 92 +++++- shellenv/shelle.h | 9 +- stall/StallStrings.uni | Bin 5510 -> 5518 bytes stall/stall.inf | 1 - time/TimeStrings.uni | Bin 7174 -> 7166 bytes time/time.c | 4 +- time/time.inf | 1 - touch/TouchStrings.uni | Bin 9490 -> 8792 bytes touch/touch.inf | 1 - type/TypeStrings.uni | Bin 11198 -> 11088 bytes type/type.inf | 1 - tzone/TZoneStrings.uni | Bin 22650 -> 22740 bytes tzone/tzone.c | 6 +- unload/UnloadStrings.uni | Bin 17588 -> 17192 bytes unload/unload.inf | 1 - ver/Ebc/verEbc.c | 62 ++++ ver/Ver.inf | 6 +- ver/VerStrings.uni | Bin 11582 -> 6738 bytes ver/ver.c | 1 + vol/Vol.inf | 1 - vol/VolStrings.uni | Bin 11374 -> 11508 bytes 136 files changed, 1560 insertions(+), 957 deletions(-) create mode 100644 ver/Ebc/verEbc.c diff --git a/DeviceTree/DevicetreeStrings.uni b/DeviceTree/DevicetreeStrings.uni index 6bb31c33ff23d3cea5817ff859dc29b8d241ea82..80f7fcaf7f27a957bcdf58113fae360c72513199 100644 GIT binary patch delta 316 zcmZp$cw{!gg;#+=mqCHSh`|5|%{Dq8hN8nt8bdA6j&h*B5{8V)g;Ls+4+&LG zcHpnrT*g<%IQbp_waJ?V)h53YI0B^gCNB~anfyR-$z&H{oy|qUd`yH)+k8Ou52H37 zD}j~+EoMjs(yk0{44#t@iZ)Jek&>8vKy=<_2}u`5LN-ipvm}&yWLz`3&Wg?@MY= zUc}=u*@#navJkHgPF0I12k=*HZsRLsWGtTioBukHyeRM*Oscbjj82{WTX6ZrE;+?w zh609EhGd3JpgoyDRtnI@B!)^L83BfRlNE*5f;CESej)UQ5vP^fo0UZWFiK-}H_$Yo z_+&xh>d70#SSBwJWtm*UtFZZz_#-^#G3o%VZZu3{C;~bwks%vsNIA&m40%9SG0@2% UaR@IH$Oi>fDJY;OZ= 0) { @@ -396,23 +413,6 @@ Routine Description: ); } - if (Status == EFI_BUFFER_TOO_SMALL) { - FreePool (File2Buffer); - File2Buffer = AllocatePool (DestinationSize); - if (File2Buffer == NULL) { - PrintToken (STRING_TOKEN (STR_COMPRESS_OUT_OF_MEM), HiiCompressHandle, L"eficompress"); - Status = EFI_OUT_OF_RESOURCES; - goto Done; - } - - Status = Compress (File1Buffer, (UINT32) SourceSize, File2Buffer, (UINT32 *) &DestinationSize); - } - - if (EFI_ERROR (Status)) { - PrintToken (STRING_TOKEN (STR_COMPRESS_COMPRESS_ERROR), HiiCompressHandle, L"eficompress", Status); - goto Done; - } - Status = File2Handle->Write (File2Handle, &DestinationSize, File2Buffer); if (EFI_ERROR (Status)) { PrintToken (STRING_TOKEN (STR_COMPRESS_WRITE_ERROR), HiiCompressHandle, L"eficompress", File2Arg->FullName, Status); diff --git a/EfiCompress/CompressStrings.uni b/EfiCompress/CompressStrings.uni index 08f8ab7981a825336269744adc0ea453308d9295..1012df97bc60cd1cb8feeeee3fbbbef76c2027b6 100644 GIT binary patch delta 188 zcmdm|b4+J~3$Fr$E`tJt5rY8`nr(F6F389^S&?6TvW!q3oF%vUgpdJ~B1oYdLncEG zLn=caLn1>ikXB$wW5{PH0@9@nd6VVEL`4;VD)JZ#fcz4$ELif|DQcD@`^K$^+7Jn~w+uFinnP;xX1`P+$mQ$Y4kX(rFBt3^`y{ z2~Z@Fp#&(F2jr(RqySkZ4EaDZi6M0|BfIcq1u>S%O(G4GABYM~j$q<3L^da%p%kdP Y08C;xHItzjW(rpf&<-UAUIs1(0KA$d>;M1& diff --git a/EfiCompress/compress.c b/EfiCompress/compress.c index 98c2486..e21c1f6 100644 --- a/EfiCompress/compress.c +++ b/EfiCompress/compress.c @@ -1,9 +1,9 @@ -/*++ +/* -Copyright (c) 2005 - 2006, Intel Corporation +Copyright (c) 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at +which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: - Compress.c + compress.c Abstract: @@ -25,39 +25,40 @@ Module Name: #include "EfiShellLib.h" + // // Macro Definitions // -typedef INT32 NODE; -#define UINT8_MAX 0xff -#define UINT8_BIT 8 -#define THRESHOLD 3 -#define INIT_CRC 0 -#define WNDBIT 19 -#define WNDSIZ (1U << WNDBIT) -#define MAXMATCH 256 -#define BLKSIZ (1U << 14) // 16 * 1024U -#define PERC_FLAG 0x80000000U -#define CODE_BIT 16 -#define NIL 0 -#define MAX_HASH_VAL (3 * WNDSIZ + (WNDSIZ / 512 + 1) * UINT8_MAX) -#define HASH(p, c) ((p) + ((c) << (WNDBIT - 9)) + WNDSIZ * 2) -#define CRCPOLY 0xA001 -#define UPDATE_CRC(c) mCrc = mCrcTable[(mCrc ^ (c)) & 0xFF] ^ (mCrc >> UINT8_BIT) +typedef INT16 NODE; +#define UINT8_MAX 0xff +#define UINT8_BIT 8 +#define THRESHOLD 3 +#define INIT_CRC 0 +#define WNDBIT 13 +#define WNDSIZ (1U << WNDBIT) +#define MAXMATCH 256 +#define BLKSIZ (1U << 14) // 16 * 1024U +#define PERC_FLAG 0x8000U +#define CODE_BIT 16 +#define NIL 0 +#define MAX_HASH_VAL (3 * WNDSIZ + (WNDSIZ / 512 + 1) * UINT8_MAX) +#define HASH(p, c) ((p) + ((c) << (WNDBIT - 9)) + WNDSIZ * 2) +#define CRCPOLY 0xA001 +#define UPDATE_CRC(c) mCrc = mCrcTable[(mCrc ^ (c)) & 0xFF] ^ (mCrc >> UINT8_BIT) // // C: the Char&Len Set; P: the Position Set; T: the exTra Set // -#define NC (UINT8_MAX + MAXMATCH + 2 - THRESHOLD) -#define CBIT 9 -#define NP (WNDBIT + 1) -#define PBIT 5 -#define NT (CODE_BIT + 3) -#define TBIT 5 +#define NC (UINT8_MAX + MAXMATCH + 2 - THRESHOLD) +#define CBIT 9 +#define NP (WNDBIT + 1) +#define PBIT 4 +#define NT (CODE_BIT + 3) +#define TBIT 5 #if NT > NP -#define NPT NT + #define NPT NT #else -#define NPT NP + #define NPT NP #endif // // Function Prototypes @@ -260,8 +261,9 @@ STATIC INT32 mRemainder, mMatchLen, mBitCount, mHeapSize, mN; STATIC UINT32 mBufSiz = 0, mOutputPos, mOutputMask, mSubBitBuf, mCrc; STATIC UINT32 mCompSize, mOrigSize; -STATIC UINT16 *mFreq, *mSortPtr, mLenCnt[17], mLeft[2 * NC - 1], mRight[2 * NC - 1], mCrcTable[UINT8_MAX + 1], - mCFreq[2 * NC - 1], mCTable[4096], mCCode[NC], mPFreq[2 * NP - 1], mPTCode[NPT], mTFreq[2 * NT - 1]; +STATIC UINT16 *mFreq, *mSortPtr, mLenCnt[17], mLeft[2 * NC - 1], mRight[2 * NC - 1], + mCrcTable[UINT8_MAX + 1], mCFreq[2 * NC - 1], mCTable[4096], mCCode[NC], + mPFreq[2 * NP - 1], mPTCode[NPT], mTFreq[2 * NT - 1]; STATIC NODE mPos, mMatchPos, mAvail, *mPosition, *mParent, *mPrev, *mNext = NULL; @@ -691,7 +693,7 @@ Returns: (VOID) } if (t < WNDSIZ) { - mPosition[t] = (NODE) (mPos | (UINT32) PERC_FLAG); + mPosition[t] = (NODE) (mPos | PERC_FLAG); } } else { // @@ -719,7 +721,7 @@ Returns: (VOID) mMatchPos = r; } else { j = mLevel[r]; - mMatchPos = (NODE) (mPosition[r] & (UINT32)~PERC_FLAG); + mMatchPos = (NODE) (mPosition[r] & ~PERC_FLAG); } if (mMatchPos >= mPos) { @@ -817,7 +819,7 @@ Returns: (VOID) return ; } - t = (NODE) (mPosition[r] & (UINT32)~PERC_FLAG); + t = (NODE) (mPosition[r] & ~PERC_FLAG); if (t >= mPos) { t -= WNDSIZ; } @@ -825,8 +827,8 @@ Returns: (VOID) s = t; q = mParent[r]; u = mPosition[q]; - while (u & (UINT32) PERC_FLAG) { - u &= (UINT32)~PERC_FLAG; + while (u & PERC_FLAG) { + u &= ~PERC_FLAG; if (u >= mPos) { u -= WNDSIZ; } @@ -849,7 +851,7 @@ Returns: (VOID) s = u; } - mPosition[q] = (NODE) (s | WNDSIZ | (UINT32) PERC_FLAG); + mPosition[q] = (NODE) (s | WNDSIZ | PERC_FLAG); } s = Child (r, mText[t + mLevel[r]]); @@ -962,15 +964,14 @@ Arguments: (VOID) // Not enough benefits are gained by outputting a pointer, // so just output the original character // - CompressOutput (mText[mPos - 1], 0); + CompressOutput(mText[mPos - 1], 0); } else { // // Outputting a pointer is beneficial enough, do it. // - CompressOutput ( - LastMatchLen + (UINT8_MAX + 1 - THRESHOLD), - (mPos - LastMatchPos - 2) & (WNDSIZ - 1) - ); + + CompressOutput(LastMatchLen + (UINT8_MAX + 1 - THRESHOLD), + (mPos - LastMatchPos - 2) & (WNDSIZ - 1)); LastMatchLen--; while (LastMatchLen > 0) { GetNextMatch (); @@ -1189,7 +1190,7 @@ EncodeP ( PutBits (mPTLen[c], mPTCode[c]); if (c > 1) { - PutBits (c - 1, p & (0xFFFFFFFFU >> (32 - c + 1))); + PutBits(c - 1, p & (0xFFFFU >> (17 - c))); } } @@ -1216,8 +1217,6 @@ Routine Description: { UINT32 i; - UINT32 j; - UINT32 k; UINT32 Flags; @@ -1265,14 +1264,10 @@ Routine Description: } else { Flags <<= 1; } - if (Flags & (1U << (UINT8_BIT - 1))) { - EncodeC (mBuf[Pos++] + (1U << UINT8_BIT)); - k = mBuf[Pos++]; - for (j = 0; j < 3; j++) { - k <<= UINT8_BIT; - k += mBuf[Pos++]; - } + EncodeC(mBuf[Pos++] + (1U << UINT8_BIT)); + k = mBuf[Pos++] << UINT8_BIT; + k += mBuf[Pos++]; EncodeP (k); } else { @@ -1309,12 +1304,7 @@ Returns: (VOID) if ((mOutputMask >>= 1) == 0) { mOutputMask = 1U << (UINT8_BIT - 1); - // - // Check the buffer overflow per outputing UINT8_BIT symbols - // which is an Original Character or a Pointer. The biggest - // symbol is a Pointer which occupies 5 bytes. - // - if (mOutputPos >= mBufSiz - 5 * UINT8_BIT) { + if (mOutputPos >= mBufSiz - 3 * UINT8_BIT) { SendBlock (); mOutputPos = 0; } @@ -1322,21 +1312,17 @@ Returns: (VOID) CPos = mOutputPos++; mBuf[CPos] = 0; } - mBuf[mOutputPos++] = (UINT8) c; mCFreq[c]++; if (c >= (1U << UINT8_BIT)) { mBuf[CPos] |= mOutputMask; - mBuf[mOutputPos++] = (UINT8) (p >> 24); - mBuf[mOutputPos++] = (UINT8) (p >> 16); - mBuf[mOutputPos++] = (UINT8) (p >> (UINT8_BIT)); - mBuf[mOutputPos++] = (UINT8) p; - c = 0; + mBuf[mOutputPos++] = (UINT8)(p >> UINT8_BIT); + mBuf[mOutputPos++] = (UINT8) p; + c = 0; while (p) { p >>= 1; c++; } - mPFreq[c]++; } } @@ -1421,22 +1407,30 @@ Routine Description: --*/ { UINT8 Temp; - - while (n >= mBitCount) { - Temp = (UINT8) (mSubBitBuf | (x >> (n -= mBitCount))); - // - // n -= mBitCount should never equal to 32 - // + + if (n < mBitCount) { + mSubBitBuf |= x << (mBitCount -= n); + } else { + + Temp = (UINT8)(mSubBitBuf | (x >> (n -= mBitCount))); if (mDst < mDstUpperLimit) { *mDst++ = Temp; } - mCompSize++; - mSubBitBuf = 0; - mBitCount = UINT8_BIT; - } - mSubBitBuf |= x << (mBitCount -= n); + if (n < UINT8_BIT) { + mSubBitBuf = x << (mBitCount = UINT8_BIT - n); + } else { + + Temp = (UINT8)(x >> (n - UINT8_BIT)); + if (mDst < mDstUpperLimit) { + *mDst++ = Temp; + } + mCompSize++; + + mSubBitBuf = x << (mBitCount = 2 * UINT8_BIT - n); + } + } } STATIC diff --git a/EfiDecompress/Decompress.c b/EfiDecompress/Decompress.c index cfec1b9..918f673 100644 --- a/EfiDecompress/Decompress.c +++ b/EfiDecompress/Decompress.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005 - 2006, Intel Corporation +Copyright (c) 2005 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -31,7 +31,6 @@ extern UINT8 STRING_ARRAY_NAME[]; // #include STRING_DEFINES_FILE -#include EFI_PROTOCOL_DEFINITION (TianoDecompress) #include EFI_PROTOCOL_DEFINITION (decompress) EFI_HII_HANDLE HiiDecompressHandle; @@ -193,7 +192,7 @@ Routine Description: // // // - Status = LibLocateProtocol (&gEfiTianoDecompressProtocolGuid, &Decompress); + Status = LibLocateProtocol (&gEfiDecompressProtocolGuid, &Decompress); if (EFI_ERROR (Status)) { PrintToken (STRING_TOKEN (STR_DECOMPRESS_PROTOCOL_NOT_FOUND), HiiDecompressHandle, L"efidecompress"); Status = EFI_UNSUPPORTED; diff --git a/EfiDecompress/DecompressStrings.uni b/EfiDecompress/DecompressStrings.uni index 856211c008af93ac7c0220d7d30b801bfb48cd90..53e4cf6b7d555de9020dfd98370fa38fed5283fa 100644 GIT binary patch delta 334 zcmZ3ddrD`53$Fr$E`tJt5rY8`nr(Du=3wNUyiq`Vav8taSp9rpBx}mF?kc05|CEf%pq*TBn|SK8$%{T4nrzK9z!BS zE|6AW$Y)4nP?+2(Dk`b~l*?l%U?^oM0g9(VR8DRbuAIy#CMAhe_vH10vXdRe#JFOB Lx|JAs8Mqh#6h}*a delta 408 zcmX@5vrcz{%f=uk4n~E^hWw6`r*RZ;D=@&}W9m=@yx;y3*gN{6Po}wVdumqvB}GX6u{OtaEML* z!W%L96u%fN*ig8U0s=M6KoK~9k3h-9CLy@SB*8^s(-bG`2vtlj;*;5YL@0u3augGf zu`bYiAq*J|sX#i7A(J5o%qjtjBr=o$#qxmsRE88FtArsRNG36)PUaPpo}45)X>tS; ik0G-De1=k>ssb>H-Ly=GVvugV7@)aI47?0nL}38EgkfX= diff --git a/IpConfig/IpConfigStrings.uni b/IpConfig/IpConfigStrings.uni index 1d779c2ceae3bc1116ad8f3b030cbd72dbfd9b10..624340ec39e3e2532b3ca116728262938aacea8b 100644 GIT binary patch delta 255 zcmaFl^vP+03$Fr$E`tJt5rY8`nr(D$6kz6L;GFEpuRi&ifYD?#DTB!tf?kX$BAX3_ z+L$Kq5cxEDjp#AqD27yqB8GgRF-Z)G48=fR%H+jjhJp$VnGAVAehE-Ck0F^Mb+VyQ z<>Uua9Fx<;jhKOQlV^)dGbb{Xz{SlZ%)sLL66#R#kCWRZXH4dj5tzJ7L}#*{i~ws1 zLk2_YW^b9}jGN`8-Y`zqQc#%OBhE9~L{30F87K#`D;;ceI?!8S)sr3Nq$igs9NMfS OFUJT{yg5XHj}ZVDL`E|J delta 289 zcmez5^vG#~%f_GvfytBjlqO#gG@2|Vq%b*7&Data1, - Guid->Data2, - Guid->Data3, - Guid->Data4[0], - Guid->Data4[1], - Guid->Data4[2], - Guid->Data4[3], - Guid->Data4[4], - Guid->Data4[5], - Guid->Data4[6], - Guid->Data4[7] + (UINTN) Guid->Data1, + (UINTN) Guid->Data2, + (UINTN) Guid->Data3, + (UINTN) Guid->Data4[0], + (UINTN) Guid->Data4[1], + (UINTN) Guid->Data4[2], + (UINTN) Guid->Data4[3], + (UINTN) Guid->Data4[4], + (UINTN) Guid->Data4[5], + (UINTN) Guid->Data4[6], + (UINTN) Guid->Data4[7] ); StrLwr (Buffer); AppendCSDStr (MappingItem, Buffer); @@ -412,7 +412,7 @@ _DevPathSerialMacAddr ( } for (Index = 0, PBuffer = Buffer; Index < HwAddressSize; Index++, PBuffer += 2) { - SPrint (PBuffer, 0, L"%02x", MAC->MacAddress.Addr[Index]); + SPrint (PBuffer, 0, L"%02x", (UINTN) MAC->MacAddress.Addr[Index]); } AppendCSDStr (MappingItem, Buffer); @@ -434,7 +434,7 @@ _DevPathSerialInfiniBand ( InfiniBand = (INFINIBAND_DEVICE_PATH *) DevicePathNode; for (Index = 0, PBuffer = Buffer; Index < 16; Index++, PBuffer += 2) { - SPrint (PBuffer, 0, L"%02x", InfiniBand->PortGid[Index]); + SPrint (PBuffer, 0, L"%02x", (UINTN) InfiniBand->PortGid[Index]); } AppendCSDStr (MappingItem, Buffer); @@ -460,10 +460,10 @@ _DevPathSerialIPv4 ( Buffer, 0, L"%02x%02x%02x%02x", - IP->LocalIpAddress.Addr[0], - IP->LocalIpAddress.Addr[1], - IP->LocalIpAddress.Addr[2], - IP->LocalIpAddress.Addr[3] + (UINTN) IP->LocalIpAddress.Addr[0], + (UINTN) IP->LocalIpAddress.Addr[1], + (UINTN) IP->LocalIpAddress.Addr[2], + (UINTN) IP->LocalIpAddress.Addr[3] ); AppendCSDStr (MappingItem, Buffer); AppendCSDNum (MappingItem, IP->LocalPort); @@ -471,10 +471,10 @@ _DevPathSerialIPv4 ( Buffer, 0, L"%02x%02x%02x%02x", - IP->RemoteIpAddress.Addr[0], - IP->RemoteIpAddress.Addr[1], - IP->RemoteIpAddress.Addr[2], - IP->RemoteIpAddress.Addr[3] + (UINTN) IP->RemoteIpAddress.Addr[0], + (UINTN) IP->RemoteIpAddress.Addr[1], + (UINTN) IP->RemoteIpAddress.Addr[2], + (UINTN) IP->RemoteIpAddress.Addr[3] ); AppendCSDStr (MappingItem, Buffer); AppendCSDNum (MappingItem, IP->RemotePort); @@ -496,13 +496,13 @@ _DevPathSerialIPv6 ( IP = (IPv6_DEVICE_PATH *) DevicePathNode; for (Index = 0, PBuffer = Buffer; Index < 16; Index++, PBuffer += 2) { - SPrint (PBuffer, 0, L"%02x", IP->LocalIpAddress.Addr[Index]); + SPrint (PBuffer, 0, L"%02x", (UINTN) IP->LocalIpAddress.Addr[Index]); } AppendCSDStr (MappingItem, Buffer); AppendCSDNum (MappingItem, IP->LocalPort); for (Index = 0, PBuffer = Buffer; Index < 16; Index++, PBuffer += 2) { - SPrint (PBuffer, 0, L"%02x", IP->RemoteIpAddress.Addr[Index]); + SPrint (PBuffer, 0, L"%02x", (UINTN) IP->RemoteIpAddress.Addr[Index]); } AppendCSDStr (MappingItem, Buffer); @@ -1016,7 +1016,7 @@ ConsistMappingGenMappingName ( CatPrint (&Str, L"%s", mMTDName[Index].Name); } - CatPrint (&Str, L"%d", MappingInfo.HI); + CatPrint (&Str, L"%d", (UINTN) MappingInfo.HI); if (MappingInfo.CSD.str != NULL) { CatPrint (&Str, L"%s", MappingInfo.CSD.str); } diff --git a/Library/DPath.c b/Library/DPath.c index 0f0a56c..4a57bb6 100644 --- a/Library/DPath.c +++ b/Library/DPath.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005 - 2006, Intel Corporation +Copyright (c) 2005 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,6 +22,12 @@ Revision History #include "EfiShelllib.h" +EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid = DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL; + +#if (EFI_SPECIFICATION_VERSION >= 0x00020000) +EFI_GUID mEfiDevicePathMessagingSASGuid = DEVICE_PATH_MESSAGING_SAS; +#endif + EFI_DEVICE_PATH_PROTOCOL * DevicePathInstance ( IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, @@ -420,7 +426,7 @@ _DevPathPci ( ASSERT (DevPath != NULL); Pci = DevPath; - CatPrint (Str, L"Pci(%x|%x)", Pci->Device, Pci->Function); + CatPrint (Str, L"Pci(%x|%x)", (UINTN) Pci->Device, (UINTN) Pci->Function); } VOID @@ -435,7 +441,7 @@ _DevPathPccard ( ASSERT (DevPath != NULL); Pccard = DevPath; - CatPrint (Str, L"Pccard(Function%x)", Pccard->FunctionNumber); + CatPrint (Str, L"Pccard(Function%x)", (UINTN) Pccard->FunctionNumber); } VOID @@ -452,8 +458,8 @@ _DevPathMemMap ( MemMap = DevPath; CatPrint ( Str, - L"MemMap(%d:%.lx-%.lx)", - MemMap->MemoryType, + L"MemMap(%d:%lx-%lx)", + (UINTN) MemMap->MemoryType, MemMap->StartingAddress, MemMap->EndingAddress ); @@ -474,7 +480,7 @@ _DevPathController ( CatPrint ( Str, L"Ctrl(%d)", - Controller->Controller + (UINTN) Controller->Controller ); } @@ -484,9 +490,14 @@ _DevPathVendor ( IN VOID *DevPath ) { - VENDOR_DEVICE_PATH *Vendor; - CHAR16 *Type; - UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *UnknownDevPath; + VENDOR_DEVICE_PATH *Vendor; + CHAR16 *Type; + UINTN DataLength; + UINTN Index; + UINT32 FlowControlMap; +#if (EFI_SPECIFICATION_VERSION >= 0x00020000) + UINT16 Info; +#endif ASSERT (Str != NULL); ASSERT (DevPath != NULL); @@ -499,6 +510,74 @@ _DevPathVendor ( case MESSAGING_DEVICE_PATH: Type = L"Msg"; + if (CompareGuid (&Vendor->Guid, &gEfiPcAnsiGuid) == 0) { + CatPrint (Str, L"VenPcAnsi()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiVT100Guid) == 0) { + CatPrint (Str, L"VenVt100()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid) == 0) { + CatPrint (Str, L"VenVt100Plus()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid) == 0) { + CatPrint (Str, L"VenUft8()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &mEfiDevicePathMessagingUartFlowControlGuid) == 0) { + FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap); + switch (FlowControlMap & 0x00000003) { + case 0: + CatPrint (Str, L"UartFlowCtrl(%s)", L"None"); + break; + + case 1: + CatPrint (Str, L"UartFlowCtrl(%s)", L"Hardware"); + break; + + case 2: + CatPrint (Str, L"UartFlowCtrl(%s)", L"XonXoff"); + break; + + default: + break; + } + + return ; +#if (EFI_SPECIFICATION_VERSION >= 0x00020000) + } else if (CompareGuid (&Vendor->Guid, &mEfiDevicePathMessagingSASGuid) == 0) { + CatPrint ( + Str, + L"SAS(%lx,%lx,%x,", + ((SAS_DEVICE_PATH *) Vendor)->SasAddress, + ((SAS_DEVICE_PATH *) Vendor)->Lun, + ((SAS_DEVICE_PATH *) Vendor)->RelativeTargetPort + ); + Info = (((SAS_DEVICE_PATH *) Vendor)->DeviceTopology); + if ((Info & 0x0f) == 0) { + CatPrint (Str, L"NoTopology,0,0,0,"); + } else if (((Info & 0x0f) == 1) || ((Info & 0x0f) == 2)) { + CatPrint ( + Str, + L"%s,%s,%s,", + (Info & (0x1 << 4)) ? L"SATA" : L"SAS", + (Info & (0x1 << 5)) ? L"External" : L"Internal", + (Info & (0x1 << 6)) ? L"Expanded" : L"Direct" + ); + if ((Info & 0x0f) == 1) { + CatPrint (Str, L"0,"); + } else { + CatPrint (Str, L"%x,", (UINTN) ((Info >> 8) & 0xff)); + } + } else { + CatPrint (Str, L"0,0,0,0,"); + } + + CatPrint (Str, L"%x)", (UINTN) ((SAS_DEVICE_PATH *) Vendor)->Reserved); + return ; +#endif + } else if (CompareGuid (&Vendor->Guid, &gEfiDebugPortProtocolGuid) == 0) { + CatPrint (Str, L"DebugPort()"); + return ; + } break; case MEDIA_DEVICE_PATH: @@ -511,15 +590,14 @@ _DevPathVendor ( } CatPrint (Str, L"Ven%s(%g", Type, &Vendor->Guid); - if (CompareGuid (&Vendor->Guid, &UnknownDeviceGuid) == 0) { - // - // GUID used by EFI to enumerate an EDD 1.1 device - // - UnknownDevPath = (UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *) Vendor; - CatPrint (Str, L":%02x)", UnknownDevPath->LegacyDriveLetter); - } else { - CatPrint (Str, L")"); + DataLength = DevicePathNodeLength (&Vendor->Header) - sizeof (VENDOR_DEVICE_PATH); + if (DataLength > 0) { + CatPrint (Str, L","); + for (Index = 0; Index < DataLength; Index++) { + CatPrint (Str, L"%02x", (UINTN) ((VENDOR_DEVICE_PATH_WITH_DATA *) Vendor)->VendorDefinedData[Index]); + } } + CatPrint (Str, L")"); } VOID @@ -535,9 +613,9 @@ _DevPathAcpi ( Acpi = DevPath; if ((Acpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { - CatPrint (Str, L"Acpi(PNP%04x,%x)", EISA_ID_TO_NUM (Acpi->HID), Acpi->UID); + CatPrint (Str, L"Acpi(PNP%04x,%x)", (UINTN) EISA_ID_TO_NUM (Acpi->HID), (UINTN) Acpi->UID); } else { - CatPrint (Str, L"Acpi(%08x,%x)", Acpi->HID, Acpi->UID); + CatPrint (Str, L"Acpi(%08x,%x)", (UINTN) Acpi->HID, (UINTN) Acpi->UID); } } @@ -547,87 +625,78 @@ _DevPathExtendedAcpi ( IN VOID *DevPath ) { - ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi; + ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR *ExtendedAcpi; // - // Index for HID, UID and CID strings, 0 for non-exist + // HID, UID and CID strings // - UINT16 HIDSTRIdx; - UINT16 UIDSTRIdx; - UINT16 CIDSTRIdx; - UINT16 Index; - UINT16 Length; - UINT16 Anchor; - CHAR8 *AsChar8Array; + CHAR8 *HIDString; + CHAR8 *UIDString; + CHAR8 *CIDString; + ASSERT (Str != NULL); ASSERT (DevPath != NULL); + ASSERT (DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) DevPath) >= + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR)); - HIDSTRIdx = 0; - UIDSTRIdx = 0; - CIDSTRIdx = 0; - ExtendedAcpi = DevPath; - Length = DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) ExtendedAcpi); + ExtendedAcpi = (ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR *) DevPath; - ASSERT (Length >= 19); - AsChar8Array = (CHAR8 *) ExtendedAcpi; + HIDString = ExtendedAcpi->HidUidCidStr; + UIDString = NextStrA (HIDString); + CIDString = NextStrA (UIDString); - // - // find HIDSTR - // - Anchor = 16; - for (Index = Anchor; Index < Length && AsChar8Array[Index]; Index++) { - ; - } - if (Index > Anchor) { - HIDSTRIdx = Anchor; - } - // - // find UIDSTR - // - Anchor = Index + 1; - for (Index = Anchor; Index < Length && AsChar8Array[Index]; Index++) { - ; - } - if (Index > Anchor) { - UIDSTRIdx = Anchor; - } - // - // find CIDSTR - // - Anchor = Index + 1; - for (Index = Anchor; Index < Length && AsChar8Array[Index]; Index++) { - ; + CatPrint (Str, L"AcpiEx("); + if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { + CatPrint (Str, L"PNP%04x,", (UINTN) EISA_ID_TO_NUM (ExtendedAcpi->HID)); + } else { + CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->HID); } - if (Index > Anchor) { - CIDSTRIdx = Anchor; + if ((ExtendedAcpi->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { + CatPrint (Str, L"PNP%04x,", (UINTN) EISA_ID_TO_NUM (ExtendedAcpi->CID)); + } else { + CatPrint (Str, L"%08x,", (UINTN) ExtendedAcpi->CID); } - - CatPrint (Str, L"Acpi("); - if (HIDSTRIdx != 0) { - CatPrint (Str, L"%a,", AsChar8Array + HIDSTRIdx); + CatPrint (Str, L"%x,", (UINTN) ExtendedAcpi->UID); + + if (*HIDString != '\0') { + CatPrint (Str, L"%a,", HIDString); } else { - if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { - CatPrint (Str, L"PNP%04x,", EISA_ID_TO_NUM (ExtendedAcpi->HID)); - } else { - CatPrint (Str, L"%08x,", ExtendedAcpi->HID); - } + CatPrint (Str, L"NULL,"); } - if (CIDSTRIdx != 0) { - CatPrint (Str, L"%a,", AsChar8Array + CIDSTRIdx); + if (*CIDString != '\0') { + CatPrint (Str, L"%a,", CIDString); } else { - if ((ExtendedAcpi->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { - CatPrint (Str, L"PNP%04x,", EISA_ID_TO_NUM (ExtendedAcpi->CID)); - } else { - CatPrint (Str, L"%08x,", ExtendedAcpi->CID); - } + CatPrint (Str, L"NULL,"); } - if (UIDSTRIdx != 0) { - CatPrint (Str, L"%a)", AsChar8Array + UIDSTRIdx); + if (*UIDString != '\0') { + CatPrint (Str, L"%a)", UIDString); } else { - CatPrint (Str, L"%x)", ExtendedAcpi->UID); + CatPrint (Str, L"NULL)"); } } +VOID +_DevPathAdrAcpi ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath + ) +{ + ACPI_ADR_DEVICE_PATH *AcpiAdr; + UINT16 Index; + UINT16 Length; + UINT16 AdditionalAdrCount; + + AcpiAdr = DevPath; + Length = DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) AcpiAdr); + AdditionalAdrCount = (Length - 8) / 4; + + CatPrint (Str, L"AcpiAdr(%x", (UINTN) AcpiAdr->ADR); + for (Index = 0; Index < AdditionalAdrCount; Index++) { + CatPrint (Str, L",%x", (UINTN) *(UINT32 *) ((UINT8 *) AcpiAdr + 8 + Index * 4)); + } + CatPrint (Str, L")"); +} + VOID _DevPathAtapi ( IN OUT POOL_PRINT *Str, @@ -660,7 +729,7 @@ _DevPathScsi ( ASSERT (DevPath != NULL); Scsi = DevPath; - CatPrint (Str, L"Scsi(Pun%x,Lun%x)", Scsi->Pun, Scsi->Lun); + CatPrint (Str, L"Scsi(Pun%x,Lun%x)", (UINTN) Scsi->Pun, (UINTN) Scsi->Lun); } VOID @@ -705,9 +774,47 @@ _DevPathUsb ( ASSERT (DevPath != NULL); Usb = DevPath; - CatPrint (Str, L"Usb(%x, %x)", Usb->ParentPortNumber, Usb->InterfaceNumber); + CatPrint (Str, L"Usb(%x,%x)", (UINTN) Usb->ParentPortNumber, (UINTN) Usb->InterfaceNumber); } +#if (EFI_SPECIFICATION_VERSION >= 0x00020000) +void +_DevPathUsbWWID ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath + ) +{ + USB_WWID_DEVICE_PATH *UsbWWId; + + ASSERT (Str != NULL); + ASSERT (DevPath != NULL); + + UsbWWId = DevPath; + CatPrint ( + Str, + L"UsbWwid(%x,%x,%x,\"WWID\")", + (UINTN) UsbWWId->VendorId, + (UINTN) UsbWWId->ProductId, + (UINTN) UsbWWId->InterfaceNumber + ); +} + +void +_DevPathLogicalUnit ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath + ) +{ + DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicalUnit; + + ASSERT (Str != NULL); + ASSERT (DevPath != NULL); + + LogicalUnit = DevPath; + CatPrint (Str, L"Unit(%x)", (UINTN) LogicalUnit->Lun); +} +#endif + VOID _DevPathUsbClass ( IN OUT POOL_PRINT *Str, @@ -725,12 +832,12 @@ _DevPathUsbClass ( UsbClass = DevPath; CatPrint ( Str, - L"Usb Class(%x, %x, %x, %x, %x)", - UsbClass->VendorId, - UsbClass->ProductId, - UsbClass->DeviceClass, - UsbClass->DeviceSubClass, - UsbClass->DeviceProtocol + L"Usb Class(%x,%x,%x,%x,%x)", + (UINTN) UsbClass->VendorId, + (UINTN) UsbClass->ProductId, + (UINTN) UsbClass->DeviceClass, + (UINTN) UsbClass->DeviceSubClass, + (UINTN) UsbClass->DeviceProtocol ); } @@ -746,7 +853,7 @@ _DevPathI2O ( ASSERT (DevPath != NULL); I2O = DevPath; - CatPrint (Str, L"I2O(%x)", I2O->Tid); + CatPrint (Str, L"I2O(%x)", (UINTN) I2O->Tid); } VOID @@ -772,7 +879,7 @@ _DevPathMacAddr ( CatPrint (Str, L"Mac("); for (Index = 0; Index < HwAddressSize; Index++) { - CatPrint (Str, L"%02x", MAC->MacAddress.Addr[Index]); + CatPrint (Str, L"%02x", (UINTN) MAC->MacAddress.Addr[Index]); } CatPrint (Str, L")"); @@ -793,11 +900,11 @@ _DevPathIPv4 ( CatPrint ( Str, L"IPv4(%d.%d.%d.%d:%d)", - IP->RemoteIpAddress.Addr[0], - IP->RemoteIpAddress.Addr[1], - IP->RemoteIpAddress.Addr[2], - IP->RemoteIpAddress.Addr[3], - IP->RemotePort + (UINTN) IP->RemoteIpAddress.Addr[0], + (UINTN) IP->RemoteIpAddress.Addr[1], + (UINTN) IP->RemoteIpAddress.Addr[2], + (UINTN) IP->RemoteIpAddress.Addr[3], + (UINTN) IP->RemotePort ); } @@ -807,9 +914,31 @@ _DevPathIPv6 ( IN VOID *DevPath ) { + IPv6_DEVICE_PATH *IP; + ASSERT (Str != NULL); - CatPrint (Str, L"IP-v6(not-done)"); + IP = DevPath; + CatPrint ( + Str, + L"IPv6(%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x)", + (UINTN) IP->RemoteIpAddress.Addr[0], + (UINTN) IP->RemoteIpAddress.Addr[1], + (UINTN) IP->RemoteIpAddress.Addr[2], + (UINTN) IP->RemoteIpAddress.Addr[3], + (UINTN) IP->RemoteIpAddress.Addr[4], + (UINTN) IP->RemoteIpAddress.Addr[5], + (UINTN) IP->RemoteIpAddress.Addr[6], + (UINTN) IP->RemoteIpAddress.Addr[7], + (UINTN) IP->RemoteIpAddress.Addr[8], + (UINTN) IP->RemoteIpAddress.Addr[9], + (UINTN) IP->RemoteIpAddress.Addr[10], + (UINTN) IP->RemoteIpAddress.Addr[11], + (UINTN) IP->RemoteIpAddress.Addr[12], + (UINTN) IP->RemoteIpAddress.Addr[13], + (UINTN) IP->RemoteIpAddress.Addr[14], + (UINTN) IP->RemoteIpAddress.Addr[15] + ); } VOID @@ -818,9 +947,20 @@ _DevPathInfiniBand ( IN VOID *DevPath ) { + INFINIBAND_DEVICE_PATH *InfiniBand; + ASSERT (Str != NULL); - CatPrint (Str, L"InfiniBand(not-done)"); + InfiniBand = DevPath; + CatPrint ( + Str, + L"Infiniband(%x,%g,%lx,%lx,%lx)", + (UINTN) InfiniBand->ResourceFlags, + InfiniBand->PortGid, + InfiniBand->ServiceId, + InfiniBand->TargetPortId, + InfiniBand->DeviceId + ); } VOID @@ -867,15 +1007,15 @@ _DevPathUart ( } if (Uart->BaudRate == 0) { - CatPrint (Str, L"Uart(DEFAULT %c", Parity); + CatPrint (Str, L"Uart(DEFAULT,%c,", Parity); } else { - CatPrint (Str, L"Uart(%ld %c", Uart->BaudRate, Parity); + CatPrint (Str, L"Uart(%ld,%c,", Uart->BaudRate, Parity); } if (Uart->DataBits == 0) { - CatPrint (Str, L"D"); + CatPrint (Str, L"D,"); } else { - CatPrint (Str, L"%d", Uart->DataBits); + CatPrint (Str, L"%d,", (UINTN) Uart->DataBits); } switch (Uart->StopBits) { @@ -901,6 +1041,44 @@ _DevPathUart ( } } +#if (EFI_SPECIFICATION_VERSION >= 0x00020000) +VOID +_DevPathiSCSI ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath + ) +{ + ISCSI_DEVICE_PATH_WITH_NAME *iSCSI; + UINT16 Options; + + ASSERT (Str != NULL); + ASSERT (DevPath != NULL); + + iSCSI = DevPath; + CatPrint ( + Str, + L"iSCSI(%s,%x,%lx,", + iSCSI->iSCSITargetName, + (UINTN) iSCSI->TargetPortalGroupTag, + iSCSI->Lun + ); + + Options = iSCSI->LoginOption; + CatPrint (Str, L"%s,", ((Options >> 1) & 0x0001) ? L"CRC32C" : L"None"); + CatPrint (Str, L"%s,", ((Options >> 3) & 0x0001) ? L"CRC32C" : L"None"); + if ((Options >> 11) & 0x0001) { + CatPrint (Str, L"%s,", L"None"); + } else if ((Options >> 12) & 0x0001) { + CatPrint (Str, L"%s,", L"CHAP_UNI"); + } else { + CatPrint (Str, L"%s,", L"CHAP_BI"); + + } + + CatPrint (Str, L"%s)", (iSCSI->NetworkProtocol == 0) ? L"TCP" : L"reserved"); +} +#endif + VOID _DevPathHardDrive ( IN OUT POOL_PRINT *Str, @@ -918,8 +1096,8 @@ _DevPathHardDrive ( CatPrint ( Str, L"HD(Part%d,Sig%08x)", - Hd->PartitionNumber, - *((UINT32 *) (&(Hd->Signature[0]))) + (UINTN) Hd->PartitionNumber, + (UINTN) *((UINT32 *) (&(Hd->Signature[0]))) ); break; @@ -927,7 +1105,7 @@ _DevPathHardDrive ( CatPrint ( Str, L"HD(Part%d,Sig%g)", - Hd->PartitionNumber, + (UINTN) Hd->PartitionNumber, (EFI_GUID *) &(Hd->Signature[0]) ); break; @@ -936,9 +1114,9 @@ _DevPathHardDrive ( CatPrint ( Str, L"HD(Part%d,MBRType=%02x,SigType=%02x)", - Hd->PartitionNumber, - Hd->MBRType, - Hd->SignatureType + (UINTN) Hd->PartitionNumber, + (UINTN) Hd->MBRType, + (UINTN) Hd->SignatureType ); break; } @@ -956,7 +1134,7 @@ _DevPathCDROM ( ASSERT (DevPath != NULL); Cd = DevPath; - CatPrint (Str, L"CDROM(Entry%x)", Cd->BootEntry); + CatPrint (Str, L"CDROM(Entry%x)", (UINTN) Cd->BootEntry); } VOID @@ -1106,6 +1284,9 @@ DevPathTable[] = { ACPI_DEVICE_PATH, ACPI_EXTENDED_DP, _DevPathExtendedAcpi, + ACPI_DEVICE_PATH, + ACPI_ADR_DP, + _DevPathAdrAcpi, MESSAGING_DEVICE_PATH, MSG_ATAPI_DP, _DevPathAtapi, @@ -1121,6 +1302,14 @@ DevPathTable[] = { MESSAGING_DEVICE_PATH, MSG_USB_DP, _DevPathUsb, +#if (EFI_SPECIFICATION_VERSION >= 0x00020000) + MESSAGING_DEVICE_PATH, + MSG_USB_WWID_DP, + _DevPathUsbWWID, + MESSAGING_DEVICE_PATH, + MSG_DEVICE_LOGICAL_UNIT_DP, + _DevPathLogicalUnit, +#endif MESSAGING_DEVICE_PATH, MSG_USB_CLASS_DP, _DevPathUsbClass, @@ -1145,6 +1334,11 @@ DevPathTable[] = { MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, _DevPathVendor, +#if (EFI_SPECIFICATION_VERSION >= 0x00020000) + MESSAGING_DEVICE_PATH, + MSG_ISCSI_DP, + _DevPathiSCSI, +#endif MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP, _DevPathHardDrive, @@ -1732,13 +1926,11 @@ Routine Description: --*/ { #if (EFI_SPECIFICATION_VERSION < 0x00020000) - BOOLEAN Found; // // Use old Device Path that conflicts with UEFI // - if (DevicePathType (&FvDevicePathNode->Header) == MEDIA_DEVICE_PATH || + if (DevicePathType (&FvDevicePathNode->Header) == MEDIA_DEVICE_PATH && DevicePathSubType (&FvDevicePathNode->Header) == MEDIA_FV_FILEPATH_DP) { - Found = TRUE; return &FvDevicePathNode->NameGuid; } @@ -1746,8 +1938,8 @@ Routine Description: // // Use the new Device path that does not conflict with the UEFI // - if (FvDevicePathNode->Piwg.Header.Type == MEDIA_DEVICE_PATH || - FvDevicePathNode->Piwg.Header.SubType == MEDIA_VENDOR_DP) { + if (DevicePathType (&FvDevicePathNode->Piwg.Header) == MEDIA_DEVICE_PATH && + DevicePathSubType (&FvDevicePathNode->Piwg.Header) == MEDIA_VENDOR_DP) { if (CompareMem (&gEfiFrameworkDevicePathGuid, &FvDevicePathNode->Piwg.PiwgSpecificDevicePath, sizeof(EFI_GUID)) == 0) { if (FvDevicePathNode->Piwg.Type == PIWG_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE) { return &FvDevicePathNode->NameGuid; diff --git a/Library/DPath.h b/Library/DPath.h index 665c331..3bc5173 100644 --- a/Library/DPath.h +++ b/Library/DPath.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005 - 2006, Intel Corporation +Copyright (c) 2005 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -23,6 +23,43 @@ Revision History --*/ #ifndef _D_PATH_H #define _D_PATH_H + +#define NextStrA(a) ((UINT8 *) (((UINT8 *) (a)) + strlena (a) + 1)) + +#include EFI_GUID_DEFINITION (PcAnsi) + +extern EFI_GUID mEfiDevicePathMessagingUartFlowControlGuid; + +typedef struct { + EFI_DEVICE_PATH_PROTOCOL Header; + UINT32 HID; + UINT32 UID; + UINT32 CID; + CHAR8 HidUidCidStr[3]; +} ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR; + +typedef struct { + EFI_DEVICE_PATH_PROTOCOL Header; + EFI_GUID Guid; + UINT8 VendorDefinedData[1]; +} VENDOR_DEVICE_PATH_WITH_DATA; + +#if (EFI_SPECIFICATION_VERSION >= 0x00020000) + +extern EFI_GUID mEfiDevicePathMessagingSASGuid; + +typedef struct { + EFI_DEVICE_PATH_PROTOCOL Header; + UINT16 NetworkProtocol; + UINT16 LoginOption; + UINT16 Reserved; + UINT16 TargetPortalGroupTag; + UINT64 Lun; + CHAR16 iSCSITargetName[1]; +} ISCSI_DEVICE_PATH_WITH_NAME; + +#endif + EFI_DEVICE_PATH_PROTOCOL * DevicePathFromHandle ( IN EFI_HANDLE Handle @@ -120,4 +157,4 @@ GetNameGuidFromFwVolDevicePathNode ( IN MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode ); -#endif \ No newline at end of file +#endif diff --git a/Library/Data.c b/Library/Data.c index 6993f67..d2ffe4a 100644 --- a/Library/Data.c +++ b/Library/Data.c @@ -78,5 +78,3 @@ EFI_DEVICE_PATH_PROTOCOL LibEndDevicePath[] = { // EFI_GUID NullGuid = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; EFI_GUID UnknownDeviceGuid = UNKNOWN_DEVICE_GUID; -EFI_GUID gEfiMpsTableGuid = EFI_MPS_TABLE_GUID; - diff --git a/Library/EfiShellLib.h b/Library/EfiShellLib.h index cd3679e..e3ca523 100644 --- a/Library/EfiShellLib.h +++ b/Library/EfiShellLib.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005 - 2006, Intel Corporation +Copyright (c) 2005 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -44,6 +44,7 @@ Revision History #include EFI_GUID_DEFINITION (ConsoleOutDevice) #include EFI_GUID_DEFINITION (DxeServices) #include EFI_GUID_DEFINITION (GlobalVariable) +#include EFI_GUID_DEFINITION (GenericVariable) #include EFI_GUID_DEFINITION (Gpt) #include EFI_GUID_DEFINITION (Mps) #include EFI_GUID_DEFINITION (PrimaryConsoleInDevice) @@ -56,6 +57,7 @@ Revision History #include EFI_PROTOCOL_DEFINITION (BlockIo) #include EFI_PROTOCOL_DEFINITION (BusSpecificDriverOverride) #include EFI_PROTOCOL_DEFINITION (ComponentName) +#include EFI_PROTOCOL_DEFINITION (ConsoleControl) #include EFI_PROTOCOL_DEFINITION (CpuIo) #include EFI_PROTOCOL_DEFINITION (DataHub) #include EFI_PROTOCOL_DEFINITION (DebugPort) @@ -105,6 +107,17 @@ Revision History #include EFI_PROTOCOL_DEFINITION (UsbHostController) #include EFI_PROTOCOL_DEFINITION (UsbIo) #include EFI_PROTOCOL_DEFINITION (VariableStore) +#include EFI_PROTOCOL_DEFINITION (UsbHostController) +#include EFI_PROTOCOL_DEFINITION (ScsiPassThruExt) +#include EFI_PROTOCOL_DEFINITION (ManagedNetwork) +#include EFI_PROTOCOL_DEFINITION (Arp) +#include EFI_PROTOCOL_DEFINITION (Dhcp4) +#include EFI_PROTOCOL_DEFINITION (Tcp4) +#include EFI_PROTOCOL_DEFINITION (Ip4) +#include EFI_PROTOCOL_DEFINITION (Ip4Config) +#include EFI_PROTOCOL_DEFINITION (Udp4) +#include EFI_PROTOCOL_DEFINITION (Mtftp4) +#include EFI_PROTOCOL_DEFINITION (DevicePath) #include "efilibplat.h" #include "efipart.h" diff --git a/Library/EfiShellLib.inf b/Library/EfiShellLib.inf index 1407b44..ee07ec8 100644 --- a/Library/EfiShellLib.inf +++ b/Library/EfiShellLib.inf @@ -1,6 +1,6 @@ #/*++ # -# Copyright (c) 2005, Intel Corporation +# Copyright (c) 2005 - 2006, Intel Corporation # All rights reserved. This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -40,7 +40,6 @@ COMPONENT_TYPE = LIBRARY ConsistMapping.c CRC.c Event.c - Lock.c Perf.c VarCheck.c @@ -79,6 +78,6 @@ COMPONENT_TYPE = LIBRARY EdkProtocolLib EfiProtocolLib EfiGuidLib + EdkGuidLib [nmake.common] - C_STD_INCLUDE= diff --git a/Library/Event.c b/Library/Event.c index bdf348b..4929e4b 100644 --- a/Library/Event.c +++ b/Library/Event.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005, Intel Corporation +Copyright (c) 2005 - 2006, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -29,7 +29,7 @@ LibCreateProtocolNotifyEvent ( IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN VOID *NotifyContext, - OUT VOID *Registration + OUT VOID **Registration ) /*++ diff --git a/Library/Event.h b/Library/Event.h index 4550deb..b8df801 100644 --- a/Library/Event.h +++ b/Library/Event.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005, Intel Corporation +Copyright (c) 2005 - 2006, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -30,7 +30,7 @@ LibCreateProtocolNotifyEvent ( IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN VOID *NotifyContext, - OUT VOID *Registration + OUT VOID **Registration ); EFI_STATUS diff --git a/Library/Misc.c b/Library/Misc.c index db35428..ac06e3c 100644 --- a/Library/Misc.c +++ b/Library/Misc.c @@ -95,50 +95,6 @@ KnownGuids[] = { NULL }; -struct { - EFI_STATUS Status; - CHAR16 *Message; -} -StatusMsgs[] = { - EFI_SUCCESS, L"Success", - EFI_LOAD_ERROR, L"Load Error", - EFI_INVALID_PARAMETER, L"Invalid Parameter", - EFI_UNSUPPORTED, L"Unsupported", - EFI_BAD_BUFFER_SIZE, L"Bad Buffer Size", - EFI_BUFFER_TOO_SMALL, L"Buffer Too Small", - EFI_NOT_READY, L"Not Ready", - EFI_DEVICE_ERROR, L"Device Error", - EFI_WRITE_PROTECTED, L"Write Protected", - EFI_OUT_OF_RESOURCES, L"Out of Resources", - EFI_VOLUME_CORRUPTED, L"Volume Corrupted", - EFI_VOLUME_FULL, L"Volume Full", - EFI_NO_MEDIA, L"No Media", - EFI_MEDIA_CHANGED, L"Media Changed", - EFI_NOT_FOUND, L"Not Found", - EFI_ACCESS_DENIED, L"Access Denied", - EFI_NO_RESPONSE, L"No Response", - EFI_NO_MAPPING, L"No Mapping", - EFI_TIMEOUT, L"Time Out", - EFI_NOT_STARTED, L"Not Started", - EFI_ALREADY_STARTED, L"Already Started", - EFI_ABORTED, L"Aborted", - EFI_ICMP_ERROR, L"ICMP Error", - EFI_TFTP_ERROR, L"TFTP Error", - EFI_PROTOCOL_ERROR, L"Protocol Error", - EFI_WARN_UNKNOWN_GLYPH, L"Warning Unknown Glyph", - EFI_WARN_DELETE_FAILURE, L"Warning Delete Failure", - EFI_WARN_WRITE_FAILURE, L"Warning Write Failure", - EFI_WARN_BUFFER_TOO_SMALL, L"Warning Buffer Too Small", - EFI_INCOMPATIBLE_VERSION, L"Incompatible Version", - EFI_SECURITY_VIOLATION, L"Security Violation", - EFI_CRC_ERROR, L"CRC Error", - EFI_NOT_AVAILABLE_YET, L"Not Available Yet", - EFI_UNLOAD_IMAGE, L"Unload Image", - EFI_WARN_RETURN_FROM_LONG_JUMP, L"Warning Return From Long Jump", - 0, NULL -}; - - STATIC CHAR8 Hex[] = { '0', '1', @@ -418,17 +374,17 @@ Routine Description: Buffer, 0, L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", - Guid->Data1, - Guid->Data2, - Guid->Data3, - Guid->Data4[0], - Guid->Data4[1], - Guid->Data4[2], - Guid->Data4[3], - Guid->Data4[4], - Guid->Data4[5], - Guid->Data4[6], - Guid->Data4[7] + (UINTN) Guid->Data1, + (UINTN) Guid->Data2, + (UINTN) Guid->Data3, + (UINTN) Guid->Data4[0], + (UINTN) Guid->Data4[1], + (UINTN) Guid->Data4[2], + (UINTN) Guid->Data4[3], + (UINTN) Guid->Data4[4], + (UINTN) Guid->Data4[5], + (UINTN) Guid->Data4[6], + (UINTN) Guid->Data4[7] ); } @@ -460,21 +416,60 @@ Routine Description: --*/ { - UINTN Index; + CHAR16 *Message; ASSERT (Buffer != NULL); - for (Index = 0; StatusMsgs[Index].Message != NULL; Index++) { - if (StatusMsgs[Index].Status == Status) { - StrCpy (Buffer, StatusMsgs[Index].Message); - return; - } - } + Message = NULL; + + // + // Can't use global Status String Array as UINTN is not constant for EBC + // + if (Status == EFI_SUCCESS) { Message = L"Success"; } else + if (Status == EFI_LOAD_ERROR) { Message = L"Load Error"; } else + if (Status == EFI_INVALID_PARAMETER) { Message = L"Invalid Parameter"; } else + if (Status == EFI_UNSUPPORTED) { Message = L"Unsupported"; } else + if (Status == EFI_BAD_BUFFER_SIZE) { Message = L"Bad Buffer Size"; } else + if (Status == EFI_BUFFER_TOO_SMALL) { Message = L"Buffer Too Small"; } else + if (Status == EFI_NOT_READY) { Message = L"Not Ready"; } else + if (Status == EFI_DEVICE_ERROR) { Message = L"Device Error"; } else + if (Status == EFI_WRITE_PROTECTED) { Message = L"Write Protected"; } else + if (Status == EFI_OUT_OF_RESOURCES) { Message = L"Out of Resources"; } else + if (Status == EFI_VOLUME_CORRUPTED) { Message = L"Volume Corrupted"; } else + if (Status == EFI_VOLUME_FULL) { Message = L"Volume Full"; } else + if (Status == EFI_NO_MEDIA) { Message = L"No Media"; } else + if (Status == EFI_MEDIA_CHANGED) { Message = L"Media Changed"; } else + if (Status == EFI_NOT_FOUND) { Message = L"Not Found"; } else + if (Status == EFI_ACCESS_DENIED) { Message = L"Access Denied"; } else + if (Status == EFI_NO_RESPONSE) { Message = L"No Response"; } else + if (Status == EFI_NO_MAPPING) { Message = L"No Mapping"; } else + if (Status == EFI_TIMEOUT) { Message = L"Time Out"; } else + if (Status == EFI_NOT_STARTED) { Message = L"Not Started"; } else + if (Status == EFI_ALREADY_STARTED) { Message = L"Already Started"; } else + if (Status == EFI_ABORTED) { Message = L"Aborted"; } else + if (Status == EFI_ICMP_ERROR) { Message = L"ICMP Error"; } else + if (Status == EFI_TFTP_ERROR) { Message = L"TFTP Error"; } else + if (Status == EFI_PROTOCOL_ERROR) { Message = L"Protocol Error"; } else + if (Status == EFI_WARN_UNKNOWN_GLYPH) { Message = L"Warning Unknown Glyph"; } else + if (Status == EFI_WARN_DELETE_FAILURE) { Message = L"Warning Delete Failure"; } else + if (Status == EFI_WARN_WRITE_FAILURE) { Message = L"Warning Write Failure"; } else + if (Status == EFI_WARN_BUFFER_TOO_SMALL) { Message = L"Warning Buffer Too Small"; } else + if (Status == EFI_INCOMPATIBLE_VERSION) { Message = L"Incompatible Version"; } else + if (Status == EFI_SECURITY_VIOLATION) { Message = L"Security Violation"; } else + if (Status == EFI_CRC_ERROR) { Message = L"CRC Error"; } else + if (Status == EFI_NOT_AVAILABLE_YET) { Message = L"Not Available Yet"; } else + if (Status == EFI_UNLOAD_IMAGE) { Message = L"Unload Image"; } else + if (Status == EFI_WARN_RETURN_FROM_LONG_JUMP) { Message = L"Warning Return From Long Jump"; } + // // If we found a match, then copy it to the user's buffer. // Otherwise SPrint the hex value into their buffer. // - SPrint (Buffer, 0, L"%X", Status); + if (Message != NULL) { + StrCpy (Buffer, Message); + } else { + SPrint (Buffer, 0, L"%X", Status); + } } EFI_STATUS @@ -1573,11 +1568,11 @@ TimeToString ( Buffer, 0, L"%02d/%02d/%02d %02d:%02d%c", - Time->Month, - Time->Day, - Year, - Hour, - Time->Minute, + (UINTN) Time->Month, + (UINTN) Time->Day, + (UINTN) Year, + (UINTN) Hour, + (UINTN) Time->Minute, AmPm ); } @@ -1681,3 +1676,155 @@ Routine Description: return FALSE; } +UINT16 * +LibGetMachineTypeString ( + IN UINT16 MachineType + ) +/*++ + +Routine Description: + + Get Machine Type string according to Machine Type code + +Arguments: + MachineType - The Machine Type code + +Returns: + The Machine Type String + +--*/ +{ + switch (MachineType) { + case EFI_IMAGE_MACHINE_EBC: + return L"EBC"; + case EFI_IMAGE_MACHINE_IA32: + return L"IA32"; + case EFI_IMAGE_MACHINE_X64: + return L"X64"; + case EFI_IMAGE_MACHINE_IA64: + return L"IA64"; + default: + return L"UNKNOWN"; + } +} + +EFI_STATUS +LibGetImageHeader ( + IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, + OUT EFI_IMAGE_DOS_HEADER *DosHeader, + OUT EFI_IMAGE_FILE_HEADER *ImageHeader, + OUT EFI_IMAGE_OPTIONAL_HEADER *OptionalHeader + ) +/*++ + +Routine Description: + + Get the headers (dos, image, optional header) from an image + +Arguments: + DevicePath - Location where the file locates + DosHeader - Pointer to dos header + ImageHeader - Pointer to image header + OptionalHeader - Pointer to optional header + +Returns: + EFI_SUCCESS - Successfully get the machine type. + EFI_NOT_FOUND - The file is not found. + EFI_LOAD_ERROR - File is not a valid image file. + +--*/ +{ + EFI_STATUS Status; + EFI_FILE_HANDLE ThisFile; + UINT32 Signature; + UINTN BufferSize; + UINT64 FileSize; + + Status = EFI_SUCCESS; + + ThisFile = LibOpenFilePath (DevicePath, EFI_FILE_MODE_READ); + if (ThisFile == NULL) { + Status = EFI_NOT_FOUND; + goto Done; + } + + // + // Get the file size + // + Status = LibGetFileSize (ThisFile, &FileSize); + if (EFI_ERROR (Status)) { + Status = EFI_LOAD_ERROR; + goto Done; + } + + // + // Read dos header + // + BufferSize = sizeof (EFI_IMAGE_DOS_HEADER); + Status = LibReadFile (ThisFile, &BufferSize, DosHeader); + if (EFI_ERROR (Status) || + BufferSize < sizeof (EFI_IMAGE_DOS_HEADER) || + FileSize <= DosHeader->e_lfanew || + DosHeader->e_magic != EFI_IMAGE_DOS_SIGNATURE) { + Status = EFI_LOAD_ERROR; + goto Done; + } + + // + // Move to PE signature + // + Status = LibSetPosition (ThisFile, DosHeader->e_lfanew); + if (EFI_ERROR (Status)) { + Status = EFI_LOAD_ERROR; + goto Done; + } + + // + // Read and check PE signature + // + BufferSize = sizeof (Signature); + Status = LibReadFile (ThisFile, &BufferSize, &Signature); + if (EFI_ERROR (Status) || + BufferSize < sizeof (Signature) || + Signature != EFI_IMAGE_NT_SIGNATURE) { + Status = EFI_LOAD_ERROR; + goto Done; + } + + // + // Read image header + // + BufferSize = EFI_IMAGE_SIZEOF_FILE_HEADER; + Status = LibReadFile (ThisFile, &BufferSize, ImageHeader); + if (EFI_ERROR (Status) || + BufferSize < EFI_IMAGE_SIZEOF_FILE_HEADER) { + Status = EFI_LOAD_ERROR; + goto Done; + } + + // + // Read optional header + // + BufferSize = ImageHeader->SizeOfOptionalHeader; + Status = LibReadFile (ThisFile, &BufferSize, OptionalHeader); + if (EFI_ERROR (Status) || + BufferSize < ImageHeader->SizeOfOptionalHeader) { + Status = EFI_LOAD_ERROR; + goto Done; + } + + // + // Check PE32 or PE32+ magic + // + if (OptionalHeader->Magic != EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC && + OptionalHeader->Magic != EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) { + Status = EFI_LOAD_ERROR; + goto Done; + } + + Done: + if (ThisFile != NULL) { + LibCloseFile (ThisFile); + } + return Status; +} diff --git a/Library/Misc.h b/Library/Misc.h index 21c162a..7098222 100644 --- a/Library/Misc.h +++ b/Library/Misc.h @@ -240,4 +240,17 @@ PrivateDumpHex ( IN VOID *UserData ); -#endif \ No newline at end of file +UINT16 * +LibGetMachineTypeString ( + IN UINT16 MachineType + ); + +EFI_STATUS +LibGetImageHeader ( + IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, + OUT EFI_IMAGE_DOS_HEADER *DosHeader, + OUT EFI_IMAGE_FILE_HEADER *ImageHeader, + OUT EFI_IMAGE_OPTIONAL_HEADER *OptionalHeader + ); + +#endif diff --git a/Library/ShellDebug.c b/Library/ShellDebug.c index 8a4c9b0..b31ef06 100644 --- a/Library/ShellDebug.c +++ b/Library/ShellDebug.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005, Intel Corporation +Copyright (c) 2005 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -126,7 +126,7 @@ Routine Description: UINTN NewEFIDebug; DataSize = sizeof (EFIDebug); - Status = RT->GetVariable (L"EFIDebug", &gEfiGlobalVariableGuid, &Attributes, &DataSize, &NewEFIDebug); + Status = RT->GetVariable (L"EFIDebug", &gEfiGenericVariableGuid, &Attributes, &DataSize, &NewEFIDebug); if (!EFI_ERROR (Status)) { EFIDebug = NewEFIDebug; } diff --git a/Library/ShellDebug.h b/Library/ShellDebug.h index 7965e91..039197e 100644 --- a/Library/ShellDebug.h +++ b/Library/ShellDebug.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005, Intel Corporation +Copyright (c) 2005 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -34,7 +34,7 @@ extern UINTN EFIDebug; #define DEBUG(a) DbgPrint a #define UPDATE_DEBUG_MASK() { \ VOID *p; \ - p = LibGetVariable (L"EFIDebug", &gEfiGlobalVariableGuid); \ + p = LibGetVariable (L"EFIDebug", &gEfiGenericVariableGuid); \ if (NULL == p) { \ EFIDebug = EFI_D_ERROR; \ } else { \ diff --git a/Library/Str.c b/Library/Str.c index e84b3ef..c6d0d9b 100644 --- a/Library/Str.c +++ b/Library/Str.c @@ -333,7 +333,7 @@ StrStr ( i = Failure[i]; } - if (Pat[i] == Pat[i + 1]) { + if (Pat[j] == Pat[i + 1]) { Failure[j] = i + 1; } else { Failure[j] = -1; diff --git a/LoadPciRom/LoadPciRom.inf b/LoadPciRom/LoadPciRom.inf index 76d00f4..2449462 100644 --- a/LoadPciRom/LoadPciRom.inf +++ b/LoadPciRom/LoadPciRom.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeLoadPciRom C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/LoadPciRom/LoadPciRomStrings.uni b/LoadPciRom/LoadPciRomStrings.uni index 222b9d64deafa0cc3984fdc49bedd5503d522aa0..9ce7deb655e9fb1c66d2f88dcab7d93ff54a0222 100644 GIT binary patch delta 395 zcmbQFe@l0Q3$Fr$E`tJt5rY8`nr(F6&(6xp0ECkp`5hZ_EF@kFPZgY}I$4W%4%`eLz79D18s91?`#4l}puk0_i0$MA!AX-p zaVSmRBcwOkPH2Z=2}1@$D$v!%3u#oSP}pL delta 407 zcmcbmJ4t_n%f_I6?3@Y=P&j!bm*eCxjzwr9cAQO&3P8Ey$!1(tVAf4;xE=(M^TLoq9<8MQ=ze`{OSk88Gl;EVv z^Mqt3Kj37UEFkoRwTK~~A$Kyru;}DZ%sG>9i12`E9+5Z{zLyx+zqv@}2+L#( G#U22=(Gn>D delta 42 wcmX@%e8hQz%f_Hh!i)-=nMH20F)B>HEp-=2ZkOH(6v~%5%fgsA*;=s|09l9+OaK4? diff --git a/Shell.inf b/Shell.inf index b46b345..00df0a3 100644 --- a/Shell.inf +++ b/Shell.inf @@ -1,6 +1,6 @@ #/*++ # -# Copyright (c) 2005, Intel Corporation +# Copyright (c) 2005 - 2007, Intel Corporation # All rights reserved. This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -41,7 +41,6 @@ COMPONENT_TYPE = APPLICATION Library\ConsistMapping.c Library\CRC.c Library\Event.c - Library\Lock.c Library\Perf.c Library\VarCheck.c @@ -176,6 +175,7 @@ COMPONENT_TYPE = APPLICATION Library\ipf\salpal.c [sources.EBC] + ver\ebc\verEbc.c Library\EBC\math.c Library\EBC\initplat.c @@ -197,28 +197,6 @@ COMPONENT_TYPE = APPLICATION $(EDK_SOURCE)\Foundation\FrameWork $(EDK_SOURCE)\Foundation\FrameWork\Include $(EDK_SOURCE)\Foundation\Core\Dxe - - $(DEST_DIR)\newshell - $(DEST_DIR)\lib - $(DEST_DIR)\shellenv - $(DEST_DIR)\attrib - $(DEST_DIR)\cp - $(DEST_DIR)\copy - $(DEST_DIR)\date - $(DEST_DIR)\Load - $(DEST_DIR)\ls - $(DEST_DIR)\dir - $(DEST_DIR)\mkdir - $(DEST_DIR)\mv - $(DEST_DIR)\reset - $(DEST_DIR)\rm - $(DEST_DIR)\del - $(DEST_DIR)\type - $(DEST_DIR)\time - $(DEST_DIR)\touch - $(DEST_DIR)\vol - $(DEST_DIR)\lang - $(DEST_DIR)\ver $(DEST_DIR) [libraries.common] @@ -243,5 +221,11 @@ COMPONENT_TYPE = APPLICATION C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" +[nmake.ebc] + EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DEFI_MONOSHELL + EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings + EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" + + \ No newline at end of file diff --git a/ShellFull.inf b/ShellFull.inf index c12e4a1..268a1d8 100644 --- a/ShellFull.inf +++ b/ShellFull.inf @@ -1,6 +1,6 @@ #/*++ # -# Copyright (c) 2006, Intel Corporation +# Copyright (c) 2006 - 2007, Intel Corporation # All rights reserved. This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -41,7 +41,6 @@ COMPONENT_TYPE = APPLICATION Library\ConsistMapping.c Library\CRC.c Library\Event.c - Library\Lock.c Library\Perf.c Library\VarCheck.c @@ -283,6 +282,7 @@ COMPONENT_TYPE = APPLICATION Library\ipf\salpal.c [sources.EBC] + ver\ebc\verEbc.c Library\EBC\math.c Library\EBC\initplat.c @@ -304,28 +304,6 @@ COMPONENT_TYPE = APPLICATION $(EDK_SOURCE)\Foundation\FrameWork $(EDK_SOURCE)\Foundation\FrameWork\Include $(EDK_SOURCE)\Foundation\Core\Dxe - - $(DEST_DIR)\newshell - $(DEST_DIR)\lib - $(DEST_DIR)\shellenv - $(DEST_DIR)\attrib - $(DEST_DIR)\cp - $(DEST_DIR)\copy - $(DEST_DIR)\date - $(DEST_DIR)\Load - $(DEST_DIR)\ls - $(DEST_DIR)\dir - $(DEST_DIR)\mkdir - $(DEST_DIR)\mv - $(DEST_DIR)\reset - $(DEST_DIR)\rm - $(DEST_DIR)\del - $(DEST_DIR)\type - $(DEST_DIR)\time - $(DEST_DIR)\touch - $(DEST_DIR)\vol - $(DEST_DIR)\lang - $(DEST_DIR)\ver $(DEST_DIR) [libraries.common] @@ -350,5 +328,10 @@ COMPONENT_TYPE = APPLICATION C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" +[nmake.ebc] + EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DEFI_MONOSHELL /DEFI_FULLSHELL + EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings + EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" + \ No newline at end of file diff --git a/SmbiosView/LibSmbiosView.c b/SmbiosView/LibSmbiosView.c index ea25128..d31ed01 100644 --- a/SmbiosView/LibSmbiosView.c +++ b/SmbiosView/LibSmbiosView.c @@ -171,10 +171,11 @@ LibGetSmbiosStructure ( Routine Description: Get SMBIOS structure given the Handle,copy data to the Buffer, - Handle is then the next. + Handle is changed to the next handle or 0xFFFF when the end is + reached or the handle is not found. Arguments: - Handle: - 0x0: get the first structure + Handle: - 0xFFFF: get the first structure - Others: get a structure according to this value. Buffter: - The pointer to the caller's memory buffer. Length: - Length of return buffer in bytes. @@ -193,21 +194,14 @@ LibGetSmbiosStructure ( SMBIOS_STRUCTURE_POINTER SmbiosEnd; UINT8 *Raw; - if (Buffer == NULL) { - PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_NO_BUFF_SPEC), HiiHandle); - return DMI_INVALID_HANDLE; - } - if (*Handle == INVALIDE_HANDLE) { - PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_INVALID_HANDLE), HiiHandle); + *Handle = mSmbiosStruct->Hdr->Handle; return DMI_INVALID_HANDLE; } - if (*Handle == 0) { - // - // first handle - // - *Handle = mSmbiosStruct->Hdr->Handle; + if (Buffer == NULL) { + PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_NO_BUFF_SPEC), HiiHandle); + return DMI_INVALID_HANDLE; } *Length = 0; @@ -228,7 +222,11 @@ LibGetSmbiosStructure ( // // update with the next structure handle. // - *Handle = Smbios.Hdr->Handle; + if (Smbios.Raw < SmbiosEnd.Raw) { + *Handle = Smbios.Hdr->Handle; + } else { + *Handle = INVALIDE_HANDLE; + } return DMI_SUCCESS; } // diff --git a/SmbiosView/SmBiosViewStrings.uni b/SmbiosView/SmBiosViewStrings.uni index dde9ca57e6474bb45f79af9c2fdbd2042302c7e4..d7e89c303135bcd7ce0917e8d561e1d76ba04678 100644 GIT binary patch delta 7829 zcmZ`;3tW{|692{suZRejhe%2nFNpF6-$Fi-@P(q3Z-RV*A|j$9u>@wW8L_~ahh-Ik z$V|yV2+Yj5W=7@`m}{__13K4(<1ykvjua47C2k47c(oQ7g~-yBWCX&BCN%;M={r(DS{ z75+$W)y^D)8;zwh<>dT6XVT*Qj;d~PH)FobE?G`;#|2YdQ#g6%l#SayRmaJB6kc;n z3y;_iBrY7SUWQmJ4`!O8*KDaFCJ;i zAvJTs2ImYal+8$Z9Ku7+ws^+uqAFiCeIC!Vr%LX|$SejI9 zj1TVjz06rYHbj}cJhUwy8d}g>jXjNiTcjBi{L=J1KcWmrDkcJrpFcP4ClZBJTokaE z^I$-r7Q5JfX6I*x4~2-CJ;sFqOivoJ0|EOwS8iy4gi?+x{hY+sAf`%j%Ts+ z!AX->>39r=)^2$5k?EWVZIN|~lL(W7v3^Q3^r96t7^|ar&@Jx%m^L!6W;wraCxHOFS|u^Jz!q<=tnQY7Jn4iyYF_d;9LTKdWUo>x zL2Qf}!&dV(i1puIU99@Ua-%Y(QnBS^#-ue`1!U4gQWZdHxQf>vP@~bZRw+Sw$t&?v zT9#sj#(B#+BN{$5V%55B>QGMMW{gR1m!*^m&R?$`S2`bzz?h6>dhF@y^uigXc6d1> zUJpe~Fs5wCQ0-scVBy;S*s`%i9?L6x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<{COQ@m96sey5d=P_a(y_%1BqhuY;kx@t}$X| zQ3S&ig7ouw+~X{Qt>-=N_)=M<4lGYVu6-9_9<`B7XEn--q@1?k1Xqz6npn9=ln}mC z@v6mCki0XRdGR-*D2X!eSi7jvqwx6c7~ul97r-4>Fbi&s zcHOsvxS(g0Z%{)Gb^b}2IA;@YUCByNOC6NHiiu;BNGy#N7Q`REl~k-ro7Y*FKQO{G62!3lxk*A086{QB2JYyN^$t*!GoCN zr<2)+@+_v=Tc#gJ-z8FUBoFtLhAhz+i?!qcieGYpGoG5U{zEfuvt`yi*0B;fG|M_> z@4fPY4;}JHk4@-07bm45WgGEdNdtds4olu!=1wv2x=dCjK-_v(i@+j;vsvt@07VMS0geLeoF2GUPZ9JAVOR<4 W5}=O&rRMT>Hp^{{VarStr, 16, &Status)); if (EFI_ERROR (Status)) { PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_INVALID_ARG), HiiHandle, L"smbiosview", Item->VarStr); @@ -251,7 +258,7 @@ Routine Description: // // Show SMBIOS structure information // - Status = SMBiosView (StructType, StructHandle, gShowType); + Status = SMBiosView (StructType, StructHandle, gShowType, RandomView); Done: // @@ -274,7 +281,8 @@ EFI_STATUS SMBiosView ( IN UINT8 QueryType, IN UINT16 QueryHandle, - IN UINT8 Option + IN UINT8 Option, + IN BOOLEAN RandomView ) /*++ Routine Description: @@ -332,7 +340,7 @@ SMBiosView ( PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYTYPE), HiiHandle, QueryType); } - if (QueryHandle == STRUCTURE_HANDLE_RANDOM) { + if (RandomView) { PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYHANDLE_RANDOM), HiiHandle); } else { PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_QUERYHANDLE), HiiHandle, QueryHandle); @@ -369,7 +377,9 @@ SMBiosView ( // // handle then point to the next! // - LibGetSmbiosStructure (&Handle, Buffer, &Length); + if (LibGetSmbiosStructure (&Handle, Buffer, &Length) != DMI_SUCCESS) { + break; + } Offset = (UINT16) (Offset + Length); pStruct.Raw = Buffer; @@ -382,10 +392,6 @@ SMBiosView ( continue; } - if (QueryHandle != STRUCTURE_HANDLE_RANDOM && pStruct.Hdr->Handle != QueryHandle) { - continue; - } - Print (L"\n=========================================================\n"); PrintToken ( STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_TYPE_HANDLE_DUMP_STRUCT), @@ -436,6 +442,9 @@ SMBiosView ( return Status; } } + if (!RandomView) { + break; + } } Print (L"\n=========================================================\n"); @@ -617,7 +626,8 @@ InitSmbiosTableStatistics ( // // search from the first one // - Handle = STRUCTURE_HANDLE_RANDOM; + Handle = STRUCTURE_HANDLE_INVALID; + LibGetSmbiosStructure (&Handle, NULL, NULL); for (Index = 1; Index <= SMBiosTable->NumberOfSmbiosStructures; Index++) { // // If reach the end of table, break.. diff --git a/SmbiosView/smbiosview.h b/SmbiosView/smbiosview.h index a309751..dd65bc1 100644 --- a/SmbiosView/smbiosview.h +++ b/SmbiosView/smbiosview.h @@ -27,7 +27,6 @@ Revision History #define STRUCTURE_TYPE_RANDOM (UINT8) 0xFE #define STRUCTURE_TYPE_INVALID (UINT8) 0xFF -#define STRUCTURE_HANDLE_RANDOM (UINT16) 0x0000 #define STRUCTURE_HANDLE_INVALID (UINT16) 0xFFFF typedef struct { @@ -48,7 +47,8 @@ EFI_STATUS SMBiosView ( IN UINT8 QueryType, IN UINT16 QueryHandle, - IN UINT8 Option + IN UINT8 Option, + IN BOOLEAN RandomView ); EFI_STATUS diff --git a/TelnetMgmt/TelnetMgmtStrings.uni b/TelnetMgmt/TelnetMgmtStrings.uni index 31eed8ece95bb6c67df3ddf521c16babf67f657a..a9d09346bb673f708e73d93635678c573cb25c77 100644 GIT binary patch delta 67 zcmZp(J77D(g$ud(;#+ delta 63 zcmX?L+h#YxWn++x_+%GJo5_dRl_m>_YixcXp29M*LtwIt%rOupCL%CdN_Gp3c~5p9 Jh&e}21pw5-7MuV8 diff --git a/attrib/AttribStrings.uni b/attrib/AttribStrings.uni index 87fd58956629c995a27ecf053c6c9a6b49958aa2..23e183552951912505a38bfbc4e2a5bee3550de1 100644 GIT binary patch delta 415 zcmZWkO-n*i5FP846zNm*gWF5FC6R$fwh(I(K`mXnXxTHB3{BA&Wh>je5YD1ak+o`Pmi|h&HXV{;Bx#wJI1+ao_fE7N3Z|R} z+Ts}7?jv*0b!!_jXqR&Ec|Q8px97cIJx=y3^TvBRj8;U^Dx_1DvqU*EIIC1+4GYUb z7d{c?u1Co44jnMgKeSH<;%X2-a}6wN6Ud0Qu%tsOP?1AYhG!&Yxvx=$5uNIcWN{(R zv877;9|cF8^JjU##(EiwL01E~*8JxBbV|WzFoD-um)oNFKQOp$iQF~ XU8#)~cqUKtw2Dh{g2qe;&4s655PWa} delta 432 zcmYk2PfG$p7{=dai$Y{qcGcX~jg825L&*=&G3bz8!b67+3Z@2|f7gQ|VYld%Jbi#p zU8;jEbPT%qDWtxG$4rxxw2nt3s*3zeFA?`J(GI5RlNFq0i*k!<_;%94 zEc-5@Y{l^8Xt=YYm^m?NA02fAp1p~9Bpzh84puR86eR5o%4*~&$GAR21)#nZC(i-J YSzbgBwZU3pS2e7kj{|GP&|2}r1E47u60DK@08TutidhDG}(do z$YdtI4U;$Ut(zRfzhN?$z`DuX1lCMW5Zp3ZNNCgMLqY~jlNAKo1XFUFmDJq4L39%%$f5G(K&cX-lkyo#fi$x7GC_`<46<;a_#&`kpes!#>v3^$Dgc${ ggA{MxE4daf#SIYznU*?vx3ui!ed04FH^|fg0MY=P&OOn$(jH93K!0m6JTc?XxqmmVp<;`Z?Voa00c#lmM;#)WQ5Z{`~1^nwKD+sKad`@81VqFWfHOF+V4$CLsc zQ@{Ws6&R90^yG`8;*$?ZYE71rnX$P^f{T$Ata$QzY1hdQB!xJg87jd(v4Wb)F?pVh o#O5hdJV*-J%YhC6YMcCDT2@ejK?7)V4p37vLpFmZ1G2_R07SA}Z~y=R diff --git a/comp/CompStrings.uni b/comp/CompStrings.uni index 49c616d7e73f2b521d5132cba995bed5101778bf..580e3e6aa388f924c5a3abc52c81fc7597df77e9 100644 GIT binary patch delta 161 zcmdm&wjynU3$Fr$E`tJt5rY8`nr(ERFRGgd6P;#|6vV1X6RWi`HJcg9XijtxzDyL6= kqh7JOPuhxg@+bMa$p#WElk+rnHdiQa5ai)y;9`Jb0N5NVrvLx| diff --git a/cp/CpStrings.uni b/cp/CpStrings.uni index d4ced0b43aae77f4a4e6ab266b56ddfa24255141..6c7aba1e1683aa82b127711f2454c6aa91c3a6ad 100644 GIT binary patch delta 456 zcmZ{fKQBXJ6vodLm&-+@B9T_P713&oDydC6U=Tr~v1m%Q{@=FL)x_2&LSkr|JSKz0 zDk9|FF!%sQV~2hKF^Rz-&V4t7oaD{P^Pcm2&hz$MS9`9j%(NObL+L|b@Iu$YL`BXb&v`rg~@G>aRuR%H5M_}BA zIqx#^@l#CseR$bQ%RUO^OXj7>#XsHxQ?AU8s)K+l_pVN0~US7 zMuV2@IJPDdgAqlI^L8IfCr4@%HIV^j*NsTv7V~?-f3xkH7Fvee877lSn3ZwJbO?>S P3oCco@Fz;Gu;~2-1}KgM delta 423 zcmaE`hv~{5rU`BvL!`JTN41D-?%-Z0Jo#K)%H##|EkN2~bC$vjw#kpuIwlvT_e`$R zD46V}D>3Z6e{*xyewM}jSYIe{ynS3h80mK(iWXJ)kMySkWNM%T2(A&H|SD2AefAYz^x04eL z;xoid?!Z;=nJ07yK*8X@6nw$ p`ADY1Q7>=OlsQlOtQ!M;=giexaPZdMoPWhOznt5h))09cDlC;$Ke delta 340 zcmca(y~A>X%f_G#&dC=zCG=Am5*bPuQW+E&@)?SNWHFFk0wfiHWCmCqp(2wZZ}NX} z@yQR^btY?Z#gVIj^BFD=CdnkQ;SlR|fY$i}9gqjIbn-`D$;l?Xb0%Nm6%$2QBqc^Wqdi0xt&MM#!2 lWP<&zz>qVUQ)uC20U4RiUnG2(uqr8@oG-9=vw+MQMgY<}RIva6 diff --git a/date/date.inf b/date/date.inf index 0cfd6ef..2c40f72 100644 --- a/date/date.inf +++ b/date/date.inf @@ -70,7 +70,6 @@ COMPONENT_TYPE = APPLICATION EfiGuidLib [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeDate C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/dblk/DblkStrings.uni b/dblk/DblkStrings.uni index 5937447d8d522752a284237cc2a9a09e275649f3..5c9315838549a2f46786c62eeae8285d2e496067 100644 GIT binary patch delta 746 zcmb7COG{fp6h7Ctkr-?vK}un&#(Rz4c)dv@ii@-rf+7Wri*Dm1_()QXH=-^?ly+Hi zIjdGtg#G~S>|E*ERf`+D@E5o#h`1^Ao7+XTKA;RUbLKq0@60);bfR5-*GdC^K_&^Z z$-+wPzbg9VfzJu?dANp$TL$FkW~-d{j0*k{uIKHfk1xVspQ(tKl%;nxPP33FXp$Cb z8m~#b@|5O4+k5_~Kk_TjL1>i65+CcSCjx$XXs470cLpd0%2ApeZZJ5YB3@GwnlX43 z_?z+k!5FvYCttP)n`-Hv<<9qVDeB|3NLACQM=MCDVZf(x3!F%gcg)7r9OMFa4#bWk zrv=YmfP6FUwD+NLd_^Umh4uP3_M;oT+EJCdi|sbYpYmmZQv{OZaXKi9KtmL3hBqTm zIcToe#V87mhpO_8{SQ|6Uo06k+sb6J%h2SE^`?xs;w!utuBqu$qt|7kgkM1l{Kt$d=3Is;wJVk9kU2jqqG1r2qf` delta 743 zcmexyiE+Xe#tAMPgG#s<6*eE`DixnBpq#V0P04_H;sl<_+f;=Zizgpf-8(soiAPbF zL4hHJA%h_mNarymGUS3;`3z}5ehEl?a-y>IbF!zpJ6O4nhS20HMs!O`ftDlzbrd1#@YOJ#yvX9idFB^1+bk8K$+sniQ4V;MhtpDF;AfD3xHxEohd+_B|r?(1M<8ALq5=z2!1|Pr8>~$ z3b2a`fbt;wGl6_eyOM$W^B9VOvLIK2RHgt`B?3hh1fYQhckpCJ{np91bW|qW=|~an zK|?H-LOr@`xXz~xks>ucR6_Z&^-|&J$G6@)p`3%Vn*^~d9&)huCEP_!G6bwel zQk(yqe`OQ~2^*qH0QD@K{LYST^E#_A{0jEj7%}q(14Ahn7&AG*FteKc);@M}kb@jM N*meem&4mu^ngEStw4wk2 diff --git a/devices/DevicesStrings.uni b/devices/DevicesStrings.uni index 763102d7950627cc4dd84193e98c242c6297cd8e..56a8bee00341b98f8821ecd4d6d115fe5ef63000 100644 GIT binary patch delta 199 zcmZp1Tw*`Lg;#+=mqCHSh`|5|%{DqW^H09S{{V<}81*J63RX_85vtgHOVEUIVgtuy zK4GEBO2T_4vk6O0{v@m>SjUMFWUT~{-0Ui;%gmp~kk3#Aw7rBO1E{}vvZGl4WC>ZX%_XudjPeCQ ZseFbMhEkvfK%;@mk{Bw{6l=&&0|0jNH$4CV delta 255 zcmZ2t-{LsIWn)kiKW7p{Dnlki9z*)%i~NsKc>0?k38*klejvs&`GqhaWAS8p;k}ce z2nzvO2l<63bBKscHV{!!RA4A(C;%Fg3^XPUh*KF-7!(+i7%G8e1PD%kDDZi+o9G@! zM!m_2qK%USBvhD#7-A={7e76@PU6I7FG($C_7a8+hD3&v$&T`ptRPnL3?ylg^ubMkE3N9n?p7 diff --git a/devices/devices.inf b/devices/devices.inf index bc57ee2..c380f7d 100644 --- a/devices/devices.inf +++ b/devices/devices.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=DevicesMain C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/dmem/DebugStrings.uni b/dmem/DebugStrings.uni index 98625597672d26e15c02291719cdc54365fdd916..47e9407dbac2b064fd26e98a3d3fc5b3129b146e 100644 GIT binary patch delta 29 jcmaFl_s(yE3$Fr$E`tJt5rY8`nr(D0?0RTwC2Pgml diff --git a/dmem/MemCommonPart.c b/dmem/MemCommonPart.c index dc0d89a..377da17 100644 --- a/dmem/MemCommonPart.c +++ b/dmem/MemCommonPart.c @@ -171,7 +171,7 @@ Routine Description: return Status; } - PciRootBridgeIo->Mem.Read (PciRootBridgeIo, IO_UINT8, Address, Size, Buffer); + PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciIoWidthUint8, Address, Size, Buffer); } else { Buffer = (UINT8 *) (UINTN) Address; } @@ -331,7 +331,7 @@ Routine Description: return Status; } - PciRootBridgeIo->Mem.Read (PciRootBridgeIo, IO_UINT8, Address, Size, Buffer); + PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciIoWidthUint8, Address, Size, Buffer); } else { Buffer = (UINT8 *) (UINTN) Address; } diff --git a/dmem/MemStrings.uni b/dmem/MemStrings.uni index 679baced32a775edf14ae8232504bd6b6a9c6e26..4f4aefa52f077374ed73a92dbeb7c2df41138952 100644 GIT binary patch delta 668 zcma)3&r6eW7=Ko7Y}4f?o72s??{G8|TcJ>(;Kd(N;PBEwkZ5kx26NeZ7YU|#N<>8X zco+#HqF%&9?c&8wogzB)7i4%W$>`9j`h4G&2M-Znp7;6rd7kIJEH%y!)e_IC1XMj^j=3F}1GEW46wY zJFX}?>TKw&kDg&y>NWO<)ggR1@{D55lek#5Co9Q@dl&G^+lO!7G8TR9 zS8`I|jt?X&PbDQ8>a^r!igupy33(_*(=)ITdxlMK4VL|GPnB6hO3aNDQ^bz{X6S$L zHr#KzbghaXGP|dVf6Q4Lo#8a?X+JG9l)UzF*c`^E$XC1%tYSLc9{%SfiJ$G7Y`xs3 zndD@WJhSYtI8!rDncu8DVYGn5Mt|`9{Bc&6Se20!9yQEkv#mz+ztt^q;&1adN(}RI zN@C}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z5-{6IS!Obm(j+*01Dw4MF2OXIJUYg0uDX`T#=!=4Ai? delta 798 zcmeyCeIRy%%f_G+9Fwbfl_tA!woJalxomO^*Rstf+zw2WRXCL<&*9Ai(h8Fe_>!PB z%jA80QDC+ce;!!P9sU`UYveg}6&Ugv(ijvNQW%ODG8xJkQh{_akYB=(!H@_f6@aq& z3^_oU&rm*jp{TI93zA9&24A3f3Q$+h?Bw<`JI^233orlYhypLD>?M6F9jzV}OoUV&G-qnk=X!Jy}3e z2P``eOm6_QRg{-Z{-h=|Sx03Om{wAS&=P7OdL3AdMFS%C3rJtml9~KLa~6FilePath); - if (StrLen (DriverName) > 19) { - DriverName[19] = 0; + if (StrLen (DriverName) > 18) { + DriverName[18] = 0; } PrintToken (STRING_TOKEN (STR_SHELLENV_PROTID_ONE_VAR_S), HiiHandle, DriverName); diff --git a/drivers/drivers.inf b/drivers/drivers.inf index 4ecc6d9..befa6cd 100644 --- a/drivers/drivers.inf +++ b/drivers/drivers.inf @@ -72,7 +72,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=DriversMain C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/drvcfg/drvcfg.inf b/drvcfg/drvcfg.inf index e8fab46..74f7084 100644 --- a/drvcfg/drvcfg.inf +++ b/drvcfg/drvcfg.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=DrvcfgMain C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/drvcfg/drvcfgStrings.uni b/drvcfg/drvcfgStrings.uni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tsm`^re~3lv=koT>TYk=kLpO7?nmYtrI}8TlqC&S zX6hT8m(>M}!hZA}O5qcvqM^D!i`%5RiN*7AzOg?HV>h-<|5;h)o6lGNoc$(iCkpZ#2_Ff$ diff --git a/drvdiag/drvdiag.inf b/drvdiag/drvdiag.inf index f5b95b4..8537e0f 100644 --- a/drvdiag/drvdiag.inf +++ b/drvdiag/drvdiag.inf @@ -72,7 +72,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=DrvdiagMain C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/drvdiag/drvdiagStrings.uni b/drvdiag/drvdiagStrings.uni index 0452fc7ebd664436969bb2ae06f9c4b7ed85c0b3..24184e85145dd1aa32e554c4da4b5079838ea022 100644 GIT binary patch delta 357 zcmX?5cCK`S3$Fr$E`tJt5rY8`nr(F6$TsMhpPoh+Mw_ delta 384 zcmX?CdZ28A%f_G$Z2ZLx84RfmIY5}okjGHAnV;R2ak7$t%H$f36_Y=4D^2#}Yy;7o z|8R0JPrf9eHd&8%2ADp>XEa%gKV4a^D*3X>HD^e1oOPl2+R0}WK0 zyg-m`@*jaRpgOI|5kfqZHwl(N*>xcKNy5t}s|hGfJ|kQOwm(nAV{(Nk-^2-Qlh+6< zOnxA;Z1O5$xyegJ119Hjb4~tZ@@(@nv1Lq?7f7loDlil?6aYPt%#g{D2E?fhDGUk> zNeq=hG6DoAFO+KD>?ZYrkuiVrM18}_88Y)YL%=>)V91!vE^E(NH2I)p^W+nW%2_Pmd$J` LC&XBI8Mqh#>pgfy diff --git a/edit/EditStrings.uni b/edit/EditStrings.uni index 3d1eae110a9fe7928d32fe38bcbc7d2402dbb49f..4d4421ce68b0e53b3bd217cd0057d1eaaf1e0cd2 100644 GIT binary patch delta 740 zcmbQ@yTEsX3$Fr$E`tJt5rY8`nr(Ex&(6-t0EUwnaz#!y5eS*Qj$dr@8xDcVuVmFG zzvHx+9Ku;OSwdQ4@(0dMaIs%pRg+aX;wGQrZea%Mo*c-t5lk=SQk<;9JBg7KXqw{W z8@yBCqJ4bRfTE4!%9B0#CqYF)_SHez%9F1Ngt5Y0qBuD~Fb#=!OE3oRPDXLn$tgln zNU~3akk#f0XCcY`5KcnTDIm%-d4fnB++6~q1zy2PCNGi6;fDJV=tr2k7}+Xlm@$g!YnC$P0HFdyF+(y#5ko2v<^g%B3@Hqm z3?&TtKrsb|G!Q-cqnz&K3+#H6r^)$fyD^ZaFGS_rW&;Ho#?4-eT`aa*Kr=&tW+LoS r0NRxSv{ivY9q1Ae3*;(2AkJq<2a18*kO}0aGFVM+RIHqQMb!oXfq0=H delta 493 zcmZ4BJH>Z`%f_I4?2{*PCrqBeQ8jrMcf{lj&Z@~TIIn=&QruOO%Y+mr8*o}o{>0rf z`2d&F(j)nVgAD5^xC{*{aEHav~Eauz{S(@5+$EkjYTO zP|TpfkjRiX`Kg?)tO8IZ56DkrC}qe2LIt2~GD8tVDiG#Pc9g3mN0)N-=05ppjGNUI ZJ6I-PP-2^$rDitSMx}y>mw}4`h5=RWmB0W1 diff --git a/edit/libFileBuffer.c b/edit/libFileBuffer.c index 14db208..19d4bab 100644 --- a/edit/libFileBuffer.c +++ b/edit/libFileBuffer.c @@ -96,7 +96,7 @@ FileBufferInit ( // // default set FileName to NewFile.txt // - FileBuffer.FileName = PoolPrint (L"NewFile.txt"); + FileBuffer.FileName = EditGetDefaultFileName (); if (FileBuffer.FileName == NULL) { return EFI_LOAD_ERROR; } @@ -3463,3 +3463,74 @@ FileBufferReplaceAll ( return EFI_SUCCESS; } + +CHAR16 * +EditGetDefaultFileName ( + VOID + ) +{ + EFI_STATUS Status; + UINTN Suffix; + BOOLEAN FoundNewFile; + CHAR16 *FileNameTmp; + EFI_LIST_ENTRY DirList; + SHELL_FILE_ARG *Arg; + + Suffix = 0; + FoundNewFile = FALSE; + + do { + if (Suffix != 0) { + FileNameTmp = PoolPrint (L"NewFile%d.txt", Suffix); + } else { + FileNameTmp = PoolPrint (L"NewFile.txt"); + } + + // + // GET CURRENT DIR HANDLE + // + InitializeListHead (&DirList); + + // + // after that filename changed to path + // + Status = ShellFileMetaArgNoWildCard (FileNameTmp, &DirList); + + if (EFI_ERROR (Status)) { + break; + } + + if (DirList.Flink == &DirList) { + break; + } + + Arg = CR (DirList.Flink, SHELL_FILE_ARG, Link, SHELL_FILE_ARG_SIGNATURE); + + // + // Make sure Arg is valid + // + if (Arg == NULL || Arg->Parent == NULL) { + ShellFreeFileList (&DirList); + break; + } + + if (Arg->Status == EFI_NOT_FOUND) { + FoundNewFile = TRUE; + ShellFreeFileList (&DirList); + break; + } else { + FreePool (FileNameTmp); + FileNameTmp = NULL; + } + + ShellFreeFileList (&DirList); + Suffix++; + + } while (Suffix != 0); + + if (!FoundNewFile && FileNameTmp != NULL) { + FreePool (FileNameTmp); + FileNameTmp = NULL; + } + return FileNameTmp; +} diff --git a/edit/libInputBar.c b/edit/libInputBar.c index 6b51545..0ec6858 100644 --- a/edit/libInputBar.c +++ b/edit/libInputBar.c @@ -75,6 +75,7 @@ MainInputBarCleanup ( return EFI_SUCCESS; } +VOID MainInputBarPrintInput ( VOID ) diff --git a/edit/libfilebuffer.h b/edit/libfilebuffer.h index aacdf82..ddbd5e9 100644 --- a/edit/libfilebuffer.h +++ b/edit/libfilebuffer.h @@ -203,4 +203,9 @@ FileBufferAdjustMousePosition ( INT32 ); +CHAR16 * +EditGetDefaultFileName ( + VOID + ); + #endif diff --git a/edit/main.c b/edit/main.c index 44772dc..6c8a2ec 100644 --- a/edit/main.c +++ b/edit/main.c @@ -234,15 +234,10 @@ Routine Description: // // print editor exit code on screen // - switch (Status) { - case EFI_SUCCESS: - break; - - case EFI_OUT_OF_RESOURCES: + if (Status == EFI_SUCCESS) { + } else if (Status == EFI_OUT_OF_RESOURCES) { PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_OUT_RESOURCE), HiiHandle, L"edit"); - break; - - default: + } else { if (Buffer != NULL) { if (StrCmp (Buffer, L"") != 0) { // @@ -255,8 +250,6 @@ Routine Description: } else { PrintToken (STRING_TOKEN (STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR), HiiHandle); } - - break; } if (Status != EFI_OUT_OF_RESOURCES) { diff --git a/err/ErrStrings.uni b/err/ErrStrings.uni index f0031350bf0db981345d149c6fb1b3280966ede7..954366efc32017abb2205eec1cd914a28b52549f 100644 GIT binary patch delta 314 zcmX@NiE-b0#tAOG3Jkgo3JgXJ20&=G(fOeC#3G5w3q%z*o5&O~POK9Gu_sq4yKUx? zd&fBWkNm66FBFb2PF|<9jFpoC2q#Yz)!$sD{DXONm{-H(FX{^1nGD4Y1q?Y1i42vK zA1X>t=2K*wyvsvkvV(@&+V@Lt&NS)m1RzKM< zqG+<1)`ZO&I!27*AwX%6B3A}C22UXE%#hDe1XQ?QH*oSMgEnCxn;{7(md{WEv{nzO z!g2FlJ!ZzqMe0qAMw3+y;#u{8O7teT8mwhBo;=yedUB9)2uSPX6~+dWV@!@sUZ&N= tm^yi*LAxNx-KjuVWiq4zaVkT~0u=Gt(~pDm4%{F0TKy{eecWwA z4z?fzCX7G{IAlQs9nz4eo+30~mEq0Ao-GF@Oe`IuL+Qbn@Hq>MC;t?4&VfP94Dk%u zpfd(>SirGBqD|;qr-=b&a?xRv5Tl?8=eUj8d?3SBSp-j&HI~62rH;kv&Rq^k3PFAZ zZk=V=h9cD|ik7EunSetVariable ( L"EFIDebug", - &gEfiGlobalVariableGuid, + &gEfiGenericVariableGuid, (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS), BufSize, &DebugLevel diff --git a/guid/GuidStrings.uni b/guid/GuidStrings.uni index 078bc3686668f4016d24632e52634c6d7b7d93d8..70ad0a203283cf5f07c429a68479f10eb99652fe 100644 GIT binary patch delta 399 zcmdmHf68ux3$Fr$E`tJt5rY8`nr(Ex%E8LX0ECmJIUOhaafu1KGPp5#0#&#(gaT<7 zhT_SyIh~pDs@UAmCCDVI0MrCB+JzyLp_rk7A%`K6p>p$Po|TM~f}U;_Q}fxjV8Ymv`|!FCc|6|a!hE#J)&iQlMIpTS|atfIP1NB=Z>3z^(_GQUc`X16_1csCKddPu1o5 D%{E*f delta 499 zcmaKoO-lk%6o!u)m=u(F7Vz6)9JKb6#_gv$qQmn{UB@Ai-%R&slXSCCH^JStO`H zi?ocdMGZQm8aZSms<(5O--8)`R^n_bIs6yn{YZ!%Ev7l>SDR|F;QY#*1bT7i#IPQ{gdfs=vcv zOPi2ty{DeTWNWm=>BtrP6S5;Po%8308GTZdo9NzKq$bz(X~`K8@OBCC2$&0d!SkDOWdqTHz~|s#VM!+ savhIUm65y11tJeM>B2@NcO%`}l7YAe?IALgUj{DuDRj|VkADY$06TGTfB*mh diff --git a/guid/guid.inf b/guid/guid.inf index 0ac965b..60639d2 100644 --- a/guid/guid.inf +++ b/guid/guid.inf @@ -64,7 +64,6 @@ EdkFrameworkGuidLib EfiGuidLib [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=GuidMain C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/hexedit/HexeditStrings.uni b/hexedit/HexeditStrings.uni index 6affe61cfbec13fa06c664c8ec0191891cd106fb..3991309d3378a9770252542b58ecc33dca7ab4f1 100644 GIT binary patch delta 1144 zcmZ`(T}V@582(nK$E9PsA9b5~+MnBLoBI(H2{Dq2D5)qAlHpF%)cnb9*%T2gFGE_7 zh=GJb7j+o}!!AO)sf!Bfq6;CfB)SOcqP&Qb-t(O;93+SFzVGur@ALkgZ)bCKdF+0B zxybxXWMLMhr|J2LpCy^;Vzict=oB90-C0L5^rhc+hiwN1NZRj((2g3uMP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@@ -85,6 +85,7 @@ Routine Description: return EFI_SUCCESS; } +VOID HMainInputBarPrintInput ( VOID ) diff --git a/hexedit/libMemImage.c b/hexedit/libMemImage.c index 14f1440..407bb2e 100644 --- a/hexedit/libMemImage.c +++ b/hexedit/libMemImage.c @@ -31,6 +31,8 @@ extern HEFI_EDITOR_GLOBAL_EDITOR HMainEditor; HEFI_EDITOR_MEM_IMAGE HMemImage; HEFI_EDITOR_MEM_IMAGE HMemImageBackupVar; +EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL DummyPciRootBridgeIo; + // // for basic initialization of HDiskImage // @@ -40,6 +42,24 @@ HEFI_EDITOR_MEM_IMAGE HMemImageConst = { 0 }; +EFI_STATUS +DummyMemRead ( + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This, + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN OUT VOID *Buffer + ); + +EFI_STATUS +DummyMemWrite ( + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This, + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN OUT VOID *Buffer + ); + EFI_STATUS HMemImageInit ( VOID @@ -73,6 +93,17 @@ Routine Description: NULL, &HMemImage.IoFncs ); + if (Status == EFI_NOT_FOUND) { + // + // For NT32, no EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL is available + // Use Dummy PciRootBridgeIo for memory access + // + ZeroMem (&DummyPciRootBridgeIo, sizeof (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL)); + DummyPciRootBridgeIo.Mem.Read = DummyMemRead; + DummyPciRootBridgeIo.Mem.Write = DummyMemWrite; + HMemImage.IoFncs = &DummyPciRootBridgeIo; + Status = EFI_SUCCESS; + } if (!EFI_ERROR (Status)) { return EFI_SUCCESS; } else { @@ -359,3 +390,27 @@ Routine Description: return EFI_SUCCESS; } + +EFI_STATUS +DummyMemRead ( + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This, + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN OUT VOID *Buffer + ) +{ + return EFI_UNSUPPORTED; +} + +EFI_STATUS +DummyMemWrite ( + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This, + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN OUT VOID *Buffer + ) +{ + return EFI_UNSUPPORTED; +} diff --git a/hexedit/libMisc.c b/hexedit/libMisc.c index bc03645..35e2d42 100644 --- a/hexedit/libMisc.c +++ b/hexedit/libMisc.c @@ -518,7 +518,7 @@ Routine Description: i = Failure[i]; } - if (Pat[i] == Pat[i + 1]) { + if (Pat[j] == Pat[i + 1]) { Failure[j] = i + 1; } else { Failure[j] = -1; diff --git a/hexedit/main.c b/hexedit/main.c index f2e8a65..879d531 100644 --- a/hexedit/main.c +++ b/hexedit/main.c @@ -80,6 +80,11 @@ EFI_BOOTSHELL_CODE( EFI_DRIVER_ENTRY_POINT (InitializeEFIHexEditor) ) +CHAR16 * +HexEditGetDefaultFileName ( + VOID + ); + VOID PrintUsage ( VOID @@ -329,7 +334,7 @@ Routine Description: WhatToDo = OPEN_FILE; } else if (0 == ChkPck.FlagCount || (ChkPck.FlagCount == 1 && LibCheckVarGetFlag (&ChkPck, L"-b") != NULL)) { if (0 == ChkPck.ValueCount) { - Name = PoolPrint (L"NewFile.bin"); + Name = HexEditGetDefaultFileName (); FreeName = TRUE; } else if (1 == ChkPck.ValueCount) { Name = ChkPck.VarList->VarStr; @@ -433,15 +438,10 @@ Routine Description: // // print editor exit code on screen // - switch (Status) { - case EFI_SUCCESS: - break; - - case EFI_OUT_OF_RESOURCES: + if (Status == EFI_SUCCESS) { + } else if (Status == EFI_OUT_OF_RESOURCES) { PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_OUT_RESOURCE), HiiHandle, L"hexedit"); - break; - - default: + } else { if (Buffer != NULL) { if (StrCmp (Buffer, L"") != 0) { // @@ -454,8 +454,6 @@ Routine Description: } else { PrintToken (STRING_TOKEN (STR_HEXEDIT_UNKNOWN_EDITOR), HiiHandle); } - - break; } if (Status != EFI_OUT_OF_RESOURCES) { @@ -494,3 +492,74 @@ Routine Description: { return LibCmdGetStringByToken (STRING_ARRAY_NAME, &EfiHexeditGuid, STRING_TOKEN (STR_HEXEDIT_LINE_HELP), Str); } + +CHAR16 * +HexEditGetDefaultFileName ( + VOID + ) +{ + EFI_STATUS Status; + UINTN Suffix; + BOOLEAN FoundNewFile; + CHAR16 *FileNameTmp; + EFI_LIST_ENTRY DirList; + SHELL_FILE_ARG *Arg; + + Suffix = 0; + FoundNewFile = FALSE; + + do { + if (Suffix != 0) { + FileNameTmp = PoolPrint (L"NewFile%d.bin", Suffix); + } else { + FileNameTmp = PoolPrint (L"NewFile.bin"); + } + + // + // GET CURRENT DIR HANDLE + // + InitializeListHead (&DirList); + + // + // after that filename changed to path + // + Status = ShellFileMetaArgNoWildCard (FileNameTmp, &DirList); + + if (EFI_ERROR (Status)) { + break; + } + + if (DirList.Flink == &DirList) { + break; + } + + Arg = CR (DirList.Flink, SHELL_FILE_ARG, Link, SHELL_FILE_ARG_SIGNATURE); + + // + // Make sure Arg is valid + // + if (Arg == NULL || Arg->Parent == NULL) { + ShellFreeFileList (&DirList); + break; + } + + if (Arg->Status == EFI_NOT_FOUND) { + FoundNewFile = TRUE; + ShellFreeFileList (&DirList); + break; + } else { + FreePool (FileNameTmp); + FileNameTmp = NULL; + } + + ShellFreeFileList (&DirList); + Suffix++; + + } while (Suffix != 0); + + if (!FoundNewFile && FileNameTmp != NULL) { + FreePool (FileNameTmp); + FileNameTmp = NULL; + } + return FileNameTmp; +} diff --git a/load/LoadStrings.uni b/load/LoadStrings.uni index 74d36755d2bb08269a4a12ff9bdcc7b41735dad4..23adb560d9ad8c7f037195f6647579dd57d6b2f1 100644 GIT binary patch delta 610 zcmb7BO)o=16uqsGYN^szz4FrcNJQjSv9Pic5~MZ+3z0^(uQZ{hABaV@WkDl?yAkQq zUgZ4=JO6;4m4)~NoOz1aNMw?kIWuR@J@?GbWI233(X3FA6dI;MjFG$Xce|7YPE(3> zbIoAh1kRAoPY#JAjw5b&Xn(VexhBo3eoD{aag^dDWLGIqIjnJ<>6GPLXNZ?=b{_Tb z@JfrT4lhu|=T#_)qET8iO(cLeQ2wDMU=&?vR&|;Z5XsTHc^!n;7;u`laF)cHGD4oT zwce!gh3AAdUqX%HViS}NP@;GueC%Q`WPX^Dj_Re`#x75TV*!>$1|V>&JIs&HeSTH< zI3t}l_TzjWf(nnhJGm?sxvy)0D}e&{_7r%q^KIyxfr6g_h#d1k!lSSuwByJ%NjunQ z_&_>@$~_boc}lJt&vMQ(`)?UD=RD>ldR#+^T6#cH7|?mU&0909a4~Sq&$7l>-A;b- tckzl+1zt9mRF~yfk8;mfRO#9mia1jkI5<2j6rTbds@ByC1lWqV2 delta 548 zcmYjOO-lk%6ul`KlqiguAC)5s=c5p)ySn|vZzQU;0D$Pb~frhs>JH3HN`Qhb74k+hHshT@t~b+D2l99aLUTT}sB zR!%M*{OhbjDUba>e|`*4@%!lI?M=vg4Yz&%ZK`uNR#+0ym9v&|t0Q3*kBh_&<#q&D z`}<@vL76h#)6O{+3ncPt(gnYPd6`pC8rAeFn(LExgX$`{9JR(B5ai(vyz(N->Pq^5 zp{HF%`vK%}D-g6HSVF|NXoOG39_~UXY{%Q2(*oQSf?pDCPfykceu4HxhxOzRUr*lS en_+!s!E2@BKZFj?O@GLSr_bd2;O6WzfaVuLhJ^wE diff --git a/load/load.c b/load/load.c index 096d59b..adf41bb 100644 --- a/load/load.c +++ b/load/load.c @@ -213,6 +213,8 @@ Routine Description: Status = ShellFileMetaArg (Item->VarStr, &FileList); if (EFI_ERROR (Status) && EFI_NOT_FOUND != Status) { goto FreeDone; + } else if (Status == EFI_NOT_FOUND) { + PrintToken (STRING_TOKEN (STR_SHELLENV_GNC_FILE_NOT_FOUND), HiiLoadHandle, L"load", Item->VarStr); } Item = GetNextArg (Item); diff --git a/load/load.inf b/load/load.inf index e62847d..3ba1dbf 100644 --- a/load/load.inf +++ b/load/load.inf @@ -69,7 +69,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeLoad C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/ls/LsStrings.uni b/ls/LsStrings.uni index 10d6a9aa0840e3f51faf10e832739ee28e647865..6a75e2cd6051eb996b14643731cb888dd8c5d7ae 100644 GIT binary patch delta 1615 zcmeH`O=uHA6oB96rzTATH8qWOgKlffnuer_2T#&gQj{DFsn%*Cg>IT{63I{PM*O+d zP(j3t?L$z|idPTOI3S)%uQ^yO74cx92QMD$Nj!*erlwjX7r~P<%+Bo0d*Az+_cm{u zzTPw49d;=Y1O<*ln8vYMbk4(8JRdFQ6indW#HWBAnhk~2x@m5YAfzxl(&bm61Vzy4 z)PO0NrJYXy3TRLkUxn5j6hOx{rGm#t+<1oOXL;2e1dS808aaU9qHVYtvB)KuCap4D zgBii(lrm9sWR2^u_}o_R{z-JT%XS6wbYnmnHFX{*PwiW{(IROWJIf>krO_G=9kSu_ z=+ni18Y0!B>f{{z6uXt#YQ^U>YJpQ$(Dm$yp(M65hh_h4)sCm}zv3AEqp5D&m{*Hb<6d z0TEFjJ}%tBYOjwS?0qZkQ3N258%BlLN`2?9}#h1@Lh6|Rfk_%yn;i*Jm8$D6%jVe#LOm4Bs*|u zVE<00Rp{GA*5Rtidy&+0y!3EOmc30%5HAJi=@ovKU~S-mOodA)L3$hh<+nQ)u*S@{^kfe6)1{bu#cWKs#K>z>% delta 1049 zcmeHGKWGzS6n~eTdWi(>*?)l+uh*Cpt=1^UqT&#XWC`_(Z8QXF6Hl&?n%L_QQ3ORO zg3z=-brEsUsYoDxO9zoE4h~tw#j$jBX)8|R;QK0xVsQ{xhwpno-s5}k_j|v)uMd37 zcYKw>+VIUbEbFHD(zc{x@Z8E=WdIc;h^|q6uA*XWM90~%io|Fg-_m;CAcGF@v1pu6 z-v;uU$ZevjCc4DPpdwB2o#!}7Ihvp={C=8ak&&!k=6jl4a%d8E=Ft{|>js8)3q~HJ zyBBJVTt+7{HGIkh@j3GXU1kswa{<{A4d=6+O21e)k142*ef0A{gp$2GWZU8|&3od& z%e_0daZ}n)E^NC)lya_bkJRE&nK?RC;ztcW26LOB0%twyhkdcP#bO>mHCg0AiFV*n z@}Y?KEe25S?(`R^fY;q&loNIFDn7rRlkHf!-io&z%ZYd5)ahp`PNt1eLp--33qA42 zqMm%N`gucQHs$y2@_6t#FE1~}GZm>TmJVZSNJAv52PDmFOxVHd(Ibk1SmYL))$Tve zt9qY$+G5Z?I>Mem.Read (PciRootBridgeIo, IO_UINT8, Address, Size, Buffer); + PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciIoWidthUint8, Address, Size, Buffer); } else { Buffer = (UINT8 *) (UINTN) Address; } @@ -327,7 +327,7 @@ Routine Description: return Status; } - PciRootBridgeIo->Mem.Read (PciRootBridgeIo, IO_UINT8, Address, Size, Buffer); + PciRootBridgeIo->Mem.Read (PciRootBridgeIo, EfiPciIoWidthUint8, Address, Size, Buffer); } else { Buffer = (UINT8 *) (UINTN) Address; } diff --git a/mem/MemStrings.uni b/mem/MemStrings.uni index 5f422d3510872ef3ea595d039f63e2b705b50d82..7d231ed3049d2f372426f7878625c56a80b37eab 100644 GIT binary patch delta 640 zcma)3OG_JJ6ul7>j3#jsqOsN_pSC^@y%7u%x z2c%0I+D&mIfi9#7?pz7}1J|zl6MDY!v2Y>sF*Dyi_nv#tJ#%?zJO5>?&A62ei;^)J z<(W8o+wa1L>n}dFDx9}07Cbo4W%$ZO!O2&g@R% zfz30HWA7N|z3=ePaD1)m#){CJMvL!#6B7Q{sQbTTs$=LyM)K6~QPNVDxTN?^N=9lBI>bfW4kwGHjL<^9rMvu{Eq$k584u)`Tzg` delta 998 zcma)4OKVd>6h0ASBQ`M?lRj+HOnrn@ViqD4>H|bus758hWl?S(jlsOUz1Or0Arah& zXwtKCQ(Wjma3lE#?gSCsxR5Sfy0p833;oXA8-=)$fnjFOH|Kocch0BRzHe`Ry({nX zC&v4|z*gWH?*s!p9!&P1;-+{fkmc=QO=5@7^2N}5efp~RQ@lU?k++Q7ylCY4dpOTO zjL@Mvm8nimvS@Sg)3~#bS0m?r8UB@h%&};M&qR|;DY^^L2H7-E3VRcKiK?_tEvk`8 zo0P%JEuiF0Q3L2Q5OQ|W1uFCB=}CSR?ew2S?iG;20jwld0b0}b1uTUW(pq>a;=GO} z+}xN6gnM!e6%ngrnL3y9%3C_OLaad5%$abb$*dc zToVB+I(r*gYFJXoLFEQcl1b?*!nOc}t;Jbjcps=La3WY3Gu>gp6Xp#!EbR_@|Y+m_PG`frB^`U0p5h} z(99)ThO{)liN{Y$#Ktd?(Lx^3)!hDymQKN*c?HC1mqnr&bqV%JTcoPZV>5BX^ek(7 zRV`FIH@1rG$4K$+T)X1tlik$TwZYQ0IR!p43^uZfBT74FK}Xf|BaJs18Oi={RN;>e zWCqjewsw0uSs%7cqC-bU$8OZa{~1I0qg|_jiKCgq6FpEbj~?JJQz@@sd$CuE60mE~ l>p-b6mvI%HZWk8u>*1gB1O;b{N> diff --git a/memmap/MemmapStrings.uni b/memmap/MemmapStrings.uni index 73a37232d1f03a78173946f672c40ae0b77b888c..dec1c11bacb7f80d3934fd6d880596db9ad05ece 100644 GIT binary patch delta 235 zcmZ1x@+owJ3$Fr$E`tJt5rY8`nr(ER$U9k&*Ke~CUl7ye1_80nGXy%Ane!P+CI^a$ zPIeICn>J%7Kfc6vv wRpl@wGC=fX0L@SUid6z}3D`UZpqa?#<^t6gFj!4Ks8TywL6l|lG4UiJ0E$vMy#N3J delta 154 zcmewqx*}wP%f_GyyptdB%1z=k;w@pwU`S*rVNhVmWGLRO&lk)zxlKT5vH%~;=2-%5 z%bu diff --git a/memmap/memmap.inf b/memmap/memmap.inf index 907cf49..03e8061 100644 --- a/memmap/memmap.inf +++ b/memmap/memmap.inf @@ -72,7 +72,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeMemmap C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/mkdir/MkdirStrings.uni b/mkdir/MkdirStrings.uni index 1946951026aef03ba4034d54491b66ffa3e4b479..595a3d18b04fe55db291609e35014f78d7628335 100644 GIT binary patch delta 234 zcmdlJ)Dbkng;#+=mqCHSh`|5|%{Dq;=G!d7FUBmJ%aF~G!jQ>O1e7cX(m6n=z>vt0 z#E{QWG&xqVRo|FF4=57MP{5GNkPK9j#!v|)^BB^>>QcbEOMoKzK(R!IoXL#B!jm6x zve*{@c||~+3)EKv#6=9nKpiPS7RaPLFe?uzqX5>a02D0(ikE>+DrG3194Oa5nMGIt aWR@@%vnDHw$}?JlRmF%nY*rE#5&;145;Hmg delta 228 zcmeAO+7mRvWn<7KzRhavm}2xcn)#q)vuTp&N2Ar;6f zW+-JyX2<}t5-0x`6`lM^tZMQCF%EWP20fry$mIWm;*)sUm=zc@C$AS%cP<7h%?E19 zVMqZ==Ki9miPR3@JxZE~V;J10mVNKMh?^$LLocateProtocol ( - &gEfiPciRootBridgeIoProtocolGuid, - NULL, - (VOID *) &IoDev - ); + Status = LibLocateHandle ( + ByProtocol, + &gEfiPciRootBridgeIoProtocolGuid, + NULL, + &BufferSize, + &HandleBuffer + ); if (EFI_ERROR (Status)) { PrintToken (STRING_TOKEN (STR_IOMOD_HANDLE_PCI), HiiHandle, L"mm", Status); goto Done; } + // + // In the case of PCI or PCIE + // Get segment number and mask the segment bits in Address + // + if (AccessType == EfiPciEConfig) { + SegmentNumber = (UINT32) RShiftU64 (Address, 36) & 0xff; + Address &= 0xfffffffff; + } else { + if (AccessType == EfiPciConfig) { + SegmentNumber = (UINT32) RShiftU64 (Address, 32) & 0xff; + Address &= 0xffffffff; + } + } + // + // Find the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL of the specified segment number + // + for (Index = 0; Index < BufferSize; Index++) { + Status = BS->HandleProtocol ( + HandleBuffer[Index], + &gEfiPciRootBridgeIoProtocolGuid, + (VOID *) &IoDev + ); + if (EFI_ERROR (Status)) { + continue; + } + if (IoDev->SegmentNumber != SegmentNumber) { + IoDev = NULL; + } + } + if (IoDev == NULL) { + // TODO add token + PrintToken (STRING_TOKEN (STR_IOMOD_SEGMENT_NOT_FOUND), HiiHandle, SegmentNumber); + Status = EFI_INVALID_PARAMETER; + goto Done; + } } if (AccessType == EfiIo && Address + Size > 0x10000) { @@ -609,6 +652,9 @@ Routine Description: Status = EFI_SUCCESS; Done: + if (HandleBuffer != NULL) { + FreePool (HandleBuffer); + } LibCheckVarFreeVarList (&ChkPck); LibUnInitializeStrings (); return Status; diff --git a/mm/mm.inf b/mm/mm.inf index c358a5a..7530b37 100644 --- a/mm/mm.inf +++ b/mm/mm.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=DumpIoModify C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/mm/mmStrings.uni b/mm/mmStrings.uni index 387fef62ba8cd9ffd59be41c44dd76d02fc9a21e..75ae84b82905da28ae612e19ee10b2ef3dcd7584 100644 GIT binary patch delta 3061 zcmd5;TTIhu6#qJHi>2)f6p)t6zaZ37NlGoLLN0vSpX-VQ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Jr1;|TeC}Kzls>lWVzl1>tCz#chdvpda#JevnQB%H;#ifT;x83k~VX*Cmy~Zm--t OO{$BXgO`De0fYg3GGWaC diff --git a/mount/mount.inf b/mount/mount.inf index 9a2dd2b..e739df5 100644 --- a/mount/mount.inf +++ b/mount/mount.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=MountMain C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/mv/MvStrings.uni b/mv/MvStrings.uni index abe819f586f9d9683eddd94f89ab5314012a4abe..2083ad6b72d5e83f38a0cb4309eb0500db6b10c8 100644 GIT binary patch delta 430 zcmX?9)loIUg;#+=mqCHSh`|5|%{Dr(WS{(w{TdK!P5!{qH(7@tL`zLR!Z~HK7oWxC zSzK*UIfcnN+!>Rvai0S7&+wc9(UW-iCST$$n>NN1?3Wke4xt`8S;R12}1@$ zDnk*Fp9AD214T<1G8ytGI|^w}J|$WQQm;ycdWO8s6UEdSB{>;zz=?&HlNB_pCLgfk z*t|?4jd8Px)FMWp$spSm7}Ob37>a>5s{`2uKsOWtaV}7%1mw2K`=!GtKay*kEFq&b z`2ml_b9`itn1BwH*gQdg7szK4lPActOm0wNn;gU;Hn~TsX)}+~7iP{8BCePq%gGgyj z&fw0N+{URh*-wCPG6&BjnC2rqXF$viynU17xU442DRWJ3;F~wuOBke*jZtB;FaLEY zZvspYhhQ0uxk1Qg@)N;D2<{vNQ)}`9;Up+`vyO-gBcuN0jr`)1^F%qgQy5YiiWy26 zG8ytFcZ+UB$V~ntC?Qx56fa@O0Ld~aFr+aQZ*CM*XPkUSCU5crotjB1ESqa2(ikV- zk>J?;NOBP)r#eFl*fjOYE2YCHx5%hWex%-pB-*IlyxB?Ch-vZ~NwLin) TH#tvHX!9jCGcguk1}+8w3MGON diff --git a/mv/mv.inf b/mv/mv.inf index 14096e1..b52e28d 100644 --- a/mv/mv.inf +++ b/mv/mv.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeMv C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/newshell/FakeHii.c b/newshell/FakeHii.c index 5e4638b..44dee95 100644 --- a/newshell/FakeHii.c +++ b/newshell/FakeHii.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005, Intel Corporation +Copyright (c) 2005 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -26,10 +26,7 @@ Revision History #include "FakeHii.h" -EFI_GUID gEfiHiiProtocolGuidOld = EFI_HII_PROTOCOL_GUID_OLD; - EFI_HANDLE mFakeHiiHandle = NULL; -EFI_HANDLE mOldFakeHiiHandle = NULL; EFI_STATUS FakeInitializeHiiDatabase ( @@ -55,13 +52,10 @@ Routine Description: UINTN HandleCount; EFI_HANDLE *HandleBuffer; EFI_FAKE_HII_DATA *HiiData; - EFI_FAKE_HII_DATA_OLD *OldHiiData; EFI_HANDLE Handle; BOOLEAN HiiInstalled; - BOOLEAN OldHiiInstalled; HiiInstalled = FALSE; - OldHiiInstalled = FALSE; HiiData = NULL; Status = LibLocateHandle ( ByProtocol, @@ -107,50 +101,6 @@ Routine Description: } } - Status = LibLocateHandle ( - ByProtocol, - &gEfiHiiProtocolGuidOld, - NULL, - &HandleCount, - &HandleBuffer - ); - if (!EFI_ERROR (Status)) { - if (NULL != HandleBuffer) { - FreePool (HandleBuffer); - OldHiiInstalled = TRUE; - } - } - - if (!OldHiiInstalled) - { - OldHiiData = AllocateZeroPool (sizeof (EFI_FAKE_HII_DATA_OLD)); - if (NULL == OldHiiData) { - FakeUninstallHiiDatabase (); - return EFI_OUT_OF_RESOURCES; - } - - OldHiiData->Signature = EFI_FAKE_HII_DATA_SIGNATURE; - OldHiiData->DatabaseHead = NULL; - OldHiiData->Hii.NewPack = FakeHiiNewPackOld; - OldHiiData->Hii.RemovePack = FakeHiiRemovePack; - OldHiiData->Hii.FindHandles = FakeHiiFindHandles; - OldHiiData->Hii.GetPrimaryLanguages = FakeHiiGetPrimaryLanguages; - OldHiiData->Hii.GetString = FakeHiiGetString; - OldHiiData->Hii.GetForms = FakeHiiGetForms; - - Handle = NULL; - Status = BS->InstallProtocolInterface ( - &mOldFakeHiiHandle, - &gEfiHiiProtocolGuidOld, - EFI_NATIVE_INTERFACE, - &OldHiiData->Hii - ); - - if (EFI_ERROR (Status)) { - FakeUninstallHiiDatabase (); - } - } - return Status; } @@ -162,9 +112,7 @@ FakeUninstallHiiDatabase ( { EFI_STATUS Status; EFI_HII_PROTOCOL *FakeHii; - EFI_HII_PROTOCOL_OLD *FakeHiiOld; EFI_FAKE_HII_DATA *HiiData; - EFI_FAKE_HII_DATA_OLD *OldHiiData; if (mFakeHiiHandle != NULL) { Status = BS->HandleProtocol ( @@ -182,22 +130,6 @@ FakeUninstallHiiDatabase ( FreePool (HiiData); } - if (mOldFakeHiiHandle != NULL) { - Status = BS->HandleProtocol ( - mOldFakeHiiHandle, - &gEfiHiiProtocolGuidOld, - &FakeHiiOld - ); - Status = BS->UninstallProtocolInterface ( - mOldFakeHiiHandle, - &gEfiHiiProtocolGuidOld, - FakeHiiOld - ); - OldHiiData = EFI_FAKE_HII_DATA_OLD_FROM_THIS (FakeHiiOld); - mOldFakeHiiHandle = NULL; - FreePool (OldHiiData); - } - return EFI_SUCCESS; } @@ -356,7 +288,7 @@ Routine Description: // If there is no string package, and the PackageInstance->IfrPack.Guid and PackageInstance->Guid are // different, we should return the correct handle for the caller to use for strings. // - if ((PackageInstance->StringSize == 0) && (!CompareGuid (&Guid, &PackageInstance->Guid))) { + if ((PackageInstance->StringSize == 0) && (CompareGuid (&Guid, &PackageInstance->Guid) != 0)) { // // Search the database for a handle that matches the PackageInstance->Guid // @@ -386,7 +318,7 @@ Routine Description: // If the Guid from the new handle matches the original Guid referenced in the original package data // return the appropriate package instance data to use. // - if (CompareGuid (&Guid, &PackageInstance->Guid)) { + if (CompareGuid (&Guid, &PackageInstance->Guid) == 0) { if (TotalStringCount != NULL) { *TotalStringCount = HandleDatabase->NumberOfTokens; } @@ -547,7 +479,7 @@ Routine Description: // // Check to see if IfrPack->Guid != GuidId // - if (!CompareGuid (&Guid, Packages->GuidId)) { + if (CompareGuid (&Guid, Packages->GuidId) != 0) { // // If a string package is present, the GUIDs should have agreed. Return an error // @@ -1545,292 +1477,3 @@ Routine Description: return EFI_SUCCESS; } - -EFI_STATUS -EFIAPI -FakeHiiNewPackOld ( - IN EFI_HII_PROTOCOL *This, - IN EFI_HII_PACK_LIST *Package, - OUT EFI_HII_HANDLE *Handle - ) -/*++ - -Routine Description: - Extracts the various packs from a package list. - -Arguments: - -Returns: - ---*/ -{ - EFI_FAKE_HII_PACKAGE_INSTANCE *PackageInstance; - EFI_FAKE_HII_DATA_OLD *HiiData; - EFI_FAKE_HII_HANDLE_DATABASE *HandleDatabase; - EFI_FAKE_HII_HANDLE_DATABASE *Database; - EFI_FAKE_HII_GLOBAL_DATA *GlobalData; - EFI_STATUS Status; - UINTN IfrSize; - UINTN StringSize; - UINTN InstanceSize; - UINTN Count; - UINT16 Member; - EFI_GUID Guid; - EFI_FORM_SET_STUB FormSetStub; - UINT8 *Location; - UINT16 Unicode; - UINT16 NumWideGlyphs; - UINT16 NumNarrowGlyphs; - UINT32 NumberOfTokens; - UINT8 *Local; - EFI_NARROW_GLYPH *NarrowGlyph; - EFI_WIDE_GLYPH *WideGlyph; - - if (Package == NULL || This == NULL) { - return EFI_INVALID_PARAMETER; - } - - HiiData = EFI_FAKE_HII_DATA_OLD_FROM_THIS(This); - - GlobalData = HiiData->GlobalData; - - Database = HiiData->DatabaseHead; - - InstanceSize = 0; - IfrSize = 0; - StringSize = 0; - NumberOfTokens = 0; - - // - // If sending a StringPack without an IfrPack, you must include a GuidId - // - if ((Package->StringPack != NULL) && (Package->IfrPack == NULL)) { - if (Package->GuidId == NULL) { - return EFI_INVALID_PARAMETER; - } - } - - // - // If passing in an IfrPack and a GuidId is provided, ensure they are the same value. - // - if ((Package->IfrPack != NULL) && (Package->GuidId != NULL)) { - Location = ((UINT8 *)Package->IfrPack); - Location = (UINT8 *)(((UINTN)Location) + sizeof (EFI_HII_PACK_HEADER)); - - // - // Advance to the Form Set Op-code - // - for (Count = 0; ((EFI_IFR_OP_HEADER *)&Location[Count])->OpCode != EFI_IFR_FORM_SET_OP; ) { - Count = Count + ((EFI_IFR_OP_HEADER *)&Location[Count])->Length; - } - - // - // Copy to local variable - // - CopyMem(&Guid, &((EFI_IFR_FORM_SET *)&Location[Count])->Guid, sizeof (EFI_GUID)); - - // - // Check to see if IfrPack->Guid != GuidId - // - if (!CompareGuid(&Guid, Package->GuidId)) { - // - // If a string package is present, the GUIDs should have agreed. Return an error - // - if (Package->StringPack != NULL) { - return EFI_INVALID_PARAMETER; - } - } - } - - if (Package->FontPack != NULL) { - // - // Add whatever narrow glyphs were passed to us if undefined - // - CopyMem(&NumNarrowGlyphs, &Package->FontPack->NumberOfNarrowGlyphs, sizeof (UINT16)); - for (Count = 0; Count <= NumNarrowGlyphs; Count++) { - Local = (UINT8*)(&Package->FontPack->NumberOfWideGlyphs + sizeof(UINT8)) + (sizeof(EFI_NARROW_GLYPH)) * Count; - NarrowGlyph = (EFI_NARROW_GLYPH*)Local; - CopyMem(&Member, &NarrowGlyph->UnicodeWeight, sizeof (UINT16)); - // - // If the glyph is already defined, do not overwrite it. It is what it is. - // - CopyMem(&Unicode, &GlobalData->NarrowGlyphs[Member].UnicodeWeight, sizeof (UINT16)); - if (Unicode == 0) { - CopyMem(&GlobalData->NarrowGlyphs[Member], Local, sizeof (EFI_NARROW_GLYPH)); - } - } - - // - // Add whatever wide glyphs were passed to us if undefined - // - CopyMem(&NumWideGlyphs, &Package->FontPack->NumberOfWideGlyphs, sizeof (UINT16)); - for (Count = 0; Count <= NumWideGlyphs; Count++) { - Local = (UINT8*)(&Package->FontPack->NumberOfWideGlyphs + sizeof(UINT8)) + (sizeof(EFI_NARROW_GLYPH)) * NumNarrowGlyphs; - WideGlyph = (EFI_WIDE_GLYPH*)Local; - CopyMem(&Member, - (UINTN*)(Local + sizeof (EFI_WIDE_GLYPH) * Count), - sizeof (UINT16)); - // - // If the glyph is already defined, do not overwrite it. It is what it is. - // - CopyMem(&Unicode, &GlobalData->WideGlyphs[Member].UnicodeWeight, sizeof (UINT16)); - if (Unicode == 0) { - Local = (UINT8*)(&Package->FontPack->NumberOfWideGlyphs + sizeof(UINT8)) + (sizeof(EFI_NARROW_GLYPH)) * NumNarrowGlyphs; - WideGlyph = (EFI_WIDE_GLYPH*)Local; - CopyMem(&GlobalData->WideGlyphs[Member], - (UINTN *)(Local + sizeof (EFI_WIDE_GLYPH) * Count), - sizeof (EFI_WIDE_GLYPH)); - } - } - } - - if (Package->KeyboardPack != NULL) { - // - // Sending me a Keyboard Package - // - if (Package->KeyboardPack->DescriptorCount > 105) { - return EFI_INVALID_PARAMETER; - } - - // - // If someone updates the Descriptors with a count of 0, blow aware the overrides. - // - if (Package->KeyboardPack->DescriptorCount == 0) { - ZeroMem (GlobalData->OverrideKeyboardLayout, sizeof (EFI_KEY_DESCRIPTOR) * 106); - } - - if (Package->KeyboardPack->DescriptorCount < 106 && Package->KeyboardPack->DescriptorCount > 0) { - // - // If SystemKeyboard was updated already, then steer changes to the override database - // - if (GlobalData->SystemKeyboardUpdate) { - ZeroMem (GlobalData->OverrideKeyboardLayout, sizeof (EFI_KEY_DESCRIPTOR) * 106); - for (Count = 0;Count < Package->KeyboardPack->DescriptorCount; Count++) { - CopyMem(&Member, &Package->KeyboardPack->Descriptor[Count].Key, sizeof (UINT16)); - CopyMem(&GlobalData->OverrideKeyboardLayout[Member], &Package->KeyboardPack->Descriptor[Count], sizeof (EFI_KEY_DESCRIPTOR)); - } - } else { - // - // SystemKeyboard was never updated, so this is likely the keyboard driver setting the System database. - // - ZeroMem (GlobalData->SystemKeyboardLayout, sizeof (EFI_KEY_DESCRIPTOR) * 106); - for (Count = 0;Count < Package->KeyboardPack->DescriptorCount; Count++) { - CopyMem(&Member, &Package->KeyboardPack->Descriptor->Key, sizeof (UINT16)); - CopyMem(&GlobalData->SystemKeyboardLayout[Member], &Package->KeyboardPack->Descriptor[Count], sizeof (EFI_KEY_DESCRIPTOR)); - } - - // - // Just updated the system keyboard database, reflect that in the global flag. - // - GlobalData->SystemKeyboardUpdate = TRUE; - } - } - } - - // - // If someone is passing in a string only, create a dummy IfrPack with a Guid - // to enable future searching of this data. - // - if ((Package->IfrPack == NULL) && (Package->StringPack != NULL)) { - ZeroMem (&FormSetStub, sizeof (FormSetStub)); - - FormSetStub.Header.Type = EFI_HII_IFR; - FormSetStub.Header.Length = sizeof (EFI_FORM_SET_STUB); - - FormSetStub.FormSet.Header.OpCode = EFI_IFR_FORM_SET_OP; - FormSetStub.FormSet.Header.Length = (UINT8)sizeof (EFI_IFR_FORM_SET); - FormSetStub.FormSet.FormSetTitle = 0x02; // Dummy string - CopyMem (&FormSetStub.FormSet.Guid, Package->GuidId, sizeof(EFI_GUID)); - - FormSetStub.EndFormSet.Header.OpCode = EFI_IFR_END_FORM_SET_OP; - FormSetStub.EndFormSet.Header.Length = (UINT8)sizeof (EFI_IFR_END_FORM_SET); - Package->IfrPack = (EFI_HII_IFR_PACK *)&FormSetStub; - } - - if (Package->IfrPack != NULL) { - // - // Sending me an IFR Package - // Get its size - // - Status = FakeGetPackSize ((VOID *)Package->IfrPack, &IfrSize, NULL); - } - - if (Package->StringPack != NULL) { - // - // Sending me a String Package - // Get its size - // - Status = FakeGetPackSize ((VOID *)Package->StringPack, &StringSize, &NumberOfTokens); - } - - InstanceSize = IfrSize + StringSize; - - if (InstanceSize != 0) { - PackageInstance = AllocateZeroPool (InstanceSize + sizeof (EFI_FAKE_HII_PACKAGE_INSTANCE)); - - ASSERT (PackageInstance); - - // - // If there is no DatabaseHead allocated - allocate one - // - if (HiiData->DatabaseHead == NULL) { - HiiData->DatabaseHead = AllocateZeroPool (sizeof(EFI_FAKE_HII_HANDLE_DATABASE)); - ASSERT (HiiData->DatabaseHead); - } - - // - // If the head is being used (Handle is non-zero), allocate next Database and - // add it to the linked-list - // - if (HiiData->DatabaseHead->Handle != 0) { - HandleDatabase = AllocateZeroPool (sizeof(EFI_FAKE_HII_HANDLE_DATABASE)); - - ASSERT (HandleDatabase); - - for ( ; Database->NextHandleDatabase != NULL; Database = Database->NextHandleDatabase); - - // - // We are sitting on the Database entry which contains the null Next pointer. Fix it. - // - Database->NextHandleDatabase = HandleDatabase; - - } - - Database = HiiData->DatabaseHead; - - // - // Initialize this instance data - // - for (*Handle = 1; Database->NextHandleDatabase != NULL; Database = Database->NextHandleDatabase) { - // - // Since the first Database instance will have a passed back handle of 1, we will continue - // down the linked list of entries until we encounter the end of the linked list. Each time - // we go down one level deeper, increment the handle value that will be passed back. - // - if (Database->Handle >= *Handle) { - *Handle = Database->Handle + 1; - } - } - - PackageInstance->Handle = *Handle; - PackageInstance->IfrSize = IfrSize; - PackageInstance->StringSize = StringSize; - if (Package->GuidId != NULL) { - CopyMem (&PackageInstance->Guid, Package->GuidId, sizeof (EFI_GUID)); - } - - Database->Buffer = PackageInstance; - Database->Handle = PackageInstance->Handle; - Database->NumberOfTokens = NumberOfTokens; - Database->NextHandleDatabase = NULL; - - if (IfrSize > 0) { - CopyMem (&PackageInstance->IfrData, Package->IfrPack, IfrSize); - } - - if (StringSize > 0) { - CopyMem ((CHAR8 *)(&PackageInstance->IfrData) + IfrSize, Package->StringPack, StringSize); - } - } - return EFI_SUCCESS; -} diff --git a/newshell/FakeHii.h b/newshell/FakeHii.h index 57815e6..7af4edc 100644 --- a/newshell/FakeHii.h +++ b/newshell/FakeHii.h @@ -34,11 +34,6 @@ Revision History #define EFI_FAKE_HII_DATA_SIGNATURE EFI_SIGNATURE_32 ('F', 'H', 'I', 'I') -#define EFI_HII_PROTOCOL_GUID_OLD \ - { \ - 0xcd361957, 0xafbe, 0x425e, 0xa3, 0x58, 0x5f, 0x58, 0x89, 0xcf, 0xfe, 0x7b \ - } - #define DEFAULT_FORM_BUFFER_SIZE 0xFFFF #define DEFAULT_STRING_BUFFER_SIZE 0xFFFF @@ -49,45 +44,6 @@ Revision History #define NARROW_WIDTH 8 #define WIDE_WIDTH 16 -typedef struct { - EFI_HII_IFR_PACK *IfrPack; - EFI_HII_FONT_PACK *FontPack; - EFI_HII_STRING_PACK *StringPack; - EFI_HII_KEYBOARD_PACK *KeyboardPack; - EFI_GUID *GuidId; -} EFI_HII_PACK_LIST; - -typedef -EFI_STATUS -(EFIAPI *EFI_HII_NEW_PACK_OLD) ( - IN EFI_HII_PROTOCOL *This, - IN EFI_HII_PACK_LIST *Package, - OUT EFI_HII_HANDLE *Handle - ); - -typedef struct _EFI_HII_PROTOCOL_OLD { - EFI_HII_NEW_PACK_OLD NewPack; - EFI_HII_REMOVE_PACK RemovePack; - EFI_HII_FIND_HANDLES FindHandles; - EFI_HII_EXPORT ExportDatabase; - - EFI_HII_TEST_STRING TestString; - EFI_HII_GET_GLYPH GetGlyph; - EFI_HII_GLYPH_TO_BLT GlyphToBlt; - - EFI_HII_NEW_STRING NewString; - EFI_HII_GET_PRI_LANGUAGES GetPrimaryLanguages; - EFI_HII_GET_SEC_LANGUAGES GetSecondaryLanguages; - EFI_HII_GET_STRING GetString; - EFI_HII_RESET_STRINGS ResetStrings; - EFI_HII_GET_LINE GetLine; - EFI_HII_GET_FORMS GetForms; - EFI_HII_GET_DEFAULT_IMAGE GetDefaultImage; - EFI_HII_UPDATE_FORM UpdateForm; - - EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout; -} EFI_HII_PROTOCOL_OLD; - typedef struct { EFI_HII_PACK_HEADER Header; EFI_IFR_FORM_SET FormSet; @@ -109,13 +65,6 @@ typedef struct _EFI_FAKE_HII_HANDLE_DATABASE { struct _EFI_FAKE_HII_HANDLE_DATABASE *NextHandleDatabase; } EFI_FAKE_HII_HANDLE_DATABASE; -typedef struct _EFI_FAKE_HII_DATA_OLD { - UINTN Signature; - EFI_FAKE_HII_GLOBAL_DATA *GlobalData; - EFI_FAKE_HII_HANDLE_DATABASE *DatabaseHead; // Head of the Null-terminated singly-linked list of handles. - EFI_HII_PROTOCOL_OLD Hii; -} EFI_FAKE_HII_DATA_OLD; - typedef struct _EFI_FAKE_HII_DATA { UINTN Signature; EFI_FAKE_HII_GLOBAL_DATA *GlobalData; @@ -134,7 +83,6 @@ typedef struct { } EFI_FAKE_HII_PACKAGE_INSTANCE; #define EFI_FAKE_HII_DATA_FROM_THIS(a) CR (a, EFI_FAKE_HII_DATA, Hii, EFI_FAKE_HII_DATA_SIGNATURE) -#define EFI_FAKE_HII_DATA_OLD_FROM_THIS(a) CR (a, EFI_FAKE_HII_DATA_OLD, Hii, EFI_FAKE_HII_DATA_SIGNATURE) EFI_STATUS FakeInitializeHiiDatabase ( @@ -147,14 +95,6 @@ FakeUninstallHiiDatabase ( VOID ); -EFI_STATUS -EFIAPI -FakeHiiNewPackOld ( - IN EFI_HII_PROTOCOL *This, - IN EFI_HII_PACK_LIST *PackageList, - OUT EFI_HII_HANDLE *Handle - ); - EFI_STATUS EFIAPI FakeHiiNewPack ( diff --git a/newshell/init.c b/newshell/init.c index 162d4c2..978d9c6 100644 --- a/newshell/init.c +++ b/newshell/init.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005, Intel Corporation +Copyright (c) 2005 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -40,6 +40,8 @@ CHAR16 *ShellEnvPathName[] = { NULL }; +EFI_CONSOLE_CONTROL_SCREEN_MODE mOldCurrentMode = EfiConsoleControlScreenText; + EFI_SHELL_INTERFACE *OldSI; EFI_STATUS @@ -205,9 +207,26 @@ _DoInit ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; - EFI_GUID EfiLibGuid = EFI_NSHELL_GUID; + EFI_STATUS Status; + EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl; + EFI_GUID EfiLibGuid = EFI_NSHELL_GUID; InitializeShellLib (ImageHandle, SystemTable); + + // + // If EFI_CONSOLE_CONTROL_PROTOCOL is available, + // use it to switch to text mode first. + // + Status = LibLocateProtocol ( + &gEfiConsoleControlProtocolGuid, + &ConsoleControl + ); + if (!EFI_ERROR (Status)) { + Status = ConsoleControl->GetMode (ConsoleControl, &mOldCurrentMode, NULL, NULL); + if (!EFI_ERROR (Status) && mOldCurrentMode != EfiConsoleControlScreenText) { + ConsoleControl->SetMode (ConsoleControl, EfiConsoleControlScreenText); + } + } + // // When running under EFI1.1, there is no HII support // so we have to provide our embedded HII support @@ -456,7 +475,10 @@ _CleanUpOnExit ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; + EFI_STATUS Status; + EFI_STATUS ConsoleControlStatus; + EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl; + EFI_CONSOLE_CONTROL_SCREEN_MODE CurrentMode; Status = EFI_SUCCESS; if (OldSI) { @@ -499,6 +521,21 @@ _CleanUpOnExit ( // LibUnInitializeStrings (); FakeUninstallHiiDatabase(); + + // + // If EFI_CONSOLE_CONTROL_PROTOCOL is available, + // switch back to the original console mode. + // + ConsoleControlStatus = LibLocateProtocol ( + &gEfiConsoleControlProtocolGuid, + &ConsoleControl + ); + if (!EFI_ERROR (ConsoleControlStatus)) { + ConsoleControlStatus = ConsoleControl->GetMode (ConsoleControl, &CurrentMode, NULL, NULL); + if (!EFI_ERROR (ConsoleControlStatus) && CurrentMode != mOldCurrentMode) { + ConsoleControl->SetMode (ConsoleControl, mOldCurrentMode); + } + } return Status; } // @@ -769,7 +806,7 @@ _ShellLoadEnvDriver ( (VOID *) &Junk ); if (!EFI_ERROR (Status)) { - if (!CompareGuid (&Junk->SESGuid, &SESGuid)) { + if (CompareGuid (&Junk->SESGuid, &SESGuid) == 0) { if (Junk->MajorVersion >= EFI_NSHELL_MAJOR_VERSION) { return Status; } @@ -822,7 +859,7 @@ _ShellLoadEnvDriver ( ); if (!EFI_ERROR (Status)) { Status = EFI_UNSUPPORTED; - if (!CompareGuid (&Junk->SESGuid, &SESGuid)) { + if (CompareGuid (&Junk->SESGuid, &SESGuid) == 0) { if (Junk->MajorVersion >= EFI_NSHELL_MAJOR_VERSION) { Status = EFI_SUCCESS; } diff --git a/openinfo/OpeninfoStrings.uni b/openinfo/OpeninfoStrings.uni index f2c230fe35434f2c84d77f549222251cb55df219..13adc0fb6c7a5911e3d2371281d6f4d8772eaffc 100644 GIT binary patch delta 736 zcmdnyy1;#c3$Fr$E`tJt5rY8`nr(F6%*LP3P{5GNkjIb-#AyuqlUdon^KvpE!O0Uj zOeb4$cwvYxWrwN)s!*OB#TkX6LV5B%&K6F%SwMA)lij#gCf6tlOy0qjgCVnt6|5F) zo(xYNBPW=(k7oj0Tz;~ffZ60MPMOJayegBQ@d_{lbpTb#PZr@ba!myKAqD8aM22** zpGp{t!MtK1ozIXA^kX7J2~Y;4rX0vCVaNc>D*$PT-W-P1$@6*LCm-Mw1KSQZ*PSZn zGU!dd$X`COfn)Lo{t6J~A+P|6mmnxJxj|59@)SX^Xo4WuWIG`tK~QwL0G(P4jHVo* zBP%Dni^xu1AS9uw0E#Y#BA`4-E*0#(G@wd|_mDk=YV9)NE|9ebA|Z@cFc*Ps6a4@Z z2Qe+g;7lX&SujyMA->5^#3#VGbrMrROb2 r&g_tbG9N+A5u2Q)q%v7Rnr-qFC8^1G_;X;Eeo|>W z0d*26071^m2a=#b&1WbF^MS!T`K5^LBw>lkj|9rVW;=*<0gYpud_%;KAL5flphg9T zOormgCq*?GA+7;gxIy#-*y2rM5PFOFEHFPoVjh?lkeo8PL0W6_HOU=d`hXOOegtMu zk%5TS$wKH1IS3sj520-oK(yH87-f~o7o^xG+bFhy&Ag)60M-vN6D04#!OOtK0Kxzr C7NWTT diff --git a/openinfo/openinfo.inf b/openinfo/openinfo.inf index b0566e1..7c14b07 100644 --- a/openinfo/openinfo.inf +++ b/openinfo/openinfo.inf @@ -72,7 +72,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=OpeninfoMain C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/pci/PciStrings.uni b/pci/PciStrings.uni index 006681f370de1db626793b1be16271a5b280c11e..9b65a2f49a1018ca00f4062e4ff305ac113b9ee4 100644 GIT binary patch delta 564 zcma)2%PT}-6hC7oj|{G6rsR3OVlk#^#6l@~l?@w9DKSFR9md7XlyPynVv_tMStup1 zB-~gip)4(|r~$sJfDC%BC4;6V`_pEMmbOfrN0BvB9f@Eo(@UD?3R zW-7X;1V)x%d1?ju%F*g|5SE#BvqXN3s?{l?0bocxl$SEW6h=KV=PDkq(Q3Sj{heiYUYb^u_T~-z7o6IK3+n0G-wu6C;VCqR#iLf(?QOj ziS`9&y%EZYU>FyvkE6(389}}L6S^J-R)bQ;?oG vgPWW<-Lu(#38nWOTqR@pNzm(F`YpQke6t*{ijd6^7W@yvTkJMLuxR}NQU86^<|1kHV<4ub?^R9JHvLIn zNIC?Lbm-vVq$0(7H(eaWNd-3v2+_s4t0H*5r`Qfo4)?p4@1A?k`ObaN2)y|msGr}t z@}gil=ve$_Ip*i0cL3%4j}c$mMsw*At`!dR~H_p4t#Dls0>EKAlVIq)(k^ou*utowUSYEw7+n4j!G7Im%_prHDR>^4teg z?rqHw>EcWIRDgFlSPA26t%!$}?$a?MC&*&UZK7Sd!IReC1I+GY)G=JV_r}oeZQ)rZ zGO2#mQJNvl`>#@d2-8&42=eS{XO4^dTzmeLekVaxj#0&ssC(h5zZ~ktAwo5EnjCZa z=$*mK$}ua3-B-INSUq92s?ij7ysi#SJ58wmM$!z|2Eymmm43}$B5|Kjm2Z)MhPy5C zKMI=Yg8yl8Im<)~7;N;Li%*UO(QMqqrR|WZHq$NUli50X`TwbPARR0tH(50xwcrby L!N%x*v1;fSPTsw` diff --git a/pci/pci.c b/pci/pci.c index c0bed9a..74321ad 100644 --- a/pci/pci.c +++ b/pci/pci.c @@ -1355,7 +1355,7 @@ Routine Description: HiiHandle, INDEX_OF (&(Bridge->PrefetchableMemBase)), Bridge->PrefetchableBaseUpper, - Bridge->PrefetchableMemBase << 16 + (Bridge->PrefetchableMemBase << 16) & 0xfff00000 ); PrintToken ( diff --git a/pci/pci.inf b/pci/pci.inf index 2be95de..00102ec 100644 --- a/pci/pci.inf +++ b/pci/pci.inf @@ -73,7 +73,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=PciDump C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/reset/ResetStrings.uni b/reset/ResetStrings.uni index a2aca91f8b9a9d025595b672640fe71c61209826..fe023bd6d2b4f9e5b21c6c32c29294e6b546eede 100644 GIT binary patch delta 98 zcmZor`=C6*g;#+=mqCHSh`|5|%{Dp*a!-!ok(#`Tdl``4vss4s6{CJJLn%W65au%! qF_ZummoQ{7qylMmpw@CAsQ{EI0E%V;={yF#$&B3fn~w=tF#!OtY8Ns9 delta 234 zcmeyM+@LnWWn)kP_rwV-lNWIx08vRidp1k)zGFmsledG;K|_65Da9wGPnWR3Q(Id SU7N~~GWj7#_2v!y4om>XPBfwb diff --git a/reset/reset.inf b/reset/reset.inf index 9b35600..3af6b2c 100644 --- a/reset/reset.inf +++ b/reset/reset.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeReset C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/rm/RmStrings.uni b/rm/RmStrings.uni index f41e9ba8a1a5a0cc22cbdf3e71660dd7695ed777..4e31b37f7a2b92c81a8df59175b5c0e19e022d6a 100644 GIT binary patch delta 847 zcmeHD%`O9B6upx&qr^{)(wGjTB@us-5*rpnyEHMaiF8SHglKEhP7|@P=*EsF=K-w5 zMg)_10b?se1KZDf142<`EnkbXQGM5L~+?Pix zEMr|3zv<3|G~RZVV2QQ9>W7|FY1W^eL`n`Jt1L8sZN;T2Vq$p|PGlOi(s8(X@(yg*|nFbp)6-X0}Ru5vVQPE&5!KjIc6cPhS1r(pDjuG$x+RW_M=Zy!Xxbz4>@d=)9aY`CGP!ug1)DjY?F;qmUp_Rm=sdh=XOP8pP!=kG~HXn#1qL z7ddBjac<;9s-BN*z3e;_ z)G5?fz~oi-P`F07Q867b8?e&7B~&YL_5#^uC{T6TK}>kJiN0HW<-Ebq67$9p8bl75 z;ad#U7FbjLX;CXRifTY;G}i&{9mF=ZmA{$^U_DA*M`jhf69LbFC05c?7d!VbN(XOt z_wlUVYBp5yTG$q@{8|miJSdi)DWKg4!#UB)>sp-6!HE8VlxU3p%BpveqsbI6gd+St zx!eDke5*y}5(LH(QUG%K!~Tc7G8OTA4y^PZJBe_^TJ?@2(u%oUeNVnAxrEkD@t16$ z7;UI|om-41SsP3?S&lPfi{QBxO&hhuc*Ztpe0p>#{wFk8kh|@JZ8NMnc?6N-s96As3UL~ouAccU|p{s6{A%}aLY&6_tf-#6dxx77RW(tuS! z7zD&2O6&N_xdj_8+g04KspvDuF=#)63A-CxtVUe3nX6|?1k2hCCPLGt$1S>os^cSm zcWi|@RRWSQ1zFHxhIYf!5|D>9d34%Mz$onmWbmgohK8OwjH(_}iaY{8AAW0^kk+HN z5++omB5+V$HRYtw(*DXcF0FU%t0vAN@K(nP_B*#qYUf#{;WRnQ+5&!YHM%as6)Gtp zK<^|KO~DxL1LT>+m9ADayQ7EnN=%AQ^3>WCCY@dQ+&+uzUfb<@h5rn&Oq1IAw3g<;XPOG{xW;p}5!G zEj^olpLK7ALGiS^&hfD9Bt?jlRAtws{u%91$3fim&f$i3r}W7;q-fI;9#cOm2hK3| z!G#EV`xgB*vgtfPlHpd86%FU>;`xu3%t}8=^KNn8sGO)64JV17m)eWpXnBH$z$I*Q9TZXMS&t=%C$U~UR`B4#OA$f5i1pN~-)xg0sL12(&fA%t`R3bi-@EKr>%r*y z*pi30UF}AO-+O{Q*plEu?~#Y@kSk2%WK)?+{M}{N++!U#cqQT;QFymzZj2$GFNwkXN)~16j0plzs(!wUgH9PHhta*N~e(8qFF$Q@J}{#Z_&RXr^2=bRf#GEDu zXQBxcJSF59!aEOp7Fn%^T|v{QL#yLatl5--zk&!sQqLur1Y55@t~f!5F?>TSw zg&YtK$3u^*i~WzAM7cgum8d~(xm+|TvYLu5H$nbb!vDZ@)_UVuVuZgXq8#=wu|FB| U%5DGcsm7D{4Ub&L+J%Jk7iMwsM*si- diff --git a/sermode/sermode.inf b/sermode/sermode.inf index 7a5cf83..0b0b9ca 100644 --- a/sermode/sermode.inf +++ b/sermode/sermode.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeSerialMode C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/shellenv/ConnectStrings.uni b/shellenv/ConnectStrings.uni index 48a817da38db274d00e9b867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u}5$^&^?^elhPO~(ZYX|%DrtU-gUlBzo)g;)*VoGmQ2-mPnVCt*QLZV=0}Tgxevp-ssae;*AC#OyI} zni_ap;D<5rF^KF`a0RBh!3QFFK6o)dt(*G5O;I#>l}vFd0(t{|IR5*#1F{hpa~*=ofd<{ttJr@#T4Fe5qx#$5Q&0%ZZ13+a(zbCpu1P)y8) zl-=FnN|4hqVS-1_o8OL8&61d&JVkhHc9M9%8%EJ{GBmoB(BP6FYb1%;qCW@j2`i>9 zJy%@Hfthh!$GMu{hGjUv6p8TvGRzYhiK@7COQ8BF*V#L$S;W)2cV%Ku2 zi>5NTXj}w6Ty8CnpCSYF|T7=d|k~;8z>J1bNbv!wGTF#&*($of{^D zM-$j8JRBJ%CiTKd@y-sIfhWG~#L|bm!X!5_aS!C++7eUb@Lc2-lx``)%{MNbh7Ov9 z)1(xVC&G8aKE6&ff0{V76E@1lObjmmtS=tf75wsrzF6~2@XLtZ!Nop(ktJXwGtFX2 zRb+?W*M=d-m6^wR{UH-{vy-MG-J!$II@{qyDu*e<_{~rjDmjW<883T(kP?UDSF%`K z{T6}tIqDR;VOe`11z+y6M(VAa>N!q~Uo}kde9(rs^hL?u;FnMIMbp0Em!I{;wikk5 zlJ*A|hxS7cGo^^L<=XEz@?jxCBwpP@fLpv3iZJxC4(aOttuX#B{&~g24TC(z9??4e zEso$*QLq_O!x;8H4t63=iSLlohKD1w!E{feRwLza3PgWPl?;~Drbl7)9ZO`MsOw^imo(DeYhxibBZ_sZAp(zWXyX;XEZJF99mPEdAyrVj*%`<^0H50b2X^Szy#N3J diff --git a/shellenv/ShellenvStrings.uni b/shellenv/ShellenvStrings.uni index d4b1e363479f98f471dcdb5482fbee29fa2704fa..ea7043f564007f8b9a7794af3a6d32eef81d00ed 100644 GIT binary patch delta 1748 zcmcgtOK%cU82u>48fh0T2n%A0G-J~TX``lUEDNAuCuwPA=qoX4(1MTxRj3BtRO8x2 z@~z$IMiUn{`~te^#!X$hGyVaSCf(O_=K)NavTDo?4EJ%)cka1oE+?lwKR((&%nkS{ zNPfCW(`YmM(LMLzJjpai%ap)plU7LPqi>`9-Q{s0P3mj>Wc0z0YOTJuUZGto>!ax=>g=e7HH~s(D(Y?5Z=q?=(4_5A-N*k?M*$k3 zD||Q=QZ*WmS$N&lX!xYhMeyV*H&ftq_^Lz>^ZqxLyU^6|ti z5miT+wy4beg*!a$>8~HS$Gy&ZN>YpzTA~F$o(;wV^oUBxSbLkN9po-gukkD)gJ~)N zm7xlrFVN4c;~GLji2&O?_noU|=AaexDp<-Y!xJ-WE$wn>RE?RCOQv;*T%b5)CTWqv zl;Yae5y^^j8FH$iEnu~fUF6dqZ|zO5Ex@3{>1k9l-sCnqyl+dC5DwhyPAbEJtVRsQ z#@@9A|FOSwsOZ{r*QhXP3tH2#Y1?F{M0asXRP{)iKo1}|gI4MQb^%4yW5{$s#PxAr zr4jA?g!?bg2yKFdU&Dr93huWU%vW$%h2h--97|A)kKB@FW?IKk0aDaaNStvA$UMF? zZI&3B3Hg%XUPPS;ZrC`Qs2IVRf=W1>F{`tQgF8({Fh-EZEE=kDBkXkwlO>n~tC7f1 zpU%$jKYRIPcHC08B^&CC^tWpkX;=CA_gJj{cVg&9pRh(Ix!#ww+l&qmDu;Y|rQesL z4b?&MKac?53VO?GoKyVpQxLfLzW&9>iQJ{($C&XWbvft} eGunIweG&KqH`b#3OZjP=tba{;hw2B}@r{4dU_#&k delta 75 zcmX>zm-)+orU@<^gX%;!$4P04Z@ytEqQ+j#kj#+Dkh%GDJToJVGg-0SadJV4)Z~c7 aoXIHID, - AcpiDevicePath->UID - ); + if ((AcpiDevicePath->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_HIDPNP_UID), + HiiEnvHandle, + EISA_ID_TO_NUM (AcpiDevicePath->HID), + AcpiDevicePath->UID + ); + } else { + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_HID_UID), + HiiEnvHandle, + AcpiDevicePath->HID, + AcpiDevicePath->UID + ); + } + break; + case ACPI_EXTENDED_DP: + AcpiExDevicepath = (ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR *) DevicePath; + HIDString = AcpiExDevicepath->HidUidCidStr; + UIDString = NextStrA (HIDString); + CIDString = NextStrA (UIDString); + CopyMem (NullString, "NULL", sizeof (NullString)); + if (*HIDString == '\0') { + HIDString = NullString; + } + if (*UIDString == '\0') { + UIDString = NullString; + } + if (*CIDString == '\0') { + CIDString = NullString; + } + if ((AcpiExDevicepath->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { + if ((AcpiExDevicepath->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_HIDPNP_CIDPNP_UID), + HiiEnvHandle, + EISA_ID_TO_NUM (AcpiExDevicepath->HID), + EISA_ID_TO_NUM (AcpiExDevicepath->CID), + AcpiExDevicepath->UID, + HIDString, + CIDString, + UIDString + ); + } else { + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_HIDPNP_CID_UID), + HiiEnvHandle, + EISA_ID_TO_NUM (AcpiExDevicepath->HID), + AcpiExDevicepath->CID, + AcpiExDevicepath->UID, + HIDString, + CIDString, + UIDString + ); + } + } else { + if ((AcpiExDevicepath->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_HID_CIDPNP_UID), + HiiEnvHandle, + AcpiExDevicepath->HID, + EISA_ID_TO_NUM (AcpiExDevicepath->CID), + AcpiExDevicepath->UID, + HIDString, + CIDString, + UIDString + ); + } else { + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_HID_CID_UID), + HiiEnvHandle, + AcpiExDevicepath->HID, + AcpiExDevicepath->CID, + AcpiExDevicepath->UID, + HIDString, + CIDString, + UIDString + ); + } + } + break; + case ACPI_ADR_DP: + AcpiAdrDevicePath = (ACPI_ADR_DEVICE_PATH *) DevicePath; + Length = DevicePathNodeLength (DevicePath); + AdditionalAdrCount = (Length - 8) / 4; + + PrintToken (STRING_TOKEN (STR_SHELLENV_DPROT_ADR), HiiEnvHandle); + Print (L"%hx", AcpiAdrDevicePath->ADR); + for (Index = 0; Index < AdditionalAdrCount; Index++) { + Print (L",%hx", *(UINT32 *) ((UINT8 *) AcpiAdrDevicePath + 8 + Index * 4)); + } + break; + default: + break; } } @@ -565,7 +663,7 @@ struct DevicePathTypes SEnvDP_Strings[] = { SEnvDP_HardwareStr, SEnvHardwareDevicePathEntry, 0x02, - 0x01, + 0x03, L"ACPI", SEnvDP_ACPI_Str, SEnvAcpiDevicePathEntry, @@ -871,7 +969,9 @@ Routine Description: UINT32 DirCount; EFI_IMAGE_DOS_HEADER *DosHdr; EFI_IMAGE_NT_HEADERS *NtHdr; - EFI_IMAGE_OPTIONAL_HEADER *OptionalHdr; + UINT16 Magic; + EFI_IMAGE_OPTIONAL_HEADER32 *OptionalHdr32; + EFI_IMAGE_OPTIONAL_HEADER64 *OptionalHdr64; EFI_IMAGE_DATA_DIRECTORY *DirectoryEntry; EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *DebugEntry; VOID *CodeViewEntryPointer; @@ -881,8 +981,28 @@ Routine Description: DosHdr = ImageBase; if (DosHdr && DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) { NtHdr = (EFI_IMAGE_NT_HEADERS *) ((UINT8 *) DosHdr + DosHdr->e_lfanew); - OptionalHdr = (VOID *) &NtHdr->OptionalHeader; - DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *) &(OptionalHdr->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]); + // + // NOTE: We use Machine to identify PE32/PE32+, instead of Magic. + // It is for backward-compatibility consideration, because + // some system will generate PE32+ image with PE32 Magic. + // + if (NtHdr->FileHeader.Machine == EFI_IMAGE_MACHINE_IA32) { + Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC; + } else if (NtHdr->FileHeader.Machine == EFI_IMAGE_MACHINE_IA64) { + Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC; + } else if (NtHdr->FileHeader.Machine == EFI_IMAGE_MACHINE_X64) { + Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC; + } else { + Magic = NtHdr->OptionalHeader.Magic; + } + if (Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) { + OptionalHdr32 = (VOID *) &NtHdr->OptionalHeader; + DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *) &(OptionalHdr32->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]); + } else { + OptionalHdr64 = (VOID *) &NtHdr->OptionalHeader; + DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *) &(OptionalHdr64->DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]); + } + if (DirectoryEntry->VirtualAddress != 0) { for (DirCount = 0; (DirCount < DirectoryEntry->Size / sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY)) && CodeViewEntryPointer == NULL; @@ -1415,3 +1535,84 @@ Routine Description: } } while (!EFI_ERROR (Status)); } + +VOID +EFIAPI +SEnvGraphicsOutput ( + IN EFI_HANDLE h, + IN VOID *Interface + ) +{ + EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; + EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; + EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; + + GraphicsOutput = (EFI_GRAPHICS_OUTPUT_PROTOCOL *) Interface; + Mode = GraphicsOutput->Mode; + Info = Mode->Info; + + // + // Dump GraphicsOutput Info: + // HorizontalResolution + // VerticalResolution + // PixelFormat + // PixelInformation + // PixelPerScanLine + // FrameBufferBase + // FrameBufferSize + // + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_HRESOL), + HiiEnvHandle, + Info->HorizontalResolution + ); + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_VRESOL), + HiiEnvHandle, + Info->VerticalResolution + ); + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_PIXELFORMAT), + HiiEnvHandle + ); + switch (Info->PixelFormat) { + case PixelRedGreenBlueReserved8BitPerColor: + Print (L"PixelRedGreenBlueReserved8BitPerColor"); + break; + case PixelBlueGreenRedReserved8BitPerColor: + Print (L"PixelBlueGreenRedReserved8BitPerColor"); + break; + case PixelBitMask: + Print (L"PixelBitMask"); + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_PIXELINFORMATION), + HiiEnvHandle, + Info->PixelInformation.RedMask, + Info->PixelInformation.GreenMask, + Info->PixelInformation.BlueMask, + Info->PixelInformation.ReservedMask + ); + break; + case PixelBltOnly: + Print (L"PixelBltOnly"); + break; + default: + Print (L"Unknown"); + break; + } + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_PIXELSPERSCANLINE), + HiiEnvHandle, + Info->PixelsPerScanLine + ); + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_FRAMEBUFFERBASE), + HiiEnvHandle, + Mode->FrameBufferBase + ); + PrintToken ( + STRING_TOKEN (STR_SHELLENV_DPROT_FRAMEBUFFERSIZE), + HiiEnvHandle, + Mode->FrameBufferSize + ); +} diff --git a/shellenv/exec.c b/shellenv/exec.c index ac69cf8..8f0b2ac 100644 --- a/shellenv/exec.c +++ b/shellenv/exec.c @@ -213,7 +213,9 @@ SEnvLoadImage ( IN EFI_HANDLE ParentImage, IN CHAR16 *IName, OUT EFI_HANDLE *pImageHandle, - OUT EFI_FILE_HANDLE *pScriptsHandle + OUT EFI_FILE_HANDLE *pScriptsHandle, + OUT UINT16 *ImageMachineType, + OUT BOOLEAN *MachineTypeMismatch ); // @@ -1282,6 +1284,8 @@ Routine Description: CHAR16 *CurrentDir; CHAR16 *OptionsBuffer; UINT32 OptionsSize; + UINT16 MachineType; + BOOLEAN MachineTypeMismatch; // // Initializing Status to aVOID a level 4 warning @@ -1431,12 +1435,24 @@ Routine Description: // // Load the app, or open the script // - SEnvLoadImage (ParentImageHandle, Shell->ShellInt.Argv[0], &NewImage, &Script); + SEnvLoadImage (ParentImageHandle, Shell->ShellInt.Argv[0], &NewImage, &Script, &MachineType, &MachineTypeMismatch); if (!NewImage && !Script) { if (Output) { - PrintToken (STRING_TOKEN (STR_SHELLENV_EXEC_NOT_FOUND), HiiEnvHandle, Shell->ShellInt.Argv[0]); + if (MachineTypeMismatch == FALSE) { + PrintToken (STRING_TOKEN (STR_SHELLENV_EXEC_NOT_FOUND), HiiEnvHandle, Shell->ShellInt.Argv[0]); + } else { + // + // Image is not loaded successfully because of the machine type mismatch. + // Print the error info. + // + PrintToken ( + STRING_TOKEN (STR_SHELLENV_EXEC_IMAGE_TYPE_UNSUPPORTED), + HiiEnvHandle, + LibGetMachineTypeString (MachineType), + LibGetMachineTypeString (EFI_IMAGE_MACHINE_TYPE) + ); + } } - Status = EFI_INVALID_PARAMETER; goto Done; } @@ -1596,14 +1612,9 @@ Routine Description: Done: DEBUG_CODE ( if (EFI_ERROR (Status) && Output) { - switch (Status) { - case -1: - case -2: - case EFI_REDIRECTION_NOT_ALLOWED: - case EFI_REDIRECTION_SAME: - break; - - default: + if ((Status == -1) || (Status == -2) || (Status == EFI_REDIRECTION_NOT_ALLOWED) + || (Status == EFI_REDIRECTION_SAME)) { + } else { PrintToken (STRING_TOKEN (STR_SHELLENV_EXEC_EXIT_STATUS_CODE), HiiEnvHandle, Status); } } @@ -1772,7 +1783,9 @@ SEnvLoadImage ( IN EFI_HANDLE ParentImage, IN CHAR16 *IName, OUT EFI_HANDLE *pImageHandle, - OUT EFI_FILE_HANDLE *pScriptHandle + OUT EFI_FILE_HANDLE *pScriptHandle, + OUT UINT16 *ImageMachineType, + OUT BOOLEAN *MachineTypeMismatch ) /*++ @@ -1810,19 +1823,24 @@ Routine Description: UINTN Size; EFI_FILE_INFO *Info; UINTN InfoBufSize; + EFI_IMAGE_DOS_HEADER DosHeader; + EFI_IMAGE_FILE_HEADER ImageHeader; + EFI_IMAGE_OPTIONAL_HEADER OptionalHeader; + + PathName = NULL; + FileName = NULL; + DevicePath = NULL; + TempDevicePath = NULL; + ImageHandle = NULL; + ScriptHandle = NULL; + OpenDir = NULL; + OpenDirHead = NULL; + *pImageHandle = NULL; + *pScriptHandle = NULL; + PathNeedFree = FALSE; + Info = NULL; + *MachineTypeMismatch = FALSE; - PathName = NULL; - FileName = NULL; - DevicePath = NULL; - TempDevicePath = NULL; - ImageHandle = NULL; - ScriptHandle = NULL; - OpenDir = NULL; - OpenDirHead = NULL; - *pImageHandle = NULL; - *pScriptHandle = NULL; - PathNeedFree = FALSE; - Info = NULL; // // Check if IName contains path info @@ -2060,6 +2078,20 @@ Routine Description: ); if (!EFI_ERROR (Status)) { goto Done; + } else { + Status = LibGetImageHeader ( + DevicePath, + &DosHeader, + &ImageHeader, + &OptionalHeader + ); + if (!EFI_ERROR (Status) && + !EFI_IMAGE_MACHINE_TYPE_SUPPORTED (ImageHeader.Machine) && + OptionalHeader.Subsystem == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION) { + *MachineTypeMismatch = TRUE; + *ImageMachineType = ImageHeader.Machine; + goto Done; + } } // // Try as a ".nsh" file diff --git a/shellenv/init.c b/shellenv/init.c index 1b80aa0..1debf66 100644 --- a/shellenv/init.c +++ b/shellenv/init.c @@ -25,7 +25,7 @@ Revision History #include "shellenvguid.h" extern UINT8 STRING_ARRAY_NAME[]; -extern +extern EFI_STATUS FakeInitializeHiiDatabase ( EFI_HANDLE, EFI_SYSTEM_TABLE *, diff --git a/shellenv/map.c b/shellenv/map.c index 5b7d068..a7dd5d7 100644 --- a/shellenv/map.c +++ b/shellenv/map.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005, Intel Corporation +Copyright (c) 2005 - 2006, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -409,7 +409,7 @@ DumpMappingItem ( HiiEnvHandle, SLen, Var->Name, - Removeable ? L"Removeable " : L"", + Removeable ? L"Removable " : L"", MediaName, ConsistName ); @@ -1206,15 +1206,23 @@ Routine Description: FreeDPath = TRUE; } - // - // Build a file path for the rest of the name string - // - FPath = SEnvIFileNameToPath (Path); + if (StrCmp (L".", Path) == 0) { + // + // Need not append "." device path, use DPath directly w/o freeing it + // + FilePath = DPath; + FreeDPath = FALSE; + } else { + // + // Build a file path for the rest of the name string + // + FPath = SEnvIFileNameToPath (Path); - // - // Append the 2 paths - // - FilePath = AppendDevicePath (DPath, FPath); + // + // Append the 2 paths + // + FilePath = AppendDevicePath (DPath, FPath); + } ASSERT (FilePath); Done: diff --git a/shellenv/protid.c b/shellenv/protid.c index 0655c40..c03bd5b 100644 --- a/shellenv/protid.c +++ b/shellenv/protid.c @@ -123,7 +123,7 @@ SEnvInternalProtocolInfo[] = { NULL, EFI_UGA_IO_PROTOCOL_GUID, L"GraphicsOutput", - NULL, + SEnvGraphicsOutput, NULL, EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID, L"EdidDiscovered", @@ -307,6 +307,96 @@ SEnvInternalProtocolInfo[] = { NULL, EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID, + L"UsbHc", + NULL, + NULL, + EFI_USB_HC_PROTOCOL_GUID, + + L"UsbHc2", + NULL, + NULL, + EFI_USB2_HC_PROTOCOL_GUID, + + L"ExtScsiPassThru", + NULL, + NULL, + EFI_EXT_SCSI_PASS_THRU_PROTOCOL_GUID, + + L"MNPSb", + NULL, + NULL, + EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID, + + L"MNP", + NULL, + NULL, + EFI_MANAGED_NETWORK_PROTOCOL_GUID, + + L"ARPSb", + NULL, + NULL, + EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID, + + L"ARP", + NULL, + NULL, + EFI_ARP_PROTOCOL_GUID, + + L"DHCPv4Sb", + NULL, + NULL, + EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID, + + L"DHCPv4", + NULL, + NULL, + EFI_DHCP4_PROTOCOL_GUID, + + L"TCPv4Sb", + NULL, + NULL, + EFI_TCP4_SERVICE_BINDING_PROTOCOL_GUID, + + L"TCPv4", + NULL, + NULL, + EFI_TCP4_PROTOCOL_GUID, + + L"IPv4Sb", + NULL, + NULL, + EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID, + + L"IPv4", + NULL, + NULL, + EFI_IP4_PROTOCOL_GUID, + + L"IPv4Config", + NULL, + NULL, + EFI_IP4_CONFIG_PROTOCOL_GUID, + + L"UDPv4Sb", + NULL, + NULL, + EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID, + + L"UDPv4", + NULL, + NULL, + EFI_UDP4_PROTOCOL_GUID, + + L"MTFTPv4Sb", + NULL, + NULL, + EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID, + + L"MTFTPv4", + NULL, + NULL, + EFI_MTFTP4_PROTOCOL_GUID, + L"Dpath", SEnvDPath, SEnvDPathTok, diff --git a/shellenv/shelle.h b/shellenv/shelle.h index 68ed225..7523690 100644 --- a/shellenv/shelle.h +++ b/shellenv/shelle.h @@ -1273,7 +1273,7 @@ SEnvCmdCd ( EFI_STATUS SEnvGetFsName ( - IN EFI_HANDLE Handle, + IN EFI_DEVICE_PATH_PROTOCOL *DevPath, IN BOOLEAN ConsistMapping, OUT CHAR16 **Name ); @@ -2046,4 +2046,11 @@ SEnvGetShellMode ( OUT CHAR16 **Mode ); +VOID +EFIAPI +SEnvGraphicsOutput ( + IN EFI_HANDLE h, + IN VOID *Interface + ); + #endif // _SHELLE_H_ diff --git a/stall/StallStrings.uni b/stall/StallStrings.uni index 3a24bd27c1ebfbb2e8e66198db99cf4dc77205f0..f29975f3dbeaa131815b4ca7ae44b2f395203e73 100644 GIT binary patch delta 111 zcmZqE?$e&&!mGfb%b>tu#9#n~W*eO+b5CaB5t@9AM{n{XcD>0iJS{Ljqu%63-pa}M z_$xO5;x%Jr)SdiMNOp4w|0KrEZv@yFH~$bcU<8_0%8qLT!_fS8*<3K}zRHV}?u0stqe8LR*R diff --git a/stall/stall.inf b/stall/stall.inf index c4e4408..578b58e 100644 --- a/stall/stall.inf +++ b/stall/stall.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeStall C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/time/TimeStrings.uni b/time/TimeStrings.uni index f9c7dd149f77516d1e71b8f6d39d3b24b439a2b5..f5c4644777b3ab9f18f64adf121d233548da55d3 100644 GIT binary patch delta 231 zcmZp(_-8)BjaPv|mqCHSh`|5|%{IEu_u*q$<5{_b-e2-UR@*l|!o82T1 GFarRgB02B? delta 249 zcmexo-exhuZDYs`-pNdS60Ri-nGCrMsSFAX`3yxsvKYuN0g?(pG6O7*tRf9byqKX9 zsICO4CU^2g9^J_?d~qNX-I3LkZ6br-WI=(Cn?LZIF!JX!K&*v0RA;h3m*M0b!9|QZ wllOC*0$F8~cM0hLdB(h^n`MNfSa_2eN`ZbU0=g`Zp=9!Z$)%g^Bn~hG06I20y8r+H diff --git a/time/time.c b/time/time.c index 6e68de3..dc09b6c 100644 --- a/time/time.c +++ b/time/time.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005 - 2006, Intel Corporation +Copyright (c) 2005 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -190,7 +190,7 @@ Routine Description: if (!EFI_ERROR (Status)) { Status = RT->GetVariable ( L"TimeZone", - &gEfiGlobalVariableGuid, + &gEfiGenericVariableGuid, NULL, &uValueSize, &nValue diff --git a/time/time.inf b/time/time.inf index eb28549..5181280 100644 --- a/time/time.inf +++ b/time/time.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeTime C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/touch/TouchStrings.uni b/touch/TouchStrings.uni index 5b88b391130cd58e72b29530afbb3f513d2c4eb6..9971b10c964ab5769789b1fc0eb42d9b69645150 100644 GIT binary patch delta 459 zcmbQ_b;D(X3$Fr$E`tJt5rY8`nr(D`%c-2kkjaq4kjjw9kjRh=q!k!SfFdAPF^~lk zE11mBEvsJ4Pze@E1&SyzqyS|~z^W60I#Uq3CeLTrpFD>vidb`H@tV6?liQSOas=-g zZUvwf5XZYsj^|V4RDd~nav}dmPCtfxuyd>?U*u_=TqU5zn$J+gpfI_SSA6m!0U1V} z$-ey3?B!su=77~4kY}6RCun4!$&dy#w-~4&;(1tb6az(*fu76*LXg=C3`x+y$!919 z%47g}DGYjGvt)$rI1z!BEiAoRN@N?OewO|QdpwanYMO delta 530 zcmccNGRbR#%f_HLoRTFBnGCrMsSFAXi41uRDL^^}$SPq-ot(%eJ9!@01pF#C_i-CB zO+LnZ%vu+yHH0ApY*Zf52#BHi3`Ick0(iRi{m!&Zj7?2iIQ& zHX|AAAO(gbpi>%UCrB&v9Q#Q{L+Qv9pMP8sj4Qxp&g9hB&I71$2F33rKGMA&|y2*-S)CQ-J}YEfc6*fx(d>n8BIB69_?a`3yx2xeSR6C6gHy z8z<|C@PTykqv@JlC@##6u9ioXZ?l-F8JH|i%k~* delta 508 zcmcZ*wl92w%f_H{{Msc984Rfm3Jl2%`3!jsB|tWaEC!0?Go%5@L?BLM$YjW2NS&<6 zt2;SOAdVD0o9_x_Gfnmp7MgrOfW;hU8Pq_q@gS=l8G;#{89adyWT*u4ahZ+RvtV-*l#tAOG3Jkgo3JgXJ20&=G(K%a-Re>R&p=ffUw)x~MTuPIj zuo$Ep$V+1=0*Zjd-5GotLMAI(HcmdLCp3AJzL2m2Lk`e{Vz4@pE}%V=>q8|Oi@~a9 z=z~>FKBm71q?!|CRw+>E!i9rrp5#SEMHkM delta 308 zcmcbzk@43C#tAMPgR-<3btWIwGH2AA{E$m|vXpijgui)@wgZ!}0s{o<0_k9eRE83U z;>n8oqLUwJNvJ9?Br+5O#WR4=iXj&W6&NxZ@)%NpWHL~$1gO4v@luV$SJfL_!LmJ4TKwt5z6;EEk!m_!*@PXW9EGetVariable ( L"TimeZone", - &gEfiGlobalVariableGuid, + &gEfiGenericVariableGuid, NULL, &uValueSize, &nValue @@ -545,7 +545,7 @@ TZoneSetValue ( { return RT->SetVariable ( L"TimeZone", - &gEfiGlobalVariableGuid, + &gEfiGenericVariableGuid, EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE, sizeof (INTN), &nValue diff --git a/unload/UnloadStrings.uni b/unload/UnloadStrings.uni index 7386b2fbee0c2e8f9b7cabe277a303060e0246d8..70d52a740fd9ee33171e187123c3e56710075556 100644 GIT binary patch delta 1242 zcmZ`&OH30{6n&#b+A{r%g3vmxlzu2f3$-D{7|?3`MT24@gv1X;g&~6whsq3(47|UJPqs=36dd94z zw&AI<2T@PGCTT=_typNQa0$8V)^*sBNkm>uA+47YGEE8+BAx)2y&_~wJw)@N+>Iik zkTJ)EGKq|9D3^$&L&SHB%3rk9A!|>-YHQD>S6QDl8#0weL;MMo4wH zG+SyE#1oqtuZ=-Oz4qcjZVY-8CA%Y`5p5AZJgV<40ap2r79$@feW!|%8yUY2qW?&# z!$QX2C9FXTzXEp!KGWLQ5f5#4>|^`cLHb@2Y=jN4E3BW5Afk_8r6Hcz>+l~)VK~&V z0cVI=EKR&&mc&v^ z4OW_~;A(Lp-eMPI?qoVDI@2Y*EC2B3qucQ#YA;iIU%>CE({z;-hq#Y(te;fwU~cCZ zU&(%GDvA1DBu1J}qwF&INO8|;bhK>s_EANdkN8@>kLK$q$5V4)Yz(!qYanywb;x^A7#wN!g8B QJ{+vUOk1`vvB$sR57I+02><{9 delta 1198 zcmZWoOGs2v7(TZQ?>xMY<8`#r?D`mIyxoS$vGIXaiq%GJ5Gx5u$5&dTGdVs(qErGw z#QH#5vnkhSG+(RmMk)f+g7x#X5ntEZ&nwz8mXu zEgUut(M&zrX{(g>ic=YOe7DDW0aF8T6c0(_i1q)#g5jQ}N?%VF4=h zp6>a+!z);}8`yT2!Ei5|{(D@{G-wMSMBHg}VW(ipJY%3PuN}>WXUzCL9?%xH-G!Kv zWPH|S!kI^$Y=tGTFaHp$G~ZE@hNYtUJwIIh5WmuWlwT2enC6Oc&$xr&M zBoJo}6~)K$@POE^8I71WTs)Ti*g7$Zm8yy4DSx$ef6;pMIMdi=Ho!($KZ~(ZvKouC zVe$vbjvx}ci|T-rS~GcTBen2?#x9{F@ETVRSm8QRU1Lxt!lG=PekWOiq7m|LuwFJK zDm>Fq(FA3C$ad4nL4E>R^)vhl-d}Xth6H#Qm4|nE;(Enm&IQhd4#WhQmmMeTMQ$*7 zh_mj+`CyUhWrcDNCRj{>(%U`D>k*-eE7WLgL}2h48cj=(?ICZ#q^Yqk(cewyG}cG? zDB*X6X0RQ!=fwWwF-AN*l}F9#^_4k@2h*(7P3lUlJA@>KOuKdDyQLvWu)4zeD+{ca>bJ3P={d rN`Au=INfk0>8$amqoKi_9iy2V^RgB(qnGf!xLGlSr!~rIz3;$Z#A#Pe diff --git a/unload/unload.inf b/unload/unload.inf index 4ee7718..e91869e 100644 --- a/unload/unload.inf +++ b/unload/unload.inf @@ -69,7 +69,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeUnload C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/ver/Ebc/verEbc.c b/ver/Ebc/verEbc.c new file mode 100644 index 0000000..1d7368d --- /dev/null +++ b/ver/Ebc/verEbc.c @@ -0,0 +1,62 @@ +/*++ + +Copyright (c) 2007, Intel Corporation +All rights reserved. This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Module Name: + + verEbc.c + +Abstract: + + Part of shell app "ver". + + + +Revision History + +--*/ + +#include "EfiShellLib.h" +#include "ver.h" +#include EFI_PROTOCOL_DEFINITION (Ebc) + +// +// +// +VOID +DisplayExtendedVersionInfo ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_EBC_PROTOCOL *Ebc; + EFI_STATUS Status; + UINT64 Version; + + Print (L"\n"); + + Status = BS->LocateProtocol ( + &gEfiEbcProtocolGuid, + NULL, + &Ebc + ); + if (EFI_ERROR (Status)) { + return ; + } + + Status = Ebc->GetVersion (Ebc, &Version); + if (EFI_ERROR (Status)) { + return ; + } + + Print (L"EBC VM Version: 0x%x.0x%x\r\n", (UINTN)(UINT16)(Version >> 16), (UINTN)(UINT16)Version); + + return ; +} diff --git a/ver/Ver.inf b/ver/Ver.inf index 4cb4d1b..eedaab2 100644 --- a/ver/Ver.inf +++ b/ver/Ver.inf @@ -1,6 +1,6 @@ #/*++ # -# Copyright (c) 2005, Intel Corporation +# Copyright (c) 2005 - 2007, Intel Corporation # All rights reserved. This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -50,6 +50,9 @@ COMPONENT_TYPE = APPLICATION [sources.ipf] ipf\ver64.c + +[sources.ebc] + ebc\verEbc.c [includes.common] . @@ -78,7 +81,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeVer C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/ver/VerStrings.uni b/ver/VerStrings.uni index 744d30de7e56e7db86f57418752dd567ba2e4aad..5e77a461cd78b61ab49663475eaaea66318bcb4e 100644 GIT binary patch delta 352 zcmdlNb;)Fc3$Fr$E`tJt5rY8`nr(Ex&OJGSn@8N2!I8n4!Gpn*!H>a}A)XlW>rqUs4Y6VNU}-*0lMZP!99tE80S6%GZlEPtMReH@Q!x3?!?pz<|S%3|2q~djdUZJo%wy z_vAa;T$7D>B?4T4f#A$w$Y8->#$XJ@x(p`3AaP|d1+!ckoWLxgE}$AGpcqJvB~Z+b X!3C%iq}PJMoFN7nAW96p3|tHVskl-| delta 1525 zcmb7ETZ>Xr7+qqf&ZJY0W9JZfe^(9AT35anE6ionbZNnT>C#+e3e=&_ez zLw})|x9~ma2NV$zJw)^af?j)Uefu2qC<9|`^a*Qlx2!Q-wuwH(@1&yIF_Kcx!j2hjjYV`^O66UB43AT*K z#E5E3oSkiJzMPDr&!Nq;3QAhJhLS1-V(M3LOMQy@)b8{bcN~cxHC)~V=8#0jPVctg zpxi3vab11znd)a`!jmMzP~GtJz`r{bFt1K}BfLL2d6^7TFfhffA=JX2D65p)8krYc z4!xj1jWpE~NQ#=jf8SSf-rG7|@$05eyH%hD6C=s0GX;{k2EUTl8qb^Dmw8s>&OjD9 ztnquAyBZ79z=kf6BsHfwqFCiwi9CbYBJOG3Gq}V1QwU%}y$Em2SV{#fX_i&uH5OXR zApRMM<7_`09?5!Ia=I_i#Q6blI5%T((*v$2PMa6UvYBM|2fhj~IVR5;qwa~ZcqT54 z*c;DJ6B!3jx<>cuzIjPFYvGmnGKkwRVC%suYg|WOKhF~D=B#L(Oy^3nZgeGD~CvDck1LZvH>*Wi2k>oY>2;^9|aPfhmJyfog5ta|6p_Q`X{; zH+KK3TcLJrk*ty)a8|tiE-%|zdF336CuAsE<51Aj`7$$PJl47NBvs#|AANiq@;>kv DQ`|Dq diff --git a/ver/ver.c b/ver/ver.c index 34aa25d..36ed140 100644 --- a/ver/ver.c +++ b/ver/ver.c @@ -198,6 +198,7 @@ Routine Description: if (LibCheckVarGetFlag (&ChkPck, L"-s")) { PrintToken (STRING_TOKEN (STR_VER_SHELL_VER), HiiHandle, SE2->MajorVersion, SE2->MinorVersion); + PrintToken (STRING_TOKEN (STR_VER_SHELL_MACHINE_TYPE), HiiHandle, LibGetMachineTypeString (EFI_IMAGE_MACHINE_TYPE)); PrintToken (STRING_TOKEN (STR_VER_SHELL_SIG), HiiHandle, &SE2->SESGuid); } else { // diff --git a/vol/Vol.inf b/vol/Vol.inf index 02eac3f..d1eef46 100644 --- a/vol/Vol.inf +++ b/vol/Vol.inf @@ -71,7 +71,6 @@ COMPONENT_TYPE = APPLICATION [nmake.common] - C_STD_INCLUDE= IMAGE_ENTRY_POINT=InitializeVol C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_ARRAY_NAME=$(BASE_NAME)Strings C_STD_FLAGS = $(C_STD_FLAGS) /DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\" diff --git a/vol/VolStrings.uni b/vol/VolStrings.uni index c3ac6151553227d2c6a4af27d1a41414e5a9b864..16252c694ea507e9e268a469f0417d06056633f9 100644 GIT binary patch delta 484 zcmZutze@sf6n~;ndS;-a-d&zoH$;I@5#_#^ZrvzBxUf_}W#C}?XF zr-GuPA)5LNqG*qXmLjOn_jG88$8qob-skgqpZDGtJ{Av>eLBTSrv!~5CR@`p{y>S! zsHAC)Oe)eUtx$zudZT>gR(PU+l)wGU|6+b5nIFQQm`+*hXqeEc&^i>-ltVR#EW`T& znG;H#Q;}NxDwuK%3Inrf=Ft{}O?(#e0$xR!C~!+}N^#_RC-^mV9TTi1P=Y1U!g3YX z%gBpl@u6E~U$`d5^vuB!Fnp>t`8l%WFnLNo=Xd#z@0E~I0oSy7;-5#9Xag!4)N}S! zlRuRczEHg}3uh6tvhb*5HNk^J)P#pJU#i1urT}Ls!9T?%9(srY%kCVUXT&4K#c`J4V9Z0igPng)|2Gm z_G8Eg3Zya=GgwX5l}w#HO>)7+2_lotq>fB3P#2l}OG->y0qD45pzcJ593aeRC