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

2016-11-04 Thread Laszlo Ersek
On 11/04/16 23:46, Yao, Jiewen wrote: > Ah, yes. Laszlo. You are right. > > I forget to push the last update yesterday. Thank you to remind me. > Now it is synced. Thanks! The commit message updates and the v1->v2 differences look good/reasonable to me (I diffed the code-level end results of the

Re: [edk2] [PATCH v4] OvmfPkg/ResetVector: Depend on PCD values of the page tables.

2016-11-04 Thread Laszlo Ersek
On 11/04/16 23:38, Jordan Justen wrote: > On 2016-11-04 15:27:48, Laszlo Ersek wrote: >> On 11/04/16 14:32, Marvin Häuser wrote: >>> Currently, the value of the page tables' address is hard-coded in the >>> ResetVector. This patch replaces these values with a PCD dependency. >>> >>> A check for

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

2016-11-04 Thread Yao, Jiewen
Ah, yes. Laszlo. You are right. I forget to push the last update yesterday. Thank you to remind me. Now it is synced. Thank you Yao Jiewen From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Saturday, November 5, 2016 6:40 AM To: Yao, Jiewen ; edk2-de...@ml01.01.org Cc:

Re: [edk2] [PATCH v4] OvmfPkg/ResetVector: Depend on PCD values of the page tables.

2016-11-04 Thread Jordan Justen
On 2016-11-04 15:27:48, Laszlo Ersek wrote: > On 11/04/16 14:32, Marvin Häuser wrote: > > Currently, the value of the page tables' address is hard-coded in the > > ResetVector. This patch replaces these values with a PCD dependency. > > > > A check for the size has been added to alert the

Re: [edk2] [PATCH v4] OvmfPkg/ResetVector: Depend on PCD values of the page tables.

2016-11-04 Thread Laszlo Ersek
On 11/04/16 14:32, Marvin Häuser wrote: > Currently, the value of the page tables' address is hard-coded in the > ResetVector. This patch replaces these values with a PCD dependency. > > A check for the size has been added to alert the developer to rewrite > the ASM according to the new size, if

Re: [edk2] Sec and Reset vector

2016-11-04 Thread Rafael Machado
All the answers were really detailed and I agree with Andrew. These answers are a great help when we are learning. Thanks a lot guys. I learn a lot with this community. Thanks and regards Rafael Em sex, 4 de nov de 2016 19:28, Kinney, Michael D < michael.d.kin...@intel.com> escreveu: > Rafael,

Re: [edk2] Sec and Reset vector

2016-11-04 Thread Kinney, Michael D
Rafael, The first instruction executed for IA32 SEC phase is typically 16-bytes from the end of the Firmware Device (FD) image generated by a build. If you look at QuarkPlatformPkg/Quark.dsc as an example build, it generates an 8MB file called Quark.FD. The reset vector is 16-bytes from the

Re: [edk2] Sec and Reset vector

2016-11-04 Thread Andrew Fish
> On Nov 4, 2016, at 12:59 PM, Laszlo Ersek wrote: > > On 11/04/16 20:33, Rafael Machado wrote: >> Hi Andrew >> >> Maybe my question was not clear. >> But thanks for the information you provided. >> >> I think we can simplify what I need based on your last comment. You

Re: [edk2] [PATCH 2/2] ShellPkg/Ifconfig: Enable setting MAC address

2016-11-04 Thread Carsey, Jaben
I think this is a good idea. But I see 2 issues. 1 - ifconfig standard parameters are controlled by the UEFI Shell Specification. If you want to extend the parameters you need to use parameters that start with underscore. I do not quite know how to so this under the "-s" set of functions

Re: [edk2] [RFC] [MdePkg] UefiLib: CreatePopUp

2016-11-04 Thread Felix Poludov
Jiewen, You suggestion is also an option, but I was hoping to achieve the goal without changing all the consumers. -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao, Jiewen Sent: Thursday, November 03, 2016 7:25 PM To: Dong, Eric; Felix

Re: [edk2] Sec and Reset vector

2016-11-04 Thread Laszlo Ersek
On 11/04/16 20:33, Rafael Machado wrote: > Hi Andrew > > Maybe my question was not clear. > But thanks for the information you provided. > > I think we can simplify what I need based on your last comment. You told: > > *"The .com file contains the hardware real mode reset vector (0xFFF0). >

Re: [edk2] Sec and Reset vector

2016-11-04 Thread Rafael Machado
Hi Andrew Maybe my question was not clear. But thanks for the information you provided. I think we can simplify what I need based on your last comment. You told: *"The .com file contains the hardware real mode reset vector (0xFFF0). So execution starts up high. The 1st far jmp you do gets

Re: [edk2] Sec and Reset vector

2016-11-04 Thread Andrew Fish
> On Nov 4, 2016, at 10:48 AM, Rafael Machado > wrote: > > Hi everyone > > Thanks Andrew and Marvin for the clarification. > Now things start to make sense. > > But I was still not able to understand were things start on a real binary Rafeal, I'm not sure

[edk2] [PATCH 2/2] ShellPkg/Ifconfig: Enable setting MAC address

2016-11-04 Thread Marcin Wojtas
This adds new feature to ifconfig shell command, which allow for updating MAC address of the interface or resetting it to the initial value. It consumes newly added NetLib helpers for parsing the Unicode string to EFI_MAC_ADDRESS, calling Snp->StationAddress() callback and reconnecting

[edk2] [PATCH 1/2] MdeModulePkg: NetLib: introduce MAC address handling helper routines

2016-11-04 Thread Marcin Wojtas
This patch introduces three functions that can be used for handling MAC address update. It's also a preparation commit for adding support for this feature using 'ifconfig' shell command. New functions are as following: * NetLibSetMacAddress - locate simple network protocol associated with the

[edk2] [PATCH 0/2] MAC address configuration from Shell

2016-11-04 Thread Marcin Wojtas
Hi, I present two commits that extend 'ifconfig' Shell command with ability to configure/reset MAC address of the network interfaces. For that purpose new routines were added to the NetLib. Details can be found in the commit logs. Any comments or remarks would be very welcome. Best regards,

Re: [edk2] Sec and Reset vector

2016-11-04 Thread Rafael Machado
One additional information. I checked the code mentioned by Andrew, and at the code things make sense. Now I'd like to see that kind of initial code at the final binary. Thanks Rafael Em sex, 4 de nov de 2016 às 15:48, Rafael Machado < rafaelrodrigues.mach...@gmail.com> escreveu: > Hi everyone

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

2016-11-04 Thread Laszlo Ersek
On 11/04/16 16:29, Paolo Bonzini wrote: > > > On 04/11/2016 16:22, Laszlo Ersek wrote: What does this *KVM internal error. Suberror: 1* mean? >> The key message is "emulation failure" -- it means that the processor >> exits to the hypervisor (KVM) because it finds some code that it cannot

[edk2] [PATCH] ArmPkg: Update Redistributor granularity for GICv4

2016-11-04 Thread evan . lloyd
From: Sami Mujawar Updated Redistributor base calculation to allow for the fact that GICv4 has 2 additional 64KB frames (for VLPI and a reserved frame). The code now tests the VLPIS bit in the GICR_TYPER register and calculates the Redistributor granularity accordingly.

Re: [edk2] [PATCH 0/4] Defer 3rd party images loading to after EndOfDxe

2016-11-04 Thread Laszlo Ersek
On 11/04/16 07:09, Ni, Ruiyu wrote: > No. > The open source platform patch will be sent out later. What are the deferred / 3rd party images? Do Driver and SysPrep qualify? Or, is this related to value 3 ("Defer execution when there is security violation") of: -

Re: [edk2] [PATCH] UefiCpuPkg/MpInitLib: Do not wakeup AP if only one processor supported

2016-11-04 Thread Laszlo Ersek
On 11/04/16 09:18, Jeff Fan wrote: > If MaxLogicalProcessorNumber is only 1, we needn't to wake up APs at all > and needn't to register callback functions. > > It could improve boot performance on single supported system. > > https://bugzilla.tianocore.org/show_bug.cgi?id=204 > > Cc: Feng Tian

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

2016-11-04 Thread Laszlo Ersek
On 11/04/16 14:50, Paolo Bonzini wrote: > > > On 04/11/2016 14:28, Yao, Jiewen wrote: >> I tried below way. But it does not help too much. It still takes more >> than 1 minutes to boot with SMP=8. >> >> SendSmiIpiAllExcludingSelf (); >> IoWrite8 (ICH9_APM_STS, DataPort== NULL ? 0 :

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

2016-11-04 Thread Laszlo Ersek
On 11/04/16 04:14, Yao, Jiewen wrote: > Mike > > You are right. > > After I turn on this, I saw all APs. > > > > However, the system becomes extremely slow. Intolerable. > > > > I suggest to add more description around below on why it is set to 0x01 > by default, and what is the impact

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

2016-11-04 Thread Laszlo Ersek
On 11/04/16 02:15, Yao, Jiewen wrote: > Thank you, Mike. > Yes, I reproduced the issue and found out what is wrong. Here is detail: > > It seems OVMF never puts AP in SMM mode, even *before my patch series*. > I rollback all my update and use e9d093. > > I add some debug message in

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

2016-11-04 Thread Paolo Bonzini
On 04/11/2016 16:22, Laszlo Ersek wrote: >> > What does this *KVM internal error. Suberror: 1* mean? > The key message is "emulation failure" -- it means that the processor > exits to the hypervisor (KVM) because it finds some code that it cannot > execute in guest mode natively, so the

Re: [edk2] [PATCH] ShellPkg/reset: Support "-fwui" flag

2016-11-04 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey > -Original Message- > From: Ni, Ruiyu > Sent: Friday, November 04, 2016 1:48 AM > To: edk2-devel@lists.01.org > Cc: Chen, Chen A ; Carsey, Jaben > > Subject: [PATCH] ShellPkg/reset: Support

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

2016-11-04 Thread Laszlo Ersek
On 11/04/16 10:35, Yao, Jiewen wrote: > Hi Laszlo > I just send out V2 patch. > > The new update resolved OVMF ASSERT issue, and added more information in > commit message. Thanks! I'll try to look at v2 (with some more testing) next week. > > However, there is no update for OVMF stability

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

2016-11-04 Thread Laszlo Ersek
On 11/04/16 00:51, Yao, Jiewen wrote: > Hi Laszlo > I appreciate your help to validate the patch for me. Well, part of me is just plain altruistic :), but another part of me is responsible for OVMF at Red Hat, and I'd rather find out about any possible regressions before they are committed ;) >

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

2016-11-04 Thread Paolo Bonzini
On 04/11/2016 14:28, Yao, Jiewen wrote: > I tried below way. But it does not help too much. It still takes more > than 1 minutes to boot with SMP=8. > > SendSmiIpiAllExcludingSelf (); > IoWrite8 (ICH9_APM_STS, DataPort== NULL ? 0 : *DataPort); > IoWrite8 (ICH9_APM_CNT, CommandPort ==

Re: [edk2] [PATCH v3] OvmfPkg/ResetVector: Depend on PCD values of the page tables.

2016-11-04 Thread Marvin Häuser
Hey Laszlo, I'm terribly sorry for the mistakes in v3, I made it in a hurry because it was late - should have postponded for today. Because I didn't see 'your v3' (or didn't you post it yet?), I posted a v4 as you said, which should have fixed the three comments you had. Thank you very much

[edk2] [PATCH v4] OvmfPkg/ResetVector: Depend on PCD values of the page tables.

2016-11-04 Thread Marvin Häuser
Currently, the value of the page tables' address is hard-coded in the ResetVector. This patch replaces these values with a PCD dependency. A check for the size has been added to alert the developer to rewrite the ASM according to the new size, if it has been changed. Contributed-under: TianoCore

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

2016-11-04 Thread Yao, Jiewen
Thank you Paolo. I tried below way. But it does not help too much. It still takes more than 1 minutes to boot with SMP=8. SendSmiIpiAllExcludingSelf (); IoWrite8 (ICH9_APM_STS, DataPort== NULL ? 0 : *DataPort); IoWrite8 (ICH9_APM_CNT, CommandPort == NULL ? 0 : *CommandPort); I also

Re: [edk2] [PATCH v3] MdePkg/BaseMemoryLib*: check for zero length in ZeroMem ()

2016-11-04 Thread Ard Biesheuvel
On 4 November 2016 at 09:08, Gao, Liming wrote: > Reviewed-by: Liming Gao > Pushed, thanks. >> -Original Message- >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >> Ard Biesheuvel >> Sent: Friday, November 04, 2016

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

2016-11-04 Thread Yao, Jiewen
Hi Laszlo I just send out V2 patch. The new update resolved OVMF ASSERT issue, and added more information in commit message. However, there is no update for OVMF stability issue. I have no much idea on what happened. If you want to try V2 with more tests, that is great. But if you want to

[edk2] [PATCH V2 1/6] MdeModulePkg/Include: Add PiSmmMemoryAttributesTable.h

2016-11-04 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 Contributed-under: TianoCore Contribution Agreement 1.0

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

2016-11-04 Thread Jiewen Yao
Cc: Michael D Kinney Cc: Kelly Steele Cc: Jeff Fan Cc: Feng Tian Cc: Star Zeng Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0

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

2016-11-04 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 Contributed-under: TianoCore Contribution Agreement 1.0

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

2016-11-04 Thread Jiewen Yao
below is V2 description 1) PiSmmCpu: resolve OVMF multiple processors boot hang issue. 2) PiSmmCpu: Add debug info on StartupAp() fails. 3) PiSmmCpu: Add ASSERT for AllocatePages(). 4) PiSmmCpu: Add protection detail in commit message. 5) UefiCpuPkg.dsc: Add page table footprint info in

[edk2] [PATCH V2 3/6] MdeModulePkg/PiSmmCore: Add MemoryAttributes support.

2016-11-04 Thread Jiewen Yao
1) This patch installs LoadedImage protocol to SMM protocol database, so that the SMM image info can be got easily to construct the PiSmmMemoryAttributes table. This table is produced at SmmEndOfDxe event. So that the consumer (PiSmmCpu) may consult this table to set memory attribute in page

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

2016-11-04 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

Re: [edk2] [PATCH v3] MdePkg/BaseMemoryLib*: check for zero length in ZeroMem ()

2016-11-04 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Ard Biesheuvel > Sent: Friday, November 04, 2016 5:05 PM > To: edk2-devel@lists.01.org; Kinney, Michael D > ; Gao,

Re: [edk2] SMBIOS/DMI data creation

2016-11-04 Thread Ryan Harkin
On 4 November 2016 at 07:22, Shaveta Leekha wrote: > Hi, > > I was adding SMBIOS DMI data in UEFI for our ARM64 platform. > One patch that I referred is of ARM JUNO platform: > ArmPlatformPkg/ArmJunoPkg: Create SMBIOS/DMI data for Juno > > In it, almost all

[edk2] [PATCH v3] MdePkg/BaseMemoryLib*: check for zero length in ZeroMem ()

2016-11-04 Thread Ard Biesheuvel
Unlike other string functions in this library, ZeroMem () does not return early when the length of the input buffer is 0. So add the same to ZeroMem () as well, for all implementations of BaseMemoryLib living under MdePkg/ This fixes an issue with the ARM implementation of BaseMemoryLibOPtDxe,

[edk2] [PATCH] ShellPkg/reset: Support "-fwui" flag

2016-11-04 Thread Ruiyu Ni
From: Chen A Chen The patch adds "-fwui" support to reset command which is newly added to Shell 2.2 spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen A Chen Reviewed-by: Ruiyu Ni Cc: Jaben Carsey

[edk2] [PATCH] UefiCpuPkg/MpInitLib: Do not wakeup AP if only one processor supported

2016-11-04 Thread Jeff Fan
If MaxLogicalProcessorNumber is only 1, we needn't to wake up APs at all and needn't to register callback functions. It could improve boot performance on single supported system. https://bugzilla.tianocore.org/show_bug.cgi?id=204 Cc: Feng Tian Cc: Liming Gao

[edk2] SMBIOS/DMI data creation

2016-11-04 Thread Shaveta Leekha
Hi, I was adding SMBIOS DMI data in UEFI for our ARM64 platform. One patch that I referred is of ARM JUNO platform: ArmPlatformPkg/ArmJunoPkg: Create SMBIOS/DMI data for Juno In it, almost all SMBIOS table entries/structures are populated statically with information. Is it

Re: [edk2] [PATCH] BaseTools/Edk2Setup.bat: Fix build errors from VS tools PREFIX ENV missing

2016-11-04 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -Original Message- From: Cinnamon Shia [mailto:cinnamon.s...@hpe.com] Sent: Friday, November 4, 2016 10:20 AM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong ; Gao, Liming

Re: [edk2] [PATCH 0/4] Defer 3rd party images loading to after EndOfDxe

2016-11-04 Thread Ni, Ruiyu
No. The open source platform patch will be sent out later. Regards, Ray From: Gao, Liming Sent: Friday, November 4, 2016 1:14 PM To: Ni, Ruiyu ; edk2-devel@lists.01.org Subject: RE: [edk2] [PATCH 0/4] Defer 3rd party images loading to after EndOfDxe Ray: Seemly,