Re: [edk2] [PATCH 0/2] MdeModulePkg/EbcDxe: add EBC Debugger

2016-11-11 Thread Yao, Jiewen
HI Pete I am glad that you like it. :) I met some problem on extracting patch from email. So I reviewed the code in https://github.com/pbatard/EbcDebugger and I assume they are same. However, the master contains some non-EBC-debugger related code. The edk2-diff branch contains an old version of

Re: [edk2] [PATCH 0/2] MdeModulePkg/EbcDxe: add EBC Debugger

2016-11-11 Thread Pete Batard
Hi Yao - good to hear from you. On 2016.11.11 23:48, Yao, Jiewen wrote: I have worked on this for EDK-I, but just did not have resource to do the porting for EDK-II. Thank you for doing this. I'll be glad if I can be of help. The EBC Debugger has been tremendously useful during my

Re: [edk2] [PATCH 0/2] MdeModulePkg/EbcDxe: add EBC Debugger

2016-11-11 Thread Yao, Jiewen
That is great news. Thank you Pete. I have worked on this for EDK-I, but just did not have resource to do the porting for EDK-II. Thank you for doing this. Please give me some time, and I will review the patch soon. Thank you Yao Jiewen > -Original Message- > From: edk2-devel

Re: [edk2] [Patch] MdePkg Base.h: Update field name in VERIFY_UINTXX_ENUM_SIZE to follow style

2016-11-11 Thread Kinney, Michael D
Liming, I agree enums should start with [A-Z]. These enums are only use to verify compiler config is right and I wanted to make sure the enum names did not conflict with any other names that might be used. This is why I added '__' to the beginning of these enum names. These enums would never

Re: [edk2] [PATCH] ShellPkg/dmpstore: Support "-sfo"

2016-11-11 Thread Shah, Tapan
Ray, Chris and I looked at the patch closely again and saw that your change also includes -sfo support for -l and -s flags which is not supported according to the latest spec. See below syntax from spec: dmpstore [-b] [-d] [-all | (-guid guid)] [variable] [-sfo] dmpstore [-all | (-guid

Re: [edk2] [PATCH v2 0/3] Put AP into safe hlt-loop code on S3 path

2016-11-11 Thread Laszlo Ersek
On 11/11/16 06:45, Jeff Fan wrote: > On S3 path, we will wake up APs to restore CPU context in PiSmmCpuDxeSmm > driver. In case, one NMI or SMI happens, APs may exit from hlt state and > execute the instruction after HLT instruction. > > But APs are not running on safe code, it leads OVMF S3 boot

Re: [edk2] [PATCH 0/2] MdeModulePkg/EbcDxe: add EBC Debugger

2016-11-11 Thread Pete Batard
Hi Mike, On 2016.11.11 17:41, Kinney, Michael D wrote: I see the new INF files uses '..' in the [Sources] section, which is not allowed. Can we move that INF file up one directory, so it can remove use of ..? Sure. I'll work on this and submit a V2. I also see that this code defined its

Re: [edk2] [PATCH 0/2] MdeModulePkg/EbcDxe: add EBC Debugger

2016-11-11 Thread Kinney, Michael D
Hi Pete, I see the new INF files uses '..' in the [Sources] section, which is not allowed. Can we move that INF file up one directory, so it can remove use of ..? I also see that this code defined its own EFI_EBC_DEBUGGER_CODE macro. Could these be changed to the standard DEBUG_CODE() macro

Re: [edk2] [PATCH] ShellPkg/dmpstore: Support "-sfo"

2016-11-11 Thread Shah, Tapan
Two comments: 1. Missing help output update for -sfo support in dmpstore command. 2. BinaryToHexString() is missing input parameter NULL and out of bound size check before access. -Original Message- From: Ruiyu Ni [mailto:ruiyu...@intel.com] Sent: Friday, November 11, 2016 4:14 AM To:

[edk2] [PATCH 0/2] MdeModulePkg/EbcDxe: add EBC Debugger

2016-11-11 Thread Pete Batard
The EBC Debugger [1], which was present in Tianocore [2], is an invaluable tool for EBC development. This patch adds it back into the EDK2, allowing, for instance, the compilation of an AARCH64 EBC debugger. Note 1: The patch is split in two, so that the changes to the existing EbcDxe code

[edk2] [PATCH 1/2] MdeModulePkg/EbcDxe: add EBC Debugger

2016-11-11 Thread Pete Batard
This patch introduces EbcDebuggerHook.h and inserts the required EBCDebugger references into the existing EBC source files. Since none of the introduced code is active, EbcDxe module compilation should be unaffected by this patch. Contributed-under: TianoCore Contribution Agreement 1.0

Re: [edk2] [PATCH] ShellPkg/dmpstore: Support "-sfo"

2016-11-11 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey > -Original Message- > From: Ni, Ruiyu > Sent: Friday, November 11, 2016 2:14 AM > To: edk2-devel@lists.01.org > Cc: Chen, Chen A ; Carsey, Jaben > ; Tapan Shah >

Re: [edk2] File mode problem on Github edk2-BaseTools-win32

2016-11-11 Thread Gao, Liming
Evan: Yes. I expect you send the patch into this mail list. After I review and test, I will help push it into edk2-BaseTools-win32 repo. As you mention, this repo is still the mirror of svn. Any change in this repo will impact the mirror sync. So, we expect the patch to be applied. Thanks

Re: [edk2] File mode problem on Github edk2-BaseTools-win32

2016-11-11 Thread Evan Lloyd
Hi Laszlo. >-Original Message- >From: Laszlo Ersek [mailto:ler...@redhat.com] >Sent: 11 November 2016 11:24 >To: Evan Lloyd; edk2-devel (edk2-devel@lists.01.org) >Cc: Leif Lindholm; liming@intel.com >Subject: Re: [edk2] File mode problem on Github edk2-BaseTools-win32 ... >> Liming,

Re: [edk2] [PATCH V3 0/6] Enable SMM page level protection.

2016-11-11 Thread Laszlo Ersek
On 11/11/16 13:53, Yao, Jiewen wrote: > Sorry, I did not explain it clear enough before. > > Jeff is right. The NX fix is introduced in this patch series. > The reason is that when we update page table to protect the SMRAM, we would > like enable the protection as early as possible. > We moved

Re: [edk2] [PATCH V3 0/6] Enable SMM page level protection.

2016-11-11 Thread Yao, Jiewen
Sorry, I did not explain it clear enough before. Jeff is right. The NX fix is introduced in this patch series. The reason is that when we update page table to protect the SMRAM, we would like enable the protection as early as possible. We moved the NX enabling code from C function to ASM

Re: [edk2] [PATCH V3 0/6] Enable SMM page level protection.

2016-11-11 Thread Laszlo Ersek
On 11/11/16 13:38, Fan, Jeff wrote: > Laszlo, > > NX support and fix in SmiEntry.asm is new code for UefiCpuPkg. Ah, you are right. Sorry, I missed that. I've checked the v2 series now and I see the SkipXd label and friends are introduced by v2; it's not preexistent code. This means it should

Re: [edk2] [PATCH v2 2/2] MdeModulePkg/Ip4Dxe: Correct the return status

2016-11-11 Thread Laszlo Ersek
On 11/11/16 06:18, Jiaxin Wu wrote: > This patch made the following change: > * DataItem->Status should be updated to the status code. > * Data should not be freed if EFI_NOT_READY returned. > > Cc: Santhapur Naveen > Cc: Laszlo Ersek > Cc: Ye Ting

Re: [edk2] [PATCH v2 1/2] MdeModulePkg/Ip4Dxe: Add wrong/invalid subnet check

2016-11-11 Thread Laszlo Ersek
On 11/11/16 06:18, Jiaxin Wu wrote: > v2: > * Separate out the return status fix. > * Replace IP4_MASK_MAX with IP4_MASK_MAX. > * Remove the ON_EXIT label. > > This patch is used to add the wrong/invalid subnet check. > > Cc: Santhapur Naveen > Cc: Laszlo Ersek

Re: [edk2] [PATCH 0/2] Place APs to suitable state on Legacy OS boot

2016-11-11 Thread Fan, Jeff
Laszlo, Got you. It's a good suggestion! Jeff -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Friday, November 11, 2016 8:33 PM To: Fan, Jeff Cc: edk2-de...@ml01.01.org; Tian, Feng; Yao, Jiewen; Kinney, Michael D; Paolo Bonzini Subject: Re: [edk2] [PATCH 0/2]

Re: [edk2] [PATCH V3 0/6] Enable SMM page level protection.

2016-11-11 Thread Fan, Jeff
Laszlo, NX support and fix in SmiEntry.asm is new code for UefiCpuPkg. So, that means we still have other unknown problem on S3 boot issue. Jeff -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Friday, November 11, 2016 8:26 PM To: Yao, Jiewen;

Re: [edk2] [PATCH 0/2] Place APs to suitable state on Legacy OS boot

2016-11-11 Thread Laszlo Ersek
On 11/11/16 12:57, Jeff Fan wrote: > Currently, DxeMpLib only places APs into specified c-state in Exit Boot > Service > callback function for UEFI OS boot. We need to put APs into specified c-state > for legacy OS boot also. > > https://bugzilla.tianocore.org/show_bug.cgi?id=210 > > Jeff Fan

Re: [edk2] [PATCH V3 0/6] Enable SMM page level protection.

2016-11-11 Thread Laszlo Ersek
Jiewen, Jeff, On 11/11/16 10:12, Yao, Jiewen wrote: > HI Laszlo > I fixed the IA32 boot issue in this patch Thank you. Jiewen, I'd like to request the following: - Please separate the fix for the incorrect parameter passing to SmiRendezvous() out to a separate patch. It is my understanding

Re: [edk2] [PATCH v2] UefiCpuPkg/DxeMpLib: Allocate below 4GB mem for AsmRelocateApLoopFunc

2016-11-11 Thread Fan, Jeff
Laszlo, Thanks your updating and pushing. Jeff -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Friday, November 11, 2016 8:08 PM To: Fan, Jeff; edk2-de...@ml01.01.org Cc: Kinney, Michael D; Paolo Bonzini; Yao, Jiewen Subject: Re: [edk2] [PATCH v2]

[edk2] [PATCH 2/2] UefiCpuPkg/DxeMpLib: Place APs to suitable state on Legacy OS boot

2016-11-11 Thread Jeff Fan
Currently, DxeMpLib only places APs into specified c-state in Exit Boot Service callback function for UEFI OS boot. We need to put APs into specified c-state for legacy OS boot also. https://bugzilla.tianocore.org/show_bug.cgi?id=210 Cc: Laszlo Ersek Cc: Paolo Bonzini

Re: [edk2] File mode problem on Github edk2-BaseTools-win32

2016-11-11 Thread Laszlo Ersek
On 11/11/16 12:05, Evan Lloyd wrote: > There is a minor, but annoying, problem with file modes on the Github > edk2-BaseTools-win32 repository. > Git maintains a limited internal record of the Unix style file modes. > edk2-BaseTools-win32 currently causes Git to set the file's modes to 660. > So,

Re: [edk2] [PATCH v2 6/9] OvmfPkg/PlatformBds: Dispatch deferred images after EndOfDxe

2016-11-11 Thread Ni, Ruiyu
Sorry for that! :( I really forgot it. 发自我的 iPhone > 在 2016年11月11日,下午7:16,Laszlo Ersek 写道: > > Ray, > >> On 11/08/16 14:04, Laszlo Ersek wrote: >>> On 11/08/16 13:29, Ruiyu Ni wrote: >>> Contributed-under: TianoCore Contribution Agreement 1.0 >>> Signed-off-by: Ruiyu Ni

Re: [edk2] [PATCH v2 6/9] OvmfPkg/PlatformBds: Dispatch deferred images after EndOfDxe

2016-11-11 Thread Laszlo Ersek
Ray, On 11/08/16 14:04, Laszlo Ersek wrote: > On 11/08/16 13:29, Ruiyu Ni wrote: >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Ruiyu Ni >> Cc: Jordan Justen >> Cc: Laszlo Ersek >> --- >>

[edk2] File mode problem on Github edk2-BaseTools-win32

2016-11-11 Thread Evan Lloyd
There is a minor, but annoying, problem with file modes on the Github edk2-BaseTools-win32 repository. Git maintains a limited internal record of the Unix style file modes. edk2-BaseTools-win32 currently causes Git to set the file's modes to 660. So, after a checkout or pull of master, the builds

Re: [edk2] [PATCH v2] UefiCpuPkg/DxeMpLib: Allocate below 4GB mem for AsmRelocateApLoopFunc

2016-11-11 Thread Laszlo Ersek
On 11/11/16 09:56, Jeff Fan wrote: > Current implementation just allocates reserve memory for > AsmRelocateApLoopFunc. > It not be safe because APs will be placed into 32bit protected mode on long > mode > DXE. This reserve memory must be located below 4GB memory. > > This fix is to allocate <

Re: [edk2] [PATCH v2 3/3] UefiCpuPkg/PiSmmCpuDxeSmm: Decrease mNumberToFinish in AP safe code

2016-11-11 Thread Paolo Bonzini
On 11/11/2016 06:45, Jeff Fan wrote: > We will put APs into hlt-loop in safe code. But we decrease mNumberToFinish > before APs enter into the safe code. Paolo pointed out this gap. > > This patch is to move mNumberToFinish decreasing to the safe code. It could > make sure BSP could wait for

[edk2] [PATCH] ShellPkg/dmpstore: Support "-sfo"

2016-11-11 Thread Ruiyu Ni
The patch adds the "-sfo" support to "dmpstore" command. 1. For "-l" (load variable from file), when the variable content can be updated, the new variable data is displayed in SFO format, otherwise, the new variable data is not displayed. So that the SFO consumer can know which variables are

Re: [edk2] [PATCH V3 0/6] Enable SMM page level protection.

2016-11-11 Thread Yao, Jiewen
HI Laszlo I fixed the IA32 boot issue in this patch with DEBUG message update you suggested. My unit test failed before. Now it can pass. I validated on a real IA32 and Windows OVMF with and without XD. For QEMU installation, it is still on progress. We have setup a Fedora 24 host, download

[edk2] [Patch] MdePkg IndustryStandard: Add DDR3, DDR4 and LPDDR definition per SPD spec

2016-11-11 Thread Liming Gao
https://bugzilla.tianocore.org/show_bug.cgi?id=201 Cc: Giri P Mudusuru Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- MdePkg/Include/IndustryStandard/SdramSpd.h | 1682 +++- 1 file

[edk2] [PATCH V3 5/6] UefiCpuPkg/PiSmmCpuDxeSmm: Add paging protection.

2016-11-11 Thread Jiewen Yao
PiSmmCpuDxeSmm consumes SmmAttributesTable and setup page table: 1) Code region is marked as read-only and Data region is non-executable, if the PE image is 4K aligned. 2) Important data structure is set to RO, such as GDT/IDT. 3) SmmSaveState is set to non-executable, and SmmEntrypoint is set to

[edk2] [PATCH V3 6/6] QuarkPlatformPkg/dsc: enable Smm paging protection.

2016-11-11 Thread Jiewen Yao
Cc: Michael D Kinney Cc: Kelly Steele Cc: Jeff Fan Cc: Feng Tian Cc: Star Zeng Cc: Laszlo Ersek Cc: Paolo Bonzini Contributed-under:

[edk2] [PATCH V3 2/6] MdeModulePkg/dec: Add gEdkiiPiSmmMemoryAttributesTableGuid.

2016-11-11 Thread Jiewen Yao
This table describes the SMM memory attributes. Cc: Jeff Fan Cc: Feng Tian Cc: Star Zeng Cc: Michael D Kinney Cc: Laszlo Ersek Cc: Paolo Bonzini

[edk2] [PATCH V3 4/6] UefiCpuPkg/dec: Add PcdCpuSmmStaticPageTable.

2016-11-11 Thread Jiewen Yao
If enabled, SMM will not use on-demand paging. SMM will build static page table for all memory. The page table size depend on 2 things: 1) The 1G paging capability. 2) The whole system memory/MMIO addressing capability. A) If the system only supports 2M paging, When the whole memory/MMIO is

[edk2] [PATCH V3 0/6] Enable SMM page level protection.

2016-11-11 Thread Jiewen Yao
below is V3 description 1) PiSmmCpu: Fix CpuIndex corruption issue due to stack malposition. (Many thanks to Laszlo Ersek for catching it.) 2) PiSmmCpu: Add ASSERT for CpuIndex check. 3) PiSmmCpu: Use DEBUG_VERBOSE for page table update. 4) PiSmmCpu: Do not report

[edk2] [PATCH] MdeModulePkg/CapsuleApp: remove unused definition.

2016-11-11 Thread Jiewen Yao
remove EFI_CAPSULE_FROM_FILE_DIR remove EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED. no one uses them. Cc: Michael D Kinney Cc: Feng Tian Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0

[edk2] [PATCH v2] UefiCpuPkg/DxeMpLib: Allocate below 4GB mem for AsmRelocateApLoopFunc

2016-11-11 Thread Jeff Fan
Current implementation just allocates reserve memory for AsmRelocateApLoopFunc. It not be safe because APs will be placed into 32bit protected mode on long mode DXE. This reserve memory must be located below 4GB memory. This fix is to allocate < 4GB memory for AsmRelocateApLoopFunc. Cc: Laszlo

Re: [edk2] [patch] MdePkg: Fix spec mismatch in string representation of EMMC dev node

2016-11-11 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni Thanks/Ray > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Feng Tian > Sent: Thursday, November 10, 2016 1:17 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming ; Jin, Eric

Re: [edk2] [PATCH 3/3] DuetPkg: Add POSTBUILD in DSC files to run post-build automatically

2016-11-11 Thread Ni, Ruiyu
Hao, Thanks for making this helpful updates. Reviewed-by: Ruiyu Ni >-Original Message- >From: Wu, Hao A >Sent: Friday, November 11, 2016 4:27 PM >To: edk2-devel@lists.01.org >Cc: Wu, Hao A ; Ni, Ruiyu >Subject: [PATCH 3/3]

Re: [edk2] [PATCH 1/3] DuetPkg: Resolve white-space issues for post-build scripts & ReadMe

2016-11-11 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni Regards, Ray >-Original Message- >From: Wu, Hao A >Sent: Friday, November 11, 2016 4:27 PM >To: edk2-devel@lists.01.org >Cc: Wu, Hao A ; Ni, Ruiyu >Subject: [PATCH 1/3] DuetPkg: Resolve white-space issues

Re: [edk2] [PATCH 2/3] DuetPkg: Use 'echo off' in BATCH script files

2016-11-11 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni Regards, Ray >-Original Message- >From: Wu, Hao A >Sent: Friday, November 11, 2016 4:27 PM >To: edk2-devel@lists.01.org >Cc: Wu, Hao A ; Ni, Ruiyu >Subject: [PATCH 2/3] DuetPkg: Use 'echo off' in BATCH

[edk2] [PATCH 0/3] Enable POSTBUILD feature in DuetPkg DSC files

2016-11-11 Thread Hao Wu
This patch series uses the POSTBUILD feature in package DSC files to make the post-build steps for DuetPkg more user-friendly. Cc: Ruiyu Ni Hao Wu (3): DuetPkg: Resolve white-space issues for post-build scripts & ReadMe DuetPkg: Use 'echo off' in BATCH script files

[edk2] [PATCH 1/3] DuetPkg: Resolve white-space issues for post-build scripts & ReadMe

2016-11-11 Thread Hao Wu
Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- DuetPkg/CreateBootDisk.bat | 14 +-- DuetPkg/CreateBootDisk.sh | 304 ++--- DuetPkg/PostBuild.bat | 2 +-

[edk2] [PATCH 2/3] DuetPkg: Use 'echo off' in BATCH script files

2016-11-11 Thread Hao Wu
Instead of putting a '@' at the beginning of every command in BATCH script files, use 'echo off' at the beginning of each file. Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- DuetPkg/CreateBootDisk.bat |