Compare commits
179 Commits
system76-c
...
vUDK2017
Author | SHA1 | Date | |
---|---|---|---|
324a4c9d7d | |||
37a0c27fe1 | |||
2447ae30ac | |||
9e0da2fa43 | |||
0a92412e8f | |||
a54759c134 | |||
ed6ff8b7d4 | |||
872c124c6f | |||
ec198f52fc | |||
d615a3a136 | |||
41e13d1056 | |||
a12787c356 | |||
a5765eec77 | |||
0164fa8f43 | |||
695d419c4c | |||
a56bfec25f | |||
756065c328 | |||
d82ea26664 | |||
f9a4814a2d | |||
c26c4067f3 | |||
3e47c01c85 | |||
fc2ef2115f | |||
121e15a578 | |||
14bb6567c7 | |||
8f0dea41bc | |||
0e3899bed8 | |||
0b5813b95d | |||
8ecee3850d | |||
508dc16eae | |||
ed500f9ed0 | |||
537b39af13 | |||
dc834fb544 | |||
60b6b38cde | |||
d3b84e02eb | |||
60ea76dd3a | |||
931f669d81 | |||
8bb0a06208 | |||
cfab632610 | |||
4dae0b6999 | |||
4f953cca20 | |||
6933eb824a | |||
e10f7f1bae | |||
19b5379a3c | |||
66a539b5d4 | |||
cb053bb8a3 | |||
1a6ed43a07 | |||
93637612c0 | |||
d58f502728 | |||
7ecf635971 | |||
454d99de04 | |||
3ecfa5668f | |||
2d18c3a917 | |||
ceaf8ece84 | |||
b46e49e70d | |||
b0cfe7bb57 | |||
6358c320ad | |||
1d22d00766 | |||
219fee13c8 | |||
14ddca5afe | |||
afd7109b1c | |||
b6adb11163 | |||
9107fb6f55 | |||
d30c0e3f5a | |||
9f7e9a0687 | |||
a08c8afa4c | |||
c345ecbb9b | |||
166481dabf | |||
52dd44ec92 | |||
103f53b650 | |||
0ebc1fa295 | |||
dee4573998 | |||
1316cced3e | |||
72d014cd18 | |||
ca89f36940 | |||
96f3ca2307 | |||
c95b7d8ee1 | |||
1531c7bd82 | |||
82729eef4c | |||
a28adad906 | |||
66dcf570a6 | |||
b583486b14 | |||
85426bd106 | |||
455af1049f | |||
08f2c8fd3a | |||
69a8a9ee20 | |||
bd49174d05 | |||
91751a0825 | |||
f30c40618b | |||
e399d6ff56 | |||
fd9e6ee972 | |||
32c1d95881 | |||
3b530b3896 | |||
c54144f512 | |||
7903b6d2b0 | |||
929246cc03 | |||
7ff98a2f77 | |||
c2fb3cd166 | |||
f567743825 | |||
09a0dbeb3f | |||
7154167901 | |||
2078ead60d | |||
efbf0349e7 | |||
eb7506f76d | |||
5b3b1e00dc | |||
905190af42 | |||
0c0490ecaa | |||
ed906ffb84 | |||
20237f4854 | |||
d64de223f7 | |||
7a4b6b1688 | |||
11a4e7057b | |||
ffd2cde5d2 | |||
1377330367 | |||
3b43e9c06a | |||
78fbc8ec8e | |||
88a0b204ec | |||
407a5c55ba | |||
44c7d1d40c | |||
5fc4b658e6 | |||
094d3a4142 | |||
28614a7b7c | |||
9b68006c93 | |||
0abf7713aa | |||
fa939c26b6 | |||
71a9aa1c50 | |||
4d3f4a20f1 | |||
9fe5799446 | |||
5794c3a92c | |||
844a25f983 | |||
b4244d101d | |||
f35772deee | |||
7430771ec3 | |||
ca740d75d6 | |||
d1ffb4e436 | |||
e51b591e2d | |||
6d644dd0d0 | |||
250c5b2aaa | |||
c0b1ed569f | |||
d7c94fca2f | |||
b4221a2e9e | |||
ce0f811c28 | |||
c29973b789 | |||
0a69072ca0 | |||
66cbba1044 | |||
5359955ddb | |||
f76eb7c132 | |||
d012503729 | |||
ffb4af3b5a | |||
4a75bfb5a0 | |||
757decbd53 | |||
870f872bad | |||
d999d6c8e4 | |||
cbdde352d1 | |||
6efcd38566 | |||
03b4f340d7 | |||
6e5dc5541b | |||
53ae831443 | |||
591c1bed31 | |||
abf1027b09 | |||
729b6b5164 | |||
adeef88496 | |||
321ec73af7 | |||
fc3ce2f30c | |||
7dbcca8820 | |||
6aecbe2de8 | |||
e83897e90c | |||
4df1410641 | |||
fca6831ae4 | |||
549a342e1e | |||
602b573d61 | |||
bfbcd7e4b2 | |||
1e2d930951 | |||
df082f757a | |||
0b75171b76 | |||
0ffecbead1 | |||
ca41ee781d | |||
c69a51ce65 | |||
ae480c61f4 | |||
cbfd09a014 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
Build/
|
Build/
|
||||||
tags/
|
tags/
|
||||||
|
.DS_Store
|
||||||
|
@ -1 +1,2 @@
|
|||||||
Win32 https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32
|
Win32 -r 253 https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32
|
||||||
|
GIT: 0e088c19ab31fccd1d2f55d9e4fe0314b57c0097 https://github.com/tianocore/edk2-BaseTools-win32.git
|
||||||
|
@ -11,32 +11,52 @@
|
|||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
LVL="--quality 9"
|
QLT="-q 9"
|
||||||
|
INPUTFLAG=0
|
||||||
|
|
||||||
while [ $# != 0 ];do
|
for arg; do
|
||||||
case $1 in
|
if [ $1 = -d ]
|
||||||
-d)
|
then
|
||||||
ARGS+="--decompress "
|
INPUTFLAG=1
|
||||||
;;
|
fi
|
||||||
-e)
|
if [ $1 = -e ]
|
||||||
;;
|
then
|
||||||
-g)
|
INPUTFLAG=1
|
||||||
ARGS+="--gap $2 "
|
|
||||||
shift
|
shift
|
||||||
;;
|
continue;
|
||||||
-l)
|
fi
|
||||||
LVL="--quality $2 "
|
if [ $1 = -g ]
|
||||||
|
then
|
||||||
|
ARGS+="$1 $2 "
|
||||||
shift
|
shift
|
||||||
;;
|
|
||||||
-o)
|
|
||||||
ARGS+="--output $2 "
|
|
||||||
shift
|
shift
|
||||||
;;
|
continue;
|
||||||
*)
|
fi
|
||||||
ARGS+="--input $1 "
|
if [ $1 = -o ]
|
||||||
esac
|
then
|
||||||
|
ARGS+="$1 $2 "
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
if [ $1 = -q ]
|
||||||
|
then
|
||||||
|
QLT="$1 $2 "
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
if [ $INPUTFLAG -eq 1 ]
|
||||||
|
then
|
||||||
|
if [ -z $2 ]
|
||||||
|
then
|
||||||
|
ARGS+="$QLT -i $1 "
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
ARGS+="$1 "
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
exec Brotli $ARGS $LVL
|
exec Brotli $ARGS
|
||||||
|
@ -5512,7 +5512,7 @@ DEFINE CLANG38_X64_PREFIX = ENV(CLANG38_BIN)
|
|||||||
DEFINE CLANG38_IA32_TARGET = -target i686-pc-linux-gnu
|
DEFINE CLANG38_IA32_TARGET = -target i686-pc-linux-gnu
|
||||||
DEFINE CLANG38_X64_TARGET = -target x86_64-pc-linux-gnu
|
DEFINE CLANG38_X64_TARGET = -target x86_64-pc-linux-gnu
|
||||||
|
|
||||||
DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -Wno-empty-body -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-parentheses-equality -Wno-unknown-pragmas -Wno-tautological-constant-out-of-range-compare -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-tautological-compare
|
DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -Wno-empty-body -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-parentheses-equality -Wno-unknown-pragmas -Wno-tautological-constant-out-of-range-compare -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-tautological-compare -Wno-unknown-warning-option
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# CLANG38 IA32 definitions
|
# CLANG38 IA32 definitions
|
||||||
@ -7435,29 +7435,40 @@ RELEASE_XCLANG_X64_CC_FLAGS = -ccc-host-triple x86_64-pc-win32-macho -c -Os
|
|||||||
*_XCODE5_*_*_BUILDRULEFAMILY = XCODE
|
*_XCODE5_*_*_BUILDRULEFAMILY = XCODE
|
||||||
*_XCODE5_*_*_BUILDRULEORDER = S s nasm
|
*_XCODE5_*_*_BUILDRULEORDER = S s nasm
|
||||||
|
|
||||||
*_XCODE5_*_ASL_PATH = /usr/bin/iasl
|
#
|
||||||
|
# use xcode-select to change Xcode version of command line tools
|
||||||
|
#
|
||||||
|
*_XCODE5_*_MAKE_PATH = make
|
||||||
|
*_XCODE5_*_CC_PATH = clang
|
||||||
|
*_XCODE5_*_SLINK_PATH = libtool
|
||||||
|
*_XCODE5_*_DLINK_PATH = ld
|
||||||
|
*_XCODE5_*_ASM_PATH = as
|
||||||
|
*_XCODE5_*_PP_PATH = clang
|
||||||
|
*_XCODE5_*_VFRPP_PATH = clang
|
||||||
|
*_XCODE5_*_ASL_PATH = iasl
|
||||||
|
*_XCODE5_*_ASLCC_PATH = clang
|
||||||
|
*_XCODE5_*_ASLPP_PATH = clang
|
||||||
|
*_XCODE5_*_ASLDLINK_PATH = ld
|
||||||
|
*_XCODE5_*_DSYMUTIL_PATH = /usr/bin/dsymutil
|
||||||
|
*_XCODE5_*_MTOC_PATH = /usr/local/bin/mtoc
|
||||||
|
|
||||||
*_XCODE5_*_MAKE_PATH = make
|
##################
|
||||||
*_XCODE5_*_DSYMUTIL_PATH = /usr/bin/dsymutil
|
# ASL definitions
|
||||||
|
##################
|
||||||
|
*_XCODE5_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -c -include AutoGen.h
|
||||||
|
*_XCODE5_*_ASLDLINK_FLAGS = -e _ReferenceAcpiTable -preload -segalign 0x20 -pie -seg1addr 0x240 -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
|
||||||
|
*_XCODE5_*_ASLPP_FLAGS = -x c -E -include AutoGen.h
|
||||||
|
*_XCODE5_*_ASL_FLAGS =
|
||||||
|
*_XCODE5_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
|
||||||
|
|
||||||
|
##################
|
||||||
|
# MTOC definitions
|
||||||
|
##################
|
||||||
|
|
||||||
DEBUG_XCODE5_*_MTOC_FLAGS = -align 0x20 -d $(DEBUG_DIR)/$(MODULE_NAME).dll
|
DEBUG_XCODE5_*_MTOC_FLAGS = -align 0x20 -d $(DEBUG_DIR)/$(MODULE_NAME).dll
|
||||||
NOOPT_XCODE5_*_MTOC_FLAGS = -align 0x20 -d $(DEBUG_DIR)/$(MODULE_NAME).dll
|
NOOPT_XCODE5_*_MTOC_FLAGS = -align 0x20 -d $(DEBUG_DIR)/$(MODULE_NAME).dll
|
||||||
RELEASE_XCODE5_*_MTOC_FLAGS = -align 0x20
|
RELEASE_XCODE5_*_MTOC_FLAGS = -align 0x20
|
||||||
|
|
||||||
#
|
|
||||||
# use xcode-select to change Xcode version of command line tools
|
|
||||||
#
|
|
||||||
*_XCODE5_*_CC_PATH = clang
|
|
||||||
*_XCODE5_*_SLINK_PATH = libtool
|
|
||||||
*_XCODE5_*_DLINK_PATH = ld
|
|
||||||
*_XCODE5_*_ASM_PATH = as
|
|
||||||
*_XCODE5_*_PP_PATH = clang
|
|
||||||
*_XCODE5_*_VFRPP_PATH = clang
|
|
||||||
*_XCODE5_*_ASL_PATH = iasl
|
|
||||||
*_XCODE5_*_ASLCC_PATH = clang
|
|
||||||
*_XCODE5_*_ASLPP_PATH = clang
|
|
||||||
*_XCODE5_*_ASLDLINK_PATH = ld
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# IA-32 definitions
|
# IA-32 definitions
|
||||||
####################
|
####################
|
||||||
@ -7476,8 +7487,6 @@ RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
|
|||||||
RELEASE_XCODE5_IA32_CC_FLAGS = -arch i386 -c -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
|
RELEASE_XCODE5_IA32_CC_FLAGS = -arch i386 -c -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
|
||||||
NOOPT_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -O0 -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
|
NOOPT_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -O0 -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# X64 definitions
|
# X64 definitions
|
||||||
##################
|
##################
|
||||||
@ -7493,16 +7502,9 @@ RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
|
|||||||
*_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
|
*_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
|
||||||
*_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
|
*_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
|
||||||
|
|
||||||
|
DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
|
||||||
DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
|
NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
|
||||||
NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
|
RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
|
||||||
RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
|
|
||||||
|
|
||||||
*_XCODE5_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -c -include AutoGen.h
|
|
||||||
*_XCODE5_*_ASLDLINK_FLAGS = -e _ReferenceAcpiTable -preload -segalign 0x20 -pie -seg1addr 0x240 -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
|
|
||||||
*_XCODE5_*_ASLPP_FLAGS = -x c -E -include AutoGen.h
|
|
||||||
*_XCODE5_*_ASL_FLAGS =
|
|
||||||
*_XCODE5_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
|
|
||||||
|
|
||||||
####################################################################################
|
####################################################################################
|
||||||
#
|
#
|
||||||
|
@ -14,48 +14,54 @@
|
|||||||
@echo off
|
@echo off
|
||||||
@setlocal
|
@setlocal
|
||||||
|
|
||||||
set LVL=--quality 9
|
set QLT=-q 9
|
||||||
|
set INPUTFLAG=0
|
||||||
|
|
||||||
:Begin
|
:Begin
|
||||||
if "%1"=="" goto End
|
if "%1"=="" goto End
|
||||||
|
|
||||||
if "%1"=="-d" (
|
if "%1"=="-d" (
|
||||||
set ARGS=%ARGS% --decompress
|
set INPUTFLAG=1
|
||||||
shift
|
|
||||||
goto Begin
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if "%1"=="-e" (
|
if "%1"=="-e" (
|
||||||
|
set INPUTFLAG=1
|
||||||
shift
|
shift
|
||||||
goto Begin
|
goto Begin
|
||||||
)
|
)
|
||||||
|
|
||||||
if "%1"=="-g" (
|
if "%1"=="-g" (
|
||||||
set ARGS=%ARGS% --gap %2
|
set ARGS=%ARGS% %1 %2
|
||||||
shift
|
|
||||||
shift
|
|
||||||
goto Begin
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1"=="-l" (
|
|
||||||
set LVL=--quality %2
|
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto Begin
|
goto Begin
|
||||||
)
|
)
|
||||||
|
|
||||||
if "%1"=="-o" (
|
if "%1"=="-o" (
|
||||||
set ARGS=%ARGS% --output %2
|
set ARGS=%ARGS% %1 %2
|
||||||
set INTMP=%2
|
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto Begin
|
goto Begin
|
||||||
)
|
)
|
||||||
|
|
||||||
set ARGS=%ARGS% --input %1
|
if "%1"=="-q" (
|
||||||
|
set QLT=%1 %2
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto Begin
|
||||||
|
)
|
||||||
|
|
||||||
|
if %INPUTFLAG%==1 (
|
||||||
|
if "%2"=="" (
|
||||||
|
set ARGS=%ARGS% %QLT% -i %1
|
||||||
|
goto End
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
set ARGS=%ARGS% %1
|
||||||
shift
|
shift
|
||||||
goto Begin
|
goto Begin
|
||||||
|
|
||||||
:End
|
:End
|
||||||
Brotli %ARGS% %LVL%
|
Brotli %ARGS%
|
||||||
@echo on
|
@echo on
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <Common/BuildVersion.h>
|
||||||
|
|
||||||
#include "../dec/decode.h"
|
#include "../dec/decode.h"
|
||||||
#include "../enc/encode.h"
|
#include "../enc/encode.h"
|
||||||
@ -67,6 +68,11 @@ static int ParseQuality(const char* s, int* quality) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define UTILITY_NAME "Brotli"
|
||||||
|
#define UTILITY_MAJOR_VERSION 0
|
||||||
|
#define UTILITY_MINOR_VERSION 5
|
||||||
|
#define UTILITY_REVERSION 2
|
||||||
|
|
||||||
static void ParseArgv(int argc, char **argv,
|
static void ParseArgv(int argc, char **argv,
|
||||||
char **input_path,
|
char **input_path,
|
||||||
char **output_path,
|
char **output_path,
|
||||||
@ -110,6 +116,15 @@ static void ParseArgv(int argc, char **argv,
|
|||||||
}
|
}
|
||||||
*verbose = 1;
|
*verbose = 1;
|
||||||
continue;
|
continue;
|
||||||
|
} else if (!strcmp("--version", argv[k])) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"%s Version %d.%d.%d %s\n",
|
||||||
|
UTILITY_NAME,
|
||||||
|
UTILITY_MAJOR_VERSION,
|
||||||
|
UTILITY_MINOR_VERSION,
|
||||||
|
UTILITY_REVERSION,
|
||||||
|
__BUILD_VERSION);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
if (k < argc - 1) {
|
if (k < argc - 1) {
|
||||||
if (!strcmp("--input", argv[k]) ||
|
if (!strcmp("--input", argv[k]) ||
|
||||||
@ -177,7 +192,8 @@ error:
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: %s [--force] [--quality n] [--gap n] [--decompress]"
|
"Usage: %s [--force] [--quality n] [--gap n] [--decompress]"
|
||||||
" [--input filename] [--output filename] [--repeat iters]"
|
" [--input filename] [--output filename] [--repeat iters]"
|
||||||
" [--verbose] [--window n] [--custom-dictionary filename]\n",
|
" [--verbose] [--window n] [--custom-dictionary filename]"
|
||||||
|
" [--version]\n",
|
||||||
argv[0]);
|
argv[0]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,10 @@ Returns:
|
|||||||
if (OpenSslEnv == NULL) {
|
if (OpenSslEnv == NULL) {
|
||||||
OpenSslPath = OpenSslCommand;
|
OpenSslPath = OpenSslCommand;
|
||||||
} else {
|
} else {
|
||||||
OpenSslPath = malloc(strlen(OpenSslEnv)+strlen(OpenSslCommand)+1);
|
//
|
||||||
|
// We add quotes to the Openssl Path in case it has space characters
|
||||||
|
//
|
||||||
|
OpenSslPath = malloc(2+strlen(OpenSslEnv)+strlen(OpenSslCommand)+1);
|
||||||
if (OpenSslPath == NULL) {
|
if (OpenSslPath == NULL) {
|
||||||
Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");
|
Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");
|
||||||
return GetUtilityStatus ();
|
return GetUtilityStatus ();
|
||||||
@ -1591,11 +1594,12 @@ CombinePath (
|
|||||||
{
|
{
|
||||||
UINT32 DefaultPathLen;
|
UINT32 DefaultPathLen;
|
||||||
UINT64 Index;
|
UINT64 Index;
|
||||||
|
CHAR8 QuotesStr[] = "\"";
|
||||||
|
strcpy(NewPath, QuotesStr);
|
||||||
DefaultPathLen = strlen(DefaultPath);
|
DefaultPathLen = strlen(DefaultPath);
|
||||||
strcpy(NewPath, DefaultPath);
|
strcat(NewPath, DefaultPath);
|
||||||
Index = 0;
|
Index = 0;
|
||||||
for (; Index < DefaultPathLen; Index ++) {
|
for (; Index < DefaultPathLen + 1; Index ++) {
|
||||||
if (NewPath[Index] == '\\' || NewPath[Index] == '/') {
|
if (NewPath[Index] == '\\' || NewPath[Index] == '/') {
|
||||||
if (NewPath[Index + 1] != '\0') {
|
if (NewPath[Index + 1] != '\0') {
|
||||||
NewPath[Index] = '/';
|
NewPath[Index] = '/';
|
||||||
@ -1607,6 +1611,7 @@ CombinePath (
|
|||||||
NewPath[Index + 1] = '\0';
|
NewPath[Index + 1] = '\0';
|
||||||
}
|
}
|
||||||
strcat(NewPath, AppendPath);
|
strcat(NewPath, AppendPath);
|
||||||
|
strcat(NewPath, QuotesStr);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,10 @@ gMakeTypeMap = {"MSFT":"nmake", "GCC":"gmake"}
|
|||||||
|
|
||||||
|
|
||||||
## Build rule configuration file
|
## Build rule configuration file
|
||||||
gDefaultBuildRuleFile = 'Conf/build_rule.txt'
|
gDefaultBuildRuleFile = 'build_rule.txt'
|
||||||
|
|
||||||
|
## Tools definition configuration file
|
||||||
|
gDefaultToolsDefFile = 'tools_def.txt'
|
||||||
|
|
||||||
## Build rule default version
|
## Build rule default version
|
||||||
AutoGenReqBuildRuleVerNum = "0.1"
|
AutoGenReqBuildRuleVerNum = "0.1"
|
||||||
@ -413,7 +416,7 @@ class WorkspaceAutoGen(AutoGen):
|
|||||||
if HasTokenSpace:
|
if HasTokenSpace:
|
||||||
if (PcdItem.TokenCName, PcdItem.TokenSpaceGuidCName) == (TokenCName, TokenSpaceGuidCName):
|
if (PcdItem.TokenCName, PcdItem.TokenSpaceGuidCName) == (TokenCName, TokenSpaceGuidCName):
|
||||||
PcdDatumType = PcdItem.DatumType
|
PcdDatumType = PcdItem.DatumType
|
||||||
NewValue = self._BuildOptionPcdValueFormat(TokenSpaceGuidCName, TokenCName, PcdDatumType, pcdvalue)
|
NewValue = BuildOptionPcdValueFormat(TokenSpaceGuidCName, TokenCName, PcdDatumType, pcdvalue)
|
||||||
FoundFlag = True
|
FoundFlag = True
|
||||||
else:
|
else:
|
||||||
if PcdItem.TokenCName == TokenCName:
|
if PcdItem.TokenCName == TokenCName:
|
||||||
@ -422,7 +425,7 @@ class WorkspaceAutoGen(AutoGen):
|
|||||||
TokenSpaceGuidCNameList.append(PcdItem.TokenSpaceGuidCName)
|
TokenSpaceGuidCNameList.append(PcdItem.TokenSpaceGuidCName)
|
||||||
PcdDatumType = PcdItem.DatumType
|
PcdDatumType = PcdItem.DatumType
|
||||||
TokenSpaceGuidCName = PcdItem.TokenSpaceGuidCName
|
TokenSpaceGuidCName = PcdItem.TokenSpaceGuidCName
|
||||||
NewValue = self._BuildOptionPcdValueFormat(TokenSpaceGuidCName, TokenCName, PcdDatumType, pcdvalue)
|
NewValue = BuildOptionPcdValueFormat(TokenSpaceGuidCName, TokenCName, PcdDatumType, pcdvalue)
|
||||||
FoundFlag = True
|
FoundFlag = True
|
||||||
else:
|
else:
|
||||||
EdkLogger.error(
|
EdkLogger.error(
|
||||||
@ -501,6 +504,22 @@ class WorkspaceAutoGen(AutoGen):
|
|||||||
SourcePcdDict['FixedAtBuild'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))
|
SourcePcdDict['FixedAtBuild'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName))
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
#
|
||||||
|
# A PCD can only use one type for all source modules
|
||||||
|
#
|
||||||
|
for i in SourcePcdDict_Keys:
|
||||||
|
for j in SourcePcdDict_Keys:
|
||||||
|
if i != j:
|
||||||
|
IntersectionList = list(set(SourcePcdDict[i]).intersection(set(SourcePcdDict[j])))
|
||||||
|
if len(IntersectionList) > 0:
|
||||||
|
EdkLogger.error(
|
||||||
|
'build',
|
||||||
|
FORMAT_INVALID,
|
||||||
|
"Building modules from source INFs, following PCD use %s and %s access method. It must be corrected to use only one access method." % (i, j),
|
||||||
|
ExtraData="%s" % '\n\t'.join([str(P[1]+'.'+P[0]) for P in IntersectionList])
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
#
|
#
|
||||||
# intersection the BinaryPCD for Mixed PCD
|
# intersection the BinaryPCD for Mixed PCD
|
||||||
@ -642,15 +661,35 @@ class WorkspaceAutoGen(AutoGen):
|
|||||||
self._BuildCommand = None
|
self._BuildCommand = None
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create BuildOptions Macro & PCD metafile.
|
# Create BuildOptions Macro & PCD metafile, also add the Active Platform and FDF file.
|
||||||
#
|
#
|
||||||
content = 'gCommandLineDefines: '
|
content = 'gCommandLineDefines: '
|
||||||
content += str(GlobalData.gCommandLineDefines)
|
content += str(GlobalData.gCommandLineDefines)
|
||||||
content += os.linesep
|
content += os.linesep
|
||||||
content += 'BuildOptionPcd: '
|
content += 'BuildOptionPcd: '
|
||||||
content += str(GlobalData.BuildOptionPcd)
|
content += str(GlobalData.BuildOptionPcd)
|
||||||
|
content += os.linesep
|
||||||
|
content += 'Active Platform: '
|
||||||
|
content += str(self.Platform)
|
||||||
|
content += os.linesep
|
||||||
|
if self.FdfFile:
|
||||||
|
content += 'Flash Image Definition: '
|
||||||
|
content += str(self.FdfFile)
|
||||||
SaveFileOnChange(os.path.join(self.BuildDir, 'BuildOptions'), content, False)
|
SaveFileOnChange(os.path.join(self.BuildDir, 'BuildOptions'), content, False)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create PcdToken Number file for Dynamic/DynamicEx Pcd.
|
||||||
|
#
|
||||||
|
PcdTokenNumber = 'PcdTokenNumber: '
|
||||||
|
if Pa.PcdTokenNumber:
|
||||||
|
if Pa.DynamicPcdList:
|
||||||
|
for Pcd in Pa.DynamicPcdList:
|
||||||
|
PcdTokenNumber += os.linesep
|
||||||
|
PcdTokenNumber += str((Pcd.TokenCName, Pcd.TokenSpaceGuidCName))
|
||||||
|
PcdTokenNumber += ' : '
|
||||||
|
PcdTokenNumber += str(Pa.PcdTokenNumber[Pcd.TokenCName, Pcd.TokenSpaceGuidCName])
|
||||||
|
SaveFileOnChange(os.path.join(self.BuildDir, 'PcdTokenNumber'), PcdTokenNumber, False)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get set of workspace metafiles
|
# Get set of workspace metafiles
|
||||||
#
|
#
|
||||||
@ -678,31 +717,6 @@ class WorkspaceAutoGen(AutoGen):
|
|||||||
print >> file, f
|
print >> file, f
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _BuildOptionPcdValueFormat(self, TokenSpaceGuidCName, TokenCName, PcdDatumType, Value):
|
|
||||||
if PcdDatumType == 'VOID*':
|
|
||||||
if Value.startswith('L'):
|
|
||||||
if not Value[1]:
|
|
||||||
EdkLogger.error('build', OPTION_VALUE_INVALID, 'For Void* type PCD, when specify the Value in the command line, please use the following format: "string", L"string", B"{...}"')
|
|
||||||
Value = Value[0] + '"' + Value[1:] + '"'
|
|
||||||
elif Value.startswith('B'):
|
|
||||||
if not Value[1]:
|
|
||||||
EdkLogger.error('build', OPTION_VALUE_INVALID, 'For Void* type PCD, when specify the Value in the command line, please use the following format: "string", L"string", B"{...}"')
|
|
||||||
Value = Value[1:]
|
|
||||||
else:
|
|
||||||
if not Value[0]:
|
|
||||||
EdkLogger.error('build', OPTION_VALUE_INVALID, 'For Void* type PCD, when specify the Value in the command line, please use the following format: "string", L"string", B"{...}"')
|
|
||||||
Value = '"' + Value + '"'
|
|
||||||
|
|
||||||
IsValid, Cause = CheckPcdDatum(PcdDatumType, Value)
|
|
||||||
if not IsValid:
|
|
||||||
EdkLogger.error('build', FORMAT_INVALID, Cause, ExtraData="%s.%s" % (TokenSpaceGuidCName, TokenCName))
|
|
||||||
if PcdDatumType == 'BOOLEAN':
|
|
||||||
Value = Value.upper()
|
|
||||||
if Value == 'TRUE' or Value == '1':
|
|
||||||
Value = '1'
|
|
||||||
elif Value == 'FALSE' or Value == '0':
|
|
||||||
Value = '0'
|
|
||||||
return Value
|
|
||||||
|
|
||||||
def _GetMetaFiles(self, Target, Toolchain, Arch):
|
def _GetMetaFiles(self, Target, Toolchain, Arch):
|
||||||
AllWorkSpaceMetaFiles = set()
|
AllWorkSpaceMetaFiles = set()
|
||||||
@ -721,10 +735,19 @@ class WorkspaceAutoGen(AutoGen):
|
|||||||
AllWorkSpaceMetaFiles.add(self.MetaFile.Path)
|
AllWorkSpaceMetaFiles.add(self.MetaFile.Path)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
# add build_rule.txt & tools_def.txt
|
||||||
|
#
|
||||||
|
AllWorkSpaceMetaFiles.add(os.path.join(GlobalData.gConfDirectory, gDefaultBuildRuleFile))
|
||||||
|
AllWorkSpaceMetaFiles.add(os.path.join(GlobalData.gConfDirectory, gDefaultToolsDefFile))
|
||||||
|
|
||||||
# add BuildOption metafile
|
# add BuildOption metafile
|
||||||
#
|
#
|
||||||
AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'BuildOptions'))
|
AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'BuildOptions'))
|
||||||
|
|
||||||
|
# add PcdToken Number file for Dynamic/DynamicEx Pcd
|
||||||
|
#
|
||||||
|
AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'PcdTokenNumber'))
|
||||||
|
|
||||||
for Arch in self.ArchList:
|
for Arch in self.ArchList:
|
||||||
Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
|
Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
|
||||||
PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
|
PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
|
||||||
@ -2735,10 +2758,7 @@ class ModuleAutoGen(AutoGen):
|
|||||||
if self._FixedAtBuildPcds:
|
if self._FixedAtBuildPcds:
|
||||||
return self._FixedAtBuildPcds
|
return self._FixedAtBuildPcds
|
||||||
for Pcd in self.ModulePcdList:
|
for Pcd in self.ModulePcdList:
|
||||||
if self.IsLibrary:
|
if Pcd.Type != "FixedAtBuild":
|
||||||
if not (Pcd.Pending == False and Pcd.Type == "FixedAtBuild"):
|
|
||||||
continue
|
|
||||||
elif Pcd.Type != "FixedAtBuild":
|
|
||||||
continue
|
continue
|
||||||
if Pcd not in self._FixedAtBuildPcds:
|
if Pcd not in self._FixedAtBuildPcds:
|
||||||
self._FixedAtBuildPcds.append(Pcd)
|
self._FixedAtBuildPcds.append(Pcd)
|
||||||
@ -3917,6 +3937,13 @@ class ModuleAutoGen(AutoGen):
|
|||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
PcdValue = ''
|
PcdValue = ''
|
||||||
|
if Pcd.DatumType == 'BOOLEAN':
|
||||||
|
BoolValue = Pcd.DefaultValue.upper()
|
||||||
|
if BoolValue == 'TRUE':
|
||||||
|
Pcd.DefaultValue = '1'
|
||||||
|
elif BoolValue == 'FALSE':
|
||||||
|
Pcd.DefaultValue = '0'
|
||||||
|
|
||||||
if Pcd.DatumType != 'VOID*':
|
if Pcd.DatumType != 'VOID*':
|
||||||
HexFormat = '0x%02x'
|
HexFormat = '0x%02x'
|
||||||
if Pcd.DatumType == 'UINT16':
|
if Pcd.DatumType == 'UINT16':
|
||||||
@ -4183,6 +4210,8 @@ class ModuleAutoGen(AutoGen):
|
|||||||
with open(self.GetTimeStampPath(),'r') as f:
|
with open(self.GetTimeStampPath(),'r') as f:
|
||||||
for source in f:
|
for source in f:
|
||||||
source = source.rstrip('\n')
|
source = source.rstrip('\n')
|
||||||
|
if not os.path.exists(source):
|
||||||
|
return False
|
||||||
if source not in ModuleAutoGen.TimeDict :
|
if source not in ModuleAutoGen.TimeDict :
|
||||||
ModuleAutoGen.TimeDict[source] = os.stat(source)[8]
|
ModuleAutoGen.TimeDict[source] = os.stat(source)[8]
|
||||||
if ModuleAutoGen.TimeDict[source] > DstTimeStamp:
|
if ModuleAutoGen.TimeDict[source] > DstTimeStamp:
|
||||||
|
@ -1203,21 +1203,22 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):
|
|||||||
else:
|
else:
|
||||||
AutoGenH.Append('extern volatile %s %s%s;\n' % (DatumType, PcdVariableName, Array))
|
AutoGenH.Append('extern volatile %s %s%s;\n' % (DatumType, PcdVariableName, Array))
|
||||||
AutoGenH.Append('#define %s %s_gPcd_BinaryPatch_%s\n' %(GetModeName, Type, TokenCName))
|
AutoGenH.Append('#define %s %s_gPcd_BinaryPatch_%s\n' %(GetModeName, Type, TokenCName))
|
||||||
|
PcdDataSize = GetPcdSize(Pcd)
|
||||||
if Pcd.DatumType == 'VOID*':
|
if Pcd.DatumType == 'VOID*':
|
||||||
AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrAndSize((VOID *)_gPcd_BinaryPatch_%s, &_gPcd_BinaryPatch_Size_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, TokenCName, TokenCName, TokenCName))
|
AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrAndSize((VOID *)_gPcd_BinaryPatch_%s, &_gPcd_BinaryPatch_Size_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, TokenCName, TokenCName, TokenCName))
|
||||||
AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrAndSizeS((VOID *)_gPcd_BinaryPatch_%s, &_gPcd_BinaryPatch_Size_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, TokenCName, TokenCName, TokenCName))
|
AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrAndSizeS((VOID *)_gPcd_BinaryPatch_%s, &_gPcd_BinaryPatch_Size_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, TokenCName, TokenCName, TokenCName))
|
||||||
|
AutoGenH.Append('#define %s %s\n' % (PatchPcdSizeTokenName, Pcd.MaxDatumSize))
|
||||||
else:
|
else:
|
||||||
AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName))
|
AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName))
|
||||||
AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS)\n' % (SetModeStatusName, PcdVariableName))
|
AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS)\n' % (SetModeStatusName, PcdVariableName))
|
||||||
|
AutoGenH.Append('#define %s %s\n' % (PatchPcdSizeTokenName, PcdDataSize))
|
||||||
PcdDataSize = GetPcdSize(Pcd)
|
|
||||||
AutoGenH.Append('#define %s %s\n' % (PatchPcdSizeTokenName, PcdDataSize))
|
|
||||||
AutoGenH.Append('#define %s %s\n' % (GetModeSizeName,PatchPcdSizeVariableName))
|
AutoGenH.Append('#define %s %s\n' % (GetModeSizeName,PatchPcdSizeVariableName))
|
||||||
AutoGenH.Append('extern UINTN %s; \n' % PatchPcdSizeVariableName)
|
AutoGenH.Append('extern UINTN %s; \n' % PatchPcdSizeVariableName)
|
||||||
|
|
||||||
if PcdItemType == TAB_PCDS_FIXED_AT_BUILD or PcdItemType == TAB_PCDS_FEATURE_FLAG:
|
if PcdItemType == TAB_PCDS_FIXED_AT_BUILD or PcdItemType == TAB_PCDS_FEATURE_FLAG:
|
||||||
key = ".".join((Pcd.TokenSpaceGuidCName,Pcd.TokenCName))
|
key = ".".join((Pcd.TokenSpaceGuidCName,Pcd.TokenCName))
|
||||||
|
PcdVariableName = '_gPcd_' + gItemTypeStringDatabase[Pcd.Type] + '_' + TokenCName
|
||||||
if DatumType == 'VOID*' and Array == '[]':
|
if DatumType == 'VOID*' and Array == '[]':
|
||||||
DatumType = ['UINT8', 'UINT16'][Pcd.DefaultValue[0] == 'L']
|
DatumType = ['UINT8', 'UINT16'][Pcd.DefaultValue[0] == 'L']
|
||||||
AutoGenH.Append('extern const %s _gPcd_FixedAtBuild_%s%s;\n' %(DatumType, TokenCName, Array))
|
AutoGenH.Append('extern const %s _gPcd_FixedAtBuild_%s%s;\n' %(DatumType, TokenCName, Array))
|
||||||
@ -1225,7 +1226,10 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):
|
|||||||
AutoGenH.Append('//#define %s ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD\n' % SetModeName)
|
AutoGenH.Append('//#define %s ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD\n' % SetModeName)
|
||||||
|
|
||||||
if PcdItemType == TAB_PCDS_FIXED_AT_BUILD and (key in Info.ConstPcd or (Info.IsLibrary and not Info._ReferenceModules)):
|
if PcdItemType == TAB_PCDS_FIXED_AT_BUILD and (key in Info.ConstPcd or (Info.IsLibrary and not Info._ReferenceModules)):
|
||||||
AutoGenH.Append('#define _PCD_VALUE_%s %s\n' %(TokenCName, Pcd.DefaultValue))
|
if Pcd.DatumType == 'VOID*':
|
||||||
|
AutoGenH.Append('#define _PCD_VALUE_%s %s%s\n' %(TokenCName, Type, PcdVariableName))
|
||||||
|
else:
|
||||||
|
AutoGenH.Append('#define _PCD_VALUE_%s %s\n' %(TokenCName, Pcd.DefaultValue))
|
||||||
|
|
||||||
if PcdItemType == TAB_PCDS_FIXED_AT_BUILD:
|
if PcdItemType == TAB_PCDS_FIXED_AT_BUILD:
|
||||||
PcdDataSize = GetPcdSize(Pcd)
|
PcdDataSize = GetPcdSize(Pcd)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Create makefile for MS nmake and GNU make
|
# Create makefile for MS nmake and GNU make
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
||||||
@ -386,7 +386,7 @@ ${END}
|
|||||||
#
|
#
|
||||||
clean:
|
clean:
|
||||||
\t${BEGIN}${clean_command}
|
\t${BEGIN}${clean_command}
|
||||||
\t${END}
|
\t${END}\t$(RM) AutoGenTimeStamp
|
||||||
|
|
||||||
#
|
#
|
||||||
# clean all generated files
|
# clean all generated files
|
||||||
@ -395,6 +395,7 @@ cleanall:
|
|||||||
${BEGIN}\t${cleanall_command}
|
${BEGIN}\t${cleanall_command}
|
||||||
${END}\t$(RM) *.pdb *.idb > NUL 2>&1
|
${END}\t$(RM) *.pdb *.idb > NUL 2>&1
|
||||||
\t$(RM) $(BIN_DIR)${separator}$(MODULE_NAME).efi
|
\t$(RM) $(BIN_DIR)${separator}$(MODULE_NAME).efi
|
||||||
|
\t$(RM) AutoGenTimeStamp
|
||||||
|
|
||||||
#
|
#
|
||||||
# clean all dependent libraries built
|
# clean all dependent libraries built
|
||||||
@ -1452,7 +1453,15 @@ class TopLevelMakefile(BuildFile):
|
|||||||
if GlobalData.BuildOptionPcd:
|
if GlobalData.BuildOptionPcd:
|
||||||
for index, option in enumerate(GlobalData.gCommand):
|
for index, option in enumerate(GlobalData.gCommand):
|
||||||
if "--pcd" == option and GlobalData.gCommand[index+1]:
|
if "--pcd" == option and GlobalData.gCommand[index+1]:
|
||||||
ExtraOption += " --pcd " + GlobalData.gCommand[index+1]
|
pcdName, pcdValue = GlobalData.gCommand[index+1].split('=')
|
||||||
|
if pcdValue.startswith('H'):
|
||||||
|
pcdValue = 'H' + '"' + pcdValue[1:] + '"'
|
||||||
|
ExtraOption += " --pcd " + pcdName + '=' + pcdValue
|
||||||
|
elif pcdValue.startswith('L'):
|
||||||
|
pcdValue = 'L' + '"' + pcdValue[1:] + '"'
|
||||||
|
ExtraOption += " --pcd " + pcdName + '=' + pcdValue
|
||||||
|
else:
|
||||||
|
ExtraOption += " --pcd " + GlobalData.gCommand[index+1]
|
||||||
|
|
||||||
MakefileName = self._FILE_NAME_[self._FileType]
|
MakefileName = self._FILE_NAME_[self._FileType]
|
||||||
SubBuildCommandList = []
|
SubBuildCommandList = []
|
||||||
|
@ -2062,6 +2062,32 @@ def PackRegistryFormatGuid(Guid):
|
|||||||
int(Guid[4][-2:], 16)
|
int(Guid[4][-2:], 16)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def BuildOptionPcdValueFormat(TokenSpaceGuidCName, TokenCName, PcdDatumType, Value):
|
||||||
|
if PcdDatumType == 'VOID*':
|
||||||
|
if Value.startswith('L'):
|
||||||
|
if not Value[1]:
|
||||||
|
EdkLogger.error("build", FORMAT_INVALID, 'For Void* type PCD, when specify the Value in the command line, please use the following format: "string", L"string", H"{...}"')
|
||||||
|
Value = Value[0] + '"' + Value[1:] + '"'
|
||||||
|
elif Value.startswith('H'):
|
||||||
|
if not Value[1]:
|
||||||
|
EdkLogger.error("build", FORMAT_INVALID, 'For Void* type PCD, when specify the Value in the command line, please use the following format: "string", L"string", H"{...}"')
|
||||||
|
Value = Value[1:]
|
||||||
|
else:
|
||||||
|
if not Value[0]:
|
||||||
|
EdkLogger.error("build", FORMAT_INVALID, 'For Void* type PCD, when specify the Value in the command line, please use the following format: "string", L"string", H"{...}"')
|
||||||
|
Value = '"' + Value + '"'
|
||||||
|
|
||||||
|
IsValid, Cause = CheckPcdDatum(PcdDatumType, Value)
|
||||||
|
if not IsValid:
|
||||||
|
EdkLogger.error("build", FORMAT_INVALID, Cause, ExtraData="%s.%s" % (TokenSpaceGuidCName, TokenCName))
|
||||||
|
if PcdDatumType == 'BOOLEAN':
|
||||||
|
Value = Value.upper()
|
||||||
|
if Value == 'TRUE' or Value == '1':
|
||||||
|
Value = '1'
|
||||||
|
elif Value == 'FALSE' or Value == '0':
|
||||||
|
Value = '0'
|
||||||
|
return Value
|
||||||
|
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
# This acts like the main() function for the script, unless it is 'import'ed into another
|
# This acts like the main() function for the script, unless it is 'import'ed into another
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define checkpoints used by ECC tool
|
# This file is used to define checkpoints used by ECC tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
||||||
@ -41,6 +41,134 @@ class Check(object):
|
|||||||
self.DeclAndDataTypeCheck()
|
self.DeclAndDataTypeCheck()
|
||||||
self.FunctionLayoutCheck()
|
self.FunctionLayoutCheck()
|
||||||
self.NamingConventionCheck()
|
self.NamingConventionCheck()
|
||||||
|
self.SmmCommParaCheck()
|
||||||
|
|
||||||
|
def SmmCommParaCheck(self):
|
||||||
|
self.SmmCommParaCheckBufferType()
|
||||||
|
|
||||||
|
|
||||||
|
# Check if SMM communication function has correct parameter type
|
||||||
|
# 1. Get function calling with instance./->Communicate() interface
|
||||||
|
# and make sure the protocol instance is of type EFI_SMM_COMMUNICATION_PROTOCOL.
|
||||||
|
# 2. Find the origin of the 2nd parameter of Communicate() interface, if -
|
||||||
|
# a. it is a local buffer on stack
|
||||||
|
# report error.
|
||||||
|
# b. it is a global buffer, check the driver that holds the global buffer is of type DXE_RUNTIME_DRIVER
|
||||||
|
# report success.
|
||||||
|
# c. it is a buffer by AllocatePage/AllocatePool (may be wrapped by nested function calls),
|
||||||
|
# check the EFI_MEMORY_TYPE to be EfiRuntimeServicesCode,EfiRuntimeServicesData,
|
||||||
|
# EfiACPIMemoryNVS or EfiReservedMemoryType
|
||||||
|
# report success.
|
||||||
|
# d. it is a buffer located via EFI_SYSTEM_TABLE.ConfigurationTable (may be wrapped by nested function calls)
|
||||||
|
# report warning to indicate human code review.
|
||||||
|
# e. it is a buffer from other kind of pointers (may need to trace into nested function calls to locate),
|
||||||
|
# repeat checks in a.b.c and d.
|
||||||
|
def SmmCommParaCheckBufferType(self):
|
||||||
|
if EccGlobalData.gConfig.SmmCommParaCheckBufferType == '1' or EccGlobalData.gConfig.SmmCommParaCheckAll == '1':
|
||||||
|
EdkLogger.quiet("Checking SMM communication parameter type ...")
|
||||||
|
# Get all EFI_SMM_COMMUNICATION_PROTOCOL interface
|
||||||
|
CommApiList = []
|
||||||
|
for IdentifierTable in EccGlobalData.gIdentifierTableList:
|
||||||
|
SqlCommand = """select ID, Name, BelongsToFile from %s
|
||||||
|
where Modifier = 'EFI_SMM_COMMUNICATION_PROTOCOL*' """ % (IdentifierTable)
|
||||||
|
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
|
||||||
|
if RecordSet:
|
||||||
|
for Record in RecordSet:
|
||||||
|
if Record[1] not in CommApiList:
|
||||||
|
CommApiList.append(Record[1])
|
||||||
|
# For each interface, check the second parameter
|
||||||
|
for CommApi in CommApiList:
|
||||||
|
for IdentifierTable in EccGlobalData.gIdentifierTableList:
|
||||||
|
SqlCommand = """select ID, Name, Value, BelongsToFile, StartLine from %s
|
||||||
|
where Name = '%s->Communicate' and Model = %s""" \
|
||||||
|
% (IdentifierTable, CommApi, MODEL_IDENTIFIER_FUNCTION_CALLING)
|
||||||
|
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
|
||||||
|
if RecordSet:
|
||||||
|
# print IdentifierTable
|
||||||
|
for Record in RecordSet:
|
||||||
|
# Get the second parameter for Communicate function
|
||||||
|
SecondPara = Record[2].split(',')[1].strip()
|
||||||
|
SecondParaIndex = None
|
||||||
|
if SecondPara.startswith('&'):
|
||||||
|
SecondPara = SecondPara[1:]
|
||||||
|
if SecondPara.endswith(']'):
|
||||||
|
SecondParaIndex = SecondPara[SecondPara.find('[') + 1:-1]
|
||||||
|
SecondPara = SecondPara[:SecondPara.find('[')]
|
||||||
|
# Get the ID
|
||||||
|
Id = Record[0]
|
||||||
|
# Get the BelongsToFile
|
||||||
|
BelongsToFile = Record[3]
|
||||||
|
# Get the source file path
|
||||||
|
SqlCommand = """select FullPath from File where ID = %s""" % BelongsToFile
|
||||||
|
NewRecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
|
||||||
|
FullPath = NewRecordSet[0][0]
|
||||||
|
# Get the line no of function calling
|
||||||
|
StartLine = Record[4]
|
||||||
|
# Get the module type
|
||||||
|
SqlCommand = """select Value3 from INF where BelongsToFile = (select ID from File
|
||||||
|
where Path = (select Path from File where ID = %s) and Model = 1011)
|
||||||
|
and Value2 = 'MODULE_TYPE'""" % BelongsToFile
|
||||||
|
NewRecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
|
||||||
|
ModuleType = NewRecordSet[0][0] if NewRecordSet else None
|
||||||
|
|
||||||
|
# print BelongsToFile, FullPath, StartLine, ModuleType, SecondPara
|
||||||
|
|
||||||
|
Value = FindPara(FullPath, SecondPara, StartLine)
|
||||||
|
# Find the value of the parameter
|
||||||
|
if Value:
|
||||||
|
if 'AllocatePage' in Value \
|
||||||
|
or 'AllocatePool' in Value \
|
||||||
|
or 'AllocateRuntimePool' in Value \
|
||||||
|
or 'AllocateZeroPool' in Value:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
if '->' in Value:
|
||||||
|
if not EccGlobalData.gException.IsException(
|
||||||
|
ERROR_SMM_COMM_PARA_CHECK_BUFFER_TYPE, Value):
|
||||||
|
EccGlobalData.gDb.TblReport.Insert(ERROR_SMM_COMM_PARA_CHECK_BUFFER_TYPE,
|
||||||
|
OtherMsg="Please review the buffer type"
|
||||||
|
+ "is correct or not. If it is correct" +
|
||||||
|
" please add [%s] to exception list"
|
||||||
|
% Value,
|
||||||
|
BelongsToTable=IdentifierTable,
|
||||||
|
BelongsToItem=Id)
|
||||||
|
else:
|
||||||
|
if not EccGlobalData.gException.IsException(
|
||||||
|
ERROR_SMM_COMM_PARA_CHECK_BUFFER_TYPE, Value):
|
||||||
|
EccGlobalData.gDb.TblReport.Insert(ERROR_SMM_COMM_PARA_CHECK_BUFFER_TYPE,
|
||||||
|
OtherMsg="Please review the buffer type"
|
||||||
|
+ "is correct or not. If it is correct" +
|
||||||
|
" please add [%s] to exception list"
|
||||||
|
% Value,
|
||||||
|
BelongsToTable=IdentifierTable,
|
||||||
|
BelongsToItem=Id)
|
||||||
|
|
||||||
|
|
||||||
|
# Not find the value of the parameter
|
||||||
|
else:
|
||||||
|
SqlCommand = """select ID, Modifier, Name, Value, Model, BelongsToFunction from %s
|
||||||
|
where Name = '%s' and StartLine < %s order by StartLine DESC""" \
|
||||||
|
% (IdentifierTable, SecondPara, StartLine)
|
||||||
|
NewRecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
|
||||||
|
if NewRecordSet:
|
||||||
|
Value = NewRecordSet[0][1]
|
||||||
|
if 'AllocatePage' in Value \
|
||||||
|
or 'AllocatePool' in Value \
|
||||||
|
or 'AllocateRuntimePool' in Value \
|
||||||
|
or 'AllocateZeroPool' in Value:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
if not EccGlobalData.gException.IsException(
|
||||||
|
ERROR_SMM_COMM_PARA_CHECK_BUFFER_TYPE, Value):
|
||||||
|
EccGlobalData.gDb.TblReport.Insert(ERROR_SMM_COMM_PARA_CHECK_BUFFER_TYPE,
|
||||||
|
OtherMsg="Please review the buffer type"
|
||||||
|
+ "is correct or not. If it is correct" +
|
||||||
|
" please add [%s] to exception list"
|
||||||
|
% Value,
|
||||||
|
BelongsToTable=IdentifierTable,
|
||||||
|
BelongsToItem=Id)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
# Check UNI files
|
# Check UNI files
|
||||||
def UniCheck(self):
|
def UniCheck(self):
|
||||||
@ -941,7 +1069,7 @@ class Check(object):
|
|||||||
|
|
||||||
# Check Guid Format in module INF
|
# Check Guid Format in module INF
|
||||||
def MetaDataFileCheckModuleFileGuidFormat(self):
|
def MetaDataFileCheckModuleFileGuidFormat(self):
|
||||||
if EccGlobalData.gConfig.MetaDataFileCheckModuleFileGuidFormat or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
|
if EccGlobalData.gConfig.MetaDataFileCheckModuleFileGuidFormat == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
|
||||||
EdkLogger.quiet("Check Guid Format in module INF ...")
|
EdkLogger.quiet("Check Guid Format in module INF ...")
|
||||||
Table = EccGlobalData.gDb.TblInf
|
Table = EccGlobalData.gDb.TblInf
|
||||||
SqlCommand = """
|
SqlCommand = """
|
||||||
@ -984,7 +1112,7 @@ class Check(object):
|
|||||||
|
|
||||||
# Check Protocol Format in module INF
|
# Check Protocol Format in module INF
|
||||||
def MetaDataFileCheckModuleFileProtocolFormat(self):
|
def MetaDataFileCheckModuleFileProtocolFormat(self):
|
||||||
if EccGlobalData.gConfig.MetaDataFileCheckModuleFileProtocolFormat or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
|
if EccGlobalData.gConfig.MetaDataFileCheckModuleFileProtocolFormat == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
|
||||||
EdkLogger.quiet("Check Protocol Format in module INF ...")
|
EdkLogger.quiet("Check Protocol Format in module INF ...")
|
||||||
Table = EccGlobalData.gDb.TblInf
|
Table = EccGlobalData.gDb.TblInf
|
||||||
SqlCommand = """
|
SqlCommand = """
|
||||||
@ -1015,7 +1143,7 @@ class Check(object):
|
|||||||
|
|
||||||
# Check Ppi Format in module INF
|
# Check Ppi Format in module INF
|
||||||
def MetaDataFileCheckModuleFilePpiFormat(self):
|
def MetaDataFileCheckModuleFilePpiFormat(self):
|
||||||
if EccGlobalData.gConfig.MetaDataFileCheckModuleFilePpiFormat or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
|
if EccGlobalData.gConfig.MetaDataFileCheckModuleFilePpiFormat == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
|
||||||
EdkLogger.quiet("Check Ppi Format in module INF ...")
|
EdkLogger.quiet("Check Ppi Format in module INF ...")
|
||||||
Table = EccGlobalData.gDb.TblInf
|
Table = EccGlobalData.gDb.TblInf
|
||||||
SqlCommand = """
|
SqlCommand = """
|
||||||
@ -1043,7 +1171,7 @@ class Check(object):
|
|||||||
|
|
||||||
# Check Pcd Format in module INF
|
# Check Pcd Format in module INF
|
||||||
def MetaDataFileCheckModuleFilePcdFormat(self):
|
def MetaDataFileCheckModuleFilePcdFormat(self):
|
||||||
if EccGlobalData.gConfig.MetaDataFileCheckModuleFilePcdFormat or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
|
if EccGlobalData.gConfig.MetaDataFileCheckModuleFilePcdFormat == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
|
||||||
EdkLogger.quiet("Check Pcd Format in module INF ...")
|
EdkLogger.quiet("Check Pcd Format in module INF ...")
|
||||||
Table = EccGlobalData.gDb.TblInf
|
Table = EccGlobalData.gDb.TblInf
|
||||||
SqlCommand = """
|
SqlCommand = """
|
||||||
@ -1139,9 +1267,10 @@ class Check(object):
|
|||||||
FileTable = 'Identifier' + str(Id)
|
FileTable = 'Identifier' + str(Id)
|
||||||
self.NamingConventionCheckDefineStatement(FileTable)
|
self.NamingConventionCheckDefineStatement(FileTable)
|
||||||
self.NamingConventionCheckTypedefStatement(FileTable)
|
self.NamingConventionCheckTypedefStatement(FileTable)
|
||||||
self.NamingConventionCheckIfndefStatement(FileTable)
|
|
||||||
self.NamingConventionCheckVariableName(FileTable)
|
self.NamingConventionCheckVariableName(FileTable)
|
||||||
self.NamingConventionCheckSingleCharacterVariable(FileTable)
|
self.NamingConventionCheckSingleCharacterVariable(FileTable)
|
||||||
|
if os.path.splitext(F)[1] in ('.h'):
|
||||||
|
self.NamingConventionCheckIfndefStatement(FileTable)
|
||||||
|
|
||||||
self.NamingConventionCheckPathName()
|
self.NamingConventionCheckPathName()
|
||||||
self.NamingConventionCheckFunctionName()
|
self.NamingConventionCheckFunctionName()
|
||||||
@ -1183,7 +1312,7 @@ class Check(object):
|
|||||||
|
|
||||||
# Check whether the #ifndef at the start of an include file uses both prefix and postfix underscore characters, '_'.
|
# Check whether the #ifndef at the start of an include file uses both prefix and postfix underscore characters, '_'.
|
||||||
def NamingConventionCheckIfndefStatement(self, FileTable):
|
def NamingConventionCheckIfndefStatement(self, FileTable):
|
||||||
if EccGlobalData.gConfig.NamingConventionCheckTypedefStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
|
if EccGlobalData.gConfig.NamingConventionCheckIfndefStatement == '1' or EccGlobalData.gConfig.NamingConventionCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
|
||||||
EdkLogger.quiet("Checking naming covention of #ifndef statement ...")
|
EdkLogger.quiet("Checking naming covention of #ifndef statement ...")
|
||||||
|
|
||||||
SqlCommand = """select ID, Value from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_MACRO_IFNDEF)
|
SqlCommand = """select ID, Value from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_MACRO_IFNDEF)
|
||||||
@ -1260,6 +1389,19 @@ class Check(object):
|
|||||||
if not EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_SINGLE_CHARACTER_VARIABLE, Record[1]):
|
if not EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_SINGLE_CHARACTER_VARIABLE, Record[1]):
|
||||||
EccGlobalData.gDb.TblReport.Insert(ERROR_NAMING_CONVENTION_CHECK_SINGLE_CHARACTER_VARIABLE, OtherMsg="The variable name [%s] does not follow the rules" % (Record[1]), BelongsToTable=FileTable, BelongsToItem=Record[0])
|
EccGlobalData.gDb.TblReport.Insert(ERROR_NAMING_CONVENTION_CHECK_SINGLE_CHARACTER_VARIABLE, OtherMsg="The variable name [%s] does not follow the rules" % (Record[1]), BelongsToTable=FileTable, BelongsToItem=Record[0])
|
||||||
|
|
||||||
|
def FindPara(FilePath, Para, CallingLine):
|
||||||
|
Lines = open(FilePath).readlines()
|
||||||
|
Line = ''
|
||||||
|
for Index in range(CallingLine - 1, 0, -1):
|
||||||
|
# Find the nearest statement for Para
|
||||||
|
Line = Lines[Index].strip()
|
||||||
|
if Line.startswith('%s = ' % Para):
|
||||||
|
Line = Line.strip()
|
||||||
|
return Line
|
||||||
|
break
|
||||||
|
|
||||||
|
return ''
|
||||||
|
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
# This acts like the main() function for the script, unless it is 'import'ed into another
|
# This acts like the main() function for the script, unless it is 'import'ed into another
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define class Configuration
|
# This file is used to define class Configuration
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
||||||
@ -256,6 +256,11 @@ class Configuration(object):
|
|||||||
# Check PCD whether defined the prompt, help in the DEC file and localized information in the associated UNI file.
|
# Check PCD whether defined the prompt, help in the DEC file and localized information in the associated UNI file.
|
||||||
self.UniCheckPCDInfo = 1
|
self.UniCheckPCDInfo = 1
|
||||||
|
|
||||||
|
# Check SMM communication function parameter
|
||||||
|
self.SmmCommParaCheckAll = 0
|
||||||
|
# Check if the EFI_SMM_COMMUNICATION_PROTOCOL parameter buffer type is Reserved / ACPI NVS or UEFI RT code/data
|
||||||
|
self.SmmCommParaCheckBufferType = -1
|
||||||
|
|
||||||
#
|
#
|
||||||
# The check points in this section are reserved
|
# The check points in this section are reserved
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Standardized Error Hanlding infrastructures.
|
# Standardized Error Hanlding infrastructures.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
||||||
@ -105,6 +105,8 @@ ERROR_META_DATA_FILE_CHECK_LIBRARY_NOT_DEFINED = 10022
|
|||||||
|
|
||||||
ERROR_SPELLING_CHECK_ALL = 11000
|
ERROR_SPELLING_CHECK_ALL = 11000
|
||||||
|
|
||||||
|
ERROR_SMM_COMM_PARA_CHECK_BUFFER_TYPE = 12001
|
||||||
|
|
||||||
gEccErrorMessage = {
|
gEccErrorMessage = {
|
||||||
ERROR_GENERAL_CHECK_ALL : "",
|
ERROR_GENERAL_CHECK_ALL : "",
|
||||||
ERROR_GENERAL_CHECK_NO_TAB : "'TAB' character is not allowed in source code, please replace each 'TAB' with two spaces",
|
ERROR_GENERAL_CHECK_NO_TAB : "'TAB' character is not allowed in source code, please replace each 'TAB' with two spaces",
|
||||||
@ -198,5 +200,7 @@ gEccErrorMessage = {
|
|||||||
ERROR_META_DATA_FILE_CHECK_FORMAT_PCD : "Wrong Pcd Format used in Module file",
|
ERROR_META_DATA_FILE_CHECK_FORMAT_PCD : "Wrong Pcd Format used in Module file",
|
||||||
ERROR_META_DATA_FILE_CHECK_LIBRARY_NOT_DEFINED : "Not defined LibraryClass used in the Module file.",
|
ERROR_META_DATA_FILE_CHECK_LIBRARY_NOT_DEFINED : "Not defined LibraryClass used in the Module file.",
|
||||||
ERROR_SPELLING_CHECK_ALL : "",
|
ERROR_SPELLING_CHECK_ALL : "",
|
||||||
|
|
||||||
|
ERROR_SMM_COMM_PARA_CHECK_BUFFER_TYPE : "SMM communication function may use wrong parameter type",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to parse exception items found by ECC tool
|
# This file is used to parse exception items found by ECC tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
||||||
@ -72,7 +72,7 @@ class ExceptionCheck(object):
|
|||||||
self.ExceptionList = self.ExceptionListXml.ToList()
|
self.ExceptionList = self.ExceptionListXml.ToList()
|
||||||
|
|
||||||
def IsException(self, ErrorID, KeyWord, FileID=-1):
|
def IsException(self, ErrorID, KeyWord, FileID=-1):
|
||||||
if (str(ErrorID), KeyWord) in self.ExceptionList:
|
if (str(ErrorID), KeyWord.replace('\r\n', '\n')) in self.ExceptionList:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
@ -261,6 +261,13 @@ UniCheckPCDInfo = 1
|
|||||||
# Uncheck whether UNI file is in UTF-16 format
|
# Uncheck whether UNI file is in UTF-16 format
|
||||||
GeneralCheckUni = -1
|
GeneralCheckUni = -1
|
||||||
|
|
||||||
|
#
|
||||||
|
# SMM Communicate Function Parameter Checking
|
||||||
|
#
|
||||||
|
SmmCommParaCheckAll = 0
|
||||||
|
# Check if the EFI_SMM_COMMUNICATION_PROTOCOL parameter buffer type is Reserved / ACPI NVS or UEFI RT code/data
|
||||||
|
SmmCommParaCheckBufferType = 1
|
||||||
|
|
||||||
#
|
#
|
||||||
# The check points in this section are reserved
|
# The check points in this section are reserved
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# generate capsule
|
# generate capsule
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -141,6 +141,11 @@ class Capsule (CapsuleClassObject) :
|
|||||||
Content.write(File.read())
|
Content.write(File.read())
|
||||||
File.close()
|
File.close()
|
||||||
for fmp in self.FmpPayloadList:
|
for fmp in self.FmpPayloadList:
|
||||||
|
if fmp.Existed:
|
||||||
|
FwMgrHdr.write(pack('=Q', PreSize))
|
||||||
|
PreSize += len(fmp.Buffer)
|
||||||
|
Content.write(fmp.Buffer)
|
||||||
|
continue
|
||||||
if fmp.ImageFile:
|
if fmp.ImageFile:
|
||||||
for Obj in fmp.ImageFile:
|
for Obj in fmp.ImageFile:
|
||||||
fmp.ImageFile = Obj.GenCapsuleSubItem()
|
fmp.ImageFile = Obj.GenCapsuleSubItem()
|
||||||
@ -169,12 +174,12 @@ class Capsule (CapsuleClassObject) :
|
|||||||
dwLength = 4 + 2 + 2 + 16 + 16 + 256 + 256
|
dwLength = 4 + 2 + 2 + 16 + 16 + 256 + 256
|
||||||
fmp.ImageFile = CapOutputTmp
|
fmp.ImageFile = CapOutputTmp
|
||||||
AuthData = [fmp.MonotonicCount, dwLength, WIN_CERT_REVISION, WIN_CERT_TYPE_EFI_GUID, fmp.Certificate_Guid]
|
AuthData = [fmp.MonotonicCount, dwLength, WIN_CERT_REVISION, WIN_CERT_TYPE_EFI_GUID, fmp.Certificate_Guid]
|
||||||
Buffer = fmp.GenCapsuleSubItem(AuthData)
|
fmp.Buffer = fmp.GenCapsuleSubItem(AuthData)
|
||||||
else:
|
else:
|
||||||
Buffer = fmp.GenCapsuleSubItem()
|
fmp.Buffer = fmp.GenCapsuleSubItem()
|
||||||
FwMgrHdr.write(pack('=Q', PreSize))
|
FwMgrHdr.write(pack('=Q', PreSize))
|
||||||
PreSize += len(Buffer)
|
PreSize += len(fmp.Buffer)
|
||||||
Content.write(Buffer)
|
Content.write(fmp.Buffer)
|
||||||
BodySize = len(FwMgrHdr.getvalue()) + len(Content.getvalue())
|
BodySize = len(FwMgrHdr.getvalue()) + len(Content.getvalue())
|
||||||
Header.write(pack('=I', HdrSize + BodySize))
|
Header.write(pack('=I', HdrSize + BodySize))
|
||||||
#
|
#
|
||||||
|
@ -183,6 +183,8 @@ class CapsulePayload(CapsuleData):
|
|||||||
self.VendorCodeFile = []
|
self.VendorCodeFile = []
|
||||||
self.Certificate_Guid = None
|
self.Certificate_Guid = None
|
||||||
self.MonotonicCount = None
|
self.MonotonicCount = None
|
||||||
|
self.Existed = False
|
||||||
|
self.Buffer = None
|
||||||
|
|
||||||
def GenCapsuleSubItem(self, AuthData=[]):
|
def GenCapsuleSubItem(self, AuthData=[]):
|
||||||
if not self.Version:
|
if not self.Version:
|
||||||
@ -239,4 +241,5 @@ class CapsulePayload(CapsuleData):
|
|||||||
VendorFile = open(self.VendorCodeFile, 'rb')
|
VendorFile = open(self.VendorCodeFile, 'rb')
|
||||||
Buffer += VendorFile.read()
|
Buffer += VendorFile.read()
|
||||||
VendorFile.close()
|
VendorFile.close()
|
||||||
|
self.Existed = True
|
||||||
return Buffer
|
return Buffer
|
||||||
|
@ -39,6 +39,7 @@ from Common.Misc import SaveFileOnChange
|
|||||||
from Common.Misc import ClearDuplicatedInf
|
from Common.Misc import ClearDuplicatedInf
|
||||||
from Common.Misc import GuidStructureStringToGuidString
|
from Common.Misc import GuidStructureStringToGuidString
|
||||||
from Common.Misc import CheckPcdDatum
|
from Common.Misc import CheckPcdDatum
|
||||||
|
from Common.Misc import BuildOptionPcdValueFormat
|
||||||
from Common.BuildVersion import gBUILD_VERSION
|
from Common.BuildVersion import gBUILD_VERSION
|
||||||
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
||||||
|
|
||||||
@ -408,31 +409,6 @@ def CheckBuildOptionPcd():
|
|||||||
|
|
||||||
GlobalData.BuildOptionPcd[i] = (TokenSpaceGuidCName, TokenCName, NewValue)
|
GlobalData.BuildOptionPcd[i] = (TokenSpaceGuidCName, TokenCName, NewValue)
|
||||||
|
|
||||||
def BuildOptionPcdValueFormat(TokenSpaceGuidCName, TokenCName, PcdDatumType, Value):
|
|
||||||
if PcdDatumType == 'VOID*':
|
|
||||||
if Value.startswith('L'):
|
|
||||||
if not Value[1]:
|
|
||||||
EdkLogger.error('GenFds', OPTION_VALUE_INVALID, 'For Void* type PCD, when specify the Value in the command line, please use the following format: "string", L"string", B"{...}"')
|
|
||||||
Value = Value[0] + '"' + Value[1:] + '"'
|
|
||||||
elif Value.startswith('B'):
|
|
||||||
if not Value[1]:
|
|
||||||
EdkLogger.error('GenFds', OPTION_VALUE_INVALID, 'For Void* type PCD, when specify the Value in the command line, please use the following format: "string", L"string", B"{...}"')
|
|
||||||
Value = Value[1:]
|
|
||||||
else:
|
|
||||||
if not Value[0]:
|
|
||||||
EdkLogger.error('GenFds', OPTION_VALUE_INVALID, 'For Void* type PCD, when specify the Value in the command line, please use the following format: "string", L"string", B"{...}"')
|
|
||||||
Value = '"' + Value + '"'
|
|
||||||
|
|
||||||
IsValid, Cause = CheckPcdDatum(PcdDatumType, Value)
|
|
||||||
if not IsValid:
|
|
||||||
EdkLogger.error('build', FORMAT_INVALID, Cause, ExtraData="%s.%s" % (TokenSpaceGuidCName, TokenCName))
|
|
||||||
if PcdDatumType == 'BOOLEAN':
|
|
||||||
Value = Value.upper()
|
|
||||||
if Value == 'TRUE' or Value == '1':
|
|
||||||
Value = '1'
|
|
||||||
elif Value == 'FALSE' or Value == '0':
|
|
||||||
Value = '0'
|
|
||||||
return Value
|
|
||||||
|
|
||||||
## FindExtendTool()
|
## FindExtendTool()
|
||||||
#
|
#
|
||||||
|
@ -102,6 +102,8 @@ if __name__ == '__main__':
|
|||||||
try:
|
try:
|
||||||
OpenSslPath = os.environ['OPENSSL_PATH']
|
OpenSslPath = os.environ['OPENSSL_PATH']
|
||||||
OpenSslCommand = os.path.join(OpenSslPath, OpenSslCommand)
|
OpenSslCommand = os.path.join(OpenSslPath, OpenSslCommand)
|
||||||
|
if ' ' in OpenSslCommand:
|
||||||
|
OpenSslCommand = '"' + OpenSslCommand + '"'
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -21,10 +21,44 @@ You may need the following steps for initialization:
|
|||||||
|
|
||||||
rd ./demoCA /S/Q
|
rd ./demoCA /S/Q
|
||||||
mkdir ./demoCA
|
mkdir ./demoCA
|
||||||
echo "" > ./demoCA/index.txt
|
echo.>./demoCA/index.txt
|
||||||
echo 01 > ./demoCA/serial
|
echo 01 > ./demoCA/serial
|
||||||
mkdir ./demoCA/newcerts
|
mkdir ./demoCA/newcerts
|
||||||
|
|
||||||
|
OpenSSL will apply the options from the specified sections in openssl.cnf when creating certificates or certificate signing requests. Make sure your configuration in openssl.cnf is correct and rational for certificate constraints.
|
||||||
|
The following sample sections were used when generating test certificates in this readme.
|
||||||
|
...
|
||||||
|
[ req ]
|
||||||
|
default_bits = 2048
|
||||||
|
default_keyfile = privkey.pem
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
x509_extensions = v3_ca # The extensions to add to the self signed cert
|
||||||
|
...
|
||||||
|
[ v3_ca ]
|
||||||
|
# Extensions for a typical Root CA.
|
||||||
|
subjectKeyIdentifier=hash
|
||||||
|
authorityKeyIdentifier=keyid:always,issuer
|
||||||
|
basicConstraints = critical,CA:true
|
||||||
|
keyUsage = critical, digitalSignature, cRLSign, keyCertSign
|
||||||
|
...
|
||||||
|
[ v3_intermediate_ca ]
|
||||||
|
# Extensions for a typical intermediate CA.
|
||||||
|
subjectKeyIdentifier = hash
|
||||||
|
authorityKeyIdentifier = keyid:always,issuer
|
||||||
|
basicConstraints = critical, CA:true
|
||||||
|
keyUsage = critical, digitalSignature, cRLSign, keyCertSign
|
||||||
|
...
|
||||||
|
[ usr_cert ]
|
||||||
|
# Extensions for user end certificates.
|
||||||
|
basicConstraints = CA:FALSE
|
||||||
|
nsCertType = client, email
|
||||||
|
subjectKeyIdentifier = hash
|
||||||
|
authorityKeyIdentifier = keyid,issuer
|
||||||
|
keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment
|
||||||
|
extendedKeyUsage = clientAuth, emailProtection
|
||||||
|
...
|
||||||
|
|
||||||
* Generate the certificate chain:
|
* Generate the certificate chain:
|
||||||
|
|
||||||
NOTE: User MUST set a UNIQUE "Common Name" on the different certificate
|
NOTE: User MUST set a UNIQUE "Common Name" on the different certificate
|
||||||
@ -37,7 +71,7 @@ Generate a root key:
|
|||||||
|
|
||||||
Generate a self-signed root certificate:
|
Generate a self-signed root certificate:
|
||||||
|
|
||||||
openssl req -new -x509 -days 3650 -key TestRoot.key -out TestRoot.crt
|
openssl req -extensions v3_ca -new -x509 -days 3650 -key TestRoot.key -out TestRoot.crt
|
||||||
openssl x509 -in TestRoot.crt -out TestRoot.cer -outform DER
|
openssl x509 -in TestRoot.crt -out TestRoot.cer -outform DER
|
||||||
openssl x509 -inform DER -in TestRoot.cer -outform PEM -out TestRoot.pub.pem
|
openssl x509 -inform DER -in TestRoot.cer -outform PEM -out TestRoot.pub.pem
|
||||||
|
|
||||||
@ -50,7 +84,7 @@ Generate the intermediate key:
|
|||||||
Generate the intermediate certificate:
|
Generate the intermediate certificate:
|
||||||
|
|
||||||
openssl req -new -days 3650 -key TestSub.key -out TestSub.csr
|
openssl req -new -days 3650 -key TestSub.key -out TestSub.csr
|
||||||
openssl ca -extensions v3_ca -in TestSub.csr -days 3650 -out TestSub.crt -cert TestRoot.crt -keyfile TestRoot.key
|
openssl ca -extensions v3_intermediate_ca -in TestSub.csr -days 3650 -out TestSub.crt -cert TestRoot.crt -keyfile TestRoot.key
|
||||||
openssl x509 -in TestSub.crt -out TestSub.cer -outform DER
|
openssl x509 -in TestSub.crt -out TestSub.cer -outform DER
|
||||||
openssl x509 -inform DER -in TestSub.cer -outform PEM -out TestSub.pub.pem
|
openssl x509 -inform DER -in TestSub.cer -outform PEM -out TestSub.pub.pem
|
||||||
|
|
||||||
@ -63,7 +97,7 @@ Generate User key:
|
|||||||
Generate User certificate:
|
Generate User certificate:
|
||||||
|
|
||||||
openssl req -new -days 3650 -key TestCert.key -out TestCert.csr
|
openssl req -new -days 3650 -key TestCert.key -out TestCert.csr
|
||||||
openssl ca -in TestCert.csr -days 3650 -out TestCert.crt -cert TestSub.crt -keyfile TestSub.key`
|
openssl ca -extensions usr_cert -in TestCert.csr -days 3650 -out TestCert.crt -cert TestSub.crt -keyfile TestSub.key
|
||||||
openssl x509 -in TestCert.crt -out TestCert.cer -outform DER
|
openssl x509 -in TestCert.crt -out TestCert.cer -outform DER
|
||||||
openssl x509 -inform DER -in TestCert.cer -outform PEM -out TestCert.pub.pem
|
openssl x509 -inform DER -in TestCert.cer -outform PEM -out TestCert.pub.pem
|
||||||
|
|
||||||
|
@ -1,57 +1,60 @@
|
|||||||
Bag Attributes
|
Bag Attributes
|
||||||
localKeyID: 01 00 00 00
|
localKeyID: 32 25 22 FA 81 B3 BF 25 E2 F7 8F 0B 1B C4 50 70 BB B7 85 96
|
||||||
Microsoft CSP Name: Microsoft Strong Cryptographic Provider
|
subject=/C=CN/ST=SH/O=TianoCore/OU=EDKII/CN=TestCert/emailAddress=edkii@tianocore.org
|
||||||
friendlyName: PvkTmp:133cc061-112c-467a-b8cf-dc0a56d7830e
|
issuer=/C=CN/ST=SH/O=TianoCore/OU=EDKII/CN=TestSub/emailAddress=edkii@tianocore.org
|
||||||
Key Attributes
|
-----BEGIN CERTIFICATE-----
|
||||||
X509v3 Key Usage: 80
|
MIIEKzCCAxOgAwIBAgICEAMwDQYJKoZIhvcNAQELBQAwdDELMAkGA1UEBhMCQ04x
|
||||||
-----BEGIN PRIVATE KEY-----
|
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
|
yekXblzF5lQY0goqDiks
|
||||||
qYzrvv8s+RVWKg9u10JDNgVg0kupHLr98RfPiWJg8vHhXFYwtb6tlNMS9+9yvczm
|
-----END CERTIFICATE-----
|
||||||
O4jzY/4zW7+qQoYKxkyq2pVn7uVOnmPNcQIHEGqBAoGBAJMfZV2vpxY6kti8SXzb
|
Bag Attributes
|
||||||
PscYI3ZbbKyJLq4+KHGcKCqqbLiY4ao8vflDyDwBm+TJg4xq9wjJAN2riE9nuuds
|
localKeyID: 32 25 22 FA 81 B3 BF 25 E2 F7 8F 0B 1B C4 50 70 BB B7 85 96
|
||||||
99mYW/8R30BIfiH/4oBHjggb0NC5K3vHR4KGDKcUiIKZPv1r7mNeYw227N4n/dPM
|
Key Attributes: <No Attributes>
|
||||||
NXjlZVuS6mqc2T+GPzAJj/Uf
|
-----BEGIN PRIVATE KEY-----
|
||||||
-----END PRIVATE KEY-----
|
MIIEwAIBADANBgkqhkiG9w0BAQEFAASCBKowggSmAgEAAoIBAQD3vtjV/039IljC
|
||||||
Bag Attributes
|
YGDFzKFjor3l/RRsfWHMB/gSp/WT2R4oOgrGegde38AVnpPKyDgDkVvBS/lMkYbJ
|
||||||
localKeyID: 01 00 00 00
|
yhf6CozDe2sIi42nJI6vJtGzxR1ZeHSaKLpR5kjwrETHhv6VrOA1T1oiKBdbr1ze
|
||||||
subject=/CN=TestCert
|
jGd87dIaH4Kj5xoyUBdByxAqz6sgb+7IrfXyGjWf3JanEd2anV0EVHxJO3RPKYPm
|
||||||
issuer=/CN=TestSub
|
YzTWv+VkxsEgQeyHpLuIxmysm76Y+hbRD//GMgCQt3zg/mODyEApxcc1nIThqxXK
|
||||||
-----BEGIN CERTIFICATE-----
|
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
|
||||||
/A==
|
L+uHmOWxfk9BodkdQwsyk8JGvPoRfq+xMH0b9qQxltsCgYEAtNf8yvoTXUHa2zje
|
||||||
-----END CERTIFICATE-----
|
PvI6OiQjuiON5UIt9KkQNrIrcm4wiQ2eVdkCQcUstuXtmBtvnsrxlay0jbSz2bV6
|
||||||
|
1sWlJIvfZJujC901yMs5+twr6jMuXZ6ashWF1f2UbwgtKvh49PPgly4RhWST3Kp1
|
||||||
|
J1AmCrzTwtaNmTZd1g5IYreXpKw=
|
||||||
|
-----END PRIVATE KEY-----
|
||||||
|
@ -1,19 +1,25 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIC/TCCAemgAwIBAgIQ0+nLBVt+jbJMSfzhFpRJrDAJBgUrDgMCHQUAMBIxEDAO
|
MIIEKzCCAxOgAwIBAgICEAMwDQYJKoZIhvcNAQELBQAwdDELMAkGA1UEBhMCQ04x
|
||||||
BgNVBAMTB1Rlc3RTdWIwHhcNMTYwODA0MTUwMjMwWhcNMzkxMjMxMjM1OTU5WjAT
|
CzAJBgNVBAgMAlNIMRIwEAYDVQQKDAlUaWFub0NvcmUxDjAMBgNVBAsMBUVES0lJ
|
||||||
MREwDwYDVQQDEwhUZXN0Q2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
MRAwDgYDVQQDDAdUZXN0U3ViMSIwIAYJKoZIhvcNAQkBFhNlZGtpaUB0aWFub2Nv
|
||||||
ggEBAJI8dhKiEX5+Kbjz2I3HwJwIb989vsou70Oyr6kHg9z9Qm1poD4PtErc+Go0
|
cmUub3JnMB4XDTE3MDQxMDA4MzgwNFoXDTE4MDQxMDA4MzgwNFowdTELMAkGA1UE
|
||||||
KtZtv6AI2CbuXGI4KseabS09qXvVRXxUVSJMztl/XLxUEUIcn3bKSZLswPCpXbmg
|
BhMCQ04xCzAJBgNVBAgMAlNIMRIwEAYDVQQKDAlUaWFub0NvcmUxDjAMBgNVBAsM
|
||||||
wYahzPiN1w+XevbIUWp32NoEA+NSwdFuzwALwIod7E4AJ97J2BCiP0o9Yf0NQVDJ
|
BUVES0lJMREwDwYDVQQDDAhUZXN0Q2VydDEiMCAGCSqGSIb3DQEJARYTZWRraWlA
|
||||||
dxu0zIZcC8UKS2dI1FB/TVR00l5t4Pr7CVCfSxRqiOfWW7nvQ51ncCQmWbptMQq9
|
dGlhbm9jb3JlLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPe+
|
||||||
8d44HbUZoedDU7VFW2q938qMUeHFJLDyZ5OzKo39Ohr/zQXJQoSZMhol0Rqr8LZc
|
2NX/Tf0iWMJgYMXMoWOiveX9FGx9YcwH+BKn9ZPZHig6CsZ6B17fwBWek8rIOAOR
|
||||||
ppQAJ7Oxiq9HEOr6mWKTKIim3psCAwEAAaNWMFQwDAYDVR0TAQH/BAIwADBEBgNV
|
W8FL+UyRhsnKF/oKjMN7awiLjackjq8m0bPFHVl4dJooulHmSPCsRMeG/pWs4DVP
|
||||||
HQEEPTA7gBAeQOcW6KCBdWSbrvKQrBrfoRUwEzERMA8GA1UEAxMIVGVzdFJvb3SC
|
WiIoF1uvXN6MZ3zt0hofgqPnGjJQF0HLECrPqyBv7sit9fIaNZ/clqcR3ZqdXQRU
|
||||||
ELOMZKZtPz2BS8i5NTXdHNMwCQYFKw4DAh0FAAOCAQEAK7YgK6iiTo07d3CSY4xG
|
fEk7dE8pg+ZjNNa/5WTGwSBB7Ieku4jGbKybvpj6FtEP/8YyAJC3fOD+Y4PIQCnF
|
||||||
9N0QS2m4LsBPrF8pFmk5h6R81MFEdBZrA+zggbUujQ2IGB7k6F7WvP3F3B3AXZtx
|
xzWchOGrFcoeqgf/hLhzoiRvalgnvjczbo3W4sgFwFD/WxoDqb1l1moHyOubw5oT
|
||||||
DW1FYrQheQhTT5wx85LxFdLy+q6uwUtJi/VyErPmZOcds3QaBXPvG/UykFbu24JV
|
CdD+J+QwdFl1kCkG+K8CAwEAAaOBxTCBwjAJBgNVHRMEAjAAMBEGCWCGSAGG+EIB
|
||||||
K2ScLpQVyzmkTN7GWSXrIO6eHHMQgeRX3XjRutbR8CKP1pWTOY+MO4G6YZqrzLdp
|
AQQEAwIFoDAzBglghkgBhvhCAQ0EJhYkT3BlblNTTCBHZW5lcmF0ZWQgQ2xpZW50
|
||||||
opYFPgvdZpTL3IKSSkp31Amu5oidkvzLgallC3SOYdLZirWEIAAXW2LVYXwiiL6L
|
IENlcnRpZmljYXRlMB0GA1UdDgQWBBTACEuCjiL/cFrP+l8hECWctq+Q+TAfBgNV
|
||||||
HEIV/G9u85jhKhv/z9l8F/1Eg4HHGSYba8pf1HQA+WsQwi4BVp4x4MBoeHOolyVT
|
HSMEGDAWgBTWnWbWSXz6II1ddWkqQQp6A1ql6zAOBgNVHQ8BAf8EBAMCBeAwHQYD
|
||||||
/A==
|
VR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMA0GCSqGSIb3DQEBCwUAA4IBAQA7
|
||||||
-----END CERTIFICATE-----
|
vYHdpk9u63dpMKAt5MrKU9dxVn/wuqNaYQMucvQLpcE12fgWMhV2wOHlmk3fJxq7
|
||||||
|
CnD8QVaRbL3OQYWQQDA+sGNSJ9r71WFFET++94Rny6BzTz+dkrvIS4WaL/vLZ17c
|
||||||
|
/gOsMCZUlhodxDcSSkachab3eE/VTEzOMUm41YYeW7USIoNSSgkWSnwZQVgcIg93
|
||||||
|
F9X6lIr0Ik6rxHMq2ManiuSh6cMjJMGYGf2/58TySIefrXTe2A3TKQR27OYjfXJO
|
||||||
|
l/H7u+4HS9AVCA7b9NihR5iSho5HrWqNC4Mmuz8D8iFOI2nWcek86StDswtoqDtu
|
||||||
|
yekXblzF5lQY0goqDiks
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
Binary file not shown.
@ -1,56 +1,58 @@
|
|||||||
Bag Attributes
|
Bag Attributes
|
||||||
localKeyID: 01 00 00 00
|
localKeyID: F4 2E C8 1D 29 A0 02 47 B7 93 2B 69 8D 8D D1 33 7A E3 09 30
|
||||||
Microsoft CSP Name: Microsoft Strong Cryptographic Provider
|
subject=/C=CN/ST=SH/L=SH/O=TianoCore/OU=EDKII/CN=TestRoot/emailAddress=edkii@tianocore.org
|
||||||
friendlyName: PvkTmp:76c92422-d6f3-4763-9b80-b423fd921d00
|
issuer=/C=CN/ST=SH/L=SH/O=TianoCore/OU=EDKII/CN=TestRoot/emailAddress=edkii@tianocore.org
|
||||||
Key Attributes
|
-----BEGIN CERTIFICATE-----
|
||||||
X509v3 Key Usage: 80
|
MIID7DCCAtSgAwIBAgIJAMCRxeK3ZsD4MA0GCSqGSIb3DQEBCwUAMIGCMQswCQYD
|
||||||
-----BEGIN PRIVATE KEY-----
|
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
|
-----END CERTIFICATE-----
|
||||||
VsMyn4uj9o0PSK/gGRQGV7FX2iAwY7g98vrWix+40FlhS3MkWzTZMaXc+uyyV5ff
|
Bag Attributes
|
||||||
kmtfcwLnhljm0XHBQ9fZzcdX0y1bXAI6oElYk8vIxnG1UEnsOgyrmcCG+zcHC1fE
|
localKeyID: F4 2E C8 1D 29 A0 02 47 B7 93 2B 69 8D 8D D1 33 7A E3 09 30
|
||||||
wxhri+TLyx9UfwNlKBOrq0KhYB00nQDUUpFpgQKBgQCPWpNeNQ8hCARnayhzu2fE
|
Key Attributes: <No Attributes>
|
||||||
HEPG1P/resOp0u+c4jy4TeHVa9806wqZlkYNRKNn09Ub5Ajpp05dwdb+JvUSkWwr
|
-----BEGIN PRIVATE KEY-----
|
||||||
vOmE94WeLg5FuNzPAQjwAe+Eq54Vk8TdAhdLSu1m2xdBKFtEOk6TQTmRBCiknwhg
|
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC5KSlsYAzXI/Z9
|
||||||
19TgHd8hEFnz6ZICAeWGbQ==
|
7vBi/9nJqlWMgZVWP7dWU7DCghLFO3UjuU3WxFVz86qVqBvzk36eQOQdIpyTBwvX
|
||||||
-----END PRIVATE KEY-----
|
qlvX5BohhNdjWQNQH/UUVZORm/VSsL8OXGg7WVKYllbhq8RDuwVXeEUBn1gVUw4R
|
||||||
Bag Attributes
|
lC8O8aYZom6GOSszjcfF6+4eM9MylMFZxAyXCxJIXzP2YHR9V8ITLX2ph6M16pGD
|
||||||
localKeyID: 01 00 00 00
|
P2d6kh8BU59iX5kS/XMbLZ4rbDRJr08Hj8Dpa55feTXaKlyI7vZIYdqW40hGoJQc
|
||||||
subject=/CN=TestRoot
|
nfZchw7vdAmRDT1a58VMinqsoYW2Z0QXVVI66BFNWKKTAGLqe4Dtz73fdYBLuWVj
|
||||||
issuer=/CN=TestRoot
|
rQtNdPpZAgMBAAECggEAci5d6wT4Jht5P4N/Ha2kweWWR8UJMFyuVD/bura3mITn
|
||||||
-----BEGIN CERTIFICATE-----
|
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
|
||||||
-----END CERTIFICATE-----
|
ABFUUad70bULTqRTSmld0I9CWWnYs0vaFKgIemddQ7W2eXr7N+N+ED+OK/PvWjMq
|
||||||
|
LMKhChf252RfOYdB+WN6alVG
|
||||||
|
-----END PRIVATE KEY-----
|
||||||
|
@ -1,18 +1,23 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIC8DCCAdygAwIBAgIQNDAnfwU9lYVDoKT1DJrnyjAJBgUrDgMCHQUAMBMxETAP
|
MIID7DCCAtSgAwIBAgIJAMCRxeK3ZsD4MA0GCSqGSIb3DQEBCwUAMIGCMQswCQYD
|
||||||
BgNVBAMTCFRlc3RSb290MB4XDTE2MDgwNDE1MDE0OFoXDTM5MTIzMTIzNTk1OVow
|
VQQGEwJDTjELMAkGA1UECAwCU0gxCzAJBgNVBAcMAlNIMRIwEAYDVQQKDAlUaWFu
|
||||||
EzERMA8GA1UEAxMIVGVzdFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
|
b0NvcmUxDjAMBgNVBAsMBUVES0lJMREwDwYDVQQDDAhUZXN0Um9vdDEiMCAGCSqG
|
||||||
AoIBAQCU5jNPVsMHoNCZV8PhVkIBcFkcL0pmjzSek7227JKkkFFdxo+1w4YV32CA
|
SIb3DQEJARYTZWRraWlAdGlhbm9jb3JlLm9yZzAeFw0xNzA0MTAwODI3NDBaFw0x
|
||||||
vrh4WVub/SeSaczKjj6egUdbhO9cm7NKQ1uNCzEEALaKwKn1IdA/zbBnfVAzLvsb
|
NzA1MTAwODI3NDBaMIGCMQswCQYDVQQGEwJDTjELMAkGA1UECAwCU0gxCzAJBgNV
|
||||||
LBYu7lYBh/bI1FMHZ5kLRr8dkMbbf21iDEqsqKI8eQ+tj/7B6OUnPfmmmh3sml9i
|
BAcMAlNIMRIwEAYDVQQKDAlUaWFub0NvcmUxDjAMBgNVBAsMBUVES0lJMREwDwYD
|
||||||
US6YHSm6a4r7Qw5oKfW+Z0hEKEX+HTtQcmrAuwyfAmGtY6eH9jKfPhZc7swFvRfo
|
VQQDDAhUZXN0Um9vdDEiMCAGCSqGSIb3DQEJARYTZWRraWlAdGlhbm9jb3JlLm9y
|
||||||
RlKvUIqmfhZpg2lbbk3Hz4C4zfZmP75soOicJmC6qQXdcUq9AKgM91CrRNY+hyE8
|
ZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALkpKWxgDNcj9n3u8GL/
|
||||||
LeYzJ14hJ7ncOEjWOpbhF0dlZc49AgMBAAGjSDBGMEQGA1UdAQQ9MDuAEM61es/l
|
2cmqVYyBlVY/t1ZTsMKCEsU7dSO5TdbEVXPzqpWoG/OTfp5A5B0inJMHC9eqW9fk
|
||||||
Icdr8+yS1L9lKjWhFTATMREwDwYDVQQDEwhUZXN0Um9vdIIQNDAnfwU9lYVDoKT1
|
GiGE12NZA1Af9RRVk5Gb9VKwvw5caDtZUpiWVuGrxEO7BVd4RQGfWBVTDhGULw7x
|
||||||
DJrnyjAJBgUrDgMCHQUAA4IBAQBrDeAK0O5bP7ZzSGLo9Fvh7dkAxeUOaPtTMzBq
|
phmiboY5KzONx8Xr7h4z0zKUwVnEDJcLEkhfM/ZgdH1XwhMtfamHozXqkYM/Z3qS
|
||||||
YLruOFtRY3DVfgX+5EUqFWIb/Nh1k1b25gaFIfcIRya5/gVOkCJU9DkJTFyOzXw7
|
HwFTn2JfmRL9cxstnitsNEmvTwePwOlrnl95NdoqXIju9khh2pbjSEaglByd9lyH
|
||||||
r0stGAb0XCQqZPdZdSiXqZAsukYCamRmSTLLXTT+JOREsMKtFxsFfdNYiC6+Dtcr
|
Du90CZENPVrnxUyKeqyhhbZnRBdVUjroEU1YopMAYup7gO3Pvd91gEu5ZWOtC010
|
||||||
yly/KCU92Ls8OFLmJ/rSuEVrX39LsCMF6K9n6OJsL5/4c3/DF7yyalsq82vT3H/f
|
+lkCAwEAAaNjMGEwHQYDVR0OBBYEFBaq1o4bLUPzLbAkrTZlP7L6sSztMB8GA1Ud
|
||||||
L9CrBgz+A+eNguyEPch97ctqWzVIVQf7qngaAbuYRYvaiuMhV4YVIxdQG5y8Glmo
|
IwQYMBaAFBaq1o4bLUPzLbAkrTZlP7L6sSztMA8GA1UdEwEB/wQFMAMBAf8wDgYD
|
||||||
Kq06fgEkg/ewYea9T9mRkKcquQw7q5UgHPB0zgK6FF3xkSVK
|
VR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IBAQCV3t+kFNuSIngavTGdHtcv
|
||||||
-----END CERTIFICATE-----
|
ChARXXRh6DDE8xXpMFT0uwwEeBNdLN2MkpDRnNDQGKOj/IwoWtSRTQjD9hrI3aYI
|
||||||
|
WOIVlfstLYqxMIC9mrbhLCA+3cTHVWXPKBf07tq+d3DVUtYVevutr/3VRZBa5jFC
|
||||||
|
14SzSVZq00fzv2hgiw/ir/Tj7BK54joWEU5Nc3mvR4VMdiaeizLAjsLcJ6bvrJOe
|
||||||
|
oV7PNEXgKsedTdfXN3KX+Fj5tjVI8dEKcn/9TXzpzNhIG0lSU95RAVM1vJDNjIrM
|
||||||
|
QyCnRf8rVbCLLf9VFUuE0MPTkJyUS1XVYuoiq2Jo3VPG3KXdmi2OeXwunORmgIwd
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
@ -1,57 +1,59 @@
|
|||||||
Bag Attributes
|
Certificate:
|
||||||
localKeyID: 01 00 00 00
|
Data:
|
||||||
Microsoft CSP Name: Microsoft Strong Cryptographic Provider
|
Version: 3 (0x2)
|
||||||
friendlyName: PvkTmp:11e8b08d-46fb-45a2-90c4-d458be4a1276
|
Serial Number: 4098 (0x1002)
|
||||||
Key Attributes
|
Signature Algorithm: sha256WithRSAEncryption
|
||||||
X509v3 Key Usage: 80
|
Issuer: C = CN, ST = SH, L = SH, O = TianoCore, OU = EDKII, CN = TestRoot, emailAddress = edkii@tianocore.org
|
||||||
-----BEGIN PRIVATE KEY-----
|
Validity
|
||||||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCfNn3oUo5iCBXg
|
Not Before: Apr 10 08:33:45 2017 GMT
|
||||||
x1AUxgHG/h23/WyThgYj2NAToG3S51i0MGamyjGP8GbBphRc0ORpIhQE8Va+NPjW
|
Not After : Apr 10 08:33:45 2018 GMT
|
||||||
cdoh4sXLOroW3Es26sR+cxdRwNF0/YxK/+JboYDmdUecgcwqipIv795bVQjRLCyT
|
Subject: C = CN, ST = SH, O = TianoCore, OU = EDKII, CN = TestSub, emailAddress = edkii@tianocore.org
|
||||||
/+LjLXs/B3XM/jc4jHa7gs+AmwH2DXz9VTsIHmXrm/KGZ64VQzFbJYJl+KvFAmlm
|
Subject Public Key Info:
|
||||||
LcL+t099lyiJYL+3LY2ajonzkAidVQylIfsmhAlcnGee6MYfPxLQRe4pIIlhyXAK
|
Public Key Algorithm: rsaEncryption
|
||||||
ZixBnAlZvifo3JRwTKXRHzkj6Vp5KhDsi/31Y54iLJQHiet/FlymIHrtkFpC47xi
|
Public-Key: (2048 bit)
|
||||||
ndF6jNpfAgMBAAECggEAD4owC9xS+A/gosnmxRWhLXJhet3fb8llvAX4zpGau+Uc
|
Modulus:
|
||||||
wVRKu1OCNucOAISx+W/iJhN6GhQRlWByO+wXkGB5UcwaRwpFb8dxBQPoGMYAgQdm
|
00:c5:3a:af:16:34:9a:14:61:74:8c:39:1a:04:1f:
|
||||||
XsOkV7E8dZdTirEYjmZsElsP5vY2dW7MWGhiFYO7mHv6ltbmk5G83Qci3biYyRKB
|
7b:95:d3:40:b7:ea:26:a7:7b:8d:76:d3:86:1b:7c:
|
||||||
4Qb+q/1yl9tdqRvMnLshgSNSa2onGiJ8k9NniSnfnKCc4S0pliy2Z5HOPQCi2QAk
|
07:17:d2:56:72:36:13:b4:6c:75:b7:bf:d1:35:d1:
|
||||||
eVWORHz5jL8lzlVCflOL7VZiS13YORMDIj0S9LyMhXO4bAtsgWfldqOupNgNW0qI
|
31:d5:9a:07:c1:62:4e:aa:3d:bd:d8:40:8b:48:9a:
|
||||||
FwzrNvIXhQxeUiqylzfKNCzuBA11CFBnPt/+agv10QKBgQDH82PHMC3GH8Teq0lw
|
c5:46:c4:c3:10:2c:d4:82:d9:6d:f4:c3:de:85:fa:
|
||||||
J5G+zYQol1ikRU7O116cAcV04P8HAiAmZ2lrP4DSJWD3y3sOjnnK54KmXkHVcNJI
|
34:1d:d1:74:7a:5f:16:34:59:2b:2b:03:61:46:62:
|
||||||
IDjb8d/BZjuYqdylfKhoKNgAdI1WcNKOz7KOK6Le8/ZK1uh1ZHMA6M+L9mTtQjhW
|
d7:88:62:59:4d:d8:55:00:52:54:e1:15:5e:a9:ec:
|
||||||
DyoMvEGsQmNHnYF5n3zPQWUMFQKBgQDL17jZMLOORK2U+Iqu0cTVttGUjg/agP+r
|
d6:e8:51:fd:ef:8e:68:5f:d2:40:d2:61:ef:2c:1d:
|
||||||
D4RWwA6BKI0vW3fFOka9MsjBpRZkZdXucq1TusDl8/J30FD/Cjp/gt9RwCQAvk44
|
5b:a7:6e:14:4c:12:bc:60:81:8e:66:c9:84:51:c2:
|
||||||
Zp6HU3TFEsBdXU+3XeJqTtyJqFuPkRQWrd0UeudSiEJammAlzyF7pPZioF1mucOA
|
89:51:fc:e5:7f:86:9a:78:a4:c1:f7:0f:a9:a5:97:
|
||||||
nCcDecLFowKBgBv1gKI9rmjh0FmCggZYwhx4CF7UquRtfJOXsfcGmGG7hG2qcmxs
|
60:dd:6f:c8:a0:fd:ea:07:2f:01:36:0a:e8:bd:0e:
|
||||||
UWVZv92itGhx34ctjQI+VRqGW5ZI7F6BgvHeZHdaoEK8ncnWIIZQD8QgiBLqO8cU
|
dc:48:2e:85:22:7b:bb:db:68:78:eb:cd:6a:54:07:
|
||||||
a9dNarzaSDo2ytJ/dUVPSJY9oec7Nz1xaWPWfyhjMBa3g39KOd2RO1vxAoGBAMRD
|
f7:81:a5:52:8f:f3:5c:09:1e:76:a3:d1:91:8f:ee:
|
||||||
Q9r6JSeJwId6diy0FAyhJVEfJux+36tYGVddO5nn7Wf3bW4cGhf4WYr45IJt+njH
|
86:2c:85:49:99:96:4f:5f:5b:0d:08:ae:d8:20:e8:
|
||||||
OVMwsKG3K3FoxVOKCaDT5SjVEtUUZkOvqlspY3iMAWLjgOlQH7uzimuQCfhE+06K
|
e3:67:70:c6:ec:0e:0e:bd:bf:3c:f6:db:e4:45:d5:
|
||||||
wB4D581zHFAX6xL8R4TA4+k59jP+D9o4fue9yGZ5AoGAMn+TsY1IZFSY1fw6TTHq
|
7a:bb:9f:d1:3b:18:89:fc:63:ac:c2:30:b8:fa:bb:
|
||||||
sp9PiYQQqTMjRkzE7GRXbb1rdE6WoLkSk4Dz4u/B9E7YVzTZggYhPisChu6wZPtK
|
8a:24:63:4e:79:58:78:72:ab:27:36:3d:bb:4f:47:
|
||||||
IiXBGu8h3GygUGI/WdNRKHW5nst9IZWrtVJ06c87jWqOktbgBnrbqXUG1rgRZr+i
|
d6:ef
|
||||||
n3sJLF+GGwzdp/gCxLMH66M=
|
Exponent: 65537 (0x10001)
|
||||||
-----END PRIVATE KEY-----
|
X509v3 extensions:
|
||||||
Bag Attributes
|
X509v3 Subject Key Identifier:
|
||||||
localKeyID: 01 00 00 00
|
D6:9D:66:D6:49:7C:FA:20:8D:5D:75:69:2A:41:0A:7A:03:5A:A5:EB
|
||||||
subject=/CN=TestSub
|
X509v3 Authority Key Identifier:
|
||||||
issuer=/CN=TestRoot
|
keyid:16:AA:D6:8E:1B:2D:43:F3:2D:B0:24:AD:36:65:3F:B2:FA:B1:2C:ED
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIDADCCAeygAwIBAgIQs4xkpm0/PYFLyLk1Nd0c0zAJBgUrDgMCHQUAMBMxETAP
|
X509v3 Basic Constraints: critical
|
||||||
BgNVBAMTCFRlc3RSb290MB4XDTE2MDgwNDE1MDIwOVoXDTM5MTIzMTIzNTk1OVow
|
CA:TRUE
|
||||||
EjEQMA4GA1UEAxMHVGVzdFN1YjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
X509v3 Key Usage: critical
|
||||||
ggEBAJ82fehSjmIIFeDHUBTGAcb+Hbf9bJOGBiPY0BOgbdLnWLQwZqbKMY/wZsGm
|
Digital Signature, Certificate Sign, CRL Sign
|
||||||
FFzQ5GkiFATxVr40+NZx2iHixcs6uhbcSzbqxH5zF1HA0XT9jEr/4luhgOZ1R5yB
|
Signature Algorithm: sha256WithRSAEncryption
|
||||||
zCqKki/v3ltVCNEsLJP/4uMtez8Hdcz+NziMdruCz4CbAfYNfP1VOwgeZeub8oZn
|
83:3c:ae:b2:fc:99:3d:33:b3:da:ca:26:83:8c:a9:ae:f8:bb:
|
||||||
rhVDMVslgmX4q8UCaWYtwv63T32XKIlgv7ctjZqOifOQCJ1VDKUh+yaECVycZ57o
|
ad:05:37:97:a5:f8:0d:2b:4e:3e:e5:b7:12:68:f8:64:d4:bd:
|
||||||
xh8/EtBF7ikgiWHJcApmLEGcCVm+J+jclHBMpdEfOSPpWnkqEOyL/fVjniIslAeJ
|
ff:65:7d:57:98:61:cd:47:10:a5:6a:bd:66:89:74:ce:5e:28:
|
||||||
638WXKYgeu2QWkLjvGKd0XqM2l8CAwEAAaNZMFcwDwYDVR0TAQH/BAUwAwEB/zBE
|
29:39:67:c9:1f:54:ec:78:76:b1:dd:04:91:63:b6:8c:2f:86:
|
||||||
BgNVHQEEPTA7gBDOtXrP5SHHa/PsktS/ZSo1oRUwEzERMA8GA1UEAxMIVGVzdFJv
|
59:1f:c4:2b:a1:4a:8c:a8:5b:f6:8a:92:f0:83:bb:92:92:5c:
|
||||||
b3SCEDQwJ38FPZWFQ6Ck9Qya58owCQYFKw4DAh0FAAOCAQEAFT8uXdMSHCmatVNg
|
b1:1c:18:95:3d:d6:be:6d:79:9d:4f:7b:92:1f:68:f5:1f:cd:
|
||||||
LMKsyVA/jJgXGncHmAy59Vjo2+KCIooEuY3NaK527LxB1yi9+UyMe2+Ia4KWcEGY
|
f4:37:2d:1e:e3:f6:eb:f2:8a:a4:8d:a1:c5:db:0c:3a:59:01:
|
||||||
+mb+PDTDrlsYtjIU3aRzDpyXUrkYV/D6vZaw+zsgAquQkCi+WwEYZ4uCSUznlcyt
|
dc:be:a9:c1:0b:04:ba:e8:02:a9:85:cd:d7:48:0d:f6:60:30:
|
||||||
U3p2Rd/+tvQqq5UerPfRBIs6JTUerwRGUQurTNpzqCGClo3zi58yuOEbNIrOzW1D
|
2b:05:ba:e0:c7:d8:9f:23:14:37:04:0a:a7:bc:b6:c8:25:31:
|
||||||
MtQFKUtKkMx4rg6NT9kq/ICXt8k3UIsXh52NTYchkLlsnCgaoKzW2DFqSMFL3KC0
|
e4:9a:41:a5:83:c2:ee:89:d3:fa:a5:7c:ae:a6:14:22:a4:5f:
|
||||||
NmQtmKaPo3mBIYJT0WDofYzas2TQO8cBiQHGrSqXNFAfI5eUo3qLtsRE+7Z9F2Mw
|
73:03:f2:7b:3c:51:f7:76:2a:0a:cf:ee:71:35:1c:bc:ff:3f:
|
||||||
HgNmsA==
|
9b:d5:b1:33:e0:b6:fc:2a:c8:ab:84:89:cd:fa:1c:ee:12:8c:
|
||||||
-----END CERTIFICATE-----
|
07:ba:93:46:50:b3:3f:73:05:be:67:58:60:90:05:2c:d3:b6:
|
||||||
|
19:7c:a4:f0:6e:ee:d4:f2:0e:f5:02:79:5f:2c:28:83:1e:83:
|
||||||
|
c6:92:ba:7c
|
||||||
|
@ -1,19 +1,23 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
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
|
||||||
HgNmsA==
|
fVeYYc1HEKVqvWaJdM5eKCk5Z8kfVOx4drHdBJFjtowvhlkfxCuhSoyoW/aKkvCD
|
||||||
-----END CERTIFICATE-----
|
u5KSXLEcGJU91r5teZ1Pe5IfaPUfzfQ3LR7j9uvyiqSNocXbDDpZAdy+qcELBLro
|
||||||
|
AqmFzddIDfZgMCsFuuDH2J8jFDcECqe8tsglMeSaQaWDwu6J0/qlfK6mFCKkX3MD
|
||||||
|
8ns8Ufd2KgrP7nE1HLz/P5vVsTPgtvwqyKuEic36HO4SjAe6k0ZQsz9zBb5nWGCQ
|
||||||
|
BSzTthl8pPBu7tTyDvUCeV8sKIMeg8aSunw=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
@ -64,6 +64,8 @@ if __name__ == '__main__':
|
|||||||
try:
|
try:
|
||||||
OpenSslPath = os.environ['OPENSSL_PATH']
|
OpenSslPath = os.environ['OPENSSL_PATH']
|
||||||
OpenSslCommand = os.path.join(OpenSslPath, OpenSslCommand)
|
OpenSslCommand = os.path.join(OpenSslPath, OpenSslCommand)
|
||||||
|
if ' ' in OpenSslCommand:
|
||||||
|
OpenSslCommand = '"' + OpenSslCommand + '"'
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -85,6 +85,8 @@ if __name__ == '__main__':
|
|||||||
try:
|
try:
|
||||||
OpenSslPath = os.environ['OPENSSL_PATH']
|
OpenSslPath = os.environ['OPENSSL_PATH']
|
||||||
OpenSslCommand = os.path.join(OpenSslPath, OpenSslCommand)
|
OpenSslCommand = os.path.join(OpenSslPath, OpenSslCommand)
|
||||||
|
if ' ' in OpenSslCommand:
|
||||||
|
OpenSslCommand = '"' + OpenSslCommand + '"'
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# build a platform or a module
|
# build a platform or a module
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
|
# Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
|
||||||
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -54,7 +54,7 @@ import Common.GlobalData as GlobalData
|
|||||||
# Version and Copyright
|
# Version and Copyright
|
||||||
VersionNumber = "0.60" + ' ' + gBUILD_VERSION
|
VersionNumber = "0.60" + ' ' + gBUILD_VERSION
|
||||||
__version__ = "%prog Version " + VersionNumber
|
__version__ = "%prog Version " + VersionNumber
|
||||||
__copyright__ = "Copyright (c) 2007 - 2016, Intel Corporation All rights reserved."
|
__copyright__ = "Copyright (c) 2007 - 2017, Intel Corporation All rights reserved."
|
||||||
|
|
||||||
## standard targets of build command
|
## standard targets of build command
|
||||||
gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 'clean', 'cleanall', 'cleanlib', 'run']
|
gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 'clean', 'cleanall', 'cleanlib', 'run']
|
||||||
@ -989,7 +989,6 @@ class Build():
|
|||||||
self.PostbuildScript = PostbuildList[0]
|
self.PostbuildScript = PostbuildList[0]
|
||||||
self.Postbuild = ' '.join(PostbuildList)
|
self.Postbuild = ' '.join(PostbuildList)
|
||||||
self.Postbuild += self.PassCommandOption(self.BuildTargetList, self.ArchList, self.ToolChainList)
|
self.Postbuild += self.PassCommandOption(self.BuildTargetList, self.ArchList, self.ToolChainList)
|
||||||
#self.LanuchPostbuild()
|
|
||||||
else:
|
else:
|
||||||
EdkLogger.error("Postbuild", POSTBUILD_ERROR, "the postbuild script %s is not exist.\n If you'd like to disable the Postbuild process, please use the format: -D POSTBUILD=\"\" " %(PostbuildList[0]))
|
EdkLogger.error("Postbuild", POSTBUILD_ERROR, "the postbuild script %s is not exist.\n If you'd like to disable the Postbuild process, please use the format: -D POSTBUILD=\"\" " %(PostbuildList[0]))
|
||||||
|
|
||||||
@ -1040,7 +1039,7 @@ class Build():
|
|||||||
Process = Popen(args, stdout=PIPE, stderr=PIPE)
|
Process = Popen(args, stdout=PIPE, stderr=PIPE)
|
||||||
else:
|
else:
|
||||||
args = ' && '.join((self.Prebuild, 'env > ' + PrebuildEnvFile))
|
args = ' && '.join((self.Prebuild, 'env > ' + PrebuildEnvFile))
|
||||||
Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True, executable="/bin/bash")
|
Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True)
|
||||||
|
|
||||||
# launch two threads to read the STDOUT and STDERR
|
# launch two threads to read the STDOUT and STDERR
|
||||||
EndOfProcedure = Event()
|
EndOfProcedure = Event()
|
||||||
@ -1076,13 +1075,13 @@ class Build():
|
|||||||
os.environ.update(dict(envs))
|
os.environ.update(dict(envs))
|
||||||
EdkLogger.info("\n- Prebuild Done -\n")
|
EdkLogger.info("\n- Prebuild Done -\n")
|
||||||
|
|
||||||
def LanuchPostbuild(self):
|
def LaunchPostbuild(self):
|
||||||
if self.Postbuild:
|
if self.Postbuild:
|
||||||
EdkLogger.info("\n- Postbuild Start -\n")
|
EdkLogger.info("\n- Postbuild Start -\n")
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE)
|
Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE)
|
||||||
else:
|
else:
|
||||||
Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, shell=True, executable="/bin/bash")
|
Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, shell=True)
|
||||||
# launch two threads to read the STDOUT and STDERR
|
# launch two threads to read the STDOUT and STDERR
|
||||||
EndOfProcedure = Event()
|
EndOfProcedure = Event()
|
||||||
EndOfProcedure.clear()
|
EndOfProcedure.clear()
|
||||||
@ -2331,7 +2330,7 @@ def Main():
|
|||||||
|
|
||||||
if ReturnCode == 0:
|
if ReturnCode == 0:
|
||||||
try:
|
try:
|
||||||
MyBuild.LanuchPostbuild()
|
MyBuild.LaunchPostbuild()
|
||||||
Conclusion = "Done"
|
Conclusion = "Done"
|
||||||
except:
|
except:
|
||||||
Conclusion = "Failed"
|
Conclusion = "Failed"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
PACKAGE_NAME = CryptoPkg
|
PACKAGE_NAME = CryptoPkg
|
||||||
PACKAGE_UNI_FILE = CryptoPkg.uni
|
PACKAGE_UNI_FILE = CryptoPkg.uni
|
||||||
PACKAGE_GUID = 36470E80-36F2-4ba0-8CC8-937C7D9FF888
|
PACKAGE_GUID = 36470E80-36F2-4ba0-8CC8-937C7D9FF888
|
||||||
PACKAGE_VERSION = 0.96
|
PACKAGE_VERSION = 0.97
|
||||||
|
|
||||||
[Includes]
|
[Includes]
|
||||||
Include
|
Include
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Cryptographic Library Package for UEFI Security Implementation.
|
# Cryptographic Library Package for UEFI Security Implementation.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
||||||
@ -20,7 +20,7 @@
|
|||||||
[Defines]
|
[Defines]
|
||||||
PLATFORM_NAME = CryptoPkg
|
PLATFORM_NAME = CryptoPkg
|
||||||
PLATFORM_GUID = E1063286-6C8C-4c25-AEF0-67A9A5B6E6B6
|
PLATFORM_GUID = E1063286-6C8C-4c25-AEF0-67A9A5B6E6B6
|
||||||
PLATFORM_VERSION = 0.96
|
PLATFORM_VERSION = 0.97
|
||||||
DSC_SPECIFICATION = 0x00010005
|
DSC_SPECIFICATION = 0x00010005
|
||||||
OUTPUT_DIRECTORY = Build/CryptoPkg
|
OUTPUT_DIRECTORY = Build/CryptoPkg
|
||||||
SUPPORTED_ARCHITECTURES = IA32|X64|IPF|ARM|AARCH64
|
SUPPORTED_ARCHITECTURES = IA32|X64|IPF|ARM|AARCH64
|
||||||
|
@ -1790,10 +1790,10 @@ Arc4Init (
|
|||||||
If Output is NULL, then return FALSE.
|
If Output is NULL, then return FALSE.
|
||||||
If this interface is not supported, then return FALSE.
|
If this interface is not supported, then return FALSE.
|
||||||
|
|
||||||
@param[in] Arc4Context Pointer to the ARC4 context.
|
@param[in, out] Arc4Context Pointer to the ARC4 context.
|
||||||
@param[in] Input Pointer to the buffer containing the data to be encrypted.
|
@param[in] Input Pointer to the buffer containing the data to be encrypted.
|
||||||
@param[in] InputSize Size of the Input buffer in bytes.
|
@param[in] InputSize Size of the Input buffer in bytes.
|
||||||
@param[out] Output Pointer to a buffer that receives the ARC4 encryption output.
|
@param[out] Output Pointer to a buffer that receives the ARC4 encryption output.
|
||||||
|
|
||||||
@retval TRUE ARC4 encryption succeeded.
|
@retval TRUE ARC4 encryption succeeded.
|
||||||
@retval FALSE ARC4 encryption failed.
|
@retval FALSE ARC4 encryption failed.
|
||||||
@ -1822,10 +1822,10 @@ Arc4Encrypt (
|
|||||||
If Output is NULL, then return FALSE.
|
If Output is NULL, then return FALSE.
|
||||||
If this interface is not supported, then return FALSE.
|
If this interface is not supported, then return FALSE.
|
||||||
|
|
||||||
@param[in] Arc4Context Pointer to the ARC4 context.
|
@param[in, out] Arc4Context Pointer to the ARC4 context.
|
||||||
@param[in] Input Pointer to the buffer containing the data to be decrypted.
|
@param[in] Input Pointer to the buffer containing the data to be decrypted.
|
||||||
@param[in] InputSize Size of the Input buffer in bytes.
|
@param[in] InputSize Size of the Input buffer in bytes.
|
||||||
@param[out] Output Pointer to a buffer that receives the ARC4 decryption output.
|
@param[out] Output Pointer to a buffer that receives the ARC4 decryption output.
|
||||||
|
|
||||||
@retval TRUE ARC4 decryption succeeded.
|
@retval TRUE ARC4 decryption succeeded.
|
||||||
@retval FALSE ARC4 decryption failed.
|
@retval FALSE ARC4 decryption failed.
|
||||||
@ -2511,7 +2511,7 @@ Pkcs7Verify (
|
|||||||
@retval TRUE The P7Data was correctly formatted for processing.
|
@retval TRUE The P7Data was correctly formatted for processing.
|
||||||
@retval FALSE The P7Data was not correctly formatted for processing.
|
@retval FALSE The P7Data was not correctly formatted for processing.
|
||||||
|
|
||||||
*/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
Pkcs7GetAttachedContent (
|
Pkcs7GetAttachedContent (
|
||||||
|
@ -232,7 +232,9 @@ DhGenerateKey (
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BN_bn2bin (DhPubKey, PublicKey);
|
if (PublicKey != NULL) {
|
||||||
|
BN_bn2bin (DhPubKey, PublicKey);
|
||||||
|
}
|
||||||
*PublicKeySize = Size;
|
*PublicKeySize = Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -558,7 +558,9 @@ Pkcs7GetCertificatesList (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
CtxUntrusted = X509_STORE_CTX_get0_untrusted (CertCtx);
|
CtxUntrusted = X509_STORE_CTX_get0_untrusted (CertCtx);
|
||||||
(VOID)sk_X509_delete_ptr (CtxUntrusted, Signer);
|
if (CtxUntrusted != NULL) {
|
||||||
|
(VOID)sk_X509_delete_ptr (CtxUntrusted, Signer);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Build certificates stack chained from Signer's certificate.
|
// Build certificates stack chained from Signer's certificate.
|
||||||
@ -711,8 +713,10 @@ _Error:
|
|||||||
}
|
}
|
||||||
sk_X509_free (Signers);
|
sk_X509_free (Signers);
|
||||||
|
|
||||||
X509_STORE_CTX_cleanup (CertCtx);
|
if (CertCtx != NULL) {
|
||||||
X509_STORE_CTX_free (CertCtx);
|
X509_STORE_CTX_cleanup (CertCtx);
|
||||||
|
X509_STORE_CTX_free (CertCtx);
|
||||||
|
}
|
||||||
|
|
||||||
if (SingleCert != NULL) {
|
if (SingleCert != NULL) {
|
||||||
free (SingleCert);
|
free (SingleCert);
|
||||||
@ -925,7 +929,7 @@ _Exit:
|
|||||||
@retval TRUE The P7Data was correctly formatted for processing.
|
@retval TRUE The P7Data was correctly formatted for processing.
|
||||||
@retval FALSE The P7Data was not correctly formatted for processing.
|
@retval FALSE The P7Data was not correctly formatted for processing.
|
||||||
|
|
||||||
*/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
Pkcs7GetAttachedContent (
|
Pkcs7GetAttachedContent (
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
# buffer overflow or integer overflow.
|
# buffer overflow or integer overflow.
|
||||||
#
|
#
|
||||||
# Note: MD4 Digest functions, SHA-384 Digest functions, SHA-512 Digest functions,
|
# Note: MD4 Digest functions, SHA-384 Digest functions, SHA-512 Digest functions,
|
||||||
# HMAC-MD5 functions, HMAC-SHA1/SHA256 functions, TDES/ARC4 functions, RSA external
|
# HMAC-MD5 functions, HMAC-SHA1 functions, TDES/ARC4 functions, RSA external
|
||||||
# functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and
|
# functions, PKCS#7 SignedData sign functions, Diffie-Hellman functions, and
|
||||||
# authenticode signature verification functions are not supported in this instance.
|
# authenticode signature verification functions are not supported in this instance.
|
||||||
#
|
#
|
||||||
@ -46,7 +46,7 @@
|
|||||||
Hash/CryptSha512Null.c
|
Hash/CryptSha512Null.c
|
||||||
Hmac/CryptHmacMd5Null.c
|
Hmac/CryptHmacMd5Null.c
|
||||||
Hmac/CryptHmacSha1Null.c
|
Hmac/CryptHmacSha1Null.c
|
||||||
Hmac/CryptHmacSha256Null.c
|
Hmac/CryptHmacSha256.c
|
||||||
Cipher/CryptAes.c
|
Cipher/CryptAes.c
|
||||||
Cipher/CryptTdesNull.c
|
Cipher/CryptTdesNull.c
|
||||||
Cipher/CryptArc4Null.c
|
Cipher/CryptArc4Null.c
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
This file contains all helper functions on the ATAPI command
|
This file contains all helper functions on the ATAPI command
|
||||||
|
|
||||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -1053,7 +1053,7 @@ AtapiReadCapacity (
|
|||||||
if (!EFI_ERROR (Status) && *SResult == SenseNoSenseKey) {
|
if (!EFI_ERROR (Status) && *SResult == SenseNoSenseKey) {
|
||||||
if (IdeDev->Type == IdeCdRom) {
|
if (IdeDev->Type == IdeCdRom) {
|
||||||
|
|
||||||
IdeDev->BlkIo.Media->LastBlock = (Data.LastLba3 << 24) |
|
IdeDev->BlkIo.Media->LastBlock = ((UINT32) Data.LastLba3 << 24) |
|
||||||
(Data.LastLba2 << 16) |
|
(Data.LastLba2 << 16) |
|
||||||
(Data.LastLba1 << 8) |
|
(Data.LastLba1 << 8) |
|
||||||
Data.LastLba0;
|
Data.LastLba0;
|
||||||
@ -1076,7 +1076,7 @@ AtapiReadCapacity (
|
|||||||
IdeDev->BlkIo.Media->LastBlock = 0;
|
IdeDev->BlkIo.Media->LastBlock = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
IdeDev->BlkIo.Media->LastBlock = (FormatData.LastLba3 << 24) |
|
IdeDev->BlkIo.Media->LastBlock = ((UINT32) FormatData.LastLba3 << 24) |
|
||||||
(FormatData.LastLba2 << 16) |
|
(FormatData.LastLba2 << 16) |
|
||||||
(FormatData.LastLba1 << 8) |
|
(FormatData.LastLba1 << 8) |
|
||||||
FormatData.LastLba0;
|
FormatData.LastLba0;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Mde UEFI library API implementation.
|
Mde UEFI library API implementation.
|
||||||
Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE
|
Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE
|
||||||
|
|
||||||
Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -474,7 +474,14 @@ InternalPrintGraphic (
|
|||||||
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
ASSERT (UgaDraw!= NULL);
|
ASSERT (UgaDraw!= NULL);
|
||||||
|
|
||||||
Blt->Image.Bitmap = AllocateZeroPool (Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
//
|
||||||
|
// Ensure Width * Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) doesn't overflow.
|
||||||
|
//
|
||||||
|
if (Blt->Width > DivU64x32 (MAX_UINTN, Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL))) {
|
||||||
|
goto Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
Blt->Image.Bitmap = AllocateZeroPool ((UINT32) Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
||||||
ASSERT (Blt->Image.Bitmap != NULL);
|
ASSERT (Blt->Image.Bitmap != NULL);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The application to show the Boot Manager Menu.
|
The application to show the Boot Manager Menu.
|
||||||
|
|
||||||
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -374,6 +374,7 @@ BootMenuSelectItem (
|
|||||||
if (BootMenuData == NULL || WantSelectItem >= BootMenuData->ItemCount) {
|
if (BootMenuData == NULL || WantSelectItem >= BootMenuData->ItemCount) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
ASSERT (BootMenuData->ItemCount != 0);
|
||||||
SavedAttribute = gST->ConOut->Mode->Attribute;
|
SavedAttribute = gST->ConOut->Mode->Attribute;
|
||||||
RePaintItems = FALSE;
|
RePaintItems = FALSE;
|
||||||
StartCol = BootMenuData->MenuScreen.StartCol;
|
StartCol = BootMenuData->MenuScreen.StartCol;
|
||||||
|
@ -18,22 +18,14 @@
|
|||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
|
||||||
#include <Library/UefiLib.h>
|
|
||||||
#include <Library/PrintLib.h>
|
|
||||||
#include <Protocol/LoadedImage.h>
|
|
||||||
#include <Protocol/SimpleFileSystem.h>
|
#include <Protocol/SimpleFileSystem.h>
|
||||||
#include <Protocol/ShellParameters.h>
|
#include <Protocol/ShellParameters.h>
|
||||||
|
#include <Protocol/Shell.h>
|
||||||
#include <Guid/FileInfo.h>
|
#include <Guid/FileInfo.h>
|
||||||
#include <Guid/Gpt.h>
|
|
||||||
|
|
||||||
#define IS_HYPHEN(a) ((a) == L'-')
|
|
||||||
#define IS_NULL(a) ((a) == L'\0')
|
|
||||||
|
|
||||||
#define MAX_ARG_NUM 11
|
|
||||||
|
|
||||||
UINTN Argc;
|
UINTN Argc;
|
||||||
CHAR16 **Argv;
|
CHAR16 **Argv;
|
||||||
|
EFI_SHELL_PROTOCOL *mShellProtocol = NULL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
@ -64,273 +56,29 @@ GetArg (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return File System Volume containing this shell application.
|
Get shell protocol.
|
||||||
|
|
||||||
@return File System Volume containing this shell application.
|
@return Pointer to shell protocol.
|
||||||
**/
|
**/
|
||||||
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *
|
EFI_SHELL_PROTOCOL *
|
||||||
GetMyVol (
|
GetShellProtocol (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
|
|
||||||
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Vol;
|
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
if (mShellProtocol == NULL) {
|
||||||
gImageHandle,
|
Status = gBS->LocateProtocol (
|
||||||
&gEfiLoadedImageProtocolGuid,
|
&gEfiShellProtocolGuid,
|
||||||
(VOID **)&LoadedImage
|
NULL,
|
||||||
);
|
(VOID **) &mShellProtocol
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
|
||||||
LoadedImage->DeviceHandle,
|
|
||||||
&gEfiSimpleFileSystemProtocolGuid,
|
|
||||||
(VOID **)&Vol
|
|
||||||
);
|
|
||||||
if (!EFI_ERROR (Status)) {
|
|
||||||
return Vol;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
Read a file from this volume.
|
|
||||||
|
|
||||||
@param[in] Vol File System Volume
|
|
||||||
@param[in] FileName The file to be read.
|
|
||||||
@param[out] BufferSize The file buffer size
|
|
||||||
@param[out] Buffer The file buffer
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Read file successfully
|
|
||||||
@retval EFI_NOT_FOUND File not found
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
ReadFileFromVol (
|
|
||||||
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Vol,
|
|
||||||
IN CHAR16 *FileName,
|
|
||||||
OUT UINTN *BufferSize,
|
|
||||||
OUT VOID **Buffer
|
|
||||||
)
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
EFI_FILE_HANDLE RootDir;
|
|
||||||
EFI_FILE_HANDLE Handle;
|
|
||||||
UINTN FileInfoSize;
|
|
||||||
EFI_FILE_INFO *FileInfo;
|
|
||||||
UINTN TempBufferSize;
|
|
||||||
VOID *TempBuffer;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Open the root directory
|
|
||||||
//
|
|
||||||
Status = Vol->OpenVolume (Vol, &RootDir);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Open the file
|
|
||||||
//
|
|
||||||
Status = RootDir->Open (
|
|
||||||
RootDir,
|
|
||||||
&Handle,
|
|
||||||
FileName,
|
|
||||||
EFI_FILE_MODE_READ,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
RootDir->Close (RootDir);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
RootDir->Close (RootDir);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Get the file information
|
|
||||||
//
|
|
||||||
FileInfoSize = sizeof(EFI_FILE_INFO) + 1024;
|
|
||||||
|
|
||||||
FileInfo = AllocateZeroPool (FileInfoSize);
|
|
||||||
if (FileInfo == NULL) {
|
|
||||||
Handle->Close (Handle);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = Handle->GetInfo (
|
|
||||||
Handle,
|
|
||||||
&gEfiFileInfoGuid,
|
|
||||||
&FileInfoSize,
|
|
||||||
FileInfo
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
Handle->Close (Handle);
|
|
||||||
gBS->FreePool (FileInfo);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Allocate buffer for the file data. The last CHAR16 is for L'\0'
|
|
||||||
//
|
|
||||||
TempBufferSize = (UINTN) FileInfo->FileSize + sizeof(CHAR16);
|
|
||||||
TempBuffer = AllocateZeroPool (TempBufferSize);
|
|
||||||
if (TempBuffer == NULL) {
|
|
||||||
Handle->Close (Handle);
|
|
||||||
gBS->FreePool (FileInfo);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
gBS->FreePool (FileInfo);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Read the file data to the buffer
|
|
||||||
//
|
|
||||||
Status = Handle->Read (
|
|
||||||
Handle,
|
|
||||||
&TempBufferSize,
|
|
||||||
TempBuffer
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
Handle->Close (Handle);
|
|
||||||
gBS->FreePool (TempBuffer);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
Handle->Close (Handle);
|
|
||||||
|
|
||||||
*BufferSize = TempBufferSize;
|
|
||||||
*Buffer = TempBuffer;
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
Read a file.
|
|
||||||
If ScanFs is FLASE, it will use this Vol as default Fs.
|
|
||||||
If ScanFs is TRUE, it will scan all FS and check the file.
|
|
||||||
If there is only one file match the name, it will be read.
|
|
||||||
If there is more than one file match the name, it will return Error.
|
|
||||||
|
|
||||||
@param[in,out] ThisVol File System Volume
|
|
||||||
@param[in] FileName The file to be read.
|
|
||||||
@param[out] BufferSize The file buffer size
|
|
||||||
@param[out] Buffer The file buffer
|
|
||||||
@param[in] ScanFs Need Scan all FS
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Read file successfully
|
|
||||||
@retval EFI_NOT_FOUND File not found
|
|
||||||
@retval EFI_NO_MAPPING There is duplicated files found
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
ReadFileToBufferEx (
|
|
||||||
IN OUT EFI_SIMPLE_FILE_SYSTEM_PROTOCOL **ThisVol,
|
|
||||||
IN CHAR16 *FileName,
|
|
||||||
OUT UINTN *BufferSize,
|
|
||||||
OUT VOID **Buffer,
|
|
||||||
IN BOOLEAN ScanFs
|
|
||||||
)
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Vol;
|
|
||||||
UINTN TempBufferSize;
|
|
||||||
VOID *TempBuffer;
|
|
||||||
UINTN NoHandles;
|
|
||||||
EFI_HANDLE *HandleBuffer;
|
|
||||||
UINTN Index;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check parameters
|
|
||||||
//
|
|
||||||
if ((FileName == NULL) || (Buffer == NULL) || (ThisVol == NULL)) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// not scan fs
|
|
||||||
//
|
|
||||||
if (!ScanFs) {
|
|
||||||
if (*ThisVol == NULL) {
|
|
||||||
*ThisVol = GetMyVol ();
|
|
||||||
if (*ThisVol == NULL) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Read file directly from Vol
|
|
||||||
//
|
|
||||||
return ReadFileFromVol (*ThisVol, FileName, BufferSize, Buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// need scan fs
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
// Get all Vol handle
|
|
||||||
//
|
|
||||||
Status = gBS->LocateHandleBuffer (
|
|
||||||
ByProtocol,
|
|
||||||
&gEfiSimpleFileSystemProtocolGuid,
|
|
||||||
NULL,
|
|
||||||
&NoHandles,
|
|
||||||
&HandleBuffer
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status) && (NoHandles == 0)) {
|
|
||||||
return EFI_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Walk through each Vol
|
|
||||||
//
|
|
||||||
*ThisVol = NULL;
|
|
||||||
*BufferSize = 0;
|
|
||||||
*Buffer = NULL;
|
|
||||||
for (Index = 0; Index < NoHandles; Index++) {
|
|
||||||
Status = gBS->HandleProtocol (
|
|
||||||
HandleBuffer[Index],
|
|
||||||
&gEfiSimpleFileSystemProtocolGuid,
|
|
||||||
(VOID **)&Vol
|
|
||||||
);
|
);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
continue;
|
mShellProtocol = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
Status = ReadFileFromVol (Vol, FileName, &TempBufferSize, &TempBuffer);
|
|
||||||
if (!EFI_ERROR (Status)) {
|
|
||||||
//
|
|
||||||
// Read file OK, check duplication
|
|
||||||
//
|
|
||||||
if (*ThisVol != NULL) {
|
|
||||||
//
|
|
||||||
// Find the duplicated file
|
|
||||||
//
|
|
||||||
gBS->FreePool (TempBuffer);
|
|
||||||
gBS->FreePool (*Buffer);
|
|
||||||
Print (L"Duplicated FileName found!\n");
|
|
||||||
return EFI_NO_MAPPING;
|
|
||||||
} else {
|
|
||||||
//
|
|
||||||
// Record value
|
|
||||||
//
|
|
||||||
*ThisVol = Vol;
|
|
||||||
*BufferSize = TempBufferSize;
|
|
||||||
*Buffer = TempBuffer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
return mShellProtocol;
|
||||||
// Scan Fs done
|
|
||||||
//
|
|
||||||
if (*ThisVol == NULL) {
|
|
||||||
return EFI_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Done
|
|
||||||
//
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -341,7 +89,8 @@ ReadFileToBufferEx (
|
|||||||
@param[out] Buffer The file buffer
|
@param[out] Buffer The file buffer
|
||||||
|
|
||||||
@retval EFI_SUCCESS Read file successfully
|
@retval EFI_SUCCESS Read file successfully
|
||||||
@retval EFI_NOT_FOUND File not found
|
@retval EFI_NOT_FOUND Shell protocol or file not found
|
||||||
|
@retval others Read file failed
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ReadFileToBuffer (
|
ReadFileToBuffer (
|
||||||
@ -350,9 +99,64 @@ ReadFileToBuffer (
|
|||||||
OUT VOID **Buffer
|
OUT VOID **Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Vol;
|
EFI_STATUS Status;
|
||||||
Vol = NULL;
|
EFI_SHELL_PROTOCOL *ShellProtocol;
|
||||||
return ReadFileToBufferEx(&Vol, FileName, BufferSize, Buffer, FALSE);
|
SHELL_FILE_HANDLE Handle;
|
||||||
|
UINT64 FileSize;
|
||||||
|
UINTN TempBufferSize;
|
||||||
|
VOID *TempBuffer;
|
||||||
|
|
||||||
|
ShellProtocol = GetShellProtocol();
|
||||||
|
if (ShellProtocol == NULL) {
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Open file by FileName.
|
||||||
|
//
|
||||||
|
Status = ShellProtocol->OpenFileByName (
|
||||||
|
FileName,
|
||||||
|
&Handle,
|
||||||
|
EFI_FILE_MODE_READ
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Get the file size.
|
||||||
|
//
|
||||||
|
Status = ShellProtocol->GetFileSize (Handle, &FileSize);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ShellProtocol->CloseFile (Handle);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
TempBufferSize = (UINTN) FileSize;
|
||||||
|
TempBuffer = AllocateZeroPool (TempBufferSize);
|
||||||
|
if (TempBuffer == NULL) {
|
||||||
|
ShellProtocol->CloseFile (Handle);
|
||||||
|
return EFI_OUT_OF_RESOURCES;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Read the file data to the buffer
|
||||||
|
//
|
||||||
|
Status = ShellProtocol->ReadFile (
|
||||||
|
Handle,
|
||||||
|
&TempBufferSize,
|
||||||
|
TempBuffer
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ShellProtocol->CloseFile (Handle);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
ShellProtocol->CloseFile (Handle);
|
||||||
|
|
||||||
|
*BufferSize = TempBufferSize;
|
||||||
|
*Buffer = TempBuffer;
|
||||||
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -363,6 +167,8 @@ ReadFileToBuffer (
|
|||||||
@param[in] Buffer The file buffer
|
@param[in] Buffer The file buffer
|
||||||
|
|
||||||
@retval EFI_SUCCESS Write file successfully
|
@retval EFI_SUCCESS Write file successfully
|
||||||
|
@retval EFI_NOT_FOUND Shell protocol not found
|
||||||
|
@retval others Write file failed
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
WriteFileFromBuffer (
|
WriteFileFromBuffer (
|
||||||
@ -372,79 +178,69 @@ WriteFileFromBuffer (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_FILE_HANDLE RootDir;
|
EFI_SHELL_PROTOCOL *ShellProtocol;
|
||||||
EFI_FILE_HANDLE Handle;
|
SHELL_FILE_HANDLE Handle;
|
||||||
|
EFI_FILE_INFO *FileInfo;
|
||||||
UINTN TempBufferSize;
|
UINTN TempBufferSize;
|
||||||
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Vol;
|
|
||||||
|
|
||||||
Vol = GetMyVol();
|
ShellProtocol = GetShellProtocol();
|
||||||
if (Vol == NULL) {
|
if (ShellProtocol == NULL) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Open the root directory
|
// Open file by FileName.
|
||||||
//
|
//
|
||||||
Status = Vol->OpenVolume (Vol, &RootDir);
|
Status = ShellProtocol->OpenFileByName (
|
||||||
|
FileName,
|
||||||
|
&Handle,
|
||||||
|
EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE
|
||||||
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Open the file
|
// Empty the file contents.
|
||||||
//
|
//
|
||||||
Status = RootDir->Open (
|
FileInfo = ShellProtocol->GetFileInfo (Handle);
|
||||||
RootDir,
|
if (FileInfo == NULL) {
|
||||||
&Handle,
|
ShellProtocol->CloseFile (Handle);
|
||||||
FileName,
|
return EFI_DEVICE_ERROR;
|
||||||
EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE| EFI_FILE_MODE_CREATE,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
RootDir->Close (RootDir);
|
|
||||||
return Status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Delete file
|
// If the file size is already 0, then it has been empty.
|
||||||
//
|
//
|
||||||
Status = Handle->Delete(Handle);
|
if (FileInfo->FileSize != 0) {
|
||||||
if (EFI_ERROR(Status)) {
|
//
|
||||||
return Status;
|
// Set the file size to 0.
|
||||||
|
//
|
||||||
|
FileInfo->FileSize = 0;
|
||||||
|
Status = ShellProtocol->SetFileInfo (Handle, FileInfo);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
FreePool (FileInfo);
|
||||||
|
ShellProtocol->CloseFile (Handle);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
FreePool (FileInfo);
|
||||||
//
|
|
||||||
// Open the file again
|
|
||||||
//
|
|
||||||
Status = RootDir->Open (
|
|
||||||
RootDir,
|
|
||||||
&Handle,
|
|
||||||
FileName,
|
|
||||||
EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE| EFI_FILE_MODE_CREATE,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
RootDir->Close (RootDir);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
RootDir->Close (RootDir);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Write the file data from the buffer
|
// Write the file data from the buffer
|
||||||
//
|
//
|
||||||
TempBufferSize = BufferSize;
|
TempBufferSize = BufferSize;
|
||||||
Status = Handle->Write (
|
Status = ShellProtocol->WriteFile (
|
||||||
Handle,
|
Handle,
|
||||||
&TempBufferSize,
|
&TempBufferSize,
|
||||||
Buffer
|
Buffer
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
Handle->Close (Handle);
|
ShellProtocol->CloseFile (Handle);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle->Close (Handle);
|
ShellProtocol->CloseFile (Handle);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -21,11 +21,7 @@
|
|||||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||||
#include <Library/UefiLib.h>
|
#include <Library/UefiLib.h>
|
||||||
#include <Library/PrintLib.h>
|
#include <Library/PrintLib.h>
|
||||||
#include <Protocol/LoadedImage.h>
|
|
||||||
#include <Protocol/SimpleFileSystem.h>
|
|
||||||
#include <Protocol/GraphicsOutput.h>
|
#include <Protocol/GraphicsOutput.h>
|
||||||
#include <Guid/FileInfo.h>
|
|
||||||
#include <Guid/Gpt.h>
|
|
||||||
#include <Guid/GlobalVariable.h>
|
#include <Guid/GlobalVariable.h>
|
||||||
#include <Guid/CapsuleReport.h>
|
#include <Guid/CapsuleReport.h>
|
||||||
#include <Guid/SystemResourceTable.h>
|
#include <Guid/SystemResourceTable.h>
|
||||||
@ -117,7 +113,8 @@ DumpEsrtData (
|
|||||||
@param[out] Buffer The file buffer
|
@param[out] Buffer The file buffer
|
||||||
|
|
||||||
@retval EFI_SUCCESS Read file successfully
|
@retval EFI_SUCCESS Read file successfully
|
||||||
@retval EFI_NOT_FOUND File not found
|
@retval EFI_NOT_FOUND Shell protocol or file not found
|
||||||
|
@retval others Read file failed
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ReadFileToBuffer (
|
ReadFileToBuffer (
|
||||||
@ -134,6 +131,8 @@ ReadFileToBuffer (
|
|||||||
@param[in] Buffer The file buffer
|
@param[in] Buffer The file buffer
|
||||||
|
|
||||||
@retval EFI_SUCCESS Write file successfully
|
@retval EFI_SUCCESS Write file successfully
|
||||||
|
@retval EFI_NOT_FOUND Shell protocol not found
|
||||||
|
@retval others Write file failed
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
WriteFileFromBuffer (
|
WriteFileFromBuffer (
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# This application can trigger capsule update process. It can also
|
# This application can trigger capsule update process. It can also
|
||||||
# generate capsule image, or dump capsule variable information.
|
# generate capsule image, or dump capsule variable information.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
||||||
@ -40,8 +40,6 @@
|
|||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiFileInfoGuid ## CONSUMES ## GUID
|
|
||||||
gEfiPartTypeSystemPartGuid ## CONSUMES ## GUID
|
|
||||||
gEfiGlobalVariableGuid ## CONSUMES ## GUID
|
gEfiGlobalVariableGuid ## CONSUMES ## GUID
|
||||||
gEfiCapsuleReportGuid ## CONSUMES ## GUID
|
gEfiCapsuleReportGuid ## CONSUMES ## GUID
|
||||||
gEfiFmpCapsuleGuid ## CONSUMES ## GUID
|
gEfiFmpCapsuleGuid ## CONSUMES ## GUID
|
||||||
@ -51,11 +49,10 @@
|
|||||||
gEfiSystemResourceTableGuid ## CONSUMES ## GUID
|
gEfiSystemResourceTableGuid ## CONSUMES ## GUID
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiLoadedImageProtocolGuid ## CONSUMES
|
|
||||||
gEfiSimpleFileSystemProtocolGuid ## CONSUMES
|
|
||||||
gEfiGraphicsOutputProtocolGuid ## CONSUMES
|
gEfiGraphicsOutputProtocolGuid ## CONSUMES
|
||||||
gEfiFirmwareManagementProtocolGuid ## CONSUMES
|
gEfiFirmwareManagementProtocolGuid ## CONSUMES
|
||||||
gEfiShellParametersProtocolGuid ## CONSUMES
|
gEfiShellParametersProtocolGuid ## CONSUMES
|
||||||
|
gEfiShellProtocolGuid ## CONSUMES
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseLib
|
BaseLib
|
||||||
|
@ -266,8 +266,8 @@ GetDriverNameString (
|
|||||||
//
|
//
|
||||||
// Method 1: Get the name string from image PDB
|
// Method 1: Get the name string from image PDB
|
||||||
//
|
//
|
||||||
if (ImageStruct->Header.Length > sizeof (SMM_CORE_IMAGE_DATABASE_STRUCTURE)) {
|
if (ImageStruct->PdbStringOffset != 0) {
|
||||||
GetShortPdbFileName ((CHAR8 *) (ImageStruct + 1), mNameString);
|
GetShortPdbFileName ((CHAR8 *) ((UINTN) ImageStruct + ImageStruct->PdbStringOffset), mNameString);
|
||||||
return mNameString;
|
return mNameString;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,15 +348,17 @@ DumpSmmLoadedImage(
|
|||||||
if (ImageStruct->Header.Signature == SMM_CORE_IMAGE_DATABASE_SIGNATURE) {
|
if (ImageStruct->Header.Signature == SMM_CORE_IMAGE_DATABASE_SIGNATURE) {
|
||||||
NameString = GetDriverNameString (ImageStruct);
|
NameString = GetDriverNameString (ImageStruct);
|
||||||
Print(L" <Image Name=\"%a\"", NameString);
|
Print(L" <Image Name=\"%a\"", NameString);
|
||||||
Print(L" Base=\"0x%x\" Size=\"0x%x\"", ImageStruct->ImageBase, ImageStruct->ImageSize);
|
Print(L" Base=\"0x%lx\" Size=\"0x%lx\"", ImageStruct->ImageBase, ImageStruct->ImageSize);
|
||||||
if (ImageStruct->EntryPoint != 0) {
|
if (ImageStruct->EntryPoint != 0) {
|
||||||
Print(L" EntryPoint=\"0x%x\"", ImageStruct->EntryPoint);
|
Print(L" EntryPoint=\"0x%lx\"", ImageStruct->EntryPoint);
|
||||||
}
|
}
|
||||||
Print(L" FvFile=\"%g\"", &ImageStruct->FileGuid);
|
Print(L" FvFile=\"%g\"", &ImageStruct->FileGuid);
|
||||||
Print(L" RefId=\"0x%x\"", ImageStruct->ImageRef);
|
Print(L" RefId=\"0x%x\"", ImageStruct->ImageRef);
|
||||||
Print(L">\n");
|
Print(L">\n");
|
||||||
PdbString = (CHAR8 *)((UINTN)ImageStruct + ImageStruct->PdbStringOffset);
|
if (ImageStruct->PdbStringOffset != 0) {
|
||||||
Print(L" <Pdb>%a</Pdb>\n", PdbString);
|
PdbString = (CHAR8 *)((UINTN)ImageStruct + ImageStruct->PdbStringOffset);
|
||||||
|
Print(L" <Pdb>%a</Pdb>\n", PdbString);
|
||||||
|
}
|
||||||
Print(L" </Image>\n");
|
Print(L" </Image>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -535,8 +537,10 @@ DumpSmiChildContext (
|
|||||||
IN UINTN ContextSize
|
IN UINTN ContextSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
CHAR16 *Str;
|
||||||
|
|
||||||
if (CompareGuid (HandlerType, &gEfiSmmSwDispatch2ProtocolGuid)) {
|
if (CompareGuid (HandlerType, &gEfiSmmSwDispatch2ProtocolGuid)) {
|
||||||
Print(L" SwSmi=\"0x%x\"", ((EFI_SMM_SW_REGISTER_CONTEXT *)Context)->SwSmiInputValue);
|
Print(L" SwSmi=\"0x%lx\"", ((SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT *)Context)->SwSmiInputValue);
|
||||||
} else if (CompareGuid (HandlerType, &gEfiSmmSxDispatch2ProtocolGuid)) {
|
} else if (CompareGuid (HandlerType, &gEfiSmmSxDispatch2ProtocolGuid)) {
|
||||||
Print(L" SxType=\"%a\"", SxTypeToString(((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Type));
|
Print(L" SxType=\"%a\"", SxTypeToString(((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Type));
|
||||||
Print(L" SxPhase=\"%a\"", SxPhaseToString(((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Phase));
|
Print(L" SxPhase=\"%a\"", SxPhaseToString(((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Phase));
|
||||||
@ -555,7 +559,11 @@ DumpSmiChildContext (
|
|||||||
Print(L" IoTrapType=\"%a\"", IoTrapTypeToString(((EFI_SMM_IO_TRAP_REGISTER_CONTEXT *)Context)->Type));
|
Print(L" IoTrapType=\"%a\"", IoTrapTypeToString(((EFI_SMM_IO_TRAP_REGISTER_CONTEXT *)Context)->Type));
|
||||||
} else if (CompareGuid (HandlerType, &gEfiSmmUsbDispatch2ProtocolGuid)) {
|
} else if (CompareGuid (HandlerType, &gEfiSmmUsbDispatch2ProtocolGuid)) {
|
||||||
Print(L" UsbType=\"0x%x\"", UsbTypeToString(((SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT *)Context)->Type));
|
Print(L" UsbType=\"0x%x\"", UsbTypeToString(((SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT *)Context)->Type));
|
||||||
Print(L" UsbDevicePath=\"%s\"", ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL *)(((SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT *)Context) + 1), TRUE, TRUE));
|
Str = ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL *)(((SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT *)Context) + 1), TRUE, TRUE);
|
||||||
|
Print(L" UsbDevicePath=\"%s\"", Str);
|
||||||
|
if (Str != NULL) {
|
||||||
|
FreePool (Str);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Print(L" Context=\"");
|
Print(L" Context=\"");
|
||||||
InternalDumpData (Context, ContextSize);
|
InternalDumpData (Context, ContextSize);
|
||||||
@ -601,14 +609,14 @@ DumpSmiHandler(
|
|||||||
Print(L" <Pdb>%a</Pdb>\n", (UINT8 *)ImageStruct + ImageStruct->PdbStringOffset);
|
Print(L" <Pdb>%a</Pdb>\n", (UINT8 *)ImageStruct + ImageStruct->PdbStringOffset);
|
||||||
}
|
}
|
||||||
Print(L" </Module>\n");
|
Print(L" </Module>\n");
|
||||||
Print(L" <Handler Address=\"0x%x\">\n", SmiHandlerStruct->Handler);
|
Print(L" <Handler Address=\"0x%lx\">\n", SmiHandlerStruct->Handler);
|
||||||
if (ImageStruct != NULL) {
|
if (ImageStruct != NULL) {
|
||||||
Print(L" <RVA>0x%x</RVA>\n", SmiHandlerStruct->Handler - ImageStruct->ImageBase);
|
Print(L" <RVA>0x%x</RVA>\n", (UINTN) (SmiHandlerStruct->Handler - ImageStruct->ImageBase));
|
||||||
}
|
}
|
||||||
Print(L" </Handler>\n", SmiHandlerStruct->Handler);
|
Print(L" </Handler>\n", SmiHandlerStruct->Handler);
|
||||||
Print(L" <Caller Address=\"0x%x\">\n", SmiHandlerStruct->CallerAddr);
|
Print(L" <Caller Address=\"0x%lx\">\n", SmiHandlerStruct->CallerAddr);
|
||||||
if (ImageStruct != NULL) {
|
if (ImageStruct != NULL) {
|
||||||
Print(L" <RVA>0x%x</RVA>\n", SmiHandlerStruct->CallerAddr - ImageStruct->ImageBase);
|
Print(L" <RVA>0x%x</RVA>\n", (UINTN) (SmiHandlerStruct->CallerAddr - ImageStruct->ImageBase));
|
||||||
}
|
}
|
||||||
Print(L" </Caller>\n", SmiHandlerStruct->Handler);
|
Print(L" </Caller>\n", SmiHandlerStruct->Handler);
|
||||||
SmiHandlerStruct = (VOID *)((UINTN)SmiHandlerStruct + SmiHandlerStruct->Length);
|
SmiHandlerStruct = (VOID *)((UINTN)SmiHandlerStruct + SmiHandlerStruct->Length);
|
||||||
|
@ -2140,7 +2140,7 @@ ReadCapacity (
|
|||||||
|
|
||||||
if (MediaInfo->DeviceType == IdeCDROM) {
|
if (MediaInfo->DeviceType == IdeCDROM) {
|
||||||
|
|
||||||
MediaInfo->LastBlock = (Data.LastLba3 << 24) | (Data.LastLba2 << 16) | (Data.LastLba1 << 8) | Data.LastLba0;
|
MediaInfo->LastBlock = ((UINT32) Data.LastLba3 << 24) | (Data.LastLba2 << 16) | (Data.LastLba1 << 8) | Data.LastLba0;
|
||||||
MediaInfo->MediaPresent = TRUE;
|
MediaInfo->MediaPresent = TRUE;
|
||||||
//
|
//
|
||||||
// Because the user data portion in the sector of the Data CD supported
|
// Because the user data portion in the sector of the Data CD supported
|
||||||
@ -2161,7 +2161,7 @@ ReadCapacity (
|
|||||||
MediaInfo2->MediaPresent = FALSE;
|
MediaInfo2->MediaPresent = FALSE;
|
||||||
MediaInfo2->LastBlock = 0;
|
MediaInfo2->LastBlock = 0;
|
||||||
} else {
|
} else {
|
||||||
MediaInfo->LastBlock = (FormatData.LastLba3 << 24) |
|
MediaInfo->LastBlock = ((UINT32) FormatData.LastLba3 << 24) |
|
||||||
(FormatData.LastLba2 << 16) |
|
(FormatData.LastLba2 << 16) |
|
||||||
(FormatData.LastLba1 << 8) |
|
(FormatData.LastLba1 << 8) |
|
||||||
FormatData.LastLba0;
|
FormatData.LastLba0;
|
||||||
|
@ -603,7 +603,7 @@ NvmExpressPassThru (
|
|||||||
Private->SqTdbl[QueueId].Sqt ^= 1;
|
Private->SqTdbl[QueueId].Sqt ^= 1;
|
||||||
}
|
}
|
||||||
Data = ReadUnaligned32 ((UINT32*)&Private->SqTdbl[QueueId]);
|
Data = ReadUnaligned32 ((UINT32*)&Private->SqTdbl[QueueId]);
|
||||||
PciIo->Mem.Write (
|
Status = PciIo->Mem.Write (
|
||||||
PciIo,
|
PciIo,
|
||||||
EfiPciIoWidthUint32,
|
EfiPciIoWidthUint32,
|
||||||
NVME_BAR,
|
NVME_BAR,
|
||||||
@ -612,6 +612,10 @@ NvmExpressPassThru (
|
|||||||
&Data
|
&Data
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
goto EXIT;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// For non-blocking requests, return directly if the command is placed
|
// For non-blocking requests, return directly if the command is placed
|
||||||
// in the submission queue.
|
// in the submission queue.
|
||||||
@ -695,7 +699,7 @@ NvmExpressPassThru (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Data = ReadUnaligned32 ((UINT32*)&Private->CqHdbl[QueueId]);
|
Data = ReadUnaligned32 ((UINT32*)&Private->CqHdbl[QueueId]);
|
||||||
PciIo->Mem.Write (
|
Status = PciIo->Mem.Write (
|
||||||
PciIo,
|
PciIo,
|
||||||
EfiPciIoWidthUint32,
|
EfiPciIoWidthUint32,
|
||||||
NVME_BAR,
|
NVME_BAR,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
UfsHcDxe driver is used to provide platform-dependent info, mainly UFS host controller
|
UfsHcDxe driver is used to provide platform-dependent info, mainly UFS host controller
|
||||||
MMIO base, to upper layer UFS drivers.
|
MMIO base, to upper layer UFS drivers.
|
||||||
|
|
||||||
Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -32,7 +32,6 @@ EFI_DRIVER_BINDING_PROTOCOL gUfsHcDriverBinding = {
|
|||||||
//
|
//
|
||||||
UFS_HOST_CONTROLLER_PRIVATE_DATA gUfsHcTemplate = {
|
UFS_HOST_CONTROLLER_PRIVATE_DATA gUfsHcTemplate = {
|
||||||
UFS_HC_PRIVATE_DATA_SIGNATURE, // Signature
|
UFS_HC_PRIVATE_DATA_SIGNATURE, // Signature
|
||||||
NULL, // Handle
|
|
||||||
{ // UfsHcProtocol
|
{ // UfsHcProtocol
|
||||||
UfsHcGetMmioBar,
|
UfsHcGetMmioBar,
|
||||||
UfsHcAllocateBuffer,
|
UfsHcAllocateBuffer,
|
||||||
@ -672,13 +671,12 @@ Done:
|
|||||||
//
|
//
|
||||||
// Restore original PCI attributes
|
// Restore original PCI attributes
|
||||||
//
|
//
|
||||||
Status = PciIo->Attributes (
|
PciIo->Attributes (
|
||||||
PciIo,
|
PciIo,
|
||||||
EfiPciIoAttributeOperationSet,
|
EfiPciIoAttributeOperationSet,
|
||||||
Private->PciAttributes,
|
Private->PciAttributes,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
}
|
}
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
UfsHcDxe driver is used to provide platform-dependent info, mainly UFS host controller
|
UfsHcDxe driver is used to provide platform-dependent info, mainly UFS host controller
|
||||||
MMIO base, to upper layer UFS drivers.
|
MMIO base, to upper layer UFS drivers.
|
||||||
|
|
||||||
Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -49,11 +49,10 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gUfsHcComponentName2;
|
|||||||
typedef struct _UFS_HOST_CONTROLLER_PRIVATE_DATA UFS_HOST_CONTROLLER_PRIVATE_DATA;
|
typedef struct _UFS_HOST_CONTROLLER_PRIVATE_DATA UFS_HOST_CONTROLLER_PRIVATE_DATA;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Nvme private data structure.
|
// Ufs host controller private data structure.
|
||||||
//
|
//
|
||||||
struct _UFS_HOST_CONTROLLER_PRIVATE_DATA {
|
struct _UFS_HOST_CONTROLLER_PRIVATE_DATA {
|
||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
EFI_HANDLE Handle;
|
|
||||||
|
|
||||||
EDKII_UFS_HOST_CONTROLLER_PROTOCOL UfsHc;
|
EDKII_UFS_HOST_CONTROLLER_PROTOCOL UfsHc;
|
||||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||||
|
@ -1319,6 +1319,7 @@ XhciDelAsyncIntTransfer (
|
|||||||
LIST_ENTRY *Next;
|
LIST_ENTRY *Next;
|
||||||
URB *Urb;
|
URB *Urb;
|
||||||
EFI_USB_DATA_DIRECTION Direction;
|
EFI_USB_DATA_DIRECTION Direction;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
Direction = ((EpNum & 0x80) != 0) ? EfiUsbDataIn : EfiUsbDataOut;
|
Direction = ((EpNum & 0x80) != 0) ? EfiUsbDataIn : EfiUsbDataOut;
|
||||||
EpNum &= 0x0F;
|
EpNum &= 0x0F;
|
||||||
@ -1330,6 +1331,15 @@ XhciDelAsyncIntTransfer (
|
|||||||
if ((Urb->Ep.BusAddr == BusAddr) &&
|
if ((Urb->Ep.BusAddr == BusAddr) &&
|
||||||
(Urb->Ep.EpAddr == EpNum) &&
|
(Urb->Ep.EpAddr == EpNum) &&
|
||||||
(Urb->Ep.Direction == Direction)) {
|
(Urb->Ep.Direction == Direction)) {
|
||||||
|
//
|
||||||
|
// Device doesn't finish the IntTransfer until real data comes
|
||||||
|
// So the TRB should be removed as well.
|
||||||
|
//
|
||||||
|
Status = XhcDequeueTrbFromEndpoint (Xhc, Urb);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((EFI_D_ERROR, "XhciDelAsyncIntTransfer: XhcDequeueTrbFromEndpoint failed\n"));
|
||||||
|
}
|
||||||
|
|
||||||
RemoveEntryList (&Urb->UrbList);
|
RemoveEntryList (&Urb->UrbList);
|
||||||
FreePool (Urb->Data);
|
FreePool (Urb->Data);
|
||||||
XhcFreeUrb (Xhc, Urb);
|
XhcFreeUrb (Xhc, Urb);
|
||||||
@ -1354,9 +1364,20 @@ XhciDelAllAsyncIntTransfers (
|
|||||||
LIST_ENTRY *Entry;
|
LIST_ENTRY *Entry;
|
||||||
LIST_ENTRY *Next;
|
LIST_ENTRY *Next;
|
||||||
URB *Urb;
|
URB *Urb;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
EFI_LIST_FOR_EACH_SAFE (Entry, Next, &Xhc->AsyncIntTransfers) {
|
EFI_LIST_FOR_EACH_SAFE (Entry, Next, &Xhc->AsyncIntTransfers) {
|
||||||
Urb = EFI_LIST_CONTAINER (Entry, URB, UrbList);
|
Urb = EFI_LIST_CONTAINER (Entry, URB, UrbList);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Device doesn't finish the IntTransfer until real data comes
|
||||||
|
// So the TRB should be removed as well.
|
||||||
|
//
|
||||||
|
Status = XhcDequeueTrbFromEndpoint (Xhc, Urb);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((EFI_D_ERROR, "XhciDelAllAsyncIntTransfers: XhcDequeueTrbFromEndpoint failed\n"));
|
||||||
|
}
|
||||||
|
|
||||||
RemoveEntryList (&Urb->UrbList);
|
RemoveEntryList (&Urb->UrbList);
|
||||||
FreePool (Urb->Data);
|
FreePool (Urb->Data);
|
||||||
XhcFreeUrb (Xhc, Urb);
|
XhcFreeUrb (Xhc, Urb);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
SCSI disk driver that layers on every SCSI IO protocol in the system.
|
SCSI disk driver that layers on every SCSI IO protocol in the system.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -2754,7 +2754,7 @@ GetMediaInfo (
|
|||||||
UINT8 *Ptr;
|
UINT8 *Ptr;
|
||||||
|
|
||||||
if (!ScsiDiskDevice->Cdb16Byte) {
|
if (!ScsiDiskDevice->Cdb16Byte) {
|
||||||
ScsiDiskDevice->BlkIo.Media->LastBlock = (Capacity10->LastLba3 << 24) |
|
ScsiDiskDevice->BlkIo.Media->LastBlock = ((UINT32) Capacity10->LastLba3 << 24) |
|
||||||
(Capacity10->LastLba2 << 16) |
|
(Capacity10->LastLba2 << 16) |
|
||||||
(Capacity10->LastLba1 << 8) |
|
(Capacity10->LastLba1 << 8) |
|
||||||
Capacity10->LastLba0;
|
Capacity10->LastLba0;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -737,11 +737,11 @@ UfsBlockIoPeimGetMediaInfo (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
Private->Media[DeviceIndex].LastBlock = (Capacity16.LastLba3 << 24) | (Capacity16.LastLba2 << 16) | (Capacity16.LastLba1 << 8) | Capacity16.LastLba0;
|
Private->Media[DeviceIndex].LastBlock = ((UINT32)Capacity16.LastLba3 << 24) | (Capacity16.LastLba2 << 16) | (Capacity16.LastLba1 << 8) | Capacity16.LastLba0;
|
||||||
Private->Media[DeviceIndex].LastBlock |= LShiftU64 ((UINT64)Capacity16.LastLba7, 56) | LShiftU64((UINT64)Capacity16.LastLba6, 48) | LShiftU64 ((UINT64)Capacity16.LastLba5, 40) | LShiftU64 ((UINT64)Capacity16.LastLba4, 32);
|
Private->Media[DeviceIndex].LastBlock |= LShiftU64 ((UINT64)Capacity16.LastLba7, 56) | LShiftU64((UINT64)Capacity16.LastLba6, 48) | LShiftU64 ((UINT64)Capacity16.LastLba5, 40) | LShiftU64 ((UINT64)Capacity16.LastLba4, 32);
|
||||||
Private->Media[DeviceIndex].BlockSize = (Capacity16.BlockSize3 << 24) | (Capacity16.BlockSize2 << 16) | (Capacity16.BlockSize1 << 8) | Capacity16.BlockSize0;
|
Private->Media[DeviceIndex].BlockSize = (Capacity16.BlockSize3 << 24) | (Capacity16.BlockSize2 << 16) | (Capacity16.BlockSize1 << 8) | Capacity16.BlockSize0;
|
||||||
} else {
|
} else {
|
||||||
Private->Media[DeviceIndex].LastBlock = (Capacity.LastLba3 << 24) | (Capacity.LastLba2 << 16) | (Capacity.LastLba1 << 8) | Capacity.LastLba0;
|
Private->Media[DeviceIndex].LastBlock = ((UINT32)Capacity.LastLba3 << 24) | (Capacity.LastLba2 << 16) | (Capacity.LastLba1 << 8) | Capacity.LastLba0;
|
||||||
Private->Media[DeviceIndex].BlockSize = (Capacity.BlockSize3 << 24) | (Capacity.BlockSize2 << 16) | (Capacity.BlockSize1 << 8) | Capacity.BlockSize0;
|
Private->Media[DeviceIndex].BlockSize = (Capacity.BlockSize3 << 24) | (Capacity.BlockSize2 << 16) | (Capacity.BlockSize1 << 8) | Capacity.BlockSize0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -479,10 +479,10 @@ UfsPassThruGetTargetLun (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check whether the DevicePath belongs to SCSI_DEVICE_PATH
|
// Check whether the DevicePath belongs to UFS_DEVICE_PATH
|
||||||
//
|
//
|
||||||
if ((DevicePath->Type != MESSAGING_DEVICE_PATH) || (DevicePath->SubType != MSG_UFS_DP) ||
|
if ((DevicePath->Type != MESSAGING_DEVICE_PATH) || (DevicePath->SubType != MSG_UFS_DP) ||
|
||||||
(DevicePathNodeLength(DevicePath) != sizeof(SCSI_DEVICE_PATH))) {
|
(DevicePathNodeLength(DevicePath) != sizeof(UFS_DEVICE_PATH))) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -729,6 +729,48 @@ UfsPassThruDriverBindingSupported (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Finishes device initialization by setting fDeviceInit flag and waiting untill device responds by
|
||||||
|
clearing it.
|
||||||
|
|
||||||
|
@param[in] Private Pointer to the UFS_PASS_THRU_PRIVATE_DATA.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The operation succeeds.
|
||||||
|
@retval Others The operation fails.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
UfsFinishDeviceInitialization (
|
||||||
|
IN UFS_PASS_THRU_PRIVATE_DATA *Private
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT8 DeviceInitStatus;
|
||||||
|
UINT8 Timeout;
|
||||||
|
|
||||||
|
DeviceInitStatus = 0xFF;
|
||||||
|
|
||||||
|
//
|
||||||
|
// The host enables the device initialization completion by setting fDeviceInit flag.
|
||||||
|
//
|
||||||
|
Status = UfsSetFlag (Private, UfsFlagDevInit);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
Timeout = 5;
|
||||||
|
do {
|
||||||
|
Status = UfsReadFlag (Private, UfsFlagDevInit, &DeviceInitStatus);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
MicroSecondDelay (1);
|
||||||
|
Timeout--;
|
||||||
|
} while (DeviceInitStatus != 0 && Timeout != 0);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
@ -777,14 +819,14 @@ UfsPassThruDriverBindingStart (
|
|||||||
UFS_PASS_THRU_PRIVATE_DATA *Private;
|
UFS_PASS_THRU_PRIVATE_DATA *Private;
|
||||||
UINTN UfsHcBase;
|
UINTN UfsHcBase;
|
||||||
UINT32 Index;
|
UINT32 Index;
|
||||||
UFS_CONFIG_DESC Config;
|
UFS_UNIT_DESC UnitDescriptor;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
UfsHc = NULL;
|
UfsHc = NULL;
|
||||||
Private = NULL;
|
Private = NULL;
|
||||||
UfsHcBase = 0;
|
UfsHcBase = 0;
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "==UfsPassThru Start== Controller = %x\n", Controller));
|
DEBUG ((DEBUG_INFO, "==UfsPassThru Start== Controller = %x\n", Controller));
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
@ -796,7 +838,7 @@ UfsPassThruDriverBindingStart (
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Open Ufs Host Controller Protocol Error, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "Open Ufs Host Controller Protocol Error, Status = %r\n", Status));
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -805,7 +847,7 @@ UfsPassThruDriverBindingStart (
|
|||||||
//
|
//
|
||||||
Status = UfsHc->GetUfsHcMmioBar (UfsHc, &UfsHcBase);
|
Status = UfsHc->GetUfsHcMmioBar (UfsHc, &UfsHcBase);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Get Ufs Host Controller Mmio Bar Error, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "Get Ufs Host Controller Mmio Bar Error, Status = %r\n", Status));
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -814,7 +856,7 @@ UfsPassThruDriverBindingStart (
|
|||||||
//
|
//
|
||||||
Private = AllocateCopyPool (sizeof (UFS_PASS_THRU_PRIVATE_DATA), &gUfsPassThruTemplate);
|
Private = AllocateCopyPool (sizeof (UFS_PASS_THRU_PRIVATE_DATA), &gUfsPassThruTemplate);
|
||||||
if (Private == NULL) {
|
if (Private == NULL) {
|
||||||
DEBUG ((EFI_D_ERROR, "Unable to allocate Ufs Pass Thru private data\n"));
|
DEBUG ((DEBUG_ERROR, "Unable to allocate Ufs Pass Thru private data\n"));
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
@ -829,7 +871,7 @@ UfsPassThruDriverBindingStart (
|
|||||||
//
|
//
|
||||||
Status = UfsControllerInit (Private);
|
Status = UfsControllerInit (Private);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Ufs Host Controller Initialization Error, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "Ufs Host Controller Initialization Error, Status = %r\n", Status));
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -840,25 +882,13 @@ UfsPassThruDriverBindingStart (
|
|||||||
//
|
//
|
||||||
Status = UfsExecNopCmds (Private);
|
Status = UfsExecNopCmds (Private);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Ufs Sending NOP IN command Error, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "Ufs Sending NOP IN command Error, Status = %r\n", Status));
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
Status = UfsFinishDeviceInitialization (Private);
|
||||||
// The host enables the device initialization completion by setting fDeviceInit flag.
|
|
||||||
//
|
|
||||||
Status = UfsSetFlag (Private, UfsFlagDevInit);
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Ufs Set fDeviceInit Flag Error, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "Device failed to finish initialization, Status = %r\n", Status));
|
||||||
goto Error;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Get Ufs Device's Lun Info by reading Configuration Descriptor.
|
|
||||||
//
|
|
||||||
Status = UfsRwDeviceDesc (Private, TRUE, UfsConfigDesc, 0, 0, &Config, sizeof (UFS_CONFIG_DESC));
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
DEBUG ((EFI_D_ERROR, "Ufs Get Configuration Descriptor Error, Status = %r\n", Status));
|
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -867,9 +897,14 @@ UfsPassThruDriverBindingStart (
|
|||||||
// TODO: Parse device descriptor to decide if exposing RPMB LUN to upper layer for authentication access.
|
// TODO: Parse device descriptor to decide if exposing RPMB LUN to upper layer for authentication access.
|
||||||
//
|
//
|
||||||
for (Index = 0; Index < 8; Index++) {
|
for (Index = 0; Index < 8; Index++) {
|
||||||
if (Config.UnitDescConfParams[Index].LunEn != 0) {
|
Status = UfsRwDeviceDesc (Private, TRUE, UfsUnitDesc, (UINT8) Index, 0, &UnitDescriptor, sizeof (UFS_UNIT_DESC));
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "Failed to read unit descriptor, index = %X, status = %r\n", Index, Status));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (UnitDescriptor.LunEn == 0x1) {
|
||||||
|
DEBUG ((DEBUG_INFO, "UFS LUN %X is enabled\n", Index));
|
||||||
Private->Luns.BitMask |= (BIT0 << Index);
|
Private->Luns.BitMask |= (BIT0 << Index);
|
||||||
DEBUG ((EFI_D_INFO, "Ufs Lun %d is enabled\n", Index));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -884,7 +919,7 @@ UfsPassThruDriverBindingStart (
|
|||||||
&Private->TimerEvent
|
&Private->TimerEvent
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Ufs Create Async Tasks Event Error, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "Ufs Create Async Tasks Event Error, Status = %r\n", Status));
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -894,7 +929,7 @@ UfsPassThruDriverBindingStart (
|
|||||||
UFS_HC_ASYNC_TIMER
|
UFS_HC_ASYNC_TIMER
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Ufs Set Periodic Timer Error, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "Ufs Set Periodic Timer Error, Status = %r\n", Status));
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -986,7 +1021,7 @@ UfsPassThruDriverBindingStop (
|
|||||||
LIST_ENTRY *Entry;
|
LIST_ENTRY *Entry;
|
||||||
LIST_ENTRY *NextEntry;
|
LIST_ENTRY *NextEntry;
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "==UfsPassThru Stop== Controller Controller = %x\n", Controller));
|
DEBUG ((DEBUG_INFO, "==UfsPassThru Stop== Controller Controller = %x\n", Controller));
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -122,16 +122,13 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct _UFS_DEVICE_MANAGEMENT_REQUEST_PACKET {
|
typedef struct _UFS_DEVICE_MANAGEMENT_REQUEST_PACKET {
|
||||||
UINT64 Timeout;
|
UINT64 Timeout;
|
||||||
VOID *InDataBuffer;
|
VOID *DataBuffer;
|
||||||
VOID *OutDataBuffer;
|
|
||||||
UINT8 Opcode;
|
UINT8 Opcode;
|
||||||
UINT8 DescId;
|
UINT8 DescId;
|
||||||
UINT8 Index;
|
UINT8 Index;
|
||||||
UINT8 Selector;
|
UINT8 Selector;
|
||||||
UINT32 InTransferLength;
|
UINT32 TransferLength;
|
||||||
UINT32 OutTransferLength;
|
|
||||||
UINT8 DataDirection;
|
UINT8 DataDirection;
|
||||||
UINT8 Ocs;
|
|
||||||
} UFS_DEVICE_MANAGEMENT_REQUEST_PACKET;
|
} UFS_DEVICE_MANAGEMENT_REQUEST_PACKET;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -716,6 +713,25 @@ UfsSetFlag (
|
|||||||
IN UINT8 FlagId
|
IN UINT8 FlagId
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Read specified flag from a UFS device.
|
||||||
|
|
||||||
|
@param[in] Private The pointer to the UFS_PASS_THRU_PRIVATE_DATA data structure.
|
||||||
|
@param[in] FlagId The ID of flag to be read.
|
||||||
|
@param[out] Value The flag's value.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The flag was read successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR A device error occurred while attempting to read the flag.
|
||||||
|
@retval EFI_TIMEOUT A timeout occurred while waiting for the completion of reading the flag.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
UfsReadFlag (
|
||||||
|
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||||
|
IN UINT8 FlagId,
|
||||||
|
OUT UINT8 *Value
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Read or write specified device descriptor of a UFS device.
|
Read or write specified device descriptor of a UFS device.
|
||||||
|
|
||||||
@ -743,6 +759,31 @@ UfsRwDeviceDesc (
|
|||||||
IN UINT32 DescSize
|
IN UINT32 DescSize
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Read or write specified attribute of a UFS device.
|
||||||
|
|
||||||
|
@param[in] Private The pointer to the UFS_PASS_THRU_PRIVATE_DATA data structure.
|
||||||
|
@param[in] Read The boolean variable to show r/w direction.
|
||||||
|
@param[in] AttrId The ID of Attribute.
|
||||||
|
@param[in] Index The Index of Attribute.
|
||||||
|
@param[in] Selector The Selector of Attribute.
|
||||||
|
@param[in, out] Attributes The value of Attribute to be read or written.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Attribute was read/written successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR A device error occurred while attempting to r/w the Attribute.
|
||||||
|
@retval EFI_TIMEOUT A timeout occurred while waiting for the completion of r/w the Attribute.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
UfsRwAttributes (
|
||||||
|
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||||
|
IN BOOLEAN Read,
|
||||||
|
IN UINT8 AttrId,
|
||||||
|
IN UINT8 Index,
|
||||||
|
IN UINT8 Selector,
|
||||||
|
IN OUT UINT32 *Attributes
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sends NOP IN cmd to a UFS device for initialization process request.
|
Sends NOP IN cmd to a UFS device for initialization process request.
|
||||||
For more details, please refer to UFS 2.0 spec Figure 13.3.
|
For more details, please refer to UFS 2.0 spec Figure 13.3.
|
||||||
|
@ -157,34 +157,34 @@ DumpUicCmdExecResult (
|
|||||||
case 0x00:
|
case 0x00:
|
||||||
break;
|
break;
|
||||||
case 0x01:
|
case 0x01:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - INVALID_MIB_ATTRIBUTE\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - INVALID_MIB_ATTRIBUTE\n"));
|
||||||
break;
|
break;
|
||||||
case 0x02:
|
case 0x02:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - INVALID_MIB_ATTRIBUTE_VALUE\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - INVALID_MIB_ATTRIBUTE_VALUE\n"));
|
||||||
break;
|
break;
|
||||||
case 0x03:
|
case 0x03:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - READ_ONLY_MIB_ATTRIBUTE\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - READ_ONLY_MIB_ATTRIBUTE\n"));
|
||||||
break;
|
break;
|
||||||
case 0x04:
|
case 0x04:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - WRITE_ONLY_MIB_ATTRIBUTE\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - WRITE_ONLY_MIB_ATTRIBUTE\n"));
|
||||||
break;
|
break;
|
||||||
case 0x05:
|
case 0x05:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - BAD_INDEX\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - BAD_INDEX\n"));
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - LOCKED_MIB_ATTRIBUTE\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - LOCKED_MIB_ATTRIBUTE\n"));
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
case 0x07:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - BAD_TEST_FEATURE_INDEX\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - BAD_TEST_FEATURE_INDEX\n"));
|
||||||
break;
|
break;
|
||||||
case 0x08:
|
case 0x08:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - PEER_COMMUNICATION_FAILURE\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - PEER_COMMUNICATION_FAILURE\n"));
|
||||||
break;
|
break;
|
||||||
case 0x09:
|
case 0x09:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - BUSY\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - BUSY\n"));
|
||||||
break;
|
break;
|
||||||
case 0x0A:
|
case 0x0A:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - DME_FAILURE\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - DME_FAILURE\n"));
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
@ -195,7 +195,7 @@ DumpUicCmdExecResult (
|
|||||||
case 0x00:
|
case 0x00:
|
||||||
break;
|
break;
|
||||||
case 0x01:
|
case 0x01:
|
||||||
DEBUG ((EFI_D_VERBOSE, "UIC control command fails - FAILURE\n"));
|
DEBUG ((DEBUG_VERBOSE, "UIC control command fails - FAILURE\n"));
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
@ -217,34 +217,34 @@ DumpQueryResponseResult (
|
|||||||
{
|
{
|
||||||
switch (Result) {
|
switch (Result) {
|
||||||
case 0xF6:
|
case 0xF6:
|
||||||
DEBUG ((EFI_D_VERBOSE, "Query Response with Parameter Not Readable\n"));
|
DEBUG ((DEBUG_VERBOSE, "Query Response with Parameter Not Readable\n"));
|
||||||
break;
|
break;
|
||||||
case 0xF7:
|
case 0xF7:
|
||||||
DEBUG ((EFI_D_VERBOSE, "Query Response with Parameter Not Writeable\n"));
|
DEBUG ((DEBUG_VERBOSE, "Query Response with Parameter Not Writeable\n"));
|
||||||
break;
|
break;
|
||||||
case 0xF8:
|
case 0xF8:
|
||||||
DEBUG ((EFI_D_VERBOSE, "Query Response with Parameter Already Written\n"));
|
DEBUG ((DEBUG_VERBOSE, "Query Response with Parameter Already Written\n"));
|
||||||
break;
|
break;
|
||||||
case 0xF9:
|
case 0xF9:
|
||||||
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Length\n"));
|
DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Length\n"));
|
||||||
break;
|
break;
|
||||||
case 0xFA:
|
case 0xFA:
|
||||||
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Value\n"));
|
DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Value\n"));
|
||||||
break;
|
break;
|
||||||
case 0xFB:
|
case 0xFB:
|
||||||
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Selector\n"));
|
DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Selector\n"));
|
||||||
break;
|
break;
|
||||||
case 0xFC:
|
case 0xFC:
|
||||||
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Index\n"));
|
DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Index\n"));
|
||||||
break;
|
break;
|
||||||
case 0xFD:
|
case 0xFD:
|
||||||
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Idn\n"));
|
DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Idn\n"));
|
||||||
break;
|
break;
|
||||||
case 0xFE:
|
case 0xFE:
|
||||||
DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Opcode\n"));
|
DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Opcode\n"));
|
||||||
break;
|
break;
|
||||||
case 0xFF:
|
case 0xFF:
|
||||||
DEBUG ((EFI_D_VERBOSE, "Query Response with General Failure\n"));
|
DEBUG ((DEBUG_VERBOSE, "Query Response with General Failure\n"));
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
@ -402,7 +402,7 @@ UfsInitUtpPrdt (
|
|||||||
|
|
||||||
if ((BufferSize & (BIT0 | BIT1)) != 0) {
|
if ((BufferSize & (BIT0 | BIT1)) != 0) {
|
||||||
BufferSize &= ~(BIT0 | BIT1);
|
BufferSize &= ~(BIT0 | BIT1);
|
||||||
DEBUG ((EFI_D_WARN, "UfsInitUtpPrdt: The BufferSize [%d] is not dword-aligned!\n", BufferSize));
|
DEBUG ((DEBUG_WARN, "UfsInitUtpPrdt: The BufferSize [%d] is not dword-aligned!\n", BufferSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BufferSize == 0) {
|
if (BufferSize == 0) {
|
||||||
@ -602,32 +602,13 @@ UfsCreateDMCommandDesc (
|
|||||||
}
|
}
|
||||||
|
|
||||||
DataDirection = Packet->DataDirection;
|
DataDirection = Packet->DataDirection;
|
||||||
if (DataDirection == UfsDataIn) {
|
DataSize = Packet->TransferLength;
|
||||||
DataSize = Packet->InTransferLength;
|
Data = Packet->DataBuffer;
|
||||||
Data = Packet->InDataBuffer;
|
|
||||||
} else if (DataDirection == UfsDataOut) {
|
|
||||||
DataSize = Packet->OutTransferLength;
|
|
||||||
Data = Packet->OutDataBuffer;
|
|
||||||
} else {
|
|
||||||
DataSize = 0;
|
|
||||||
Data = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (((Opcode != UtpQueryFuncOpcodeSetFlag) && (Opcode != UtpQueryFuncOpcodeClrFlag) && (Opcode != UtpQueryFuncOpcodeTogFlag))
|
|
||||||
&& ((DataSize == 0) || (Data == NULL))) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (((Opcode == UtpQueryFuncOpcodeSetFlag) || (Opcode == UtpQueryFuncOpcodeClrFlag) || (Opcode == UtpQueryFuncOpcodeTogFlag))
|
|
||||||
&& ((DataSize != 0) || (Data != NULL))) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((Opcode == UtpQueryFuncOpcodeWrAttr) && (DataSize != sizeof (UINT32))) {
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((Opcode == UtpQueryFuncOpcodeWrDesc) || (Opcode == UtpQueryFuncOpcodeRdDesc)) {
|
if ((Opcode == UtpQueryFuncOpcodeWrDesc) || (Opcode == UtpQueryFuncOpcodeRdDesc)) {
|
||||||
|
if (DataSize == 0 || Data == NULL) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
TotalLen = ROUNDUP8 (sizeof (UTP_QUERY_REQ_UPIU)) + ROUNDUP8 (sizeof (UTP_QUERY_RESP_UPIU)) + ROUNDUP8 (DataSize);
|
TotalLen = ROUNDUP8 (sizeof (UTP_QUERY_REQ_UPIU)) + ROUNDUP8 (sizeof (UTP_QUERY_RESP_UPIU)) + ROUNDUP8 (DataSize);
|
||||||
} else {
|
} else {
|
||||||
TotalLen = ROUNDUP8 (sizeof (UTP_QUERY_REQ_UPIU)) + ROUNDUP8 (sizeof (UTP_QUERY_RESP_UPIU));
|
TotalLen = ROUNDUP8 (sizeof (UTP_QUERY_REQ_UPIU)) + ROUNDUP8 (sizeof (UTP_QUERY_RESP_UPIU));
|
||||||
@ -867,6 +848,183 @@ UfsStopExecCmd (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Extracts return data from query response upiu.
|
||||||
|
|
||||||
|
@param[in] Packet Pointer to the UFS_DEVICE_MANAGEMENT_REQUEST_PACKET.
|
||||||
|
@param[in] QueryResp Pointer to the query response.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Packet or QueryResp are empty or opcode is invalid.
|
||||||
|
@retval EFI_SUCCESS Data extracted.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
UfsGetReturnDataFromQueryResponse (
|
||||||
|
IN UFS_DEVICE_MANAGEMENT_REQUEST_PACKET *Packet,
|
||||||
|
IN UTP_QUERY_RESP_UPIU *QueryResp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
UINT16 ReturnDataSize;
|
||||||
|
UINT32 ReturnData;
|
||||||
|
|
||||||
|
if (Packet == NULL || QueryResp == NULL) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (Packet->Opcode) {
|
||||||
|
case UtpQueryFuncOpcodeRdDesc:
|
||||||
|
ReturnDataSize = QueryResp->Tsf.Length;
|
||||||
|
SwapLittleEndianToBigEndian ((UINT8*)&ReturnDataSize, sizeof (UINT16));
|
||||||
|
CopyMem (Packet->DataBuffer, (QueryResp + 1), ReturnDataSize);
|
||||||
|
Packet->TransferLength = ReturnDataSize;
|
||||||
|
break;
|
||||||
|
case UtpQueryFuncOpcodeWrDesc:
|
||||||
|
ReturnDataSize = QueryResp->Tsf.Length;
|
||||||
|
SwapLittleEndianToBigEndian ((UINT8*)&ReturnDataSize, sizeof (UINT16));
|
||||||
|
Packet->TransferLength = ReturnDataSize;
|
||||||
|
break;
|
||||||
|
case UtpQueryFuncOpcodeRdFlag:
|
||||||
|
case UtpQueryFuncOpcodeSetFlag:
|
||||||
|
case UtpQueryFuncOpcodeClrFlag:
|
||||||
|
case UtpQueryFuncOpcodeTogFlag:
|
||||||
|
CopyMem (Packet->DataBuffer, &QueryResp->Tsf.Value, sizeof (UINT8));
|
||||||
|
break;
|
||||||
|
case UtpQueryFuncOpcodeRdAttr:
|
||||||
|
case UtpQueryFuncOpcodeWrAttr:
|
||||||
|
ReturnData = QueryResp->Tsf.Value;
|
||||||
|
SwapLittleEndianToBigEndian ((UINT8*) &ReturnData, sizeof (UINT32));
|
||||||
|
CopyMem (Packet->DataBuffer, &ReturnData, sizeof (UINT32));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Creates Transfer Request descriptor and sends Query Request to the device.
|
||||||
|
|
||||||
|
@param[in] Private Pointer to the UFS_PASS_THRU_PRIVATE_DATA.
|
||||||
|
@param[in] Packet Pointer to the UFS_DEVICE_MANAGEMENT_REQUEST_PACKET.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The device descriptor was read/written successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR A device error occurred while attempting to r/w the device descriptor.
|
||||||
|
@retval EFI_TIMEOUT A timeout occurred while waiting for the completion of r/w the device descriptor.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
UfsSendDmRequestRetry (
|
||||||
|
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||||
|
IN UFS_DEVICE_MANAGEMENT_REQUEST_PACKET *Packet
|
||||||
|
)
|
||||||
|
{
|
||||||
|
UINT8 Slot;
|
||||||
|
UTP_TRD *Trd;
|
||||||
|
VOID *CmdDescHost;
|
||||||
|
VOID *CmdDescMapping;
|
||||||
|
UINT32 CmdDescSize;
|
||||||
|
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc;
|
||||||
|
UTP_QUERY_RESP_UPIU *QueryResp;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Find out which slot of transfer request list is available.
|
||||||
|
//
|
||||||
|
Status = UfsFindAvailableSlotInTrl (Private, &Slot);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
Trd = ((UTP_TRD*)Private->UtpTrlBase) + Slot;
|
||||||
|
//
|
||||||
|
// Fill transfer request descriptor to this slot.
|
||||||
|
//
|
||||||
|
Status = UfsCreateDMCommandDesc (Private, Packet, Trd, &CmdDescHost, &CmdDescMapping);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "Failed to create DM command descriptor\n"));
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
UfsHc = Private->UfsHostController;
|
||||||
|
QueryResp = (UTP_QUERY_RESP_UPIU*)((UINT8*)CmdDescHost + Trd->RuO * sizeof (UINT32));
|
||||||
|
ASSERT (QueryResp != NULL);
|
||||||
|
CmdDescSize = Trd->RuO * sizeof (UINT32) + Trd->RuL * sizeof (UINT32);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Start to execute the transfer request.
|
||||||
|
//
|
||||||
|
UfsStartExecCmd (Private, Slot);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Wait for the completion of the transfer request.
|
||||||
|
//
|
||||||
|
Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, Packet->Timeout);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Trd->Ocs != 0 || QueryResp->QueryResp != UfsUtpQueryResponseSuccess) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "Failed to send query request, OCS = %X, QueryResp = %X\n", Trd->Ocs, QueryResp->QueryResp));
|
||||||
|
DumpQueryResponseResult (QueryResp->QueryResp);
|
||||||
|
Status = EFI_DEVICE_ERROR;
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = UfsGetReturnDataFromQueryResponse (Packet, QueryResp);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "Failed to get return data from query response\n"));
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
Exit:
|
||||||
|
UfsHc->Flush (UfsHc);
|
||||||
|
|
||||||
|
UfsStopExecCmd (Private, Slot);
|
||||||
|
|
||||||
|
if (CmdDescMapping != NULL) {
|
||||||
|
UfsHc->Unmap (UfsHc, CmdDescMapping);
|
||||||
|
}
|
||||||
|
if (CmdDescHost != NULL) {
|
||||||
|
UfsHc->FreeBuffer (UfsHc, EFI_SIZE_TO_PAGES (CmdDescSize), CmdDescHost);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Sends Query Request to the device. Query is sent until device responds correctly or counter runs out.
|
||||||
|
|
||||||
|
@param[in] Private Pointer to the UFS_PASS_THRU_PRIVATE_DATA.
|
||||||
|
@param[in] Packet Pointer to the UFS_DEVICE_MANAGEMENT_PACKET.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The device responded correctly to the Query request.
|
||||||
|
@retval EFI_DEVICE_ERROR A device error occurred while waiting for the response from the device.
|
||||||
|
@retval EFI_TIMEOUT A timeout occurred while waiting for the completion of the operation.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
UfsSendDmRequest (
|
||||||
|
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
|
||||||
|
IN UFS_DEVICE_MANAGEMENT_REQUEST_PACKET *Packet
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT8 Retry;
|
||||||
|
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
|
for (Retry = 0; Retry < 5; Retry ++) {
|
||||||
|
Status = UfsSendDmRequestRetry (Private, Packet);
|
||||||
|
if (!EFI_ERROR (Status)) {
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DEBUG ((DEBUG_ERROR, "Failed to get response from the device after %d retries\n", Retry));
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Read or write specified device descriptor of a UFS device.
|
Read or write specified device descriptor of a UFS device.
|
||||||
|
|
||||||
@ -894,106 +1052,25 @@ UfsRwDeviceDesc (
|
|||||||
IN UINT32 DescSize
|
IN UINT32 DescSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
|
||||||
UFS_DEVICE_MANAGEMENT_REQUEST_PACKET Packet;
|
UFS_DEVICE_MANAGEMENT_REQUEST_PACKET Packet;
|
||||||
UINT8 Slot;
|
|
||||||
UTP_TRD *Trd;
|
|
||||||
UTP_QUERY_RESP_UPIU *QueryResp;
|
|
||||||
UINT32 CmdDescSize;
|
|
||||||
UINT16 ReturnDataSize;
|
|
||||||
VOID *CmdDescHost;
|
|
||||||
VOID *CmdDescMapping;
|
|
||||||
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc;
|
|
||||||
|
|
||||||
ZeroMem (&Packet, sizeof (UFS_DEVICE_MANAGEMENT_REQUEST_PACKET));
|
ZeroMem (&Packet, sizeof (UFS_DEVICE_MANAGEMENT_REQUEST_PACKET));
|
||||||
|
|
||||||
if (Read) {
|
if (Read) {
|
||||||
Packet.DataDirection = UfsDataIn;
|
Packet.DataDirection = UfsDataIn;
|
||||||
Packet.InDataBuffer = Descriptor;
|
|
||||||
Packet.InTransferLength = DescSize;
|
|
||||||
Packet.Opcode = UtpQueryFuncOpcodeRdDesc;
|
Packet.Opcode = UtpQueryFuncOpcodeRdDesc;
|
||||||
} else {
|
} else {
|
||||||
Packet.DataDirection = UfsDataOut;
|
Packet.DataDirection = UfsDataOut;
|
||||||
Packet.OutDataBuffer = Descriptor;
|
|
||||||
Packet.OutTransferLength = DescSize;
|
|
||||||
Packet.Opcode = UtpQueryFuncOpcodeWrDesc;
|
Packet.Opcode = UtpQueryFuncOpcodeWrDesc;
|
||||||
}
|
}
|
||||||
|
Packet.DataBuffer = Descriptor;
|
||||||
|
Packet.TransferLength = DescSize;
|
||||||
Packet.DescId = DescId;
|
Packet.DescId = DescId;
|
||||||
Packet.Index = Index;
|
Packet.Index = Index;
|
||||||
Packet.Selector = Selector;
|
Packet.Selector = Selector;
|
||||||
Packet.Timeout = UFS_TIMEOUT;
|
Packet.Timeout = UFS_TIMEOUT;
|
||||||
|
|
||||||
//
|
return UfsSendDmRequest (Private, &Packet);
|
||||||
// Find out which slot of transfer request list is available.
|
|
||||||
//
|
|
||||||
Status = UfsFindAvailableSlotInTrl (Private, &Slot);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
Trd = ((UTP_TRD*)Private->UtpTrlBase) + Slot;
|
|
||||||
//
|
|
||||||
// Fill transfer request descriptor to this slot.
|
|
||||||
//
|
|
||||||
Status = UfsCreateDMCommandDesc (Private, &Packet, Trd, &CmdDescHost, &CmdDescMapping);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check the transfer request result.
|
|
||||||
//
|
|
||||||
UfsHc = Private->UfsHostController;
|
|
||||||
QueryResp = (UTP_QUERY_RESP_UPIU*)((UINT8*)CmdDescHost + Trd->RuO * sizeof (UINT32));
|
|
||||||
ASSERT (QueryResp != NULL);
|
|
||||||
CmdDescSize = Trd->RuO * sizeof (UINT32) + Trd->RuL * sizeof (UINT32);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Start to execute the transfer request.
|
|
||||||
//
|
|
||||||
UfsStartExecCmd (Private, Slot);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Wait for the completion of the transfer request.
|
|
||||||
//
|
|
||||||
Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, Packet.Timeout);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
goto Exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (QueryResp->QueryResp != 0) {
|
|
||||||
DumpQueryResponseResult (QueryResp->QueryResp);
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
|
||||||
goto Exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Trd->Ocs == 0) {
|
|
||||||
ReturnDataSize = QueryResp->Tsf.Length;
|
|
||||||
SwapLittleEndianToBigEndian ((UINT8*)&ReturnDataSize, sizeof (UINT16));
|
|
||||||
|
|
||||||
if (Read) {
|
|
||||||
CopyMem (Packet.InDataBuffer, (QueryResp + 1), ReturnDataSize);
|
|
||||||
Packet.InTransferLength = ReturnDataSize;
|
|
||||||
} else {
|
|
||||||
Packet.OutTransferLength = ReturnDataSize;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
Exit:
|
|
||||||
UfsHc->Flush (UfsHc);
|
|
||||||
|
|
||||||
UfsStopExecCmd (Private, Slot);
|
|
||||||
|
|
||||||
if (CmdDescMapping != NULL) {
|
|
||||||
UfsHc->Unmap (UfsHc, CmdDescMapping);
|
|
||||||
}
|
|
||||||
if (CmdDescHost != NULL) {
|
|
||||||
UfsHc->FreeBuffer (UfsHc, EFI_SIZE_TO_PAGES (CmdDescSize), CmdDescHost);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1021,16 +1098,7 @@ UfsRwAttributes (
|
|||||||
IN OUT UINT32 *Attributes
|
IN OUT UINT32 *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
|
||||||
UFS_DEVICE_MANAGEMENT_REQUEST_PACKET Packet;
|
UFS_DEVICE_MANAGEMENT_REQUEST_PACKET Packet;
|
||||||
UINT8 Slot;
|
|
||||||
UTP_TRD *Trd;
|
|
||||||
UTP_QUERY_RESP_UPIU *QueryResp;
|
|
||||||
UINT32 CmdDescSize;
|
|
||||||
UINT32 ReturnData;
|
|
||||||
VOID *CmdDescHost;
|
|
||||||
VOID *CmdDescMapping;
|
|
||||||
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc;
|
|
||||||
|
|
||||||
ZeroMem (&Packet, sizeof (UFS_DEVICE_MANAGEMENT_REQUEST_PACKET));
|
ZeroMem (&Packet, sizeof (UFS_DEVICE_MANAGEMENT_REQUEST_PACKET));
|
||||||
|
|
||||||
@ -1041,77 +1109,13 @@ UfsRwAttributes (
|
|||||||
Packet.DataDirection = UfsDataOut;
|
Packet.DataDirection = UfsDataOut;
|
||||||
Packet.Opcode = UtpQueryFuncOpcodeWrAttr;
|
Packet.Opcode = UtpQueryFuncOpcodeWrAttr;
|
||||||
}
|
}
|
||||||
|
Packet.DataBuffer = Attributes;
|
||||||
Packet.DescId = AttrId;
|
Packet.DescId = AttrId;
|
||||||
Packet.Index = Index;
|
Packet.Index = Index;
|
||||||
Packet.Selector = Selector;
|
Packet.Selector = Selector;
|
||||||
Packet.Timeout = UFS_TIMEOUT;
|
Packet.Timeout = UFS_TIMEOUT;
|
||||||
|
|
||||||
//
|
return UfsSendDmRequest (Private, &Packet);
|
||||||
// Find out which slot of transfer request list is available.
|
|
||||||
//
|
|
||||||
Status = UfsFindAvailableSlotInTrl (Private, &Slot);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
Trd = ((UTP_TRD*)Private->UtpTrlBase) + Slot;
|
|
||||||
//
|
|
||||||
// Fill transfer request descriptor to this slot.
|
|
||||||
//
|
|
||||||
Status = UfsCreateDMCommandDesc (Private, &Packet, Trd, &CmdDescHost, &CmdDescMapping);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check the transfer request result.
|
|
||||||
//
|
|
||||||
UfsHc = Private->UfsHostController;
|
|
||||||
QueryResp = (UTP_QUERY_RESP_UPIU*)((UINT8*)CmdDescHost + Trd->RuO * sizeof (UINT32));
|
|
||||||
ASSERT (QueryResp != NULL);
|
|
||||||
CmdDescSize = Trd->RuO * sizeof (UINT32) + Trd->RuL * sizeof (UINT32);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Start to execute the transfer request.
|
|
||||||
//
|
|
||||||
UfsStartExecCmd (Private, Slot);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Wait for the completion of the transfer request.
|
|
||||||
//
|
|
||||||
Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, Packet.Timeout);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
goto Exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (QueryResp->QueryResp != 0) {
|
|
||||||
DumpQueryResponseResult (QueryResp->QueryResp);
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
|
||||||
goto Exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Trd->Ocs == 0) {
|
|
||||||
ReturnData = QueryResp->Tsf.Value;
|
|
||||||
SwapLittleEndianToBigEndian ((UINT8*)&ReturnData, sizeof (UINT32));
|
|
||||||
*Attributes = ReturnData;
|
|
||||||
} else {
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
Exit:
|
|
||||||
UfsHc->Flush (UfsHc);
|
|
||||||
|
|
||||||
UfsStopExecCmd (Private, Slot);
|
|
||||||
|
|
||||||
if (CmdDescMapping != NULL) {
|
|
||||||
UfsHc->Unmap (UfsHc, CmdDescMapping);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CmdDescHost != NULL) {
|
|
||||||
UfsHc->FreeBuffer (UfsHc, EFI_SIZE_TO_PAGES (CmdDescSize), CmdDescHost);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1135,15 +1139,7 @@ UfsRwFlags (
|
|||||||
IN OUT UINT8 *Value
|
IN OUT UINT8 *Value
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
|
||||||
UFS_DEVICE_MANAGEMENT_REQUEST_PACKET Packet;
|
UFS_DEVICE_MANAGEMENT_REQUEST_PACKET Packet;
|
||||||
UINT8 Slot;
|
|
||||||
UTP_TRD *Trd;
|
|
||||||
UTP_QUERY_RESP_UPIU *QueryResp;
|
|
||||||
UINT32 CmdDescSize;
|
|
||||||
VOID *CmdDescHost;
|
|
||||||
VOID *CmdDescMapping;
|
|
||||||
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc;
|
|
||||||
|
|
||||||
if (Value == NULL) {
|
if (Value == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
@ -1165,74 +1161,13 @@ UfsRwFlags (
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Packet.DataBuffer = Value;
|
||||||
Packet.DescId = FlagId;
|
Packet.DescId = FlagId;
|
||||||
Packet.Index = 0;
|
Packet.Index = 0;
|
||||||
Packet.Selector = 0;
|
Packet.Selector = 0;
|
||||||
Packet.Timeout = UFS_TIMEOUT;
|
Packet.Timeout = UFS_TIMEOUT;
|
||||||
|
|
||||||
//
|
return UfsSendDmRequest (Private, &Packet);
|
||||||
// Find out which slot of transfer request list is available.
|
|
||||||
//
|
|
||||||
Status = UfsFindAvailableSlotInTrl (Private, &Slot);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Fill transfer request descriptor to this slot.
|
|
||||||
//
|
|
||||||
Trd = ((UTP_TRD*)Private->UtpTrlBase) + Slot;
|
|
||||||
Status = UfsCreateDMCommandDesc (Private, &Packet, Trd, &CmdDescHost, &CmdDescMapping);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Check the transfer request result.
|
|
||||||
//
|
|
||||||
UfsHc = Private->UfsHostController;
|
|
||||||
QueryResp = (UTP_QUERY_RESP_UPIU*)((UINT8*)CmdDescHost + Trd->RuO * sizeof (UINT32));
|
|
||||||
ASSERT (QueryResp != NULL);
|
|
||||||
CmdDescSize = Trd->RuO * sizeof (UINT32) + Trd->RuL * sizeof (UINT32);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Start to execute the transfer request.
|
|
||||||
//
|
|
||||||
UfsStartExecCmd (Private, Slot);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Wait for the completion of the transfer request.
|
|
||||||
//
|
|
||||||
Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, Packet.Timeout);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
goto Exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (QueryResp->QueryResp != 0) {
|
|
||||||
DumpQueryResponseResult (QueryResp->QueryResp);
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
|
||||||
goto Exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Trd->Ocs == 0) {
|
|
||||||
*Value = (UINT8)QueryResp->Tsf.Value;
|
|
||||||
} else {
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
Exit:
|
|
||||||
UfsHc->Flush (UfsHc);
|
|
||||||
|
|
||||||
UfsStopExecCmd (Private, Slot);
|
|
||||||
|
|
||||||
if (CmdDescMapping != NULL) {
|
|
||||||
UfsHc->Unmap (UfsHc, CmdDescMapping);
|
|
||||||
}
|
|
||||||
if (CmdDescHost != NULL) {
|
|
||||||
UfsHc->FreeBuffer (UfsHc, EFI_SIZE_TO_PAGES (CmdDescSize), CmdDescHost);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1559,7 +1494,7 @@ UfsExecScsiCmds (
|
|||||||
//
|
//
|
||||||
Packet->TargetStatus = Response->Status;
|
Packet->TargetStatus = Response->Status;
|
||||||
if (Response->Response != 0) {
|
if (Response->Response != 0) {
|
||||||
DEBUG ((EFI_D_ERROR, "UfsExecScsiCmds() fails with Target Failure\n"));
|
DEBUG ((DEBUG_ERROR, "UfsExecScsiCmds() fails with Target Failure\n"));
|
||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
@ -1717,7 +1652,7 @@ UfsExecUicCommands (
|
|||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "UfsPassThruDxe: found a attached UFS device\n"));
|
DEBUG ((DEBUG_INFO, "UfsPassThruDxe: found a attached UFS device\n"));
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -2084,29 +2019,29 @@ UfsControllerInit (
|
|||||||
|
|
||||||
Status = UfsEnableHostController (Private);
|
Status = UfsEnableHostController (Private);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "UfsControllerInit: Enable Host Controller Fails, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "UfsControllerInit: Enable Host Controller Fails, Status = %r\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = UfsDeviceDetection (Private);
|
Status = UfsDeviceDetection (Private);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "UfsControllerInit: Device Detection Fails, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "UfsControllerInit: Device Detection Fails, Status = %r\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = UfsInitTaskManagementRequestList (Private);
|
Status = UfsInitTaskManagementRequestList (Private);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "UfsControllerInit: Task management list initialization Fails, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "UfsControllerInit: Task management list initialization Fails, Status = %r\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = UfsInitTransferRequestList (Private);
|
Status = UfsInitTransferRequestList (Private);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "UfsControllerInit: Transfer list initialization Fails, Status = %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "UfsControllerInit: Transfer list initialization Fails, Status = %r\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "UfsControllerInit Finished\n"));
|
DEBUG ((DEBUG_INFO, "UfsControllerInit Finished\n"));
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2167,7 +2102,7 @@ UfsControllerStop (
|
|||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "UfsController is stopped\n"));
|
DEBUG ((DEBUG_INFO, "UfsController is stopped\n"));
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -2274,7 +2209,7 @@ ProcessAsyncTaskList (
|
|||||||
// case.
|
// case.
|
||||||
//
|
//
|
||||||
Packet->HostAdapterStatus = EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR;
|
Packet->HostAdapterStatus = EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR;
|
||||||
DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p UfsMmioRead32() Error.\n", TransReq->CallerEvent));
|
DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p UfsMmioRead32() Error.\n", TransReq->CallerEvent));
|
||||||
SignalCallerEvent (Private, TransReq);
|
SignalCallerEvent (Private, TransReq);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2291,7 +2226,7 @@ ProcessAsyncTaskList (
|
|||||||
// Timeout occurs.
|
// Timeout occurs.
|
||||||
//
|
//
|
||||||
Packet->HostAdapterStatus = EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND;
|
Packet->HostAdapterStatus = EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND;
|
||||||
DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p EFI_TIMEOUT.\n", TransReq->CallerEvent));
|
DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p EFI_TIMEOUT.\n", TransReq->CallerEvent));
|
||||||
SignalCallerEvent (Private, TransReq);
|
SignalCallerEvent (Private, TransReq);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2316,7 +2251,7 @@ ProcessAsyncTaskList (
|
|||||||
//
|
//
|
||||||
Packet->TargetStatus = Response->Status;
|
Packet->TargetStatus = Response->Status;
|
||||||
if (Response->Response != 0) {
|
if (Response->Response != 0) {
|
||||||
DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Target Failure.\n", TransReq->CallerEvent));
|
DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Target Failure.\n", TransReq->CallerEvent));
|
||||||
SignalCallerEvent (Private, TransReq);
|
SignalCallerEvent (Private, TransReq);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2336,12 +2271,12 @@ ProcessAsyncTaskList (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Target Device Error.\n", TransReq->CallerEvent));
|
DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Target Device Error.\n", TransReq->CallerEvent));
|
||||||
SignalCallerEvent (Private, TransReq);
|
SignalCallerEvent (Private, TransReq);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Success.\n", TransReq->CallerEvent));
|
DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p Success.\n", TransReq->CallerEvent));
|
||||||
SignalCallerEvent (Private, TransReq);
|
SignalCallerEvent (Private, TransReq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Pei USB ATATPI command implementations.
|
Pei USB ATATPI command implementations.
|
||||||
|
|
||||||
Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions
|
are licensed and made available under the terms and conditions
|
||||||
@ -274,7 +274,7 @@ PeiUsbReadCapacity (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
LastBlock = (Data.LastLba3 << 24) | (Data.LastLba2 << 16) | (Data.LastLba1 << 8) | Data.LastLba0;
|
LastBlock = ((UINT32) Data.LastLba3 << 24) | (Data.LastLba2 << 16) | (Data.LastLba1 << 8) | Data.LastLba0;
|
||||||
|
|
||||||
if (LastBlock == 0xFFFFFFFF) {
|
if (LastBlock == 0xFFFFFFFF) {
|
||||||
DEBUG ((EFI_D_INFO, "The usb device LBA count is larger than 0xFFFFFFFF!\n"));
|
DEBUG ((EFI_D_INFO, "The usb device LBA count is larger than 0xFFFFFFFF!\n"));
|
||||||
@ -346,7 +346,7 @@ PeiUsbReadFormattedCapacity (
|
|||||||
PeiBotDevice->Media2.LastBlock = 0;
|
PeiBotDevice->Media2.LastBlock = 0;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
LastBlock = (FormatData.LastLba3 << 24) | (FormatData.LastLba2 << 16) | (FormatData.LastLba1 << 8) | FormatData.LastLba0;
|
LastBlock = ((UINT32) FormatData.LastLba3 << 24) | (FormatData.LastLba2 << 16) | (FormatData.LastLba1 << 8) | FormatData.LastLba0;
|
||||||
if (LastBlock == 0xFFFFFFFF) {
|
if (LastBlock == 0xFFFFFFFF) {
|
||||||
DEBUG ((EFI_D_INFO, "The usb device LBA count is larger than 0xFFFFFFFF!\n"));
|
DEBUG ((EFI_D_INFO, "The usb device LBA count is larger than 0xFFFFFFFF!\n"));
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Usb bus enumeration support.
|
Usb bus enumeration support.
|
||||||
|
|
||||||
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -53,28 +53,33 @@ UsbGetEndpointDesc (
|
|||||||
|
|
||||||
@param UsbIf The USB interface to free.
|
@param UsbIf The USB interface to free.
|
||||||
|
|
||||||
|
@retval EFI_ACCESS_DENIED The interface is still occupied.
|
||||||
|
@retval EFI_SUCCESS The interface is freed.
|
||||||
**/
|
**/
|
||||||
VOID
|
EFI_STATUS
|
||||||
UsbFreeInterface (
|
UsbFreeInterface (
|
||||||
IN USB_INTERFACE *UsbIf
|
IN USB_INTERFACE *UsbIf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
UsbCloseHostProtoByChild (UsbIf->Device->Bus, UsbIf->Handle);
|
UsbCloseHostProtoByChild (UsbIf->Device->Bus, UsbIf->Handle);
|
||||||
|
|
||||||
gBS->UninstallMultipleProtocolInterfaces (
|
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||||
UsbIf->Handle,
|
UsbIf->Handle,
|
||||||
&gEfiDevicePathProtocolGuid,
|
&gEfiDevicePathProtocolGuid, UsbIf->DevicePath,
|
||||||
UsbIf->DevicePath,
|
&gEfiUsbIoProtocolGuid, &UsbIf->UsbIo,
|
||||||
&gEfiUsbIoProtocolGuid,
|
NULL
|
||||||
&UsbIf->UsbIo,
|
);
|
||||||
NULL
|
if (!EFI_ERROR (Status)) {
|
||||||
);
|
if (UsbIf->DevicePath != NULL) {
|
||||||
|
FreePool (UsbIf->DevicePath);
|
||||||
if (UsbIf->DevicePath != NULL) {
|
}
|
||||||
FreePool (UsbIf->DevicePath);
|
FreePool (UsbIf);
|
||||||
|
} else {
|
||||||
|
UsbOpenHostProtoByChild (UsbIf->Device->Bus, UsbIf->Handle);
|
||||||
}
|
}
|
||||||
|
return Status;
|
||||||
FreePool (UsbIf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -525,7 +530,13 @@ UsbRemoveConfig (
|
|||||||
|
|
||||||
Status = UsbDisconnectDriver (UsbIf);
|
Status = UsbDisconnectDriver (UsbIf);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
UsbFreeInterface (UsbIf);
|
Status = UsbFreeInterface (UsbIf);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
UsbConnectDriver (UsbIf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!EFI_ERROR (Status)) {
|
||||||
Device->Interfaces[Index] = NULL;
|
Device->Interfaces[Index] = NULL;
|
||||||
} else {
|
} else {
|
||||||
ReturnStatus = Status;
|
ReturnStatus = Status;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Wrapper function for usb host controller interface.
|
Wrapper function for usb host controller interface.
|
||||||
|
|
||||||
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -1364,10 +1364,10 @@ UsbBusRecursivelyConnectWantedUsbIo (
|
|||||||
//
|
//
|
||||||
// Recursively connect the wanted Usb Io handle
|
// Recursively connect the wanted Usb Io handle
|
||||||
//
|
//
|
||||||
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL before connect is %d\n", (UINT32)UsbGetCurrentTpl ()));
|
DEBUG ((EFI_D_INFO, "UsbBusRecursivelyConnectWantedUsbIo: TPL before connect is %d\n", (UINT32)UsbGetCurrentTpl ()));
|
||||||
Status = gBS->ConnectController (UsbIf->Handle, NULL, NULL, TRUE);
|
Status = gBS->ConnectController (UsbIf->Handle, NULL, NULL, TRUE);
|
||||||
UsbIf->IsManaged = (BOOLEAN)!EFI_ERROR (Status);
|
UsbIf->IsManaged = (BOOLEAN)!EFI_ERROR (Status);
|
||||||
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL after connect is %d\n", (UINT32)UsbGetCurrentTpl()));
|
DEBUG ((EFI_D_INFO, "UsbBusRecursivelyConnectWantedUsbIo: TPL after connect is %d\n", (UINT32)UsbGetCurrentTpl()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -773,7 +773,7 @@ FvIsBeingProcesssed (
|
|||||||
for (Link = mFvHandleList.ForwardLink; Link != &mFvHandleList; Link = Link->ForwardLink) {
|
for (Link = mFvHandleList.ForwardLink; Link != &mFvHandleList; Link = Link->ForwardLink) {
|
||||||
KnownHandle = CR(Link, KNOWN_HANDLE, Link, KNOWN_HANDLE_SIGNATURE);
|
KnownHandle = CR(Link, KNOWN_HANDLE, Link, KNOWN_HANDLE_SIGNATURE);
|
||||||
if (CompareGuid (&FvNameGuid, &KnownHandle->FvNameGuid)) {
|
if (CompareGuid (&FvNameGuid, &KnownHandle->FvNameGuid)) {
|
||||||
DEBUG ((EFI_D_ERROR, "FvImage on FvHandle %p and %p has the same FvNameGuid %g.\n", FvHandle, KnownHandle->Handle, FvNameGuid));
|
DEBUG ((EFI_D_ERROR, "FvImage on FvHandle %p and %p has the same FvNameGuid %g.\n", FvHandle, KnownHandle->Handle, &FvNameGuid));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1647,6 +1647,12 @@ CoreStartImage (
|
|||||||
//
|
//
|
||||||
PERF_START (NULL, "StartImage:", NULL, Tick);
|
PERF_START (NULL, "StartImage:", NULL, Tick);
|
||||||
PERF_END (NULL, "StartImage:", NULL, 0);
|
PERF_END (NULL, "StartImage:", NULL, 0);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Pop the current start image context
|
||||||
|
//
|
||||||
|
mCurrentImage = LastImage;
|
||||||
|
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
Image->JumpContext = ALIGN_POINTER (Image->JumpBuffer, BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);
|
Image->JumpContext = ALIGN_POINTER (Image->JumpBuffer, BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);
|
||||||
|
@ -576,6 +576,11 @@ SplitRecord (
|
|||||||
TempRecord.NumberOfPages = EfiSizeToPages (PhysicalEnd - PhysicalStart);
|
TempRecord.NumberOfPages = EfiSizeToPages (PhysicalEnd - PhysicalStart);
|
||||||
} while ((ImageRecord != NULL) && (PhysicalStart < PhysicalEnd));
|
} while ((ImageRecord != NULL) && (PhysicalStart < PhysicalEnd));
|
||||||
|
|
||||||
|
//
|
||||||
|
// The logic in function SplitTable() ensures that TotalNewRecordCount will not be zero if the
|
||||||
|
// code reaches here.
|
||||||
|
//
|
||||||
|
ASSERT (TotalNewRecordCount != 0);
|
||||||
return TotalNewRecordCount - 1;
|
return TotalNewRecordCount - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -596,7 +596,7 @@ SmmLoadImage (
|
|||||||
}
|
}
|
||||||
CopyMem (DriverEntry->LoadedImage->FilePath, FilePath, GetDevicePathSize (FilePath));
|
CopyMem (DriverEntry->LoadedImage->FilePath, FilePath, GetDevicePathSize (FilePath));
|
||||||
|
|
||||||
DriverEntry->LoadedImage->ImageBase = (VOID *)(UINTN)DriverEntry->ImageBuffer;
|
DriverEntry->LoadedImage->ImageBase = (VOID *)(UINTN) ImageContext.ImageAddress;
|
||||||
DriverEntry->LoadedImage->ImageSize = ImageContext.ImageSize;
|
DriverEntry->LoadedImage->ImageSize = ImageContext.ImageSize;
|
||||||
DriverEntry->LoadedImage->ImageCodeType = EfiRuntimeServicesCode;
|
DriverEntry->LoadedImage->ImageCodeType = EfiRuntimeServicesCode;
|
||||||
DriverEntry->LoadedImage->ImageDataType = EfiRuntimeServicesData;
|
DriverEntry->LoadedImage->ImageDataType = EfiRuntimeServicesData;
|
||||||
@ -615,7 +615,7 @@ SmmLoadImage (
|
|||||||
}
|
}
|
||||||
CopyMem (DriverEntry->SmmLoadedImage.FilePath, FilePath, GetDevicePathSize(FilePath));
|
CopyMem (DriverEntry->SmmLoadedImage.FilePath, FilePath, GetDevicePathSize(FilePath));
|
||||||
|
|
||||||
DriverEntry->SmmLoadedImage.ImageBase = (VOID *)(UINTN)DriverEntry->ImageBuffer;
|
DriverEntry->SmmLoadedImage.ImageBase = (VOID *)(UINTN) ImageContext.ImageAddress;
|
||||||
DriverEntry->SmmLoadedImage.ImageSize = ImageContext.ImageSize;
|
DriverEntry->SmmLoadedImage.ImageSize = ImageContext.ImageSize;
|
||||||
DriverEntry->SmmLoadedImage.ImageCodeType = EfiRuntimeServicesCode;
|
DriverEntry->SmmLoadedImage.ImageCodeType = EfiRuntimeServicesCode;
|
||||||
DriverEntry->SmmLoadedImage.ImageDataType = EfiRuntimeServicesData;
|
DriverEntry->SmmLoadedImage.ImageDataType = EfiRuntimeServicesData;
|
||||||
|
@ -1196,12 +1196,28 @@ extern LIST_ENTRY mSmmMemoryMap;
|
|||||||
//
|
//
|
||||||
#define MAX_POOL_INDEX (MAX_POOL_SHIFT - MIN_POOL_SHIFT + 1)
|
#define MAX_POOL_INDEX (MAX_POOL_SHIFT - MIN_POOL_SHIFT + 1)
|
||||||
|
|
||||||
|
#define POOL_HEAD_SIGNATURE SIGNATURE_32('p','h','d','0')
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINTN Size;
|
UINT32 Signature;
|
||||||
BOOLEAN Available;
|
BOOLEAN Available;
|
||||||
EFI_MEMORY_TYPE Type;
|
EFI_MEMORY_TYPE Type;
|
||||||
|
UINTN Size;
|
||||||
} POOL_HEADER;
|
} POOL_HEADER;
|
||||||
|
|
||||||
|
#define POOL_TAIL_SIGNATURE SIGNATURE_32('p','t','a','l')
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
UINT32 Signature;
|
||||||
|
UINT32 Reserved;
|
||||||
|
UINTN Size;
|
||||||
|
} POOL_TAIL;
|
||||||
|
|
||||||
|
#define POOL_OVERHEAD (sizeof(POOL_HEADER) + sizeof(POOL_TAIL))
|
||||||
|
|
||||||
|
#define HEAD_TO_TAIL(a) \
|
||||||
|
((POOL_TAIL *) (((CHAR8 *) (a)) + (a)->Size - sizeof(POOL_TAIL)));
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
POOL_HEADER Header;
|
POOL_HEADER Header;
|
||||||
LIST_ENTRY Link;
|
LIST_ENTRY Link;
|
||||||
|
@ -263,6 +263,7 @@ EFI_PHYSICAL_ADDRESS mSmramCacheBase;
|
|||||||
UINT64 mSmramCacheSize;
|
UINT64 mSmramCacheSize;
|
||||||
|
|
||||||
EFI_SMM_COMMUNICATE_HEADER mCommunicateHeader;
|
EFI_SMM_COMMUNICATE_HEADER mCommunicateHeader;
|
||||||
|
EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE *mLMFAConfigurationTable = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Table of Protocol notification and GUIDed Event notifications that the SMM IPL requires
|
// Table of Protocol notification and GUIDed Event notifications that the SMM IPL requires
|
||||||
@ -841,7 +842,7 @@ GetPeCoffImageFixLoadingAssignedAddress(
|
|||||||
|
|
||||||
FixLoadingAddress = 0;
|
FixLoadingAddress = 0;
|
||||||
Status = EFI_NOT_FOUND;
|
Status = EFI_NOT_FOUND;
|
||||||
SmramBase = mCurrentSmramRange->CpuStart;
|
SmramBase = mLMFAConfigurationTable->SmramBase;
|
||||||
//
|
//
|
||||||
// Get PeHeader pointer
|
// Get PeHeader pointer
|
||||||
//
|
//
|
||||||
@ -1519,7 +1520,6 @@ SmmIplEntry (
|
|||||||
UINT64 MaxSize;
|
UINT64 MaxSize;
|
||||||
VOID *Registration;
|
VOID *Registration;
|
||||||
UINT64 SmmCodeSize;
|
UINT64 SmmCodeSize;
|
||||||
EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE *LMFAConfigurationTable;
|
|
||||||
EFI_CPU_ARCH_PROTOCOL *CpuArch;
|
EFI_CPU_ARCH_PROTOCOL *CpuArch;
|
||||||
EFI_STATUS SetAttrStatus;
|
EFI_STATUS SetAttrStatus;
|
||||||
EFI_SMRAM_DESCRIPTOR *SmramRangeSmmDriver;
|
EFI_SMRAM_DESCRIPTOR *SmramRangeSmmDriver;
|
||||||
@ -1623,14 +1623,14 @@ SmmIplEntry (
|
|||||||
//
|
//
|
||||||
Status = EfiGetSystemConfigurationTable (
|
Status = EfiGetSystemConfigurationTable (
|
||||||
&gLoadFixedAddressConfigurationTableGuid,
|
&gLoadFixedAddressConfigurationTableGuid,
|
||||||
(VOID **) &LMFAConfigurationTable
|
(VOID **) &mLMFAConfigurationTable
|
||||||
);
|
);
|
||||||
if (!EFI_ERROR (Status) && LMFAConfigurationTable != NULL) {
|
if (!EFI_ERROR (Status) && mLMFAConfigurationTable != NULL) {
|
||||||
LMFAConfigurationTable->SmramBase = mCurrentSmramRange->CpuStart;
|
mLMFAConfigurationTable->SmramBase = mCurrentSmramRange->CpuStart;
|
||||||
//
|
//
|
||||||
// Print the SMRAM base
|
// Print the SMRAM base
|
||||||
//
|
//
|
||||||
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: TSEG BASE is %x. \n", LMFAConfigurationTable->SmramBase));
|
DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: TSEG BASE is %x. \n", mLMFAConfigurationTable->SmramBase));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
SMM Memory pool management functions.
|
SMM Memory pool management functions.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available
|
This program and the accompanying materials are licensed and made available
|
||||||
under the terms and conditions of the BSD License which accompanies this
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
distribution. The full text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
@ -133,9 +133,11 @@ InternalAllocPoolByIndex (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
FREE_POOL_HEADER *Hdr;
|
FREE_POOL_HEADER *Hdr;
|
||||||
|
POOL_TAIL *Tail;
|
||||||
EFI_PHYSICAL_ADDRESS Address;
|
EFI_PHYSICAL_ADDRESS Address;
|
||||||
SMM_POOL_TYPE SmmPoolType;
|
SMM_POOL_TYPE SmmPoolType;
|
||||||
|
|
||||||
|
Address = 0;
|
||||||
SmmPoolType = UefiMemoryTypeToSmmPoolType(PoolType);
|
SmmPoolType = UefiMemoryTypeToSmmPoolType(PoolType);
|
||||||
|
|
||||||
ASSERT (PoolIndex <= MAX_POOL_INDEX);
|
ASSERT (PoolIndex <= MAX_POOL_INDEX);
|
||||||
@ -153,18 +155,26 @@ InternalAllocPoolByIndex (
|
|||||||
} else {
|
} else {
|
||||||
Status = InternalAllocPoolByIndex (PoolType, PoolIndex + 1, &Hdr);
|
Status = InternalAllocPoolByIndex (PoolType, PoolIndex + 1, &Hdr);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
|
Hdr->Header.Signature = 0;
|
||||||
Hdr->Header.Size >>= 1;
|
Hdr->Header.Size >>= 1;
|
||||||
Hdr->Header.Available = TRUE;
|
Hdr->Header.Available = TRUE;
|
||||||
Hdr->Header.Type = PoolType;
|
Hdr->Header.Type = 0;
|
||||||
|
Tail = HEAD_TO_TAIL(&Hdr->Header);
|
||||||
|
Tail->Signature = 0;
|
||||||
|
Tail->Size = 0;
|
||||||
InsertHeadList (&mSmmPoolLists[SmmPoolType][PoolIndex], &Hdr->Link);
|
InsertHeadList (&mSmmPoolLists[SmmPoolType][PoolIndex], &Hdr->Link);
|
||||||
Hdr = (FREE_POOL_HEADER*)((UINT8*)Hdr + Hdr->Header.Size);
|
Hdr = (FREE_POOL_HEADER*)((UINT8*)Hdr + Hdr->Header.Size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
|
Hdr->Header.Signature = POOL_HEAD_SIGNATURE;
|
||||||
Hdr->Header.Size = MIN_POOL_SIZE << PoolIndex;
|
Hdr->Header.Size = MIN_POOL_SIZE << PoolIndex;
|
||||||
Hdr->Header.Available = FALSE;
|
Hdr->Header.Available = FALSE;
|
||||||
Hdr->Header.Type = PoolType;
|
Hdr->Header.Type = PoolType;
|
||||||
|
Tail = HEAD_TO_TAIL(&Hdr->Header);
|
||||||
|
Tail->Signature = POOL_TAIL_SIGNATURE;
|
||||||
|
Tail->Size = Hdr->Header.Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
*FreePoolHdr = Hdr;
|
*FreePoolHdr = Hdr;
|
||||||
@ -175,13 +185,15 @@ InternalAllocPoolByIndex (
|
|||||||
Internal Function. Free a pool by specified PoolIndex.
|
Internal Function. Free a pool by specified PoolIndex.
|
||||||
|
|
||||||
@param FreePoolHdr The pool to free.
|
@param FreePoolHdr The pool to free.
|
||||||
|
@param PoolTail The pointer to the pool tail.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Pool successfully freed.
|
@retval EFI_SUCCESS Pool successfully freed.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
InternalFreePoolByIndex (
|
InternalFreePoolByIndex (
|
||||||
IN FREE_POOL_HEADER *FreePoolHdr
|
IN FREE_POOL_HEADER *FreePoolHdr,
|
||||||
|
IN POOL_TAIL *PoolTail
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN PoolIndex;
|
UINTN PoolIndex;
|
||||||
@ -194,7 +206,11 @@ InternalFreePoolByIndex (
|
|||||||
SmmPoolType = UefiMemoryTypeToSmmPoolType(FreePoolHdr->Header.Type);
|
SmmPoolType = UefiMemoryTypeToSmmPoolType(FreePoolHdr->Header.Type);
|
||||||
|
|
||||||
PoolIndex = (UINTN) (HighBitSet32 ((UINT32)FreePoolHdr->Header.Size) - MIN_POOL_SHIFT);
|
PoolIndex = (UINTN) (HighBitSet32 ((UINT32)FreePoolHdr->Header.Size) - MIN_POOL_SHIFT);
|
||||||
|
FreePoolHdr->Header.Signature = 0;
|
||||||
FreePoolHdr->Header.Available = TRUE;
|
FreePoolHdr->Header.Available = TRUE;
|
||||||
|
FreePoolHdr->Header.Type = 0;
|
||||||
|
PoolTail->Signature = 0;
|
||||||
|
PoolTail->Size = 0;
|
||||||
ASSERT (PoolIndex < MAX_POOL_INDEX);
|
ASSERT (PoolIndex < MAX_POOL_INDEX);
|
||||||
InsertHeadList (&mSmmPoolLists[SmmPoolType][PoolIndex], &FreePoolHdr->Link);
|
InsertHeadList (&mSmmPoolLists[SmmPoolType][PoolIndex], &FreePoolHdr->Link);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
@ -222,17 +238,23 @@ SmmInternalAllocatePool (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
POOL_HEADER *PoolHdr;
|
POOL_HEADER *PoolHdr;
|
||||||
|
POOL_TAIL *PoolTail;
|
||||||
FREE_POOL_HEADER *FreePoolHdr;
|
FREE_POOL_HEADER *FreePoolHdr;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_PHYSICAL_ADDRESS Address;
|
EFI_PHYSICAL_ADDRESS Address;
|
||||||
UINTN PoolIndex;
|
UINTN PoolIndex;
|
||||||
|
|
||||||
|
Address = 0;
|
||||||
|
|
||||||
if (PoolType != EfiRuntimeServicesCode &&
|
if (PoolType != EfiRuntimeServicesCode &&
|
||||||
PoolType != EfiRuntimeServicesData) {
|
PoolType != EfiRuntimeServicesData) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
Size += sizeof (*PoolHdr);
|
//
|
||||||
|
// Adjust the size by the pool header & tail overhead
|
||||||
|
//
|
||||||
|
Size += POOL_OVERHEAD;
|
||||||
if (Size > MAX_POOL_SIZE) {
|
if (Size > MAX_POOL_SIZE) {
|
||||||
Size = EFI_SIZE_TO_PAGES (Size);
|
Size = EFI_SIZE_TO_PAGES (Size);
|
||||||
Status = SmmInternalAllocatePages (AllocateAnyPages, PoolType, Size, &Address);
|
Status = SmmInternalAllocatePages (AllocateAnyPages, PoolType, Size, &Address);
|
||||||
@ -241,9 +263,13 @@ SmmInternalAllocatePool (
|
|||||||
}
|
}
|
||||||
|
|
||||||
PoolHdr = (POOL_HEADER*)(UINTN)Address;
|
PoolHdr = (POOL_HEADER*)(UINTN)Address;
|
||||||
|
PoolHdr->Signature = POOL_HEAD_SIGNATURE;
|
||||||
PoolHdr->Size = EFI_PAGES_TO_SIZE (Size);
|
PoolHdr->Size = EFI_PAGES_TO_SIZE (Size);
|
||||||
PoolHdr->Available = FALSE;
|
PoolHdr->Available = FALSE;
|
||||||
PoolHdr->Type = PoolType;
|
PoolHdr->Type = PoolType;
|
||||||
|
PoolTail = HEAD_TO_TAIL(PoolHdr);
|
||||||
|
PoolTail->Signature = POOL_TAIL_SIGNATURE;
|
||||||
|
PoolTail->Size = PoolHdr->Size;
|
||||||
*Buffer = PoolHdr + 1;
|
*Buffer = PoolHdr + 1;
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
@ -314,13 +340,30 @@ SmmInternalFreePool (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
FREE_POOL_HEADER *FreePoolHdr;
|
FREE_POOL_HEADER *FreePoolHdr;
|
||||||
|
POOL_TAIL *PoolTail;
|
||||||
|
|
||||||
if (Buffer == NULL) {
|
if (Buffer == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePoolHdr = (FREE_POOL_HEADER*)((POOL_HEADER*)Buffer - 1);
|
FreePoolHdr = (FREE_POOL_HEADER*)((POOL_HEADER*)Buffer - 1);
|
||||||
|
ASSERT (FreePoolHdr->Header.Signature == POOL_HEAD_SIGNATURE);
|
||||||
ASSERT (!FreePoolHdr->Header.Available);
|
ASSERT (!FreePoolHdr->Header.Available);
|
||||||
|
PoolTail = HEAD_TO_TAIL(&FreePoolHdr->Header);
|
||||||
|
ASSERT (PoolTail->Signature == POOL_TAIL_SIGNATURE);
|
||||||
|
ASSERT (FreePoolHdr->Header.Size == PoolTail->Size);
|
||||||
|
|
||||||
|
if (FreePoolHdr->Header.Signature != POOL_HEAD_SIGNATURE) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PoolTail->Signature != POOL_TAIL_SIGNATURE) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FreePoolHdr->Header.Size != PoolTail->Size) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
if (FreePoolHdr->Header.Size > MAX_POOL_SIZE) {
|
if (FreePoolHdr->Header.Size > MAX_POOL_SIZE) {
|
||||||
ASSERT (((UINTN)FreePoolHdr & EFI_PAGE_MASK) == 0);
|
ASSERT (((UINTN)FreePoolHdr & EFI_PAGE_MASK) == 0);
|
||||||
@ -330,7 +373,7 @@ SmmInternalFreePool (
|
|||||||
EFI_SIZE_TO_PAGES (FreePoolHdr->Header.Size)
|
EFI_SIZE_TO_PAGES (FreePoolHdr->Header.Size)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return InternalFreePoolByIndex (FreePoolHdr);
|
return InternalFreePoolByIndex (FreePoolHdr, PoolTail);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,14 +33,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
#include "PiSmmCore.h"
|
#include "PiSmmCore.h"
|
||||||
|
|
||||||
|
#define GET_OCCUPIED_SIZE(ActualSize, Alignment) \
|
||||||
|
((ActualSize) + (((Alignment) - ((ActualSize) & ((Alignment) - 1))) & ((Alignment) - 1)))
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
EFI_GUID FileGuid;
|
EFI_GUID FileGuid;
|
||||||
UINTN ImageRef;
|
PHYSICAL_ADDRESS EntryPoint;
|
||||||
UINTN EntryPoint;
|
PHYSICAL_ADDRESS ImageBase;
|
||||||
UINTN ImageBase;
|
UINT64 ImageSize;
|
||||||
UINTN ImageSize;
|
UINT32 ImageRef;
|
||||||
UINTN PdbStringSize;
|
UINT16 PdbStringSize;
|
||||||
CHAR8 *PdbString;
|
CHAR8 *PdbString;
|
||||||
} IMAGE_STRUCT;
|
} IMAGE_STRUCT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -89,8 +92,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED LIST_ENTRY *mSmmCoreSmiEntryList = &mSmiEntry
|
|||||||
GLOBAL_REMOVE_IF_UNREFERENCED LIST_ENTRY *mSmmCoreHardwareSmiEntryList = &mHardwareSmiEntryList;
|
GLOBAL_REMOVE_IF_UNREFERENCED LIST_ENTRY *mSmmCoreHardwareSmiEntryList = &mHardwareSmiEntryList;
|
||||||
|
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED IMAGE_STRUCT *mImageStruct;
|
GLOBAL_REMOVE_IF_UNREFERENCED IMAGE_STRUCT *mImageStruct;
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED UINTN mImageStructCountMax;
|
GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mImageStructCountMax;
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED UINTN mImageStructCount;
|
GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mImageStructCount;
|
||||||
|
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED VOID *mSmiHandlerProfileDatabase;
|
GLOBAL_REMOVE_IF_UNREFERENCED VOID *mSmiHandlerProfileDatabase;
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED UINTN mSmiHandlerProfileDatabaseSize;
|
GLOBAL_REMOVE_IF_UNREFERENCED UINTN mSmiHandlerProfileDatabaseSize;
|
||||||
@ -162,11 +165,11 @@ GetDriverGuid (
|
|||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
AddImageStruct(
|
AddImageStruct(
|
||||||
IN UINTN ImageBase,
|
IN PHYSICAL_ADDRESS ImageBase,
|
||||||
IN UINTN ImageSize,
|
IN UINT64 ImageSize,
|
||||||
IN UINTN EntryPoint,
|
IN PHYSICAL_ADDRESS EntryPoint,
|
||||||
IN EFI_GUID *Guid,
|
IN EFI_GUID *Guid,
|
||||||
IN CHAR8 *PdbString
|
IN CHAR8 *PdbString
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN PdbStringSize;
|
UINTN PdbStringSize;
|
||||||
@ -185,7 +188,7 @@ AddImageStruct(
|
|||||||
PdbStringSize = AsciiStrSize(PdbString);
|
PdbStringSize = AsciiStrSize(PdbString);
|
||||||
mImageStruct[mImageStructCount].PdbString = AllocateCopyPool (PdbStringSize, PdbString);
|
mImageStruct[mImageStructCount].PdbString = AllocateCopyPool (PdbStringSize, PdbString);
|
||||||
if (mImageStruct[mImageStructCount].PdbString != NULL) {
|
if (mImageStruct[mImageStructCount].PdbString != NULL) {
|
||||||
mImageStruct[mImageStructCount].PdbStringSize = PdbStringSize;
|
mImageStruct[mImageStructCount].PdbStringSize = (UINT16) PdbStringSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +225,7 @@ AddressToImageStruct(
|
|||||||
|
|
||||||
@return image reference index
|
@return image reference index
|
||||||
**/
|
**/
|
||||||
UINTN
|
UINT32
|
||||||
AddressToImageRef(
|
AddressToImageRef(
|
||||||
IN UINTN Address
|
IN UINTN Address
|
||||||
)
|
)
|
||||||
@ -233,7 +236,7 @@ AddressToImageRef(
|
|||||||
if (ImageStruct != NULL) {
|
if (ImageStruct != NULL) {
|
||||||
return ImageStruct->ImageRef;
|
return ImageStruct->ImageRef;
|
||||||
}
|
}
|
||||||
return (UINTN)-1;
|
return (UINT32)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -252,11 +255,11 @@ GetSmmLoadedImage(
|
|||||||
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
|
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
|
||||||
CHAR16 *PathStr;
|
CHAR16 *PathStr;
|
||||||
EFI_SMM_DRIVER_ENTRY *LoadedImagePrivate;
|
EFI_SMM_DRIVER_ENTRY *LoadedImagePrivate;
|
||||||
UINTN EntryPoint;
|
PHYSICAL_ADDRESS EntryPoint;
|
||||||
VOID *EntryPointInImage;
|
VOID *EntryPointInImage;
|
||||||
EFI_GUID Guid;
|
EFI_GUID Guid;
|
||||||
CHAR8 *PdbString;
|
CHAR8 *PdbString;
|
||||||
UINTN RealImageBase;
|
PHYSICAL_ADDRESS RealImageBase;
|
||||||
|
|
||||||
HandleBufferSize = 0;
|
HandleBufferSize = 0;
|
||||||
HandleBuffer = NULL;
|
HandleBuffer = NULL;
|
||||||
@ -286,7 +289,7 @@ GetSmmLoadedImage(
|
|||||||
}
|
}
|
||||||
|
|
||||||
NoHandles = HandleBufferSize/sizeof(EFI_HANDLE);
|
NoHandles = HandleBufferSize/sizeof(EFI_HANDLE);
|
||||||
mImageStructCountMax = NoHandles;
|
mImageStructCountMax = (UINT32) NoHandles;
|
||||||
mImageStruct = AllocateZeroPool(mImageStructCountMax * sizeof(IMAGE_STRUCT));
|
mImageStruct = AllocateZeroPool(mImageStructCountMax * sizeof(IMAGE_STRUCT));
|
||||||
if (mImageStruct == NULL) {
|
if (mImageStruct == NULL) {
|
||||||
goto Done;
|
goto Done;
|
||||||
@ -309,8 +312,8 @@ GetSmmLoadedImage(
|
|||||||
LoadedImagePrivate = BASE_CR(LoadedImage, EFI_SMM_DRIVER_ENTRY, SmmLoadedImage);
|
LoadedImagePrivate = BASE_CR(LoadedImage, EFI_SMM_DRIVER_ENTRY, SmmLoadedImage);
|
||||||
RealImageBase = (UINTN)LoadedImage->ImageBase;
|
RealImageBase = (UINTN)LoadedImage->ImageBase;
|
||||||
if (LoadedImagePrivate->Signature == EFI_SMM_DRIVER_ENTRY_SIGNATURE) {
|
if (LoadedImagePrivate->Signature == EFI_SMM_DRIVER_ENTRY_SIGNATURE) {
|
||||||
EntryPoint = (UINTN)LoadedImagePrivate->ImageEntryPoint;
|
EntryPoint = LoadedImagePrivate->ImageEntryPoint;
|
||||||
if ((EntryPoint != 0) && ((EntryPoint < (UINTN)LoadedImage->ImageBase) || (EntryPoint >= ((UINTN)LoadedImage->ImageBase + (UINTN)LoadedImage->ImageSize)))) {
|
if ((EntryPoint != 0) && ((EntryPoint < (UINTN)LoadedImage->ImageBase) || (EntryPoint >= ((UINTN)LoadedImage->ImageBase + LoadedImage->ImageSize)))) {
|
||||||
//
|
//
|
||||||
// If the EntryPoint is not in the range of image buffer, it should come from emulation environment.
|
// If the EntryPoint is not in the range of image buffer, it should come from emulation environment.
|
||||||
// So patch ImageBuffer here to align the EntryPoint.
|
// So patch ImageBuffer here to align the EntryPoint.
|
||||||
@ -320,9 +323,9 @@ GetSmmLoadedImage(
|
|||||||
RealImageBase = (UINTN)LoadedImage->ImageBase + EntryPoint - (UINTN)EntryPointInImage;
|
RealImageBase = (UINTN)LoadedImage->ImageBase + EntryPoint - (UINTN)EntryPointInImage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEBUG ((DEBUG_INFO, "(0x%x - 0x%x", RealImageBase, (UINTN)LoadedImage->ImageSize));
|
DEBUG ((DEBUG_INFO, "(0x%lx - 0x%lx", RealImageBase, LoadedImage->ImageSize));
|
||||||
if (EntryPoint != 0) {
|
if (EntryPoint != 0) {
|
||||||
DEBUG ((DEBUG_INFO, ", EntryPoint:0x%x", EntryPoint));
|
DEBUG ((DEBUG_INFO, ", EntryPoint:0x%lx", EntryPoint));
|
||||||
}
|
}
|
||||||
DEBUG ((DEBUG_INFO, ")\n"));
|
DEBUG ((DEBUG_INFO, ")\n"));
|
||||||
|
|
||||||
@ -334,7 +337,7 @@ GetSmmLoadedImage(
|
|||||||
}
|
}
|
||||||
DEBUG ((DEBUG_INFO, " (%s)\n", PathStr));
|
DEBUG ((DEBUG_INFO, " (%s)\n", PathStr));
|
||||||
|
|
||||||
AddImageStruct((UINTN)RealImageBase, (UINTN)LoadedImage->ImageSize, EntryPoint, &Guid, PdbString);
|
AddImageStruct(RealImageBase, LoadedImage->ImageSize, EntryPoint, &Guid, PdbString);
|
||||||
}
|
}
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
@ -356,8 +359,10 @@ DumpSmiChildContext (
|
|||||||
IN UINTN ContextSize
|
IN UINTN ContextSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
CHAR16 *Str;
|
||||||
|
|
||||||
if (CompareGuid (HandlerType, &gEfiSmmSwDispatch2ProtocolGuid)) {
|
if (CompareGuid (HandlerType, &gEfiSmmSwDispatch2ProtocolGuid)) {
|
||||||
DEBUG ((DEBUG_INFO, " SwSmi - 0x%x\n", ((EFI_SMM_SW_REGISTER_CONTEXT *)Context)->SwSmiInputValue));
|
DEBUG ((DEBUG_INFO, " SwSmi - 0x%lx\n", ((SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT *)Context)->SwSmiInputValue));
|
||||||
} else if (CompareGuid (HandlerType, &gEfiSmmSxDispatch2ProtocolGuid)) {
|
} else if (CompareGuid (HandlerType, &gEfiSmmSxDispatch2ProtocolGuid)) {
|
||||||
DEBUG ((DEBUG_INFO, " SxType - 0x%x\n", ((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Type));
|
DEBUG ((DEBUG_INFO, " SxType - 0x%x\n", ((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Type));
|
||||||
DEBUG ((DEBUG_INFO, " SxPhase - 0x%x\n", ((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Phase));
|
DEBUG ((DEBUG_INFO, " SxPhase - 0x%x\n", ((EFI_SMM_SX_REGISTER_CONTEXT *)Context)->Phase));
|
||||||
@ -376,7 +381,11 @@ DumpSmiChildContext (
|
|||||||
DEBUG ((DEBUG_INFO, " IoTrapType - 0x%x\n", ((EFI_SMM_IO_TRAP_REGISTER_CONTEXT *)Context)->Type));
|
DEBUG ((DEBUG_INFO, " IoTrapType - 0x%x\n", ((EFI_SMM_IO_TRAP_REGISTER_CONTEXT *)Context)->Type));
|
||||||
} else if (CompareGuid (HandlerType, &gEfiSmmUsbDispatch2ProtocolGuid)) {
|
} else if (CompareGuid (HandlerType, &gEfiSmmUsbDispatch2ProtocolGuid)) {
|
||||||
DEBUG ((DEBUG_INFO, " UsbType - 0x%x\n", ((SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT *)Context)->Type));
|
DEBUG ((DEBUG_INFO, " UsbType - 0x%x\n", ((SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT *)Context)->Type));
|
||||||
DEBUG ((DEBUG_INFO, " UsbDevicePath - %s\n", ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL *)(((SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT *)Context) + 1), TRUE, TRUE)));
|
Str = ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL *)(((SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT *)Context) + 1), TRUE, TRUE);
|
||||||
|
DEBUG ((DEBUG_INFO, " UsbDevicePath - %s\n", Str));
|
||||||
|
if (Str != NULL) {
|
||||||
|
FreePool (Str);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
DEBUG ((DEBUG_INFO, " Context - "));
|
DEBUG ((DEBUG_INFO, " Context - "));
|
||||||
InternalDumpData (Context, ContextSize);
|
InternalDumpData (Context, ContextSize);
|
||||||
@ -416,12 +425,12 @@ DumpSmiHandlerOnSmiEntry(
|
|||||||
}
|
}
|
||||||
DEBUG ((DEBUG_INFO, " Handler - 0x%x", SmiHandler->Handler));
|
DEBUG ((DEBUG_INFO, " Handler - 0x%x", SmiHandler->Handler));
|
||||||
if (ImageStruct != NULL) {
|
if (ImageStruct != NULL) {
|
||||||
DEBUG ((DEBUG_INFO, " <== RVA - 0x%x", (UINTN)SmiHandler->Handler - ImageStruct->ImageBase));
|
DEBUG ((DEBUG_INFO, " <== RVA - 0x%x", (UINTN)SmiHandler->Handler - (UINTN) ImageStruct->ImageBase));
|
||||||
}
|
}
|
||||||
DEBUG ((DEBUG_INFO, "\n"));
|
DEBUG ((DEBUG_INFO, "\n"));
|
||||||
DEBUG ((DEBUG_INFO, " CallerAddr - 0x%x", SmiHandler->CallerAddr));
|
DEBUG ((DEBUG_INFO, " CallerAddr - 0x%x", SmiHandler->CallerAddr));
|
||||||
if (ImageStruct != NULL) {
|
if (ImageStruct != NULL) {
|
||||||
DEBUG ((DEBUG_INFO, " <== RVA - 0x%x", SmiHandler->CallerAddr - ImageStruct->ImageBase));
|
DEBUG ((DEBUG_INFO, " <== RVA - 0x%x", SmiHandler->CallerAddr - (UINTN) ImageStruct->ImageBase));
|
||||||
}
|
}
|
||||||
DEBUG ((DEBUG_INFO, "\n"));
|
DEBUG ((DEBUG_INFO, "\n"));
|
||||||
}
|
}
|
||||||
@ -527,11 +536,11 @@ GetSmmImageDatabaseSize(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
UINTN Index;
|
UINT32 Index;
|
||||||
|
|
||||||
Size = (sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE)) * mImageStructCount;
|
Size = 0;
|
||||||
for (Index = 0; Index < mImageStructCount; Index++) {
|
for (Index = 0; Index < mImageStructCount; Index++) {
|
||||||
Size += mImageStruct[Index].PdbStringSize;
|
Size += sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE) + GET_OCCUPIED_SIZE (mImageStruct[Index].PdbStringSize, sizeof (UINT64));
|
||||||
}
|
}
|
||||||
return Size;
|
return Size;
|
||||||
}
|
}
|
||||||
@ -558,7 +567,7 @@ GetSmmSmiHandlerSizeOnSmiEntry(
|
|||||||
ListEntry != &SmiEntry->SmiHandlers;
|
ListEntry != &SmiEntry->SmiHandlers;
|
||||||
ListEntry = ListEntry->ForwardLink) {
|
ListEntry = ListEntry->ForwardLink) {
|
||||||
SmiHandler = CR(ListEntry, SMI_HANDLER, Link, SMI_HANDLER_SIGNATURE);
|
SmiHandler = CR(ListEntry, SMI_HANDLER, Link, SMI_HANDLER_SIGNATURE);
|
||||||
Size += sizeof(SMM_CORE_SMI_HANDLER_STRUCTURE) + SmiHandler->ContextSize;
|
Size += sizeof(SMM_CORE_SMI_HANDLER_STRUCTURE) + GET_OCCUPIED_SIZE (SmiHandler->ContextSize, sizeof (UINT64));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Size;
|
return Size;
|
||||||
@ -634,21 +643,25 @@ GetSmmImageDatabaseData (
|
|||||||
if (Size >= ExpectedSize) {
|
if (Size >= ExpectedSize) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE) + mImageStruct[Index].PdbStringSize > ExpectedSize - Size) {
|
if (sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE) + GET_OCCUPIED_SIZE (mImageStruct[Index].PdbStringSize, sizeof (UINT64)) > ExpectedSize - Size) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ImageStruct->Header.Signature = SMM_CORE_IMAGE_DATABASE_SIGNATURE;
|
ImageStruct->Header.Signature = SMM_CORE_IMAGE_DATABASE_SIGNATURE;
|
||||||
ImageStruct->Header.Length = (UINT32)(sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE) + mImageStruct[Index].PdbStringSize);
|
ImageStruct->Header.Length = (UINT32)(sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE) + GET_OCCUPIED_SIZE (mImageStruct[Index].PdbStringSize, sizeof (UINT64)));
|
||||||
ImageStruct->Header.Revision = SMM_CORE_IMAGE_DATABASE_REVISION;
|
ImageStruct->Header.Revision = SMM_CORE_IMAGE_DATABASE_REVISION;
|
||||||
CopyGuid(&ImageStruct->FileGuid, &mImageStruct[Index].FileGuid);
|
CopyGuid(&ImageStruct->FileGuid, &mImageStruct[Index].FileGuid);
|
||||||
ImageStruct->ImageRef = mImageStruct[Index].ImageRef;
|
ImageStruct->ImageRef = mImageStruct[Index].ImageRef;
|
||||||
ImageStruct->EntryPoint = mImageStruct[Index].EntryPoint;
|
ImageStruct->EntryPoint = mImageStruct[Index].EntryPoint;
|
||||||
ImageStruct->ImageBase = mImageStruct[Index].ImageBase;
|
ImageStruct->ImageBase = mImageStruct[Index].ImageBase;
|
||||||
ImageStruct->ImageSize = mImageStruct[Index].ImageSize;
|
ImageStruct->ImageSize = mImageStruct[Index].ImageSize;
|
||||||
ImageStruct->PdbStringOffset = sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE);
|
if (mImageStruct[Index].PdbStringSize != 0) {
|
||||||
CopyMem ((VOID *)((UINTN)ImageStruct + ImageStruct->PdbStringOffset), mImageStruct[Index].PdbString, mImageStruct[Index].PdbStringSize);
|
ImageStruct->PdbStringOffset = sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE);
|
||||||
|
CopyMem ((VOID *)((UINTN)ImageStruct + ImageStruct->PdbStringOffset), mImageStruct[Index].PdbString, mImageStruct[Index].PdbStringSize);
|
||||||
|
} else {
|
||||||
|
ImageStruct->PdbStringOffset = 0;
|
||||||
|
}
|
||||||
ImageStruct = (SMM_CORE_IMAGE_DATABASE_STRUCTURE *)((UINTN)ImageStruct + ImageStruct->Header.Length);
|
ImageStruct = (SMM_CORE_IMAGE_DATABASE_STRUCTURE *)((UINTN)ImageStruct + ImageStruct->Header.Length);
|
||||||
Size += sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE) + mImageStruct[Index].PdbStringSize;
|
Size += sizeof(SMM_CORE_IMAGE_DATABASE_STRUCTURE) + GET_OCCUPIED_SIZE (mImageStruct[Index].PdbStringSize, sizeof (UINT64));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ExpectedSize != Size) {
|
if (ExpectedSize != Size) {
|
||||||
@ -672,7 +685,7 @@ GetSmmSmiHandlerDataOnSmiEntry(
|
|||||||
IN SMI_ENTRY *SmiEntry,
|
IN SMI_ENTRY *SmiEntry,
|
||||||
IN OUT VOID *Data,
|
IN OUT VOID *Data,
|
||||||
IN UINTN MaxSize,
|
IN UINTN MaxSize,
|
||||||
OUT UINTN *Count
|
OUT UINT32 *Count
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
SMM_CORE_SMI_HANDLER_STRUCTURE *SmiHandlerStruct;
|
SMM_CORE_SMI_HANDLER_STRUCTURE *SmiHandlerStruct;
|
||||||
@ -692,11 +705,11 @@ GetSmmSmiHandlerDataOnSmiEntry(
|
|||||||
*Count = 0;
|
*Count = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (sizeof(SMM_CORE_SMI_HANDLER_STRUCTURE) + SmiHandler->ContextSize > MaxSize - Size) {
|
if (sizeof(SMM_CORE_SMI_HANDLER_STRUCTURE) + GET_OCCUPIED_SIZE (SmiHandler->ContextSize, sizeof (UINT64)) > MaxSize - Size) {
|
||||||
*Count = 0;
|
*Count = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
SmiHandlerStruct->Length = (UINT32)(sizeof(SMM_CORE_SMI_HANDLER_STRUCTURE) + SmiHandler->ContextSize);
|
SmiHandlerStruct->Length = (UINT32)(sizeof(SMM_CORE_SMI_HANDLER_STRUCTURE) + GET_OCCUPIED_SIZE (SmiHandler->ContextSize, sizeof (UINT64)));
|
||||||
SmiHandlerStruct->CallerAddr = (UINTN)SmiHandler->CallerAddr;
|
SmiHandlerStruct->CallerAddr = (UINTN)SmiHandler->CallerAddr;
|
||||||
SmiHandlerStruct->Handler = (UINTN)SmiHandler->Handler;
|
SmiHandlerStruct->Handler = (UINTN)SmiHandler->Handler;
|
||||||
SmiHandlerStruct->ImageRef = AddressToImageRef((UINTN)SmiHandler->Handler);
|
SmiHandlerStruct->ImageRef = AddressToImageRef((UINTN)SmiHandler->Handler);
|
||||||
@ -707,7 +720,7 @@ GetSmmSmiHandlerDataOnSmiEntry(
|
|||||||
} else {
|
} else {
|
||||||
SmiHandlerStruct->ContextBufferOffset = 0;
|
SmiHandlerStruct->ContextBufferOffset = 0;
|
||||||
}
|
}
|
||||||
Size += sizeof(SMM_CORE_SMI_HANDLER_STRUCTURE) + SmiHandler->ContextSize;
|
Size += sizeof(SMM_CORE_SMI_HANDLER_STRUCTURE) + GET_OCCUPIED_SIZE (SmiHandler->ContextSize, sizeof (UINT64));
|
||||||
SmiHandlerStruct = (SMM_CORE_SMI_HANDLER_STRUCTURE *)((UINTN)SmiHandlerStruct + SmiHandlerStruct->Length);
|
SmiHandlerStruct = (SMM_CORE_SMI_HANDLER_STRUCTURE *)((UINTN)SmiHandlerStruct + SmiHandlerStruct->Length);
|
||||||
*Count = *Count + 1;
|
*Count = *Count + 1;
|
||||||
}
|
}
|
||||||
@ -738,7 +751,7 @@ GetSmmSmiDatabaseData(
|
|||||||
SMI_ENTRY *SmiEntry;
|
SMI_ENTRY *SmiEntry;
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
UINTN SmiHandlerSize;
|
UINTN SmiHandlerSize;
|
||||||
UINTN SmiHandlerCount;
|
UINT32 SmiHandlerCount;
|
||||||
|
|
||||||
SmiStruct = Data;
|
SmiStruct = Data;
|
||||||
Size = 0;
|
Size = 0;
|
||||||
@ -1122,6 +1135,36 @@ ConvertSmiHandlerUsbContext (
|
|||||||
return SmiHandlerUsbContext;
|
return SmiHandlerUsbContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Convert EFI_SMM_SW_REGISTER_CONTEXT to SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT.
|
||||||
|
|
||||||
|
@param SwContext A pointer to EFI_SMM_SW_REGISTER_CONTEXT
|
||||||
|
@param SwContextSize The size of EFI_SMM_SW_REGISTER_CONTEXT in bytes
|
||||||
|
@param SmiHandlerSwContextSize The size of SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT in bytes
|
||||||
|
|
||||||
|
@return SmiHandlerSwContext A pointer to SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT
|
||||||
|
**/
|
||||||
|
SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT *
|
||||||
|
ConvertSmiHandlerSwContext (
|
||||||
|
IN EFI_SMM_SW_REGISTER_CONTEXT *SwContext,
|
||||||
|
IN UINTN SwContextSize,
|
||||||
|
OUT UINTN *SmiHandlerSwContextSize
|
||||||
|
)
|
||||||
|
{
|
||||||
|
SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT *SmiHandlerSwContext;
|
||||||
|
|
||||||
|
ASSERT (SwContextSize == sizeof(EFI_SMM_SW_REGISTER_CONTEXT));
|
||||||
|
|
||||||
|
SmiHandlerSwContext = AllocatePool (sizeof (SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT));
|
||||||
|
if (SmiHandlerSwContext == NULL) {
|
||||||
|
*SmiHandlerSwContextSize = 0;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
SmiHandlerSwContext->SwSmiInputValue = SwContext->SwSmiInputValue;
|
||||||
|
*SmiHandlerSwContextSize = sizeof (SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT);
|
||||||
|
return SmiHandlerSwContext;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is called by SmmChildDispatcher module to report
|
This function is called by SmmChildDispatcher module to report
|
||||||
a new SMI handler is registered, to SmmCore.
|
a new SMI handler is registered, to SmmCore.
|
||||||
@ -1176,6 +1219,8 @@ SmiHandlerProfileRegisterHandler (
|
|||||||
if (Context != NULL) {
|
if (Context != NULL) {
|
||||||
if (CompareGuid (HandlerGuid, &gEfiSmmUsbDispatch2ProtocolGuid)) {
|
if (CompareGuid (HandlerGuid, &gEfiSmmUsbDispatch2ProtocolGuid)) {
|
||||||
SmiHandler->Context = ConvertSmiHandlerUsbContext (Context, ContextSize, &SmiHandler->ContextSize);
|
SmiHandler->Context = ConvertSmiHandlerUsbContext (Context, ContextSize, &SmiHandler->ContextSize);
|
||||||
|
} else if (CompareGuid (HandlerGuid, &gEfiSmmSwDispatch2ProtocolGuid)) {
|
||||||
|
SmiHandler->Context = ConvertSmiHandlerSwContext (Context, ContextSize, &SmiHandler->ContextSize);
|
||||||
} else {
|
} else {
|
||||||
SmiHandler->Context = AllocateCopyPool (ContextSize, Context);
|
SmiHandler->Context = AllocateCopyPool (ContextSize, Context);
|
||||||
}
|
}
|
||||||
@ -1251,6 +1296,8 @@ SmiHandlerProfileUnregisterHandler (
|
|||||||
if (Context != NULL) {
|
if (Context != NULL) {
|
||||||
if (CompareGuid (HandlerGuid, &gEfiSmmUsbDispatch2ProtocolGuid)) {
|
if (CompareGuid (HandlerGuid, &gEfiSmmUsbDispatch2ProtocolGuid)) {
|
||||||
SearchContext = ConvertSmiHandlerUsbContext (Context, ContextSize, &SearchContextSize);
|
SearchContext = ConvertSmiHandlerUsbContext (Context, ContextSize, &SearchContextSize);
|
||||||
|
} else if (CompareGuid (HandlerGuid, &gEfiSmmSwDispatch2ProtocolGuid)) {
|
||||||
|
SearchContext = ConvertSmiHandlerSwContext (Context, ContextSize, &SearchContextSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,12 +25,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Protocol/SmmSxDispatch2.h>
|
#include <Protocol/SmmSxDispatch2.h>
|
||||||
#include <Protocol/SmmUsbDispatch2.h>
|
#include <Protocol/SmmUsbDispatch2.h>
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
UINT32 Length;
|
UINT32 Length;
|
||||||
UINT32 Revision;
|
UINT32 Revision;
|
||||||
|
UINT8 Reserved[4];
|
||||||
} SMM_CORE_DATABASE_COMMON_HEADER;
|
} SMM_CORE_DATABASE_COMMON_HEADER;
|
||||||
|
|
||||||
#define SMM_CORE_IMAGE_DATABASE_SIGNATURE SIGNATURE_32 ('S','C','I','D')
|
#define SMM_CORE_IMAGE_DATABASE_SIGNATURE SIGNATURE_32 ('S','C','I','D')
|
||||||
@ -39,12 +38,12 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
SMM_CORE_DATABASE_COMMON_HEADER Header;
|
SMM_CORE_DATABASE_COMMON_HEADER Header;
|
||||||
EFI_GUID FileGuid;
|
EFI_GUID FileGuid;
|
||||||
UINTN ImageRef;
|
PHYSICAL_ADDRESS EntryPoint;
|
||||||
UINTN EntryPoint;
|
PHYSICAL_ADDRESS ImageBase;
|
||||||
UINTN ImageBase;
|
UINT64 ImageSize;
|
||||||
UINTN ImageSize;
|
UINT32 ImageRef;
|
||||||
UINT16 PdbStringOffset;
|
UINT16 PdbStringOffset;
|
||||||
UINT8 Reserved2[6];
|
UINT8 Reserved[2];
|
||||||
//CHAR8 PdbString[];
|
//CHAR8 PdbString[];
|
||||||
} SMM_CORE_IMAGE_DATABASE_STRUCTURE;
|
} SMM_CORE_IMAGE_DATABASE_STRUCTURE;
|
||||||
|
|
||||||
@ -64,7 +63,7 @@ typedef enum {
|
|||||||
// NULL
|
// NULL
|
||||||
// Context for SmmCoreSmiHandlerCategoryHardwareHandler:
|
// Context for SmmCoreSmiHandlerCategoryHardwareHandler:
|
||||||
// (NOTE: The context field should NOT include any data pointer.)
|
// (NOTE: The context field should NOT include any data pointer.)
|
||||||
// gEfiSmmSwDispatch2ProtocolGuid: EFI_SMM_SW_REGISTER_CONTEXT
|
// gEfiSmmSwDispatch2ProtocolGuid: (EFI_SMM_SW_REGISTER_CONTEXT => SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT)
|
||||||
// gEfiSmmSxDispatch2ProtocolGuid: EFI_SMM_SX_REGISTER_CONTEXT
|
// gEfiSmmSxDispatch2ProtocolGuid: EFI_SMM_SX_REGISTER_CONTEXT
|
||||||
// gEfiSmmPowerButtonDispatch2ProtocolGuid: EFI_SMM_POWER_BUTTON_REGISTER_CONTEXT
|
// gEfiSmmPowerButtonDispatch2ProtocolGuid: EFI_SMM_POWER_BUTTON_REGISTER_CONTEXT
|
||||||
// gEfiSmmStandbyButtonDispatch2ProtocolGuid: EFI_SMM_STANDBY_BUTTON_REGISTER_CONTEXT
|
// gEfiSmmStandbyButtonDispatch2ProtocolGuid: EFI_SMM_STANDBY_BUTTON_REGISTER_CONTEXT
|
||||||
@ -81,21 +80,25 @@ typedef struct {
|
|||||||
} SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT;
|
} SMI_HANDLER_PROFILE_USB_REGISTER_CONTEXT;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT32 Length;
|
UINT64 SwSmiInputValue;
|
||||||
UINTN CallerAddr;
|
} SMI_HANDLER_PROFILE_SW_REGISTER_CONTEXT;
|
||||||
UINTN Handler;
|
|
||||||
UINTN ImageRef;
|
typedef struct {
|
||||||
UINT16 ContextBufferOffset;
|
UINT32 Length;
|
||||||
UINT8 Reserved2[2];
|
UINT32 ImageRef;
|
||||||
UINT32 ContextBufferSize;
|
PHYSICAL_ADDRESS CallerAddr;
|
||||||
//UINT8 ContextBuffer[];
|
PHYSICAL_ADDRESS Handler;
|
||||||
|
UINT16 ContextBufferOffset;
|
||||||
|
UINT8 Reserved[2];
|
||||||
|
UINT32 ContextBufferSize;
|
||||||
|
//UINT8 ContextBuffer[];
|
||||||
} SMM_CORE_SMI_HANDLER_STRUCTURE;
|
} SMM_CORE_SMI_HANDLER_STRUCTURE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
SMM_CORE_DATABASE_COMMON_HEADER Header;
|
SMM_CORE_DATABASE_COMMON_HEADER Header;
|
||||||
UINT32 HandlerCategory;
|
|
||||||
EFI_GUID HandlerType;
|
EFI_GUID HandlerType;
|
||||||
UINTN HandlerCount;
|
UINT32 HandlerCategory;
|
||||||
|
UINT32 HandlerCount;
|
||||||
//SMM_CORE_SMI_HANDLER_STRUCTURE Handler[HandlerCount];
|
//SMM_CORE_SMI_HANDLER_STRUCTURE Handler[HandlerCount];
|
||||||
} SMM_CORE_SMI_DATABASE_STRUCTURE;
|
} SMM_CORE_SMI_DATABASE_STRUCTURE;
|
||||||
|
|
||||||
@ -144,8 +147,6 @@ typedef struct {
|
|||||||
|
|
||||||
#define SMI_HANDLER_PROFILE_GUID {0x49174342, 0x7108, 0x409b, {0x8b, 0xbe, 0x65, 0xfd, 0xa8, 0x53, 0x89, 0xf5}}
|
#define SMI_HANDLER_PROFILE_GUID {0x49174342, 0x7108, 0x409b, {0x8b, 0xbe, 0x65, 0xfd, 0xa8, 0x53, 0x89, 0xf5}}
|
||||||
|
|
||||||
#pragma pack()
|
|
||||||
|
|
||||||
extern EFI_GUID gSmiHandlerProfileGuid;
|
extern EFI_GUID gSmiHandlerProfileGuid;
|
||||||
|
|
||||||
typedef struct _SMI_HANDLER_PROFILE_PROTOCOL SMI_HANDLER_PROFILE_PROTOCOL;
|
typedef struct _SMI_HANDLER_PROFILE_PROTOCOL SMI_HANDLER_PROFILE_PROTOCOL;
|
||||||
|
@ -1302,7 +1302,7 @@ BootMaintCallback (
|
|||||||
} else if ((QuestionId >= CON_OUT_DEVICE_QUESTION_ID) && (QuestionId < CON_OUT_DEVICE_QUESTION_ID + MAX_MENU_NUMBER)) {
|
} else if ((QuestionId >= CON_OUT_DEVICE_QUESTION_ID) && (QuestionId < CON_OUT_DEVICE_QUESTION_ID + MAX_MENU_NUMBER)) {
|
||||||
UpdateConsoleContent (L"ConOut", CurrentFakeNVMap);
|
UpdateConsoleContent (L"ConOut", CurrentFakeNVMap);
|
||||||
} else if ((QuestionId >= CON_ERR_DEVICE_QUESTION_ID) && (QuestionId < CON_ERR_DEVICE_QUESTION_ID + MAX_MENU_NUMBER)) {
|
} else if ((QuestionId >= CON_ERR_DEVICE_QUESTION_ID) && (QuestionId < CON_ERR_DEVICE_QUESTION_ID + MAX_MENU_NUMBER)) {
|
||||||
UpdateConsoleContent (L"ConErr", CurrentFakeNVMap);
|
UpdateConsoleContent (L"ErrOut", CurrentFakeNVMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1031,6 +1031,7 @@ GetConsoleInCheck (
|
|||||||
BM_MENU_ENTRY *NewMenuEntry;
|
BM_MENU_ENTRY *NewMenuEntry;
|
||||||
UINT8 *ConInCheck;
|
UINT8 *ConInCheck;
|
||||||
BM_CONSOLE_CONTEXT *NewConsoleContext;
|
BM_CONSOLE_CONTEXT *NewConsoleContext;
|
||||||
|
BM_TERMINAL_CONTEXT *NewTerminalContext;
|
||||||
|
|
||||||
ASSERT (CallbackData != NULL);
|
ASSERT (CallbackData != NULL);
|
||||||
|
|
||||||
@ -1041,6 +1042,13 @@ GetConsoleInCheck (
|
|||||||
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
||||||
ConInCheck[Index] = NewConsoleContext->IsActive;
|
ConInCheck[Index] = NewConsoleContext->IsActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
|
||||||
|
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
|
||||||
|
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
|
||||||
|
ASSERT (Index + ConsoleInpMenu.MenuNumber < MAX_MENU_NUMBER);
|
||||||
|
ConInCheck[Index + ConsoleInpMenu.MenuNumber] = NewTerminalContext->IsConIn;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1060,7 +1068,8 @@ GetConsoleOutCheck (
|
|||||||
BM_MENU_ENTRY *NewMenuEntry;
|
BM_MENU_ENTRY *NewMenuEntry;
|
||||||
UINT8 *ConOutCheck;
|
UINT8 *ConOutCheck;
|
||||||
BM_CONSOLE_CONTEXT *NewConsoleContext;
|
BM_CONSOLE_CONTEXT *NewConsoleContext;
|
||||||
|
BM_TERMINAL_CONTEXT *NewTerminalContext;
|
||||||
|
|
||||||
ASSERT (CallbackData != NULL);
|
ASSERT (CallbackData != NULL);
|
||||||
ConOutCheck = &CallbackData->BmmFakeNvData.ConsoleOutCheck[0];
|
ConOutCheck = &CallbackData->BmmFakeNvData.ConsoleOutCheck[0];
|
||||||
for (Index = 0; ((Index < ConsoleOutMenu.MenuNumber) && \
|
for (Index = 0; ((Index < ConsoleOutMenu.MenuNumber) && \
|
||||||
@ -1069,6 +1078,13 @@ GetConsoleOutCheck (
|
|||||||
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
||||||
ConOutCheck[Index] = NewConsoleContext->IsActive;
|
ConOutCheck[Index] = NewConsoleContext->IsActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
|
||||||
|
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
|
||||||
|
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
|
||||||
|
ASSERT (Index + ConsoleOutMenu.MenuNumber < MAX_MENU_NUMBER);
|
||||||
|
ConOutCheck[Index + ConsoleOutMenu.MenuNumber] = NewTerminalContext->IsConOut;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1088,6 +1104,7 @@ GetConsoleErrCheck (
|
|||||||
BM_MENU_ENTRY *NewMenuEntry;
|
BM_MENU_ENTRY *NewMenuEntry;
|
||||||
UINT8 *ConErrCheck;
|
UINT8 *ConErrCheck;
|
||||||
BM_CONSOLE_CONTEXT *NewConsoleContext;
|
BM_CONSOLE_CONTEXT *NewConsoleContext;
|
||||||
|
BM_TERMINAL_CONTEXT *NewTerminalContext;
|
||||||
|
|
||||||
ASSERT (CallbackData != NULL);
|
ASSERT (CallbackData != NULL);
|
||||||
ConErrCheck = &CallbackData->BmmFakeNvData.ConsoleErrCheck[0];
|
ConErrCheck = &CallbackData->BmmFakeNvData.ConsoleErrCheck[0];
|
||||||
@ -1097,6 +1114,13 @@ GetConsoleErrCheck (
|
|||||||
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
|
||||||
ConErrCheck[Index] = NewConsoleContext->IsActive;
|
ConErrCheck[Index] = NewConsoleContext->IsActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
|
||||||
|
NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
|
||||||
|
NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
|
||||||
|
ASSERT (Index + ConsoleErrMenu.MenuNumber < MAX_MENU_NUMBER);
|
||||||
|
ConErrCheck[Index + ConsoleErrMenu.MenuNumber] = NewTerminalContext->IsStdErr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -126,6 +126,7 @@ BrotliDecompress (
|
|||||||
BrotliState * BroState;
|
BrotliState * BroState;
|
||||||
VOID * Temp;
|
VOID * Temp;
|
||||||
|
|
||||||
|
TotalOut = 0;
|
||||||
AvailableOut = FILE_BUFFER_SIZE;
|
AvailableOut = FILE_BUFFER_SIZE;
|
||||||
Result = BROTLI_RESULT_ERROR;
|
Result = BROTLI_RESULT_ERROR;
|
||||||
BroState = BrotliCreateState(BrAlloc, BrFree, BuffInfo);
|
BroState = BrotliCreateState(BrAlloc, BrFree, BuffInfo);
|
||||||
|
@ -802,6 +802,7 @@ static BROTLI_INLINE uint32_t ReadBlockLength(const HuffmanCode* table,
|
|||||||
uint32_t code;
|
uint32_t code;
|
||||||
uint32_t nbits;
|
uint32_t nbits;
|
||||||
code = ReadSymbol(table, br);
|
code = ReadSymbol(table, br);
|
||||||
|
if (code >= BROTLI_NUM_BLOCK_LEN_SYMBOLS) code = BROTLI_NUM_BLOCK_LEN_SYMBOLS - 1;
|
||||||
nbits = kBlockLengthPrefixCode[code].nbits; /* nbits == 2..24 */
|
nbits = kBlockLengthPrefixCode[code].nbits; /* nbits == 2..24 */
|
||||||
return kBlockLengthPrefixCode[code].offset + BrotliReadBits(br, nbits);
|
return kBlockLengthPrefixCode[code].offset + BrotliReadBits(br, nbits);
|
||||||
}
|
}
|
||||||
@ -854,6 +855,7 @@ static BROTLI_NOINLINE void InverseMoveToFrontTransform(
|
|||||||
uint32_t i = 4;
|
uint32_t i = 4;
|
||||||
uint32_t upper_bound = state->mtf_upper_bound;
|
uint32_t upper_bound = state->mtf_upper_bound;
|
||||||
uint8_t* mtf = &state->mtf[4]; /* Make mtf[-1] addressable. */
|
uint8_t* mtf = &state->mtf[4]; /* Make mtf[-1] addressable. */
|
||||||
|
uint8_t* mtft = &state->mtf[3];
|
||||||
/* Load endian-aware constant. */
|
/* Load endian-aware constant. */
|
||||||
const uint8_t b0123[4] = {0, 1, 2, 3};
|
const uint8_t b0123[4] = {0, 1, 2, 3};
|
||||||
uint32_t pattern;
|
uint32_t pattern;
|
||||||
@ -872,13 +874,13 @@ static BROTLI_NOINLINE void InverseMoveToFrontTransform(
|
|||||||
for (i = 0; i < v_len; ++i) {
|
for (i = 0; i < v_len; ++i) {
|
||||||
int index = v[i];
|
int index = v[i];
|
||||||
uint8_t value = mtf[index];
|
uint8_t value = mtf[index];
|
||||||
upper_bound |= v[i];
|
upper_bound |= (uint32_t)v[i];
|
||||||
v[i] = value;
|
v[i] = value;
|
||||||
mtf[-1] = value;
|
mtft[0] = value;
|
||||||
do {
|
while (index >= 0) {
|
||||||
|
mtft[index + 1] = mtft[index];
|
||||||
index--;
|
index--;
|
||||||
mtf[index + 1] = mtf[index];
|
}
|
||||||
} while (index >= 0);
|
|
||||||
}
|
}
|
||||||
/* Remember amount of elements to be reinitialized. */
|
/* Remember amount of elements to be reinitialized. */
|
||||||
state->mtf_upper_bound = upper_bound;
|
state->mtf_upper_bound = upper_bound;
|
||||||
@ -1498,6 +1500,7 @@ static BROTLI_INLINE BROTLI_BOOL ReadCommandInternal(
|
|||||||
return BROTLI_FALSE;
|
return BROTLI_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (cmd_code >= BROTLI_NUM_COMMAND_SYMBOLS) cmd_code = BROTLI_NUM_COMMAND_SYMBOLS - 1;
|
||||||
v = kCmdLut[cmd_code];
|
v = kCmdLut[cmd_code];
|
||||||
s->distance_code = v.distance_code;
|
s->distance_code = v.distance_code;
|
||||||
s->distance_context = v.context;
|
s->distance_context = v.context;
|
||||||
@ -2209,7 +2212,9 @@ BrotliDecoderResult BrotliDecoderDecompressStream(
|
|||||||
}
|
}
|
||||||
s->max_distance = s->max_backward_distance;
|
s->max_distance = s->max_backward_distance;
|
||||||
if (s->state == BROTLI_STATE_COMMAND_POST_WRITE_1) {
|
if (s->state == BROTLI_STATE_COMMAND_POST_WRITE_1) {
|
||||||
memcpy(s->ringbuffer, s->ringbuffer_end, (size_t)s->pos);
|
if (s->ringbuffer != 0) {
|
||||||
|
memcpy(s->ringbuffer, s->ringbuffer_end, (size_t)s->pos);
|
||||||
|
}
|
||||||
if (s->meta_block_remaining_len == 0) {
|
if (s->meta_block_remaining_len == 0) {
|
||||||
/* Next metablock, if any */
|
/* Next metablock, if any */
|
||||||
s->state = BROTLI_STATE_METABLOCK_DONE;
|
s->state = BROTLI_STATE_METABLOCK_DONE;
|
||||||
|
@ -540,12 +540,15 @@ CreateDeviceManagerForm(
|
|||||||
// Update the network device form titile.
|
// Update the network device form titile.
|
||||||
//
|
//
|
||||||
if (NextShowFormId == NETWORK_DEVICE_FORM_ID) {
|
if (NextShowFormId == NETWORK_DEVICE_FORM_ID) {
|
||||||
String = HiiGetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NULL);
|
String = HiiGetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE_HEAD), NULL);
|
||||||
NewStringLen = StrLen(mSelectedMacAddrString) * 2;
|
if (String == NULL) {
|
||||||
NewStringLen += (StrLen(String) + 2) * 2;
|
return;
|
||||||
|
}
|
||||||
|
NewStringLen = StrLen (mSelectedMacAddrString) * 2;
|
||||||
|
NewStringLen += (StrLen (String) + 2) * 2;
|
||||||
NewStringTitle = AllocatePool (NewStringLen);
|
NewStringTitle = AllocatePool (NewStringLen);
|
||||||
UnicodeSPrint (NewStringTitle, NewStringLen, L"%s %s", String, mSelectedMacAddrString);
|
UnicodeSPrint (NewStringTitle, NewStringLen, L"%s %s", String, mSelectedMacAddrString);
|
||||||
HiiSetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NewStringTitle, NULL);
|
HiiSetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NewStringTitle, NULL);
|
||||||
FreePool (String);
|
FreePool (String);
|
||||||
FreePool (NewStringTitle);
|
FreePool (NewStringTitle);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// String definitions for the Device Manager.
|
// String definitions for the Device Manager.
|
||||||
//
|
//
|
||||||
// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// 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
|
||||||
@ -42,7 +42,8 @@
|
|||||||
#language fr-FR ""
|
#language fr-FR ""
|
||||||
#string STR_EXIT_STRING #language en-US "Press ESC to exit."
|
#string STR_EXIT_STRING #language en-US "Press ESC to exit."
|
||||||
#language fr-FR "Press ESC to exit."
|
#language fr-FR "Press ESC to exit."
|
||||||
#string STR_FORM_NETWORK_DEVICE_TITLE #language en-US "Network Device"
|
#string STR_FORM_NETWORK_DEVICE_TITLE_HEAD #language en-US "Network Device"
|
||||||
|
#string STR_FORM_NETWORK_DEVICE_TITLE #language en-US "Network Device"
|
||||||
#language fr-FR "Network Device"
|
#language fr-FR "Network Device"
|
||||||
#string STR_FORM_NETWORK_DEVICE_HELP #language en-US "Network Device Help..."
|
#string STR_FORM_NETWORK_DEVICE_HELP #language en-US "Network Device Help..."
|
||||||
#language fr-FR "Network Device Help..."
|
#language fr-FR "Network Device Help..."
|
||||||
|
@ -1028,6 +1028,12 @@ IpIoListenHandlerDpc (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (IpIo->IpVersion == IP_VERSION_4) {
|
if (IpIo->IpVersion == IP_VERSION_4) {
|
||||||
|
if (IP4_IS_LOCAL_BROADCAST (EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress))) {
|
||||||
|
//
|
||||||
|
// The source address is a broadcast address, discard it.
|
||||||
|
//
|
||||||
|
goto CleanUp;
|
||||||
|
}
|
||||||
if ((EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress) != 0) &&
|
if ((EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress) != 0) &&
|
||||||
(IpIo->SubnetMask != 0) &&
|
(IpIo->SubnetMask != 0) &&
|
||||||
IP4_NET_EQUAL (IpIo->StationIp, EFI_NTOHL (((EFI_IP4_RECEIVE_DATA *) RxData)->Header->SourceAddress), IpIo->SubnetMask) &&
|
IP4_NET_EQUAL (IpIo->StationIp, EFI_NTOHL (((EFI_IP4_RECEIVE_DATA *) RxData)->Header->SourceAddress), IpIo->SubnetMask) &&
|
||||||
|
@ -1546,26 +1546,35 @@ BmGetNextLoadOptionDevicePath (
|
|||||||
//
|
//
|
||||||
return BmExpandUriDevicePath (FilePath, FullPath);
|
return BmExpandUriDevicePath (FilePath, FullPath);
|
||||||
} else {
|
} else {
|
||||||
for (Node = FilePath; !IsDevicePathEnd (Node); Node = NextDevicePathNode (Node)) {
|
Node = FilePath;
|
||||||
if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) &&
|
Status = gBS->LocateDevicePath (&gEfiUsbIoProtocolGuid, &Node, &Handle);
|
||||||
((DevicePathSubType (Node) == MSG_USB_CLASS_DP) || (DevicePathSubType (Node) == MSG_USB_WWID_DP))) {
|
if (EFI_ERROR (Status)) {
|
||||||
break;
|
//
|
||||||
|
// Only expand the USB WWID/Class device path
|
||||||
|
// when FilePath doesn't point to a physical UsbIo controller.
|
||||||
|
// Otherwise, infinite recursion will happen.
|
||||||
|
//
|
||||||
|
for (Node = FilePath; !IsDevicePathEnd (Node); Node = NextDevicePathNode (Node)) {
|
||||||
|
if ((DevicePathType (Node) == MESSAGING_DEVICE_PATH) &&
|
||||||
|
((DevicePathSubType (Node) == MSG_USB_CLASS_DP) || (DevicePathSubType (Node) == MSG_USB_WWID_DP))) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Expand the USB WWID/Class device path
|
// Expand the USB WWID/Class device path
|
||||||
//
|
//
|
||||||
if (!IsDevicePathEnd (Node)) {
|
if (!IsDevicePathEnd (Node)) {
|
||||||
if (FilePath == Node) {
|
if (FilePath == Node) {
|
||||||
//
|
//
|
||||||
// Boot Option device path starts with USB Class or USB WWID device path.
|
// Boot Option device path starts with USB Class or USB WWID device path.
|
||||||
// For Boot Option device path which doesn't begin with the USB Class or
|
// For Boot Option device path which doesn't begin with the USB Class or
|
||||||
// USB WWID device path, it's not needed to connect again here.
|
// USB WWID device path, it's not needed to connect again here.
|
||||||
//
|
//
|
||||||
BmConnectUsbShortFormDevicePath (FilePath);
|
BmConnectUsbShortFormDevicePath (FilePath);
|
||||||
|
}
|
||||||
|
return BmExpandUsbDevicePath (FilePath, FullPath, Node);
|
||||||
}
|
}
|
||||||
return BmExpandUsbDevicePath (FilePath, FullPath, Node);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,13 +382,13 @@ BmGetNetworkDescription (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// The PXE device path is like:
|
// The PXE device path is like:
|
||||||
// ....../Mac(...)[/Vlan(...)]
|
// ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]
|
||||||
// ....../Mac(...)[/Vlan(...)]/IPv4(...)
|
// ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)
|
||||||
// ....../Mac(...)[/Vlan(...)]/IPv6(...)
|
// ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)
|
||||||
//
|
//
|
||||||
// The HTTP device path is like:
|
// The HTTP device path is like:
|
||||||
// ....../Mac(...)[/Vlan(...)]/IPv4(...)/Uri(...)
|
// ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)/Uri(...)
|
||||||
// ....../Mac(...)[/Vlan(...)]/IPv6(...)/Uri(...)
|
// ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)/Uri(...)
|
||||||
//
|
//
|
||||||
while (!IsDevicePathEnd (DevicePath) &&
|
while (!IsDevicePathEnd (DevicePath) &&
|
||||||
((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) ||
|
((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) ||
|
||||||
@ -404,6 +404,9 @@ BmGetNetworkDescription (
|
|||||||
Mac = (MAC_ADDR_DEVICE_PATH *) DevicePath;
|
Mac = (MAC_ADDR_DEVICE_PATH *) DevicePath;
|
||||||
DevicePath = NextDevicePathNode (DevicePath);
|
DevicePath = NextDevicePathNode (DevicePath);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Locate the optional Vlan node
|
||||||
|
//
|
||||||
if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&
|
if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&
|
||||||
(DevicePathSubType (DevicePath) == MSG_VLAN_DP)
|
(DevicePathSubType (DevicePath) == MSG_VLAN_DP)
|
||||||
) {
|
) {
|
||||||
@ -413,6 +416,18 @@ BmGetNetworkDescription (
|
|||||||
Vlan = NULL;
|
Vlan = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Skip the optional Wi-Fi node
|
||||||
|
//
|
||||||
|
if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&
|
||||||
|
(DevicePathSubType (DevicePath) == MSG_WIFI_DP)
|
||||||
|
) {
|
||||||
|
DevicePath = NextDevicePathNode (DevicePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Locate the IP node
|
||||||
|
//
|
||||||
if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&
|
if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&
|
||||||
((DevicePathSubType (DevicePath) == MSG_IPv4_DP) ||
|
((DevicePathSubType (DevicePath) == MSG_IPv4_DP) ||
|
||||||
(DevicePathSubType (DevicePath) == MSG_IPv6_DP))
|
(DevicePathSubType (DevicePath) == MSG_IPv6_DP))
|
||||||
@ -423,6 +438,9 @@ BmGetNetworkDescription (
|
|||||||
Ip = NULL;
|
Ip = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Locate the URI node
|
||||||
|
//
|
||||||
if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&
|
if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&
|
||||||
(DevicePathSubType (DevicePath) == MSG_URI_DP)
|
(DevicePathSubType (DevicePath) == MSG_URI_DP)
|
||||||
) {
|
) {
|
||||||
|
@ -42,7 +42,7 @@ VOID *mBmTxtInExRegistration = NULL;
|
|||||||
**/
|
**/
|
||||||
UINTN
|
UINTN
|
||||||
BmSizeOfKeyOption (
|
BmSizeOfKeyOption (
|
||||||
EFI_BOOT_MANAGER_KEY_OPTION *KeyOption
|
IN CONST EFI_BOOT_MANAGER_KEY_OPTION *KeyOption
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return OFFSET_OF (EFI_BOOT_MANAGER_KEY_OPTION, Keys)
|
return OFFSET_OF (EFI_BOOT_MANAGER_KEY_OPTION, Keys)
|
||||||
@ -61,8 +61,8 @@ BmSizeOfKeyOption (
|
|||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
BmIsKeyOptionValid (
|
BmIsKeyOptionValid (
|
||||||
IN EFI_BOOT_MANAGER_KEY_OPTION *KeyOption,
|
IN CONST EFI_BOOT_MANAGER_KEY_OPTION *KeyOption,
|
||||||
IN UINTN KeyOptionSize
|
IN UINTN KeyOptionSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT16 OptionName[BM_OPTION_NAME_LEN];
|
UINT16 OptionName[BM_OPTION_NAME_LEN];
|
||||||
@ -158,16 +158,15 @@ BmCollectKeyOptions (
|
|||||||
{
|
{
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
BM_COLLECT_KEY_OPTIONS_PARAM *Param;
|
BM_COLLECT_KEY_OPTIONS_PARAM *Param;
|
||||||
EFI_BOOT_MANAGER_KEY_OPTION *KeyOption;
|
VOID *KeyOption;
|
||||||
UINT16 OptionNumber;
|
UINT16 OptionNumber;
|
||||||
UINTN KeyOptionSize;
|
UINTN KeyOptionSize;
|
||||||
|
|
||||||
Param = (BM_COLLECT_KEY_OPTIONS_PARAM *) Context;
|
Param = (BM_COLLECT_KEY_OPTIONS_PARAM *) Context;
|
||||||
|
|
||||||
if (BmIsKeyOptionVariable (Name, Guid, &OptionNumber)) {
|
if (BmIsKeyOptionVariable (Name, Guid, &OptionNumber)) {
|
||||||
GetEfiGlobalVariable2 (Name, (VOID**) &KeyOption, &KeyOptionSize);
|
GetEfiGlobalVariable2 (Name, &KeyOption, &KeyOptionSize);
|
||||||
ASSERT (KeyOption != NULL);
|
ASSERT (KeyOption != NULL);
|
||||||
KeyOption->OptionNumber = OptionNumber;
|
|
||||||
if (BmIsKeyOptionValid (KeyOption, KeyOptionSize)) {
|
if (BmIsKeyOptionValid (KeyOption, KeyOptionSize)) {
|
||||||
Param->KeyOptions = ReallocatePool (
|
Param->KeyOptions = ReallocatePool (
|
||||||
Param->KeyOptionCount * sizeof (EFI_BOOT_MANAGER_KEY_OPTION),
|
Param->KeyOptionCount * sizeof (EFI_BOOT_MANAGER_KEY_OPTION),
|
||||||
@ -179,12 +178,13 @@ BmCollectKeyOptions (
|
|||||||
// Insert the key option in order
|
// Insert the key option in order
|
||||||
//
|
//
|
||||||
for (Index = 0; Index < Param->KeyOptionCount; Index++) {
|
for (Index = 0; Index < Param->KeyOptionCount; Index++) {
|
||||||
if (KeyOption->OptionNumber < Param->KeyOptions[Index].OptionNumber) {
|
if (OptionNumber < Param->KeyOptions[Index].OptionNumber) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CopyMem (&Param->KeyOptions[Index + 1], &Param->KeyOptions[Index], (Param->KeyOptionCount - Index) * sizeof (EFI_BOOT_MANAGER_KEY_OPTION));
|
CopyMem (&Param->KeyOptions[Index + 1], &Param->KeyOptions[Index], (Param->KeyOptionCount - Index) * sizeof (EFI_BOOT_MANAGER_KEY_OPTION));
|
||||||
CopyMem (&Param->KeyOptions[Index], KeyOption, BmSizeOfKeyOption (KeyOption));
|
CopyMem (&Param->KeyOptions[Index], KeyOption, KeyOptionSize);
|
||||||
|
Param->KeyOptions[Index].OptionNumber = OptionNumber;
|
||||||
Param->KeyOptionCount++;
|
Param->KeyOptionCount++;
|
||||||
}
|
}
|
||||||
FreePool (KeyOption);
|
FreePool (KeyOption);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Logo DXE Driver, install Edkii Platform Logo protocol.
|
Logo DXE Driver, install Edkii Platform Logo protocol.
|
||||||
|
|
||||||
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -133,7 +133,10 @@ InitializeLogo (
|
|||||||
NULL,
|
NULL,
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "HII Image Package with logo not found in PE/COFF resource section\n"));
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Publish HII package list to HII Database.
|
// Publish HII package list to HII Database.
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
PACKAGE_NAME = MdeModulePkg
|
PACKAGE_NAME = MdeModulePkg
|
||||||
PACKAGE_UNI_FILE = MdeModulePkg.uni
|
PACKAGE_UNI_FILE = MdeModulePkg.uni
|
||||||
PACKAGE_GUID = BA0D78D6-2CAF-414b-BD4D-B6762A894288
|
PACKAGE_GUID = BA0D78D6-2CAF-414b-BD4D-B6762A894288
|
||||||
PACKAGE_VERSION = 0.96
|
PACKAGE_VERSION = 0.97
|
||||||
|
|
||||||
[Includes]
|
[Includes]
|
||||||
Include
|
Include
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# EFI/PI Reference Module Package for All Architectures
|
# EFI/PI Reference Module Package for All Architectures
|
||||||
#
|
#
|
||||||
# (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
# (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||||
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -17,7 +17,7 @@
|
|||||||
[Defines]
|
[Defines]
|
||||||
PLATFORM_NAME = MdeModule
|
PLATFORM_NAME = MdeModule
|
||||||
PLATFORM_GUID = 587CE499-6CBE-43cd-94E2-186218569478
|
PLATFORM_GUID = 587CE499-6CBE-43cd-94E2-186218569478
|
||||||
PLATFORM_VERSION = 0.96
|
PLATFORM_VERSION = 0.97
|
||||||
DSC_SPECIFICATION = 0x00010005
|
DSC_SPECIFICATION = 0x00010005
|
||||||
OUTPUT_DIRECTORY = Build/MdeModule
|
OUTPUT_DIRECTORY = Build/MdeModule
|
||||||
SUPPORTED_ARCHITECTURES = IA32|IPF|X64|EBC|ARM|AARCH64
|
SUPPORTED_ARCHITECTURES = IA32|IPF|X64|EBC|ARM|AARCH64
|
||||||
|
@ -103,7 +103,7 @@ S3BootScriptExecutorEntryFunction (
|
|||||||
//
|
//
|
||||||
// X64 S3 Resume
|
// X64 S3 Resume
|
||||||
//
|
//
|
||||||
DEBUG ((EFI_D_ERROR, "Call AsmDisablePaging64() to return to S3 Resume in PEI Phase\n"));
|
DEBUG ((DEBUG_INFO, "Call AsmDisablePaging64() to return to S3 Resume in PEI Phase\n"));
|
||||||
PeiS3ResumeState->AsmTransferControl = (EFI_PHYSICAL_ADDRESS)(UINTN)AsmTransferControl32;
|
PeiS3ResumeState->AsmTransferControl = (EFI_PHYSICAL_ADDRESS)(UINTN)AsmTransferControl32;
|
||||||
|
|
||||||
if ((Facs != NULL) &&
|
if ((Facs != NULL) &&
|
||||||
@ -128,7 +128,7 @@ S3BootScriptExecutorEntryFunction (
|
|||||||
//
|
//
|
||||||
// IA32 S3 Resume
|
// IA32 S3 Resume
|
||||||
//
|
//
|
||||||
DEBUG ((EFI_D_ERROR, "Call SwitchStack() to return to S3 Resume in PEI Phase\n"));
|
DEBUG ((DEBUG_INFO, "Call SwitchStack() to return to S3 Resume in PEI Phase\n"));
|
||||||
PeiS3ResumeState->AsmTransferControl = (EFI_PHYSICAL_ADDRESS)(UINTN)AsmTransferControl;
|
PeiS3ResumeState->AsmTransferControl = (EFI_PHYSICAL_ADDRESS)(UINTN)AsmTransferControl;
|
||||||
|
|
||||||
SwitchStack (
|
SwitchStack (
|
||||||
@ -160,7 +160,7 @@ S3BootScriptExecutorEntryFunction (
|
|||||||
//
|
//
|
||||||
// X64 long mode waking vector
|
// X64 long mode waking vector
|
||||||
//
|
//
|
||||||
DEBUG (( EFI_D_ERROR, "Transfer to 64bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
|
DEBUG ((DEBUG_INFO, "Transfer to 64bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
|
||||||
if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
|
if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
|
||||||
SwitchStack (
|
SwitchStack (
|
||||||
(SWITCH_STACK_ENTRY_POINT)(UINTN)Facs->XFirmwareWakingVector,
|
(SWITCH_STACK_ENTRY_POINT)(UINTN)Facs->XFirmwareWakingVector,
|
||||||
@ -177,7 +177,7 @@ S3BootScriptExecutorEntryFunction (
|
|||||||
//
|
//
|
||||||
// IA32 protected mode waking vector (Page disabled)
|
// IA32 protected mode waking vector (Page disabled)
|
||||||
//
|
//
|
||||||
DEBUG (( EFI_D_ERROR, "Transfer to 32bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
|
DEBUG ((DEBUG_INFO, "Transfer to 32bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
|
||||||
if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
|
if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
|
||||||
AsmDisablePaging64 (
|
AsmDisablePaging64 (
|
||||||
0x10,
|
0x10,
|
||||||
@ -199,7 +199,7 @@ S3BootScriptExecutorEntryFunction (
|
|||||||
//
|
//
|
||||||
// 16bit Realmode waking vector
|
// 16bit Realmode waking vector
|
||||||
//
|
//
|
||||||
DEBUG (( EFI_D_ERROR, "Transfer to 16bit OS waking vector - %x\r\n", (UINTN)Facs->FirmwareWakingVector));
|
DEBUG ((DEBUG_INFO, "Transfer to 16bit OS waking vector - %x\r\n", (UINTN)Facs->FirmwareWakingVector));
|
||||||
AsmTransferControl (Facs->FirmwareWakingVector, 0x0);
|
AsmTransferControl (Facs->FirmwareWakingVector, 0x0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform
|
Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform
|
||||||
|
|
||||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||||
|
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ PageFaultHandler (
|
|||||||
UINTN PTIndex;
|
UINTN PTIndex;
|
||||||
|
|
||||||
PFAddress = AsmReadCr2 ();
|
PFAddress = AsmReadCr2 ();
|
||||||
DEBUG ((EFI_D_ERROR, "BootScript - PageFaultHandler: Cr2 - %lx\n", PFAddress));
|
DEBUG ((DEBUG_INFO, "BootScript - PageFaultHandler: Cr2 - %lx\n", PFAddress));
|
||||||
|
|
||||||
if (PFAddress >= mPhyMask + SIZE_4KB) {
|
if (PFAddress >= mPhyMask + SIZE_4KB) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
for Firmware Basic Boot Performance Record and other boot performance records,
|
for Firmware Basic Boot Performance Record and other boot performance records,
|
||||||
and install FPDT to ACPI table.
|
and install FPDT to ACPI table.
|
||||||
|
|
||||||
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -876,7 +876,7 @@ FirmwarePerformanceDxeEntryPoint (
|
|||||||
//
|
//
|
||||||
// SEC Performance Data Hob not found, ResetEnd in ACPI FPDT table will be 0.
|
// SEC Performance Data Hob not found, ResetEnd in ACPI FPDT table will be 0.
|
||||||
//
|
//
|
||||||
DEBUG ((EFI_D_ERROR, "FPDT: WARNING: SEC Performance Data Hob not found, ResetEnd will be set to 0!\n"));
|
DEBUG ((DEBUG_WARN, "FPDT: WARNING: SEC Performance Data Hob not found, ResetEnd will be set to 0!\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FeaturePcdGet (PcdFirmwarePerformanceDataTableS3Support)) {
|
if (FeaturePcdGet (PcdFirmwarePerformanceDataTableS3Support)) {
|
||||||
|
@ -407,7 +407,7 @@ S3AllocatePageTablesBuffer (
|
|||||||
}
|
}
|
||||||
|
|
||||||
TotalPageTableSize += ExtraPageTablePages;
|
TotalPageTableSize += ExtraPageTablePages;
|
||||||
DEBUG ((EFI_D_ERROR, "AcpiS3ContextSave TotalPageTableSize - 0x%x pages\n", TotalPageTableSize));
|
DEBUG ((DEBUG_INFO, "AcpiS3ContextSave TotalPageTableSize - 0x%x pages\n", TotalPageTableSize));
|
||||||
|
|
||||||
//
|
//
|
||||||
// By architecture only one PageMapLevel4 exists - so lets allocate storage for it.
|
// By architecture only one PageMapLevel4 exists - so lets allocate storage for it.
|
||||||
|
@ -763,7 +763,7 @@ GetCapsuleDescriptors (
|
|||||||
(VOID *) &CapsuleDataPtr64
|
(VOID *) &CapsuleDataPtr64
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Capsule -- capsule variable not set\n"));
|
DEBUG ((DEBUG_INFO, "Capsule -- capsule variable not set\n"));
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Create the variable to save the base address of page table and stack
|
Create the variable to save the base address of page table and stack
|
||||||
for transferring into long mode in IA32 capsule PEI.
|
for transferring into long mode in IA32 capsule PEI.
|
||||||
|
|
||||||
Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -160,7 +160,7 @@ PrepareContextForCapsulePei (
|
|||||||
TotalPagesNum = NumberOfPml4EntriesNeeded + 1;
|
TotalPagesNum = NumberOfPml4EntriesNeeded + 1;
|
||||||
}
|
}
|
||||||
TotalPagesNum += ExtraPageTablePages;
|
TotalPagesNum += ExtraPageTablePages;
|
||||||
DEBUG ((EFI_D_ERROR, "CapsuleRuntimeDxe X64 TotalPagesNum - 0x%x pages\n", TotalPagesNum));
|
DEBUG ((DEBUG_INFO, "CapsuleRuntimeDxe X64 TotalPagesNum - 0x%x pages\n", TotalPagesNum));
|
||||||
|
|
||||||
LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));
|
LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));
|
||||||
ASSERT (LongModeBuffer.PageTableAddress != 0);
|
ASSERT (LongModeBuffer.PageTableAddress != 0);
|
||||||
|
@ -993,6 +993,49 @@ TerminalDriverBindingStop (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Compare a device path data structure to that of all the nodes of a
|
||||||
|
second device path instance.
|
||||||
|
|
||||||
|
@param Multi A pointer to a multi-instance device path data structure.
|
||||||
|
@param Single A pointer to a single-instance device path data structure.
|
||||||
|
|
||||||
|
@retval TRUE If the Single is contained within Multi.
|
||||||
|
@retval FALSE The Single is not match within Multi.
|
||||||
|
|
||||||
|
**/
|
||||||
|
BOOLEAN
|
||||||
|
MatchDevicePaths (
|
||||||
|
IN EFI_DEVICE_PATH_PROTOCOL *Multi,
|
||||||
|
IN EFI_DEVICE_PATH_PROTOCOL *Single
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||||
|
EFI_DEVICE_PATH_PROTOCOL *DevicePathInst;
|
||||||
|
UINTN Size;
|
||||||
|
|
||||||
|
DevicePath = Multi;
|
||||||
|
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
|
||||||
|
//
|
||||||
|
// Search for the match of 'Single' in 'Multi'
|
||||||
|
//
|
||||||
|
while (DevicePathInst != NULL) {
|
||||||
|
//
|
||||||
|
// If the single device path is found in multiple device paths,
|
||||||
|
// return success
|
||||||
|
//
|
||||||
|
if (CompareMem (Single, DevicePathInst, Size) == 0) {
|
||||||
|
FreePool (DevicePathInst);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
FreePool (DevicePathInst);
|
||||||
|
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Update terminal device path in Console Device Environment Variables.
|
Update terminal device path in Console Device Environment Variables.
|
||||||
|
|
||||||
@ -1018,8 +1061,12 @@ TerminalUpdateConsoleDevVariable (
|
|||||||
//
|
//
|
||||||
// Get global variable and its size according to the name given.
|
// Get global variable and its size according to the name given.
|
||||||
//
|
//
|
||||||
GetEfiGlobalVariable2 (VariableName, (VOID**)&Variable, NULL);
|
Status = GetEfiGlobalVariable2 (VariableName, (VOID**)&Variable, NULL);
|
||||||
if (Variable == NULL) {
|
if (Status == EFI_NOT_FOUND) {
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
|
Variable = NULL;
|
||||||
|
}
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1028,17 +1075,21 @@ TerminalUpdateConsoleDevVariable (
|
|||||||
//
|
//
|
||||||
for (TerminalType = 0; TerminalType < ARRAY_SIZE (mTerminalType); TerminalType++) {
|
for (TerminalType = 0; TerminalType < ARRAY_SIZE (mTerminalType); TerminalType++) {
|
||||||
SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath);
|
SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath);
|
||||||
NewVariable = AppendDevicePathInstance (Variable, TempDevicePath);
|
|
||||||
ASSERT (NewVariable != NULL);
|
|
||||||
if (Variable != NULL) {
|
|
||||||
FreePool (Variable);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TempDevicePath != NULL) {
|
if (TempDevicePath != NULL) {
|
||||||
|
if (!MatchDevicePaths (Variable, TempDevicePath)) {
|
||||||
|
NewVariable = AppendDevicePathInstance (Variable, TempDevicePath);
|
||||||
|
if (NewVariable != NULL) {
|
||||||
|
if (Variable != NULL) {
|
||||||
|
FreePool (Variable);
|
||||||
|
}
|
||||||
|
Variable = NewVariable;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FreePool (TempDevicePath);
|
FreePool (TempDevicePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variable = NewVariable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VariableSize = GetDevicePathSize (Variable);
|
VariableSize = GetDevicePathSize (Variable);
|
||||||
|
@ -877,7 +877,7 @@ UpdateSkipInfoForMenu (
|
|||||||
CHAR16 *OutputString;
|
CHAR16 *OutputString;
|
||||||
UINT16 GlyphWidth;
|
UINT16 GlyphWidth;
|
||||||
|
|
||||||
Width = (UINT16) gOptionBlockWidth;
|
Width = (UINT16) gOptionBlockWidth - 1;
|
||||||
GlyphWidth = 1;
|
GlyphWidth = 1;
|
||||||
Row = 1;
|
Row = 1;
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ GetImageIdOrAddress (
|
|||||||
case EFI_HII_IIBT_IMAGE_8BIT_TRANS:
|
case EFI_HII_IIBT_IMAGE_8BIT_TRANS:
|
||||||
Length = sizeof (EFI_HII_IIBT_IMAGE_8BIT_BLOCK) - sizeof (UINT8) +
|
Length = sizeof (EFI_HII_IIBT_IMAGE_8BIT_BLOCK) - sizeof (UINT8) +
|
||||||
BITMAP_LEN_8_BIT (
|
BITMAP_LEN_8_BIT (
|
||||||
ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),
|
(UINT32) ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),
|
||||||
ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)
|
ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)
|
||||||
);
|
);
|
||||||
ImageIdCurrent++;
|
ImageIdCurrent++;
|
||||||
@ -115,7 +115,7 @@ GetImageIdOrAddress (
|
|||||||
case EFI_HII_IIBT_IMAGE_24BIT_TRANS:
|
case EFI_HII_IIBT_IMAGE_24BIT_TRANS:
|
||||||
Length = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +
|
Length = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +
|
||||||
BITMAP_LEN_24_BIT (
|
BITMAP_LEN_24_BIT (
|
||||||
ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),
|
(UINT32) ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),
|
||||||
ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)
|
ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)
|
||||||
);
|
);
|
||||||
ImageIdCurrent++;
|
ImageIdCurrent++;
|
||||||
@ -453,7 +453,7 @@ Output8bitPixel (
|
|||||||
// Convert the pixel from 8 bits to corresponding color.
|
// Convert the pixel from 8 bits to corresponding color.
|
||||||
//
|
//
|
||||||
for (Ypos = 0; Ypos < Image->Height; Ypos++) {
|
for (Ypos = 0; Ypos < Image->Height; Ypos++) {
|
||||||
OffsetY = BITMAP_LEN_8_BIT (Image->Width, Ypos);
|
OffsetY = BITMAP_LEN_8_BIT ((UINT32) Image->Width, Ypos);
|
||||||
//
|
//
|
||||||
// All bits are meaningful since the bitmap is 8 bits per pixel.
|
// All bits are meaningful since the bitmap is 8 bits per pixel.
|
||||||
//
|
//
|
||||||
@ -493,7 +493,7 @@ Output24bitPixel (
|
|||||||
BitMapPtr = Image->Bitmap;
|
BitMapPtr = Image->Bitmap;
|
||||||
|
|
||||||
for (Ypos = 0; Ypos < Image->Height; Ypos++) {
|
for (Ypos = 0; Ypos < Image->Height; Ypos++) {
|
||||||
OffsetY = BITMAP_LEN_8_BIT (Image->Width, Ypos);
|
OffsetY = BITMAP_LEN_8_BIT ((UINT32) Image->Width, Ypos);
|
||||||
CopyRgbToGopPixel (&BitMapPtr[OffsetY], &Data[OffsetY], Image->Width);
|
CopyRgbToGopPixel (&BitMapPtr[OffsetY], &Data[OffsetY], Image->Width);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -650,7 +650,7 @@ HiiNewImage (
|
|||||||
}
|
}
|
||||||
|
|
||||||
NewBlockSize = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +
|
NewBlockSize = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +
|
||||||
BITMAP_LEN_24_BIT (Image->Width, Image->Height);
|
BITMAP_LEN_24_BIT ((UINT32) Image->Width, Image->Height);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the image package in the package list,
|
// Get the image package in the package list,
|
||||||
@ -753,7 +753,7 @@ HiiNewImage (
|
|||||||
}
|
}
|
||||||
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) ImageBlocks)->Bitmap.Width, Image->Width);
|
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) ImageBlocks)->Bitmap.Width, Image->Width);
|
||||||
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) ImageBlocks)->Bitmap.Height, Image->Height);
|
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) ImageBlocks)->Bitmap.Height, Image->Height);
|
||||||
CopyGopToRgbPixel (((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) ImageBlocks)->Bitmap.Bitmap, Image->Bitmap, Image->Width * Image->Height);
|
CopyGopToRgbPixel (((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) ImageBlocks)->Bitmap.Bitmap, Image->Bitmap, (UINT32) Image->Width * Image->Height);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Append the block end
|
// Append the block end
|
||||||
@ -896,7 +896,7 @@ IGetImage (
|
|||||||
//
|
//
|
||||||
CopyMem (&Iibt1bit, CurrentImageBlock, sizeof (EFI_HII_IIBT_IMAGE_1BIT_BLOCK));
|
CopyMem (&Iibt1bit, CurrentImageBlock, sizeof (EFI_HII_IIBT_IMAGE_1BIT_BLOCK));
|
||||||
ImageLength = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) *
|
ImageLength = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) *
|
||||||
(Iibt1bit.Bitmap.Width * Iibt1bit.Bitmap.Height);
|
((UINT32) Iibt1bit.Bitmap.Width * Iibt1bit.Bitmap.Height);
|
||||||
Image->Bitmap = AllocateZeroPool (ImageLength);
|
Image->Bitmap = AllocateZeroPool (ImageLength);
|
||||||
if (Image->Bitmap == NULL) {
|
if (Image->Bitmap == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
@ -947,7 +947,7 @@ IGetImage (
|
|||||||
case EFI_HII_IIBT_IMAGE_24BIT:
|
case EFI_HII_IIBT_IMAGE_24BIT:
|
||||||
Width = ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width);
|
Width = ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width);
|
||||||
Height = ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height);
|
Height = ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height);
|
||||||
ImageLength = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * (Width * Height);
|
ImageLength = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * ((UINT32) Width * Height);
|
||||||
Image->Bitmap = AllocateZeroPool (ImageLength);
|
Image->Bitmap = AllocateZeroPool (ImageLength);
|
||||||
if (Image->Bitmap == NULL) {
|
if (Image->Bitmap == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
@ -1095,7 +1095,7 @@ HiiSetImage (
|
|||||||
case EFI_HII_IIBT_IMAGE_8BIT_TRANS:
|
case EFI_HII_IIBT_IMAGE_8BIT_TRANS:
|
||||||
OldBlockSize = sizeof (EFI_HII_IIBT_IMAGE_8BIT_BLOCK) - sizeof (UINT8) +
|
OldBlockSize = sizeof (EFI_HII_IIBT_IMAGE_8BIT_BLOCK) - sizeof (UINT8) +
|
||||||
BITMAP_LEN_8_BIT (
|
BITMAP_LEN_8_BIT (
|
||||||
ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),
|
(UINT32) ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),
|
||||||
ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)
|
ReadUnaligned16 (&((EFI_HII_IIBT_IMAGE_8BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -1103,7 +1103,7 @@ HiiSetImage (
|
|||||||
case EFI_HII_IIBT_IMAGE_24BIT_TRANS:
|
case EFI_HII_IIBT_IMAGE_24BIT_TRANS:
|
||||||
OldBlockSize = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +
|
OldBlockSize = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +
|
||||||
BITMAP_LEN_24_BIT (
|
BITMAP_LEN_24_BIT (
|
||||||
ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),
|
(UINT32) ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Width),
|
||||||
ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)
|
ReadUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) CurrentImageBlock)->Bitmap.Height)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -1115,7 +1115,7 @@ HiiSetImage (
|
|||||||
// Create the new image block according to input image.
|
// Create the new image block according to input image.
|
||||||
//
|
//
|
||||||
NewBlockSize = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +
|
NewBlockSize = sizeof (EFI_HII_IIBT_IMAGE_24BIT_BLOCK) - sizeof (EFI_HII_RGB_PIXEL) +
|
||||||
BITMAP_LEN_24_BIT (Image->Width, Image->Height);
|
BITMAP_LEN_24_BIT ((UINT32) Image->Width, Image->Height);
|
||||||
//
|
//
|
||||||
// Adjust the image package to remove the original block firstly then add the new block.
|
// Adjust the image package to remove the original block firstly then add the new block.
|
||||||
//
|
//
|
||||||
@ -1140,7 +1140,7 @@ HiiSetImage (
|
|||||||
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) NewImageBlock)->Bitmap.Width, Image->Width);
|
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) NewImageBlock)->Bitmap.Width, Image->Width);
|
||||||
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) NewImageBlock)->Bitmap.Height, Image->Height);
|
WriteUnaligned16 ((VOID *) &((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) NewImageBlock)->Bitmap.Height, Image->Height);
|
||||||
CopyGopToRgbPixel (((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) NewImageBlock)->Bitmap.Bitmap,
|
CopyGopToRgbPixel (((EFI_HII_IIBT_IMAGE_24BIT_BLOCK *) NewImageBlock)->Bitmap.Bitmap,
|
||||||
Image->Bitmap, Image->Width * Image->Height);
|
Image->Bitmap, (UINT32) Image->Width * Image->Height);
|
||||||
|
|
||||||
CopyMem ((UINT8 *) NewImageBlock + NewBlockSize, (UINT8 *) CurrentImageBlock + OldBlockSize, Part2Size);
|
CopyMem ((UINT8 *) NewImageBlock + NewBlockSize, (UINT8 *) CurrentImageBlock + OldBlockSize, Part2Size);
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
SmmLockBoxHandler(), SmmLockBoxRestore(), SmmLockBoxUpdate(), SmmLockBoxSave()
|
SmmLockBoxHandler(), SmmLockBoxRestore(), SmmLockBoxUpdate(), SmmLockBoxSave()
|
||||||
will receive untrusted input and do basic validation.
|
will receive untrusted input and do basic validation.
|
||||||
|
|
||||||
Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions
|
are licensed and made available under the terms and conditions
|
||||||
@ -267,7 +267,7 @@ SmmLockBoxHandler (
|
|||||||
EFI_SMM_LOCK_BOX_PARAMETER_HEADER *LockBoxParameterHeader;
|
EFI_SMM_LOCK_BOX_PARAMETER_HEADER *LockBoxParameterHeader;
|
||||||
UINTN TempCommBufferSize;
|
UINTN TempCommBufferSize;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "SmmLockBox SmmLockBoxHandler Enter\n"));
|
DEBUG ((DEBUG_INFO, "SmmLockBox SmmLockBoxHandler Enter\n"));
|
||||||
|
|
||||||
//
|
//
|
||||||
// If input is invalid, stop processing this SMI
|
// If input is invalid, stop processing this SMI
|
||||||
@ -294,9 +294,9 @@ SmmLockBoxHandler (
|
|||||||
|
|
||||||
LockBoxParameterHeader->ReturnStatus = (UINT64)-1;
|
LockBoxParameterHeader->ReturnStatus = (UINT64)-1;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "SmmLockBox LockBoxParameterHeader - %x\n", (UINTN)LockBoxParameterHeader));
|
DEBUG ((DEBUG_INFO, "SmmLockBox LockBoxParameterHeader - %x\n", (UINTN)LockBoxParameterHeader));
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "SmmLockBox Command - %x\n", (UINTN)LockBoxParameterHeader->Command));
|
DEBUG ((DEBUG_INFO, "SmmLockBox Command - %x\n", (UINTN)LockBoxParameterHeader->Command));
|
||||||
|
|
||||||
switch (LockBoxParameterHeader->Command) {
|
switch (LockBoxParameterHeader->Command) {
|
||||||
case EFI_SMM_LOCK_BOX_COMMAND_SAVE:
|
case EFI_SMM_LOCK_BOX_COMMAND_SAVE:
|
||||||
@ -341,7 +341,7 @@ SmmLockBoxHandler (
|
|||||||
|
|
||||||
LockBoxParameterHeader->Command = (UINT32)-1;
|
LockBoxParameterHeader->Command = (UINT32)-1;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "SmmLockBox SmmLockBoxHandler Exit\n"));
|
DEBUG ((DEBUG_INFO, "SmmLockBox SmmLockBoxHandler Exit\n"));
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Vfr file for IP4Dxe.
|
Vfr file for IP4Dxe.
|
||||||
|
|
||||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -31,7 +31,7 @@ formset
|
|||||||
|
|
||||||
checkbox varid = IP4_CONFIG2_IFR_NVDATA.Configure,
|
checkbox varid = IP4_CONFIG2_IFR_NVDATA.Configure,
|
||||||
prompt = STRING_TOKEN(STR_IP4_CONFIGURE),
|
prompt = STRING_TOKEN(STR_IP4_CONFIGURE),
|
||||||
help = STRING_TOKEN(STR_IP4_CONFIGURE),
|
help = STRING_TOKEN(STR_IP4_CONFIGURE_HELP),
|
||||||
flags = INTERACTIVE,
|
flags = INTERACTIVE,
|
||||||
key = KEY_ENABLE,
|
key = KEY_ENABLE,
|
||||||
endcheckbox;
|
endcheckbox;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// /** @file
|
// /** @file
|
||||||
// String definitions for Ip4Config2 formset
|
// String definitions for Ip4Config2 formset
|
||||||
|
|
||||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// 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
|
||||||
@ -22,6 +22,7 @@
|
|||||||
#string STR_IP4_DEVICE_FORM_TITLE #language en-US ""
|
#string STR_IP4_DEVICE_FORM_TITLE #language en-US ""
|
||||||
#string STR_IP4_DEVICE_FORM_HELP #language en-US ""
|
#string STR_IP4_DEVICE_FORM_HELP #language en-US ""
|
||||||
#string STR_IP4_CONFIGURE #language en-US "Configured"
|
#string STR_IP4_CONFIGURE #language en-US "Configured"
|
||||||
|
#string STR_IP4_CONFIGURE_HELP #language en-US "Indicate whether network address configured successfully or not."
|
||||||
#string STR_IP4_ENABLE_DHCP #language en-US "Enable DHCP"
|
#string STR_IP4_ENABLE_DHCP #language en-US "Enable DHCP"
|
||||||
#string STR_IP4_LOCAL_IP_ADDRESS #language en-US "Local IP Address"
|
#string STR_IP4_LOCAL_IP_ADDRESS #language en-US "Local IP Address"
|
||||||
#string STR_IP4_IP_ADDRESS_HELP #language en-US "Enter IP address in dotted-decimal notation. Example: 192.168.10.12\r\n"
|
#string STR_IP4_IP_ADDRESS_HELP #language en-US "Enter IP address in dotted-decimal notation. Example: 192.168.10.12\r\n"
|
||||||
|
@ -855,7 +855,7 @@ Ip4OnArpResolvedDpc (
|
|||||||
|
|
||||||
Status = Interface->Mnp->Transmit (Interface->Mnp, &Token->MnpToken);
|
Status = Interface->Mnp->Transmit (Interface->Mnp, &Token->MnpToken);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
RemoveEntryList (Entry);
|
RemoveEntryList (&Token->Link);
|
||||||
Token->CallBack (Token->IpInstance, Token->Packet, Status, 0, Token->Context);
|
Token->CallBack (Token->IpInstance, Token->Packet, Status, 0, Token->Context);
|
||||||
|
|
||||||
Ip4FreeLinkTxToken (Token);
|
Ip4FreeLinkTxToken (Token);
|
||||||
@ -1081,7 +1081,7 @@ SEND_NOW:
|
|||||||
InsertTailList (&Interface->SentFrames, &Token->Link);
|
InsertTailList (&Interface->SentFrames, &Token->Link);
|
||||||
Status = Interface->Mnp->Transmit (Interface->Mnp, &Token->MnpToken);
|
Status = Interface->Mnp->Transmit (Interface->Mnp, &Token->MnpToken);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
RemoveEntryList (&Interface->SentFrames);
|
RemoveEntryList (&Token->Link);
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation of Managed Network Protocol private services.
|
Implementation of Managed Network Protocol private services.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions
|
are licensed and made available under the terms and conditions
|
||||||
of the BSD License which accompanies this distribution. The full
|
of the BSD License which accompanies this distribution. The full
|
||||||
@ -235,7 +235,7 @@ MnpAddFreeTxBuf (
|
|||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
for (Index = 0; Index < Count; Index++) {
|
for (Index = 0; Index < Count; Index++) {
|
||||||
TxBufWrap = (MNP_TX_BUF_WRAP*) AllocatePool (sizeof (MNP_TX_BUF_WRAP) + MnpDeviceData->BufferLength - 1);
|
TxBufWrap = (MNP_TX_BUF_WRAP*) AllocatePool (OFFSET_OF (MNP_TX_BUF_WRAP, TxBuf) + MnpDeviceData->BufferLength );
|
||||||
if (TxBufWrap == NULL) {
|
if (TxBufWrap == NULL) {
|
||||||
DEBUG ((EFI_D_ERROR, "MnpAddFreeTxBuf: TxBuf Alloc failed.\n"));
|
DEBUG ((EFI_D_ERROR, "MnpAddFreeTxBuf: TxBuf Alloc failed.\n"));
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Interface routine for Mtftp4.
|
Interface routine for Mtftp4.
|
||||||
|
|
||||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -667,6 +667,10 @@ EfiMtftp4Configure (
|
|||||||
Gateway = NTOHL (Gateway);
|
Gateway = NTOHL (Gateway);
|
||||||
ServerIp = NTOHL (ServerIp);
|
ServerIp = NTOHL (ServerIp);
|
||||||
|
|
||||||
|
if (ServerIp == 0 || IP4_IS_LOCAL_BROADCAST (ServerIp)) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ConfigData->UseDefaultSetting &&
|
if (!ConfigData->UseDefaultSetting &&
|
||||||
((!IP4_IS_VALID_NETMASK (Netmask) || (Netmask != 0 && !NetIp4IsUnicast (Ip, Netmask))))) {
|
((!IP4_IS_VALID_NETMASK (Netmask) || (Netmask != 0 && !NetIp4IsUnicast (Ip, Netmask))))) {
|
||||||
|
|
||||||
|
@ -162,15 +162,6 @@ SockDestroyChild (
|
|||||||
|
|
||||||
ASSERT (Tcb != NULL);
|
ASSERT (Tcb != NULL);
|
||||||
|
|
||||||
Status = EfiAcquireLockOrFail (&(Sock->Lock));
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "SockDestroyChild: Get the lock to "
|
|
||||||
"access socket failed with %r\n", Status));
|
|
||||||
|
|
||||||
return EFI_ACCESS_DENIED;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Close the IP protocol.
|
// Close the IP protocol.
|
||||||
//
|
//
|
||||||
@ -214,6 +205,15 @@ SockDestroyChild (
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Status = EfiAcquireLockOrFail (&(Sock->Lock));
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
|
||||||
|
DEBUG ((EFI_D_ERROR, "SockDestroyChild: Get the lock to "
|
||||||
|
"access socket failed with %r\n", Status));
|
||||||
|
|
||||||
|
return EFI_ACCESS_DENIED;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// force protocol layer to detach the PCB
|
// force protocol layer to detach the PCB
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
TCP input process routines.
|
TCP input process routines.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -703,7 +703,8 @@ TcpInput (
|
|||||||
TCP_SEG *Seg;
|
TCP_SEG *Seg;
|
||||||
TCP_SEQNO Right;
|
TCP_SEQNO Right;
|
||||||
TCP_SEQNO Urg;
|
TCP_SEQNO Urg;
|
||||||
|
INT32 Usable;
|
||||||
|
|
||||||
NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
|
NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
|
||||||
|
|
||||||
Parent = NULL;
|
Parent = NULL;
|
||||||
@ -1187,9 +1188,27 @@ TcpInput (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (TCP_SEQ_LT (Right, Tcb->SndNxt)) {
|
if (TCP_SEQ_LT (Right, Tcb->SndNxt)) {
|
||||||
|
//
|
||||||
Tcb->SndNxt = Right;
|
// Check for Window Retraction in RFC7923 section 2.4.
|
||||||
|
// The lower n bits of the peer's actual receive window is wiped out if TCP
|
||||||
|
// window scale is enabled, it will look like the peer is shrinking the window.
|
||||||
|
// Check whether the SndNxt is out of the advertised receive window by more than
|
||||||
|
// 2^Rcv.Wind.Shift before moving the SndNxt to the left.
|
||||||
|
//
|
||||||
|
DEBUG (
|
||||||
|
(EFI_D_WARN,
|
||||||
|
"TcpInput: peer advise negative useable window for connected TCB %p\n",
|
||||||
|
Tcb)
|
||||||
|
);
|
||||||
|
Usable = TCP_SUB_SEQ (Tcb->SndNxt, Right);
|
||||||
|
if ((Usable >> Tcb->SndWndScale) > 0) {
|
||||||
|
DEBUG (
|
||||||
|
(EFI_D_WARN,
|
||||||
|
"TcpInput: SndNxt is out of window by more than window scale for TCB %p\n",
|
||||||
|
Tcb)
|
||||||
|
);
|
||||||
|
Tcb->SndNxt = Right;
|
||||||
|
}
|
||||||
if (Right == Tcb->SndUna) {
|
if (Right == Tcb->SndUna) {
|
||||||
|
|
||||||
TcpClearTimer (Tcb, TCP_TIMER_REXMIT);
|
TcpClearTimer (Tcb, TCP_TIMER_REXMIT);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Misc support routines for tcp.
|
Misc support routines for tcp.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -78,7 +78,8 @@ TcpInitTcbLocal (
|
|||||||
// First window size is never scaled
|
// First window size is never scaled
|
||||||
//
|
//
|
||||||
Tcb->RcvWndScale = 0;
|
Tcb->RcvWndScale = 0;
|
||||||
|
Tcb->RetxmitSeqMax = 0;
|
||||||
|
|
||||||
Tcb->ProbeTimerOn = FALSE;
|
Tcb->ProbeTimerOn = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
TCP output process routines.
|
TCP output process routines.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -671,17 +671,39 @@ TcpRetransmit (
|
|||||||
// 2. must in the current send window
|
// 2. must in the current send window
|
||||||
// 3. will not change the boundaries of queued segments.
|
// 3. will not change the boundaries of queued segments.
|
||||||
//
|
//
|
||||||
if (TCP_SEQ_LT (Tcb->SndWl2 + Tcb->SndWnd, Seq)) {
|
|
||||||
DEBUG ((EFI_D_WARN, "TcpRetransmit: retransmission cancelled "
|
//
|
||||||
"because send window too small for TCB %p\n", Tcb));
|
// Handle the Window Retraction if TCP window scale is enabled according to RFC7323:
|
||||||
|
// On first retransmission, or if the sequence number is out of
|
||||||
|
// window by less than 2^Rcv.Wind.Shift, then do normal
|
||||||
|
// retransmission(s) without regard to the receiver window as long
|
||||||
|
// as the original segment was in window when it was sent.
|
||||||
|
//
|
||||||
|
if ((Tcb->SndWndScale != 0) &&
|
||||||
|
(TCP_SEQ_GT (Seq, Tcb->RetxmitSeqMax) || TCP_SEQ_BETWEEN (Tcb->SndWl2 + Tcb->SndWnd, Seq, Tcb->SndWl2 + Tcb->SndWnd + (1 << Tcb->SndWndScale)))) {
|
||||||
|
Len = TCP_SUB_SEQ (Tcb->SndNxt, Seq);
|
||||||
|
DEBUG (
|
||||||
|
(EFI_D_WARN,
|
||||||
|
"TcpRetransmit: retransmission without regard to the receiver window for TCB %p\n",
|
||||||
|
Tcb)
|
||||||
|
);
|
||||||
|
|
||||||
|
} else if (TCP_SEQ_GEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq)) {
|
||||||
|
Len = TCP_SUB_SEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
DEBUG (
|
||||||
|
(EFI_D_WARN,
|
||||||
|
"TcpRetransmit: retransmission cancelled because send window too small for TCB %p\n",
|
||||||
|
Tcb)
|
||||||
|
);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Len = MIN (Len, Tcb->SndMss);
|
||||||
|
|
||||||
Len = TCP_SUB_SEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq);
|
Nbuf = TcpGetSegmentSndQue (Tcb, Seq, Len);
|
||||||
Len = MIN (Len, Tcb->SndMss);
|
|
||||||
|
|
||||||
Nbuf = TcpGetSegmentSndQue (Tcb, Seq, Len);
|
|
||||||
if (Nbuf == NULL) {
|
if (Nbuf == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -691,6 +713,10 @@ TcpRetransmit (
|
|||||||
if (TcpTransmitSegment (Tcb, Nbuf) != 0) {
|
if (TcpTransmitSegment (Tcb, Nbuf) != 0) {
|
||||||
goto OnError;
|
goto OnError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (TCP_SEQ_GT (Seq, Tcb->RetxmitSeqMax)) {
|
||||||
|
Tcb->RetxmitSeqMax = Seq;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// The retransmitted buffer may be on the SndQue,
|
// The retransmitted buffer may be on the SndQue,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Tcp Protocol header file.
|
Tcp Protocol header file.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -250,6 +250,12 @@ struct _TCP_CB {
|
|||||||
UINT32 TimeWaitTimeout; ///< The TIME_WAIT time out
|
UINT32 TimeWaitTimeout; ///< The TIME_WAIT time out
|
||||||
UINT32 ConnectTimeout; ///< The connect establishment time out
|
UINT32 ConnectTimeout; ///< The connect establishment time out
|
||||||
|
|
||||||
|
//
|
||||||
|
// RFC7323
|
||||||
|
// Addressing Window Retraction for TCP Window Scale Option.
|
||||||
|
//
|
||||||
|
TCP_SEQNO RetxmitSeqMax; ///< Max Seq number in previous retransmission.
|
||||||
|
|
||||||
//
|
//
|
||||||
// configuration for tcp provided by user
|
// configuration for tcp provided by user
|
||||||
//
|
//
|
||||||
|
@ -1296,6 +1296,7 @@ DxePcdGetNextTokenSpace (
|
|||||||
(EFI_GUID *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->GuidTableOffset)
|
(EFI_GUID *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->GuidTableOffset)
|
||||||
);
|
);
|
||||||
CopyMem (TmpTokenSpaceBuffer, PeiTokenSpaceTable, sizeof (EFI_GUID*) * PeiTokenSpaceTableSize);
|
CopyMem (TmpTokenSpaceBuffer, PeiTokenSpaceTable, sizeof (EFI_GUID*) * PeiTokenSpaceTableSize);
|
||||||
|
TmpTokenSpaceBufferCount = PeiTokenSpaceTableSize;
|
||||||
FreePool (PeiTokenSpaceTable);
|
FreePool (PeiTokenSpaceTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user