[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Set I2S pins.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: zwei4--- .../Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h index 10ca9325b..88044926d 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h @@ -183,15 +183,15 @@ BXT_GPIO_PAD_INIT mBXT_GpioInitData_NW [] = BXT_GPIO_PAD_CONF(L"PMIC_I2C_SDA", M1 ,NA, NA , NA , NA ,Wake_Disabled, P_1K_H ,NA ,NA ,IOS_Masked, SAME, GPIO_PADBAR+0x0108, NORTHWEST), BXT_GPIO_PAD_CONF(L"GPIO_74 AVS_I2S1_MCLK",M1 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,NA,NA, GPIO_PADBAR+0x0110, NORTHWEST),//Feature:AVS_I2S1_MCLK BXT_GPIO_PAD_CONF(L"GPIO_75 AVS_I2S1_BCLK",M1 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,NA,NA, GPIO_PADBAR+0x0118, NORTHWEST),//Feature:AVS_I2S1_BCLK - BXT_GPIO_PAD_CONF(L"GPIO_76 AVS_I2S1_WS_SYNC", M0 ,GPO ,GPIO_D, HI , NA ,Wake_Disabled, P_20K_L,NA ,NA ,NA, NA, GPIO_PADBAR+0x0120, NORTHWEST),//Feature:Wake - BXT_GPIO_PAD_CONF(L"GPIO_77 AVS_I2S1_SDI", M0 ,GPI , NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,NA,NA, GPIO_PADBAR+0x0128, NORTHWEST),//Feature:LPE Hdr - BXT_GPIO_PAD_CONF(L"GPIO_78 AVS_I2S1_SDO", M0 ,GPI , NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,NA,NA, GPIO_PADBAR+0x0130, NORTHWEST),//Feature:LPE Hdr + BXT_GPIO_PAD_CONF(L"GPIO_76 AVS_I2S1_WS_SYNC", M1 ,NA, NA , NA , NA ,Wake_Disabled, P_20K_L,NA ,NA ,NA, NA, GPIO_PADBAR+0x0120, NORTHWEST),//Feature:Wake + BXT_GPIO_PAD_CONF(L"GPIO_77 AVS_I2S1_SDI", M1 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,NA,NA, GPIO_PADBAR+0x0128, NORTHWEST),//Feature:LPE Hdr + BXT_GPIO_PAD_CONF(L"GPIO_78 AVS_I2S1_SDO", M1 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,NA,NA, GPIO_PADBAR+0x0130, NORTHWEST),//Feature:LPE Hdr BXT_GPIO_PAD_CONF(L"GPIO_79 AVS_M_CLK_A1", M2 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,IOS_Masked, SAME, GPIO_PADBAR+0x0138, NORTHWEST), BXT_GPIO_PAD_CONF(L"GPIO_80 AVS_M_CLK_B1", M2 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,IOS_Masked, SAME, GPIO_PADBAR+0x0140, NORTHWEST), BXT_GPIO_PAD_CONF(L"GPIO_81 AVS_M_DATA_1", M2 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,TxDRxE, EnPd, GPIO_PADBAR+0x0148, NORTHWEST), BXT_GPIO_PAD_CONF(L"GPIO_82 AVS_M_CLK_AB2",M2 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,IOS_Masked, SAME, GPIO_PADBAR+0x0150, NORTHWEST), BXT_GPIO_PAD_CONF(L"GPIO_83 AVS_M_DATA_2", M1 ,NA, NA , NA , NA ,Wake_Disabled, P_20K_L,NA ,NA ,TxDRxE, EnPd, GPIO_PADBAR+0x0158, NORTHWEST), - BXT_GPIO_PAD_CONF(L"GPIO_84 AVS_I2S2_MCLK",M2 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,NA,NA, GPIO_PADBAR+0x0160, NORTHWEST),//Spare signal, set to GPI. Net in Sch:HDA_RSTB + BXT_GPIO_PAD_CONF(L"GPIO_84 AVS_I2S2_MCLK",M1 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,NA,NA, GPIO_PADBAR+0x0160, NORTHWEST),//Spare signal, set to GPI. Net in Sch:HDA_RSTB BXT_GPIO_PAD_CONF(L"GPIO_85 AVS_I2S2_BCLK",M1 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,IOS_Masked, SAME, GPIO_PADBAR+0x0168, NORTHWEST), BXT_GPIO_PAD_CONF(L"GPIO_86 AVS_I2S2_WS_SYNC", M1 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,IOS_Masked, SAME, GPIO_PADBAR+0x0170, NORTHWEST), BXT_GPIO_PAD_CONF(L"GPIO_87 AVS_I2S2_SDI", M1 ,NA, NA , NA , NA , Wake_Disabled, P_20K_L, NA,NA,IOS_Masked, SAME, GPIO_PADBAR+0x0178, NORTHWEST), -- 2.11.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] build error on fresh download
Thanks for your help! duser@duser-virtual-machine ~/src/edk2 $ cat /etc/os-release NAME="Linux Mint" VERSION="18 (Sarah)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 18" VERSION_ID="18" HOME_URL="http://www.linuxmint.com/; SUPPORT_URL="http://forums.linuxmint.com/; BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/; UBUNTU_CODENAME=xenial duser@duser-virtual-machine ~/src/edk2 $ uname -a Linux duser-virtual-machine 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux It is Mint, which shares all of the Ubuntu Xenial (16.04) packages. On Thu, Jun 15, 2017 at 8:33 PM, Zhu, Yonghongwrote: > Hi Nick, > > Which OS are you use ? I will try to reproduce it on my local and investigate > first. > > Best Regards, > Zhu Yonghong > > > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Nick > Sent: Friday, June 16, 2017 11:22 AM > To: edk2-devel@lists.01.org > Subject: [edk2] build error on fresh download > > I downloaded the latest edk2, following the instructions from: > > https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC#Open_the_GNOME_Terminal_program > > and > > https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions > > I am getting this error on the initial build: > > duser@duser-virtual-machine ~/src/edk2 $ build Build environment: > Linux-4.4.0-21-generic-x86_64-with-LinuxMint-18-sarah > Build start time: 20:10:28, Jun.15 2017 > > WORKSPACE= /home/duser/src/edk2 > ECP_SOURCE = /home/duser/src/edk2/EdkCompatibilityPkg > EDK_SOURCE = /home/duser/src/edk2/EdkCompatibilityPkg > EFI_SOURCE = /home/duser/src/edk2/EdkCompatibilityPkg > EDK_TOOLS_PATH = /home/duser/src/edk2/BaseTools > CONF_PATH= /home/duser/src/edk2/Conf > > > Architecture(s) = IA32 IPF EBC AARCH64 X64 ARM > Build target = DEBUG > Toolchain= GCC5 > > Active Platform = /home/duser/src/edk2/MdeModulePkg/MdeModulePkg.dsc > > Processing meta-data ... done! > Building ... > /home/duser/src/edk2/MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf > [IA32] > make: Nothing to be done for 'tbuild'. > Building ... /home/duser/src/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf > [IA32] > make: Nothing to be done for 'tbuild'. > Building ... /home/duser/src/edk2/MdePkg/Library/BaseLib/BaseLib.inf [IA32] > make: Nothing to be done for 'tbuild'. > Building ... > /home/duser/src/edk2/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf > [IA32] > make: Nothing to be done for 'tbuild'. > Building ... > /home/duser/src/edk2/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf > [IA32] > "gcc" -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror > -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h > -fno-common -DSTRING_ARRAY_NAME=UefiDebugLibStdErrStrings > -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 > -fno-asynchronous-unwind-tables -Wno-address -flto -Os -D > DISABLE_NEW_DEPRECATED_INTERFACES -c -o > /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/OUTPUT/./DebugLib.obj > -I/home/duser/src/edk2/MdePkg/Library/UefiDebugLibStdErr > -I/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/DEBUG > -I/home/duser/src/edk2/MdePkg -I/home/duser/src/edk2/MdePkg/Include > -I/home/duser/src/edk2/MdePkg/Include/Ia32 > /home/duser/src/edk2/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c > "gcc-ar" cr > /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/OUTPUT/UefiDebugLibStdErr.lib > > @/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/OUTPUT/object_files.lst > Building ... > /home/duser/src/edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > [IA32] > "gcc" -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror > -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h > -fno-common -DSTRING_ARRAY_NAME=BasePcdLibNullStrings -m32 > -march=i586 -malign-double -fno-stack-protector -D EFI32 > -fno-asynchronous-unwind-tables -Wno-address -flto -Os -D > DISABLE_NEW_DEPRECATED_INTERFACES -c -o > /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/OUTPUT/./PcdLib.obj > -I/home/duser/src/edk2/MdePkg/Library/BasePcdLibNull > -I/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/DEBUG > -I/home/duser/src/edk2/MdePkg -I/home/duser/src/edk2/MdePkg/Include > -I/home/duser/src/edk2/MdePkg/Include/Ia32 > /home/duser/src/edk2/MdePkg/Library/BasePcdLibNull/PcdLib.c > "gcc-ar" cr > /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/OUTPUT/BasePcdLibNull.lib > >
Re: [edk2] build error on fresh download
Hi Nick, Which OS are you use ? I will try to reproduce it on my local and investigate first. Best Regards, Zhu Yonghong -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Nick Sent: Friday, June 16, 2017 11:22 AM To: edk2-devel@lists.01.org Subject: [edk2] build error on fresh download I downloaded the latest edk2, following the instructions from: https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC#Open_the_GNOME_Terminal_program and https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions I am getting this error on the initial build: duser@duser-virtual-machine ~/src/edk2 $ build Build environment: Linux-4.4.0-21-generic-x86_64-with-LinuxMint-18-sarah Build start time: 20:10:28, Jun.15 2017 WORKSPACE= /home/duser/src/edk2 ECP_SOURCE = /home/duser/src/edk2/EdkCompatibilityPkg EDK_SOURCE = /home/duser/src/edk2/EdkCompatibilityPkg EFI_SOURCE = /home/duser/src/edk2/EdkCompatibilityPkg EDK_TOOLS_PATH = /home/duser/src/edk2/BaseTools CONF_PATH= /home/duser/src/edk2/Conf Architecture(s) = IA32 IPF EBC AARCH64 X64 ARM Build target = DEBUG Toolchain= GCC5 Active Platform = /home/duser/src/edk2/MdeModulePkg/MdeModulePkg.dsc Processing meta-data ... done! Building ... /home/duser/src/edk2/MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf [IA32] make: Nothing to be done for 'tbuild'. Building ... /home/duser/src/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf [IA32] make: Nothing to be done for 'tbuild'. Building ... /home/duser/src/edk2/MdePkg/Library/BaseLib/BaseLib.inf [IA32] make: Nothing to be done for 'tbuild'. Building ... /home/duser/src/edk2/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf [IA32] make: Nothing to be done for 'tbuild'. Building ... /home/duser/src/edk2/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf [IA32] "gcc" -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiDebugLibStdErrStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -flto -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/OUTPUT/./DebugLib.obj -I/home/duser/src/edk2/MdePkg/Library/UefiDebugLibStdErr -I/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/DEBUG -I/home/duser/src/edk2/MdePkg -I/home/duser/src/edk2/MdePkg/Include -I/home/duser/src/edk2/MdePkg/Include/Ia32 /home/duser/src/edk2/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c "gcc-ar" cr /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/OUTPUT/UefiDebugLibStdErr.lib @/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/OUTPUT/object_files.lst Building ... /home/duser/src/edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf [IA32] "gcc" -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BasePcdLibNullStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -flto -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/OUTPUT/./PcdLib.obj -I/home/duser/src/edk2/MdePkg/Library/BasePcdLibNull -I/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/DEBUG -I/home/duser/src/edk2/MdePkg -I/home/duser/src/edk2/MdePkg/Include -I/home/duser/src/edk2/MdePkg/Include/Ia32 /home/duser/src/edk2/MdePkg/Library/BasePcdLibNull/PcdLib.c "gcc-ar" cr /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/OUTPUT/BasePcdLibNull.lib @/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/OUTPUT/object_files.lst Building ... /home/duser/src/edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf [IA32] "gcc" -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiBootServicesTableLibStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -flto -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib/OUTPUT/./UefiBootServicesTableLib.obj -I/home/duser/src/edk2/MdePkg/Library/UefiBootServicesTableLib
[edk2] build error on fresh download
I downloaded the latest edk2, following the instructions from: https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC#Open_the_GNOME_Terminal_program and https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions I am getting this error on the initial build: duser@duser-virtual-machine ~/src/edk2 $ build Build environment: Linux-4.4.0-21-generic-x86_64-with-LinuxMint-18-sarah Build start time: 20:10:28, Jun.15 2017 WORKSPACE= /home/duser/src/edk2 ECP_SOURCE = /home/duser/src/edk2/EdkCompatibilityPkg EDK_SOURCE = /home/duser/src/edk2/EdkCompatibilityPkg EFI_SOURCE = /home/duser/src/edk2/EdkCompatibilityPkg EDK_TOOLS_PATH = /home/duser/src/edk2/BaseTools CONF_PATH= /home/duser/src/edk2/Conf Architecture(s) = IA32 IPF EBC AARCH64 X64 ARM Build target = DEBUG Toolchain= GCC5 Active Platform = /home/duser/src/edk2/MdeModulePkg/MdeModulePkg.dsc Processing meta-data ... done! Building ... /home/duser/src/edk2/MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf [IA32] make: Nothing to be done for 'tbuild'. Building ... /home/duser/src/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf [IA32] make: Nothing to be done for 'tbuild'. Building ... /home/duser/src/edk2/MdePkg/Library/BaseLib/BaseLib.inf [IA32] make: Nothing to be done for 'tbuild'. Building ... /home/duser/src/edk2/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf [IA32] make: Nothing to be done for 'tbuild'. Building ... /home/duser/src/edk2/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf [IA32] "gcc" -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiDebugLibStdErrStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -flto -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/OUTPUT/./DebugLib.obj -I/home/duser/src/edk2/MdePkg/Library/UefiDebugLibStdErr -I/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/DEBUG -I/home/duser/src/edk2/MdePkg -I/home/duser/src/edk2/MdePkg/Include -I/home/duser/src/edk2/MdePkg/Include/Ia32 /home/duser/src/edk2/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c "gcc-ar" cr /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/OUTPUT/UefiDebugLibStdErr.lib @/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr/OUTPUT/object_files.lst Building ... /home/duser/src/edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf [IA32] "gcc" -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BasePcdLibNullStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -flto -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/OUTPUT/./PcdLib.obj -I/home/duser/src/edk2/MdePkg/Library/BasePcdLibNull -I/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/DEBUG -I/home/duser/src/edk2/MdePkg -I/home/duser/src/edk2/MdePkg/Include -I/home/duser/src/edk2/MdePkg/Include/Ia32 /home/duser/src/edk2/MdePkg/Library/BasePcdLibNull/PcdLib.c "gcc-ar" cr /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/OUTPUT/BasePcdLibNull.lib @/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/OUTPUT/object_files.lst Building ... /home/duser/src/edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf [IA32] "gcc" -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=UefiBootServicesTableLibStrings -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -flto -Os -D DISABLE_NEW_DEPRECATED_INTERFACES -c -o /home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib/OUTPUT/./UefiBootServicesTableLib.obj -I/home/duser/src/edk2/MdePkg/Library/UefiBootServicesTableLib -I/home/duser/src/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib/DEBUG -I/home/duser/src/edk2/MdePkg -I/home/duser/src/edk2/MdePkg/Include -I/home/duser/src/edk2/MdePkg/Include/Ia32 /home/duser/src/edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c "gcc-ar" cr
Re: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build script.
Reviewed-by: zwei4Thanks, David Wei -Original Message- From: Lu, ShifeiX A Sent: Friday, June 16, 2017 10:49 AM To: Wei, David Cc: edk2-devel@lists.01.org Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build script. Change build script. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex --- Platform/BroxtonPlatformPkg/BiosId.env| 1 - Platform/BroxtonPlatformPkg/BuildBios.bat | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/BiosId.env b/Platform/BroxtonPlatformPkg/BiosId.env index 18b4e01..1e28313 100644 --- a/Platform/BroxtonPlatformPkg/BiosId.env +++ b/Platform/BroxtonPlatformPkg/BiosId.env @@ -29,7 +29,6 @@ BOARD_ID = APLKRVP BOARD_REV = 3 -OEM_ID = X64 BUILD_TYPE= D VERSION_MAJOR = 0064 VERSION_MINOR = 01 diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat b/Platform/BroxtonPlatformPkg/BuildBios.bat index 5e06a98..b59e8eb 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.bat +++ b/Platform/BroxtonPlatformPkg/BuildBios.bat @@ -218,8 +218,8 @@ if "%Arch%"=="IA32" ( if "%Arch%"=="X64" ( findstr /b /v "BOARD_ID BUILD_TYPE" %PLATFORM_PACKAGE%\BiosId.env > Conf\BiosId.env ) else if "%Arch%"=="IA32" ( -findstr /b /v "BOARD_ID BUILD_TYPE OEM_ID" %PLATFORM_PACKAGE%\BiosId.env > Conf\BiosId.env -echo OEM_ID = I32 >> Conf\BiosId.env +findstr /b /v "BOARD_ID BUILD_TYPE BOARD_EXT" %PLATFORM_PACKAGE%\BiosId.env > Conf\BiosId.env +echo BOARD_EXT = I32 >> Conf\BiosId.env ) if /i "%~2" == "RELEASE" ( -- 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build script.
Change build script. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex--- Platform/BroxtonPlatformPkg/BiosId.env| 1 - Platform/BroxtonPlatformPkg/BuildBios.bat | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/BiosId.env b/Platform/BroxtonPlatformPkg/BiosId.env index 18b4e01..1e28313 100644 --- a/Platform/BroxtonPlatformPkg/BiosId.env +++ b/Platform/BroxtonPlatformPkg/BiosId.env @@ -29,7 +29,6 @@ BOARD_ID = APLKRVP BOARD_REV = 3 -OEM_ID = X64 BUILD_TYPE= D VERSION_MAJOR = 0064 VERSION_MINOR = 01 diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat b/Platform/BroxtonPlatformPkg/BuildBios.bat index 5e06a98..b59e8eb 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.bat +++ b/Platform/BroxtonPlatformPkg/BuildBios.bat @@ -218,8 +218,8 @@ if "%Arch%"=="IA32" ( if "%Arch%"=="X64" ( findstr /b /v "BOARD_ID BUILD_TYPE" %PLATFORM_PACKAGE%\BiosId.env > Conf\BiosId.env ) else if "%Arch%"=="IA32" ( -findstr /b /v "BOARD_ID BUILD_TYPE OEM_ID" %PLATFORM_PACKAGE%\BiosId.env > Conf\BiosId.env -echo OEM_ID = I32 >> Conf\BiosId.env +findstr /b /v "BOARD_ID BUILD_TYPE BOARD_EXT" %PLATFORM_PACKAGE%\BiosId.env > Conf\BiosId.env +echo BOARD_EXT = I32 >> Conf\BiosId.env ) if /i "%~2" == "RELEASE" ( -- 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH V2] MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol
Hi Kumar, One other minor comment. + // + // This is the protocol interface entry for this protocol. + // In case of any Error, Interface should not be updated as per spec. + // + if ((Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) + && (Status == EFI_SUCCESS)) { +*Interface = Prot->Interface; + } I think it is better to use the EFI_ERROR() macro here instead of direct compare against a specific status code value. // // This is the protocol interface entry for this protocol. // Only update *Interface if the protocol was found and the request // is not the test to see if the protocol is present. // if (!EFI_ERROR (Status) && Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) { *Interface = Prot->Interface; } Mike -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Amit Kumar Sent: Thursday, June 15, 2017 3:40 AM To: edk2-devel@lists.01.org Cc: akam...@hotmail.com; Tian, FengSubject: [edk2] [PATCH V2] MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol Change since v1: 1) Fixed typo protocal to protocol 2) Fixed coding style Modified source code to update Interface as per spec. 1) In case of Protocol is un-supported, interface should be returned NULL. 2) In case of any error, interface should not be modified. 3) In case of Test Protocol, interface is optional. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Amit Kumar --- MdeModulePkg/Core/Dxe/Hand/Handle.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Hand/Handle.c b/MdeModulePkg/Core/Dxe/Hand/Handle.c index 1c25521..db23170 100644 --- a/MdeModulePkg/Core/Dxe/Hand/Handle.c +++ b/MdeModulePkg/Core/Dxe/Hand/Handle.c @@ -1004,12 +1004,8 @@ CoreOpenProtocol ( // // Check for invalid Interface // - if (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) { -if (Interface == NULL) { - return EFI_INVALID_PARAMETER; -} else { - *Interface = NULL; -} + if ((Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) && (Interface == NULL)) { +return EFI_INVALID_PARAMETER; } // @@ -1073,15 +1069,11 @@ CoreOpenProtocol ( Prot = CoreGetProtocolInterface (UserHandle, Protocol); if (Prot == NULL) { Status = EFI_UNSUPPORTED; +// Return NULL Interface if Unsupported Protocol +*Interface = NULL; goto Done; } - // - // This is the protocol interface entry for this protocol - // - if (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) { -*Interface = Prot->Interface; - } Status = EFI_SUCCESS; ByDriver= FALSE; @@ -1175,6 +1167,15 @@ CoreOpenProtocol ( } Done: + + // + // This is the protocol interface entry for this protocol. + // In case of any Error, Interface should not be updated as per spec. + // + if ((Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) + && (Status == EFI_SUCCESS)) { +*Interface = Prot->Interface; + } // // Done. Release the database lock are return // -- 1.9.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2 staging][BaseToolsOpt 0/4] Enable multiple driver combination
On 06/15/17 11:46, Liming Gao wrote: > In V2, > 1) Add SamplePkg to include the example to show the combined drivers in DSC. > 2) Update Read.MD to describe the Depex will be AND together in the combined > driver. > > Combine more drivers into the single one can reduce the image size and > compile link time. This patch adds this support in BaseTools. > > Liming Gao (4): > BaseTools: Merge multiple drivers into one for size and link > performance > SamplePkg: Add it to show the edk2 usage case. > SamplePkg: Combine two drivers into one > Update Readme.MD to include multiple driver combination. > > BaseTools/Source/Python/AutoGen/GenC.py | 24 ++- > Readme.MD | 3 + > SamplePkg/SamplePkg.dec | 21 +++ > SamplePkg/SamplePkg.dsc | 264 > > 4 files changed, 307 insertions(+), 5 deletions(-) > create mode 100644 SamplePkg/SamplePkg.dec > create mode 100644 SamplePkg/SamplePkg.dsc > Thank you Liming, this looks good to me. Acked-by: Laszlo ErsekCheers Laszlo ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH V2] MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol
Change since v1: 1) Fixed typo protocal to protocol 2) Fixed coding style Modified source code to update Interface as per spec. 1) In case of Protocol is un-supported, interface should be returned NULL. 2) In case of any error, interface should not be modified. 3) In case of Test Protocol, interface is optional. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Amit Kumar--- MdeModulePkg/Core/Dxe/Hand/Handle.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Hand/Handle.c b/MdeModulePkg/Core/Dxe/Hand/Handle.c index 1c25521..db23170 100644 --- a/MdeModulePkg/Core/Dxe/Hand/Handle.c +++ b/MdeModulePkg/Core/Dxe/Hand/Handle.c @@ -1004,12 +1004,8 @@ CoreOpenProtocol ( // // Check for invalid Interface // - if (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) { -if (Interface == NULL) { - return EFI_INVALID_PARAMETER; -} else { - *Interface = NULL; -} + if ((Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) && (Interface == NULL)) { +return EFI_INVALID_PARAMETER; } // @@ -1073,15 +1069,11 @@ CoreOpenProtocol ( Prot = CoreGetProtocolInterface (UserHandle, Protocol); if (Prot == NULL) { Status = EFI_UNSUPPORTED; +// Return NULL Interface if Unsupported Protocol +*Interface = NULL; goto Done; } - // - // This is the protocol interface entry for this protocol - // - if (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) { -*Interface = Prot->Interface; - } Status = EFI_SUCCESS; ByDriver= FALSE; @@ -1175,6 +1167,15 @@ CoreOpenProtocol ( } Done: + + // + // This is the protocol interface entry for this protocol. + // In case of any Error, Interface should not be updated as per spec. + // + if ((Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) + && (Status == EFI_SUCCESS)) { +*Interface = Prot->Interface; + } // // Done. Release the database lock are return // -- 1.9.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 staging][BaseToolsOpt 4/4] Update Readme.MD to include multiple driver combination.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao--- Readme.MD | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Readme.MD b/Readme.MD index a436dd5..ba64853 100644 --- a/Readme.MD +++ b/Readme.MD @@ -15,6 +15,9 @@ identified to be optimized. POC code will be added in this branch for evaluation In Ubuntu 14.04 GCC5, OvmfPkgIa32X64 GenFds build time can be reduced from 6s to 4s. 2) Support to merge multiple drivers into one. It should save the link time. But, it doesn't save much in the multiple build. Besides, this feature can save the image size when the image is not compressed, such as PEI images. + POC code has been added. One example in SamplePkg\SamplePkg.dsc is added to show how to combine more than drivers into single one. + When more than one drivers are combined, their depex will be AND together. Platform developer can use APRIORI list to + describe the combined driver and make it be dispatched correctly. 3) Reduce the extra copy actions in build process. 4) Analyze cProfile data and enhance the parser logic. https://bugzilla.tianocore.org/show_bug.cgi?id=42 -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 staging][BaseToolsOpt 0/4] Enable multiple driver combination
In V2, 1) Add SamplePkg to include the example to show the combined drivers in DSC. 2) Update Read.MD to describe the Depex will be AND together in the combined driver. Combine more drivers into the single one can reduce the image size and compile link time. This patch adds this support in BaseTools. Liming Gao (4): BaseTools: Merge multiple drivers into one for size and link performance SamplePkg: Add it to show the edk2 usage case. SamplePkg: Combine two drivers into one Update Readme.MD to include multiple driver combination. BaseTools/Source/Python/AutoGen/GenC.py | 24 ++- Readme.MD | 3 + SamplePkg/SamplePkg.dec | 21 +++ SamplePkg/SamplePkg.dsc | 264 4 files changed, 307 insertions(+), 5 deletions(-) create mode 100644 SamplePkg/SamplePkg.dec create mode 100644 SamplePkg/SamplePkg.dsc -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 staging][BaseToolsOpt 1/4] BaseTools: Merge multiple drivers into one for size and link performance
Update BaseTools to support the multiple driver combination. The merge style reuses the library instance syntax in package.dsc file. The below example is to combine DriverHealthManagerDxe and BootManagerPolicyDxe driver into one driver. BootManagerPolicyDxe driver entry point will be executed first, DriverHealthManagerDxe entry point will run last. After combination, their Depex will be AND together. [Components] MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf { NULL|MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf } Notes: When try combining some drivers, the compile failure may happen, because the same function name are used in the different drivers. Those drivers are required to be clean up first, then be combined. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao--- BaseTools/Source/Python/AutoGen/GenC.py | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 67aaef7..6579457 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1359,10 +1359,17 @@ def CreateLibraryDestructorCode(Info, AutoGenC, AutoGenH): def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH): if Info.IsLibrary or Info.ModuleType in ['USER_DEFINED', 'SEC']: return + +ModuleEntryPointList = [] +for Lib in Info.DependentLibraryList: +if len (Lib.ModuleEntryPointList) > 0: +ModuleEntryPointList = ModuleEntryPointList + Lib.ModuleEntryPointList +ModuleEntryPointList = ModuleEntryPointList + Info.Module.ModuleEntryPointList + # # Module Entry Points # -NumEntryPoints = len(Info.Module.ModuleEntryPointList) +NumEntryPoints = len(ModuleEntryPointList) if 'PI_SPECIFICATION_VERSION' in Info.Module.Specification: PiSpecVersion = Info.Module.Specification['PI_SPECIFICATION_VERSION'] else: @@ -1372,7 +1379,7 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH): else: UefiSpecVersion = '0x' Dict = { -'Function' : Info.Module.ModuleEntryPointList, +'Function' : ModuleEntryPointList, 'PiSpecVersion' : PiSpecVersion + 'U', 'UefiSpecVersion': UefiSpecVersion + 'U' } @@ -1385,7 +1392,7 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH): AUTOGEN_ERROR, '%s must have exactly one entry point' % Info.ModuleType, File=str(Info), - ExtraData= ", ".join(Info.Module.ModuleEntryPointList) + ExtraData= ", ".join(ModuleEntryPointList) ) if Info.ModuleType == 'PEI_CORE': AutoGenC.Append(gPeiCoreEntryPointString.Replace(Dict)) @@ -1430,11 +1437,18 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH): def CreateModuleUnloadImageCode(Info, AutoGenC, AutoGenH): if Info.IsLibrary or Info.ModuleType in ['USER_DEFINED', 'SEC']: return + +ModuleUnloadImageList = [] +for Lib in Info.DependentLibraryList: +if len (Lib.ModuleUnloadImageList) > 0: +ModuleUnloadImageList = ModuleUnloadImageList + Lib.ModuleUnloadImageList +ModuleUnloadImageList = ModuleUnloadImageList + Info.Module.ModuleUnloadImageList + # # Unload Image Handlers # -NumUnloadImage = len(Info.Module.ModuleUnloadImageList) -Dict = {'Count':str(NumUnloadImage) + 'U', 'Function':Info.Module.ModuleUnloadImageList} +NumUnloadImage = len(ModuleUnloadImageList) +Dict = {'Count':str(NumUnloadImage) + 'U', 'Function':ModuleUnloadImageList} if NumUnloadImage < 2: AutoGenC.Append(gUefiUnloadImageString[NumUnloadImage].Replace(Dict)) else: -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 staging][BaseToolsOpt 3/4] SamplePkg: Combine two drivers into one
This is an example to show the driver combination in DSC. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao--- SamplePkg/SamplePkg.dsc | 4 1 file changed, 4 insertions(+) diff --git a/SamplePkg/SamplePkg.dsc b/SamplePkg/SamplePkg.dsc index 4279ce3..cf3600f 100644 --- a/SamplePkg/SamplePkg.dsc +++ b/SamplePkg/SamplePkg.dsc @@ -258,3 +258,7 @@ # ### [Components] + MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf { + +NULL|MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf + } -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 staging][BaseToolsOpt 2/4] SamplePkg: Add it to show the edk2 usage case.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao--- SamplePkg/SamplePkg.dec | 21 SamplePkg/SamplePkg.dsc | 260 2 files changed, 281 insertions(+) create mode 100644 SamplePkg/SamplePkg.dec create mode 100644 SamplePkg/SamplePkg.dsc diff --git a/SamplePkg/SamplePkg.dec b/SamplePkg/SamplePkg.dec new file mode 100644 index 000..dc01032 --- /dev/null +++ b/SamplePkg/SamplePkg.dec @@ -0,0 +1,21 @@ +## @file +# This package provides the usage example. +# +# Copyright (c) 2017, Intel Corporation. All rights reserved. +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# + +[Defines] + DEC_SPECIFICATION = 0x00010005 + PACKAGE_NAME = SamplePkg + PACKAGE_GUID = E3266E19-3D9F-4455-ACB1-6EE3C723DA78 + PACKAGE_VERSION= 0.1 + diff --git a/SamplePkg/SamplePkg.dsc b/SamplePkg/SamplePkg.dsc new file mode 100644 index 000..4279ce3 --- /dev/null +++ b/SamplePkg/SamplePkg.dsc @@ -0,0 +1,260 @@ +## @file +# This package provides the usage example. +# It also lists the default library instances. +# +# Copyright (c) 2017, Intel Corporation. All rights reserved. +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# + + +# +# Defines Section - statements that will be processed to create a Makefile. +# + +[Defines] + PLATFORM_NAME = SamplePkg + PLATFORM_GUID = A8F1E850-AF66-4E78-9869-843494FEE0C8 + PLATFORM_VERSION = 0.1 + DSC_SPECIFICATION = 0x00010005 + OUTPUT_DIRECTORY = Build/SamplePkg + SUPPORTED_ARCHITECTURES= IA32|X64 + BUILD_TARGETS = DEBUG|RELEASE|NOOPT + SKUID_IDENTIFIER = DEFAULT + + # + # Defines for default states. These can be changed on the command line. + # -D FLAG=VALUE + # + # Note: Secure Boot feature highly depends on the OpenSSL building. To enable this + # feature, please follow the instructions found in the file "Patch-HOWTO.txt" + # located in CryptoPkg/Library/OpensslLib to enable the OpenSSL building first. + # + DEFINE SECURE_BOOT_ENABLE = FALSE + + # + # This flag is to enable or disable TLS feature. + # These can be changed on the command line. + # -D FLAG=VALUE + # + # Note: TLS feature highly depends on the OpenSSL building. To enable this + # feature, please follow the instructions found in the file "Patch-HOWTO.txt" + # located in CryptoPkg/Library/OpensslLib to enable the OpenSSL building first. + # + DEFINE TLS_ENABLE = FALSE + + +# +# SKU Identification section - list of all SKU IDs supported by this +# Platform. +# + +[SkuIds] + 0|DEFAULT # The entry: 0|DEFAULT is reserved and always required. + + +# +# Library Class section - list of all Library Classes needed by this Platform. +# + +[LibraryClasses] + # + # Entry point + # + PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf + PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf + DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf + UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf + # + # Basic + # + BaseLib|MdePkg/Library/BaseLib/BaseLib.inf + SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf + CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf + IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf +
Re: [edk2] [Patch 1/2] MdePkg: Add header file for HTTP Boot Callback protocol in UEFI 2.7.
Reviewed-by: Wu Jiaxin> -Original Message- > From: Fu, Siyuan > Sent: Wednesday, June 14, 2017 5:37 PM > To: edk2-devel@lists.01.org > Cc: Ye, Ting ; Wu, Jiaxin > Subject: [Patch 1/2] MdePkg: Add header file for HTTP Boot Callback protocol > in UEFI 2.7. > > Cc: Ye Ting > Cc: Wu Jiaxin > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Fu Siyuan > --- > MdePkg/Include/Protocol/HttpBootCallback.h | 100 > + > MdePkg/MdePkg.dec | 7 +- > 2 files changed, 105 insertions(+), 2 deletions(-) > create mode 100644 MdePkg/Include/Protocol/HttpBootCallback.h > > diff --git a/MdePkg/Include/Protocol/HttpBootCallback.h > b/MdePkg/Include/Protocol/HttpBootCallback.h > new file mode 100644 > index 00..7542b30e03 > --- /dev/null > +++ b/MdePkg/Include/Protocol/HttpBootCallback.h > @@ -0,0 +1,100 @@ > +/** @file > + This file defines the EFI HTTP Boot Callback Protocol interface. > + > + Copyright (c) 2017, Intel Corporation. All rights reserved. > + This program and the accompanying materials > + are licensed and made available under the terms and conditions of the BSD > License > + which accompanies this distribution. The full text of the license may be > found at > + http://opensource.org/licenses/bsd-license.php > + > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > BASIS, > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > EXPRESS OR IMPLIED. > + > + @par Revision Reference: > + This Protocol is introduced in UEFI Specification 2.7 > + > +**/ > + > +#ifndef __EFI_HTTP_BOOT_CALLBACK_H__ > +#define __EFI_HTTP_BOOT_CALLBACK_H__ > + > +#define EFI_HTTP_BOOT_CALLBACK_PROTOCOL_GUID \ > + { \ > +0xba23b311, 0x343d, 0x11e6, {0x91, 0x85, 0x58, 0x20, 0xb1, 0xd6, 0x52, > 0x99} \ > + } > + > +typedef struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL > EFI_HTTP_BOOT_CALLBACK_PROTOCOL; > + > +/// > +/// EFI_HTTP_BOOT_CALLBACK_DATA_TYPE > +/// > +typedef enum { > + /// > + /// Data points to a DHCP4 packet which is about to transmit or has > received. > + /// > + HttpBootDhcp4, > + /// > + /// Data points to a DHCP6 packet which is about to be transmit or has > received. > + /// > + HttpBootDhcp6, > + /// > + /// Data points to an EFI_HTTP_MESSAGE structure, whichcontians a HTTP > request message > + /// to be transmitted. > + /// > + HttpBootHttpRequest, > + /// > + /// Data points to an EFI_HTTP_MESSAGE structure, which contians a > received HTTP > + /// response message. > + /// > + HttpBootHttpResponse, > + /// > + /// Part of the entity body has been received from the HTTP server. Data > points to the > + /// buffer of the entity body data. > + /// > + HttpBootHttpEntityBody, > + HttpBootTypeMax > +} EFI_HTTP_BOOT_CALLBACK_DATA_TYPE; > + > +/** > + Callback function that is invoked when the HTTP Boot driver is about to > transmit or has received a > + packet. > + > + This function is invoked when the HTTP Boot driver is about to transmit or > has received packet. > + Parameters DataType and Received specify the type of event and the > format of the buffer pointed > + to by Data. Due to the polling nature of UEFI device drivers, this callback > function should not > + execute for more than 5 ms. > + The returned status code determines the behavior of the HTTP Boot driver. > + > + @param[in] ThisPointer to the > EFI_HTTP_BOOT_CALLBACK_PROTOCOL instance. > + @param[in] DataTypeThe event that occurs in the current state. > + @param[in] ReceivedTRUE if the callback is being invoked due > to a > receive event. > + FALSE if the callback is being invoked due > to a transmit > event. > + @param[in] DataLength The length in bytes of the buffer pointed > to > by Data. > + @param[in] DataA pointer to the buffer of data, the data > type is > specified by > + DataType. > + > + @retval EFI_SUCCESS Tells the HTTP Boot driver to continue the > HTTP Boot process. > + @retval EFI_ABORTED Tells the HTTP Boot driver to abort the > current > HTTP Boot process. > +**/ > +typedef > +EFI_STATUS > +(EFIAPI * EFI_HTTP_BOOT_CALLBACK) ( > + IN EFI_HTTP_BOOT_CALLBACK_PROTOCOL*This, > + IN EFI_HTTP_BOOT_CALLBACK_DATA_TYPE DataType, > + IN BOOLEANReceived, > + IN UINT32 DataLength, > + IN VOID *Data OPTIONAL > + ); > + > +/// > +/// EFI HTTP Boot Callback Protocol is invoked when the HTTP Boot driver is > about to transmit or > +/// has received a packet. The EFI HTTP Boot Callback Protocol must be > installed on the same handle > +/// as the Load File Protocol for the HTTP Boot. > +/// > +struct
Re: [edk2] [Patch 2/2] NetworkPkg/HttpBootDxe: Add HTTP Boot Callback protocol support.
Hi Siyuan, In HttpBootCallback(), below output seems to be incorrect for the FileSize display in NT32, please check it. Print (L" File Size: %lu\n", Private->FileSize); Print (L"\r Downloading...%d Bytes", Private->ReceivedSize); Thanks, Jiaxin > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Fu > Siyuan > Sent: Wednesday, June 14, 2017 5:37 PM > To: edk2-devel@lists.01.org > Cc: Ye, Ting; Wu, Jiaxin > Subject: [edk2] [Patch 2/2] NetworkPkg/HttpBootDxe: Add HTTP Boot > Callback protocol support. > > This patch updates the HTTP Boot driver to install a default HTTP Callback > protocol > if the platform doesn't provide one. This callback implementation will print > the > boot file download progress in percentage format. > > Cc: Ye Ting > Cc: Wu Jiaxin > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Fu Siyuan > --- > NetworkPkg/HttpBootDxe/HttpBootClient.c | 67 +- > NetworkPkg/HttpBootDxe/HttpBootClient.h | 4 +- > NetworkPkg/HttpBootDxe/HttpBootDhcp4.c | 26 +++- > NetworkPkg/HttpBootDxe/HttpBootDhcp6.c | 106 +-- > NetworkPkg/HttpBootDxe/HttpBootDxe.h | 14 ++ > NetworkPkg/HttpBootDxe/HttpBootDxe.inf | 3 +- > NetworkPkg/HttpBootDxe/HttpBootImpl.c| 221 > +-- > NetworkPkg/HttpBootDxe/HttpBootImpl.h| 2 + > NetworkPkg/HttpBootDxe/HttpBootSupport.c | 29 > NetworkPkg/HttpBootDxe/HttpBootSupport.h | 34 + > 10 files changed, 446 insertions(+), 60 deletions(-) > > diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.c > b/NetworkPkg/HttpBootDxe/HttpBootClient.c > index 99db3d5505..68f5a49bad 100644 > --- a/NetworkPkg/HttpBootDxe/HttpBootClient.c > +++ b/NetworkPkg/HttpBootDxe/HttpBootClient.c > @@ -233,7 +233,6 @@ HttpBootDhcp4ExtractUriInfo ( >// >// All boot informations are valid here. >// > - AsciiPrint ("\n URI: %a", Private->BootFileUri); > >// >// Update the device path to include the IP and boot URI information. > @@ -401,7 +400,7 @@ HttpBootDhcp6ExtractUriInfo ( >// >// All boot informations are valid here. >// > - AsciiPrint ("\n URI: %a", Private->BootFileUri); > + >// >// Update the device path to include the IP and boot URI information. >// > @@ -452,6 +451,40 @@ HttpBootDiscoverBootInfo ( > } > > /** > + HttpIo Callback function which will be invoked when specified > HTTP_IO_CALLBACK_EVENT happened. > + > + @param[in]EventType Indicate the Event type that occurs in the > current callback. > + @param[in]MessageHTTP message which will be send to, or just > received from HTTP server. > + @param[in]ContextThe Callback Context pointer. > + > + @retval EFI_SUCCESS Tells the HttpIo to continue the HTTP process. > + @retval Others Tells the HttpIo to abort the current HTTP > process. > +**/ > +EFI_STATUS > +EFIAPI > +HttpBootHttpIoCallback ( > + IN HTTP_IO_CALLBACK_EVENTEventType, > + IN EFI_HTTP_MESSAGE *Message, > + IN VOID *Context > + ) > +{ > + HTTP_BOOT_PRIVATE_DATA *Private; > + EFI_STATUS Status; > + Private = (HTTP_BOOT_PRIVATE_DATA *) Context; > + if (Private->HttpBootCallback != NULL) { > +Status = Private->HttpBootCallback->Callback ( > + Private->HttpBootCallback, > + EventType == HttpIoRequest ? HttpBootHttpRequest : > HttpBootHttpResponse, > + EventType == HttpIoRequest ? FALSE : TRUE, > + sizeof (EFI_HTTP_MESSAGE), > + (VOID *) Message > + ); > +return Status; > + } > + return EFI_SUCCESS; > +} > + > +/** >Create a HttpIo instance for the file download. > >@param[in]PrivateThe pointer to the driver's private data. > @@ -490,6 +523,8 @@ HttpBootCreateHttpIo ( > Private->Controller, > Private->UsingIpv6 ? IP_VERSION_6 : IP_VERSION_4, > , > + HttpBootHttpIoCallback, > + (VOID *) Private, > >HttpIo > ); >if (EFI_ERROR (Status)) { > @@ -686,6 +721,8 @@ HttpBootGetBootFileCallback ( > { >HTTP_BOOT_CALLBACK_DATA *CallbackData; >HTTP_BOOT_ENTITY_DATA*NewEntityData; > + EFI_STATUS Status; > + EFI_HTTP_BOOT_CALLBACK_PROTOCOL *HttpBootCallback; > >// >// We only care about the entity data. > @@ -695,6 +732,19 @@ HttpBootGetBootFileCallback ( >} > >CallbackData = (HTTP_BOOT_CALLBACK_DATA *) Context; > + HttpBootCallback = CallbackData->Private->HttpBootCallback; > + if (HttpBootCallback != NULL) { > +Status = HttpBootCallback->Callback ( > + HttpBootCallback, > + HttpBootHttpEntityBody, > + TRUE, > +
Re: [edk2] [PATCH] MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol
Amit: I have minor comments. 1) The first changed sentence should have {} for return EFI_INVALID_PARAMETER; to follow coding style. 2) In the second change, the comment "Return NULL Interface if Unsupported Protocal" should be updated to protocol. Thanks Liming >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >Amit Kumar >Sent: Tuesday, June 13, 2017 8:45 PM >To: edk2-devel@lists.01.org >Cc: Tian, Feng>Subject: [edk2] [PATCH] MdeModulePkg/DxeCore: Fixed Interface returned >by CoreOpenProtocol > >Modified source code to update Interface as per spec. >1) In case of Protocol is un-supported, interface should be returned NULL. >2) In case of any error, interface should not be modified. >3) In case of Test Protocol, interface is optional. > >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Amit Kumar >--- > MdeModulePkg/Core/Dxe/Hand/Handle.c | 26 +- > 1 file changed, 13 insertions(+), 13 deletions(-) > >diff --git a/MdeModulePkg/Core/Dxe/Hand/Handle.c >b/MdeModulePkg/Core/Dxe/Hand/Handle.c >index 1c25521..0afa86b 100644 >--- a/MdeModulePkg/Core/Dxe/Hand/Handle.c >+++ b/MdeModulePkg/Core/Dxe/Hand/Handle.c >@@ -1004,13 +1004,8 @@ CoreOpenProtocol ( > // > // Check for invalid Interface > // >- if (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) { >-if (Interface == NULL) { >- return EFI_INVALID_PARAMETER; >-} else { >- *Interface = NULL; >-} >- } >+ if ((Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) && (Interface == >NULL)) >+return EFI_INVALID_PARAMETER; > > // > // Check for invalid UserHandle >@@ -1073,15 +1068,11 @@ CoreOpenProtocol ( > Prot = CoreGetProtocolInterface (UserHandle, Protocol); > if (Prot == NULL) { > Status = EFI_UNSUPPORTED; >+// Return NULL Interface if Unsupported Protocal >+*Interface = NULL; > goto Done; > } > >- // >- // This is the protocol interface entry for this protocol >- // >- if (Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) { >-*Interface = Prot->Interface; >- } > Status = EFI_SUCCESS; > > ByDriver= FALSE; >@@ -1175,6 +1166,15 @@ CoreOpenProtocol ( > } > > Done: >+ >+ // >+ // This is the protocol interface entry for this protocol. >+ // In case of any Error, Interface should not be updated as per spec. >+ // >+ if ((Attributes != EFI_OPEN_PROTOCOL_TEST_PROTOCOL) >+ && (Status == EFI_SUCCESS)) { >+*Interface = Prot->Interface; >+ } > // > // Done. Release the database lock are return > // >-- >1.9.1 > >___ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel