Re: [edk2] [PATCH] CryptoPkg/IntrinsicLib: Fix the warning on memset

2017-11-22 Thread Long, Qin
Reviewed-by: Long Qin (Thanks, Gary. I cannot recall why we used "char" instead of "int" here. Obviously, the prototype of CRT memset should use "int"). Best Regards & Thanks, LONG, Qin -Original Message- From: Gary Lin [mailto:g...@suse.com] Sent: Wednesday,

Re: [edk2] [PATCH v7 0/2] Fix multiple entries of RT_CODE in memory map

2017-11-22 Thread Wang, Jian J
Sorry just see this email. I just replied another one. Great to know it works for both of us. > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Wednesday, November 22, 2017 5:05 PM > To: Zeng, Star ; Wang, Jian J >

[edk2] [PATCH v2 1/9] Platform/NXP: Add support for Big Endian Mmio APIs

2017-11-22 Thread Meenakshi Aggarwal
This library add supports for BE read/write and other MMIO helper function. In this data swapped after reading from MMIO and before write using MMIO. It can be used by any module with BE address space. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal

[edk2] [PATCH v2 3/9] SocLib : Add support for initialization of peripherals

2017-11-22 Thread Meenakshi Aggarwal
Add SocInit function that initializes peripherals and print board and soc information. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- Platform/NXP/Include/Bitops.h | 179 +

[edk2] [PATCH v2 2/9] Platform/NXP : Add support for Watchdog driver

2017-11-22 Thread Meenakshi Aggarwal
Installs watchdog timer arch protocol Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- Platform/NXP/Drivers/WatchDog/WatchDog.c | 421 ++ Platform/NXP/Drivers/WatchDog/WatchDog.h | 37 +++

Re: [edk2] [PATCH] MdeModulePkg/AtaAtapiPassThru: disable only BM-DMA at ExitBootServices()

2017-11-22 Thread Zeng, Star
Ray, You may explain more why Win10 S4 resume fails with only BM disabled, then Laszlo can know the issue well. Thanks, Star -Original Message- From: Ni, Ruiyu Sent: Wednesday, November 22, 2017 6:06 PM To: Laszlo Ersek ; edk2-devel-01 Cc:

[edk2] [PATCH v2 02/14] ArmVirtPkg/PrePi: remove unused GetPlatformPpi() function

2017-11-22 Thread Ard Biesheuvel
Remove GetPlatformPpi() from PrePi: it is not used anywhere. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/PrePi/PrePi.c | 24

[edk2] [PATCH v2 11/14] ArmVirtPkg/ArmVirtQemu: add ArmVirtMemInfoLib implementation

2017-11-22 Thread Ard Biesheuvel
Create a new ArmVirtMemInfoLib for ArmVirtQemuKernel by cloning the existing ArmPlatformGetVirtualMemoryMap () for this platform, (ArmQemuRelocatablePlatformLib *not* ArmVirtPlatformLib), and cleaning it up: - remove support for uncached DRAM mappings - replace EFI_D_xxx with DEBUG_xxx throughout

[edk2] [PATCH v2 09/14] ArmVirtPkg: introduce ArmVirtMemInfoLib library class

2017-11-22 Thread Ard Biesheuvel
As part of the effort to get rid of ArmPlatformLib (which incorporates far too many duties in a single library), introduce ArmVirtMemInfoLib which will be invoked by our ArmVirtMemoryInitPeiLib implementation to get a description of the virtual address space. This will allow us to remove this

[edk2] [PATCH v2 06/14] ArmVirtPkg/PrePi: remove ArmPlatformStackLib dependency

2017-11-22 Thread Ard Biesheuvel
ArmPlatformStackLib has hooks into primary/secondary core PCDs and other ArmPlatformLib related junk, so let's simply set the stack pointer directly. This is trivial given that our PrePi is unicore only. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel

[edk2] [PATCH v2 00/14] ArmVirtPkg: get rid of ArmPlatformLib

2017-11-22 Thread Ard Biesheuvel
ArmPlatformLib is a mixed bag of platform specific hooks, some of which are called from early startup code, and some of which are called from C code, to get the boot mode, memory layout etc. This library class is tightly coupled to the old ARM implementations that ran some parts of UEFI in the

[edk2] [PATCH v2 01/14] ArmVirtPkg/PrePi: run all library constructors by hand

2017-11-22 Thread Ard Biesheuvel
Instead of invoking the library constructors of some libraries by hand, invoke the generated function ProcessLibraryConstructorList in AutoGen.c so all constructors are executed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel

Re: [edk2] [PATCH 1/2] MdeModulePkg/PciBus: Revert "disable all BME when entering RT"

2017-11-22 Thread Yao, Jiewen
BTW: I notice that we have exit boot service callback in ATA bus driver, which may also clear some command register. I think we need validate that too. Thank you Yao Jiewen > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao, > Jiewen >

[edk2] [PATCH v2 14/14] ArmVirtPkg: remove ArmPlatformLib implementations

2017-11-22 Thread Ard Biesheuvel
These libraries are no longer used, so remove them from the tree. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/ArmVirtQemuKernel.dsc

[edk2] [PATCH v2 05/14] ArmVirtPkg/PrePi: remove dependency on ArmPlatformLib

2017-11-22 Thread Ard Biesheuvel
Remove the pointless dependency on ArmPlatformLib: none of the code we call from it actually does anything useful. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek ---

[edk2] [PATCH v2 08/14] ArmVirtPkg/ArmVirtPlatformLib: remove support for uncached mappings

2017-11-22 Thread Ard Biesheuvel
QEMU/KVM has very little tolerance for using anything except writeback cacheable mappings of DRAM, so let's remove the 'feature' that allows us to select uncached mappings at build time. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel

[edk2] [PATCH v2 07/14] ArmVirtPkg/PrePi: remove bogus IntelFrameworkModulePkg.dec dependency

2017-11-22 Thread Ard Biesheuvel
PrePi doesn't use anything defined by this package so drop the bogus dependency. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf

[edk2] [PATCH v2 12/14] ArmVirtPkg: create QemuVirtMemInfoLib version for ArmVirtQemu

2017-11-22 Thread Ard Biesheuvel
The QemuVirtMemInfoLib ArmVirtMemInfoLib implementation created for ArmVirtQemuKernel does exactly what we need for ArmVirtQemu, the only difference being that the latter is PrePeiCore based, and so it uses a different method to ensure that PcdSystemMemorySize is set when ArmVirtGetMemoryMap() is

[edk2] [PATCH v2 13/14] ArmVirtPkg/ArmVirtMemoryInitPeiLib: move to ArmVirtMemInfoLib

2017-11-22 Thread Ard Biesheuvel
Move to the new ArmVirtMemInfoLib library to retrieve DRAM information from the platform, so that we can phase out ArmPlatformLib going forward. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtQemu.dsc

[edk2] [PATCH v2 10/14] ArmVirtPkg/ArmVirtXen: add ArmVirtMemInfoLib implementation

2017-11-22 Thread Ard Biesheuvel
Clone the existing ArmPlatformGetVirtualMemoryMap () for this platform, clean it up slightly (by using a static buffer rather than a heap allocation, and removing the support for uncached DRAM mappings), and turn it into a new ArmVirtMemInfoLib implementation. Contributed-under: TianoCore

[edk2] [PATCH v2 04/14] ArmVirtPkg/PrePi: move DRAM discovery code into PrePi

2017-11-22 Thread Ard Biesheuvel
ArmVirtQemuKernel and ArmVirtXen use essentially the same code to retrieve DRAM information from the DT /memory node at early boot, and invoke it via the ArmPlatformPeiBootAction () hook exposed by ArmPlatformLib. Let's move this code into the PrePi implementation these platforms share between

[edk2] [PATCH v2 03/14] ArmVirtPkg/PrePi: remove bogus primary core check

2017-11-22 Thread Ard Biesheuvel
QEMU and KVM based ARM/AARCH64 virtual machines only enter UEFI on a single core, so ArmPlatformIsPrimaryCore() always returns true. And even if it didn't, our code does absolutely nothing meaningful based on its return value, so don't bother calling it, and remove another frivolous dependency on

[edk2] [PATCH v2 7/8] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support

2017-11-22 Thread Jian J Wang
> v2: >a. Move common TSS structure and API definitions to BaseLib.h >b. Add EXCEPTION_STACK_SWITCH_DATA to convery data used to setup stack > switch. This can avoid allocating memory for it in this library. >c. Add globals to reserve memory for stack switch initialized in early

[edk2] [PATCH v2 8/8] UefiCpuPkg/CpuDxe: Initialize stack switch for MP

2017-11-22 Thread Jian J Wang
> v2: >Add code to reserve resources and initialize AP exception with stack >switch besides BSP, if PcdCpuStackGuard is enabled. In current MP implementation, BSP and AP shares the same exception configuration. Stack switch required by Stack Guard feature needs that BSP and AP have their

[edk2] [PATCH v2 3/8] MdePkg/BaseLib: Add stack switch related definitions for IA32

2017-11-22 Thread Jian J Wang
> v2: >Add new definitions required by stack switch in IA32 The new definitions include two structures IA32_TASK_STATE_SEGMENT IA32_TSS_DESCRIPTOR and one API VOID EFIAPI AsmWriteTr ( IN UINT16 Selector ); They're needed to setup task gate and interrupt stack table for

[edk2] [PATCH v2 1/8] MdeModulePkg/metafile: Add PCD PcdCpuStackGuard

2017-11-22 Thread Jian J Wang
PcdCpuStackGuard is introduced to enable/disable Stack Guard feature. Its value is FALSE by default. Cc: Star Zeng Cc: Eric Dong Suggested-by: Ayellet Wolman Contributed-under: TianoCore Contribution Agreement 1.1

[edk2] [PATCH v2 2/8] MdeModulePkg/CpuExceptionHandlerLib.h: Add a new API

2017-11-22 Thread Jian J Wang
> v2: >Add prototype definition of InitializeCpuExceptionStackSwitchHandlers() A new API InitializeCpuExceptionStackSwitchHandlers() is introduced to support initializing exception handlers being able to switch stack. StackSwitchData is arch dependent and required by IA32 processor to convey

[edk2] [PATCH v2 6/8] UefiCpuPkg/MpLib: Add GDTR, IDTR and TR in saved AP data

2017-11-22 Thread Jian J Wang
> v2: >Add code to save/restore GDTR, IDTR and TR for AP. In current implementation of CPU MP, AP is initialized with data copied from BSP. Stack switch required by Stack Guard feature needs different GDT, IDT table and task gates for each logic processor. This patch adds GDTR, IDTR and TR

[edk2] [PATCH v2 0/8] Implement stack guard feature

2017-11-22 Thread Jian J Wang
Stack guard feature makes use of paging mechanism to monitor if there's a stack overflow occurred during boot. A new PCD PcdCpuStackGuard is added to enable/disable this feature. PCD PcdCpuStackSwitchExceptionList and PcdCpuKnownGoodStackSize are introduced to configure the required exceptions and

Re: [edk2] [PATCH 13/15] ArmVirtPkg: implement ArmVirtMemInfo PPI, PEIM and library

2017-11-22 Thread Laszlo Ersek
On 11/21/17 21:32, Ard Biesheuvel wrote: > On 21 November 2017 at 20:17, Laszlo Ersek > wrote: >> On 11/21/17 18:57, Ard Biesheuvel wrote: >>> So how do you propose i go about creating two versions of >>> QemuVirtMemInfoLib, only one of which has a constructor? Share >>> the

[edk2] [PATCH v2 5/8] UefiCpuPkg/UefiCpuPkg.dec: Add two new PCDs for stack switch

2017-11-22 Thread Jian J Wang
> v2: >Add two new PCDs to configure exception stack switch. Stack switch is required by Stack Guard feature. Following two PCDs are introduced to simplify the resource allocation for initializing stack switch. gUefiCpuPkgTokenSpaceGuid.PcdCpuStackSwitchExceptionList

[edk2] [PATCH v2 4/8] MdeModulePkg/DxeIpl: Enable paging for Stack Guard

2017-11-22 Thread Jian J Wang
Stack guard feature makes use of paging mechanism to monitor if there's a stack overflow occurred during boot. This patch will check setting of PCD PcdCpuStackGuard. If it's TRUE, DxeIpl will setup page table and set the page at which the stack base locates to be NOT PRESENT. If stack is used up

Re: [edk2] [PATCH v7 0/2] Fix multiple entries of RT_CODE in memory map

2017-11-22 Thread Wang, Jian J
Laszlo, Thanks for the comments. Sorry for the commit log which doesn't meet the requirement. I appreciate everything you did to this patch series. It's not intended to ignore them in log. I think I just need more time to get used to the commit conventions. I've explained the reason why v7

Re: [edk2] [PATCH] MdeModulePkg/AtaAtapiPassThru: disable only BM-DMA at ExitBootServices()

2017-11-22 Thread Ni, Ruiyu
Laszlo, Our QA found Win10 S4 resume fails due to your change. As you might notice that I just rolled back the BM disabling patches in PciBus module, I am thinking about maybe you need to rollback the whole ExitBootServices callback as well to fix the compatibility issue. Thanks/Ray >

Re: [edk2] [PATCH 2/2] MdeModulePkg/PciBus: Revert "Enable BM on P2P bridges on demand"

2017-11-22 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com > -Original Message- > From: Ni, Ruiyu > Sent: Monday, November 20, 2017 11:06 AM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Michael Turner > ; Kinney, Michael D > ; Yao,

Re: [edk2] SCT Test crashes After HTTPS boot success.

2017-11-22 Thread Wu, Jiaxin
Hi Karunakar, I didn't see the SCT crash issue but also see the TLS test failure you attached. For the failure, it's related to the EFI compliant test. According the UEFI Spec, section of 2.6.2: If the network environment requires TLS features, EFI_TLS_SERVICE_BINDING_PROTOCOL,EFI_TLS_PROTOCOL

Re: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Remove assertion

2017-11-22 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com > -Original Message- > From: Ni, Ruiyu > Sent: Monday, November 20, 2017 1:14 PM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen > Subject: [PATCH] MdeModulePkg/UefiBootManagerLib: Remove assertion > >

Re: [edk2] [PATCH 1/2] MdeModulePkg/PciBus: Revert "disable all BME when entering RT"

2017-11-22 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com > -Original Message- > From: Ni, Ruiyu > Sent: Monday, November 20, 2017 11:06 AM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Michael Turner > ; Kinney, Michael D > ; Yao,

Re: [edk2] [PATCH v7 0/2] Fix multiple entries of RT_CODE in memory map

2017-11-22 Thread Laszlo Ersek
On 11/22/17 08:56, Zeng, Star wrote: > How about we have the v6 patch series in first with the feedback from Jiewen > (about comments) and you (about MemoryMapStart) addressed? > > Then we can have a separated patch for the merging. Good idea! Thanks! Laszlo > > > Thanks, > Star >

[edk2] [PATCH v2 8/9] Compilation : Add the fdf, dsc and dec files.

2017-11-22 Thread Meenakshi Aggarwal
The firmware device, description and declaration files. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dec | 29 ++ Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc | 77 +

[edk2] [PATCH v2 9/9] Build : Add build script and environment script

2017-11-22 Thread Meenakshi Aggarwal
Build script and Environment setup script. Readme to explain how to run build script Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- Platform/NXP/Env.cshrc | 77

[edk2] [PATCH v2 6/9] Silicon/Maxim : Add support for DS1307 RTC library

2017-11-22 Thread Meenakshi Aggarwal
Real time clock Apis on top of I2C Apis Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- Silicon/Maxim/Library/Ds1307RtcLib/Ds1307Rtc.h | 59 Silicon/Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.c | 327

[edk2] [PATCH v2 7/9] Platform/NXP: Add support for ArmPlatformLib

2017-11-22 Thread Meenakshi Aggarwal
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- .../Library/PlatformLib/ArmPlatformLib.c | 105 .../Library/PlatformLib/ArmPlatformLib.inf | 70

[edk2] [PATCH v2 5/9] Platform/NXP: Add support for I2c driver

2017-11-22 Thread Meenakshi Aggarwal
I2C driver produces gEfiI2cMasterProtocolGuid which can be used by other modules. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- Platform/NXP/Drivers/I2cDxe/I2cDxe.c | 728 +

[edk2] [PATCH v2 4/9] Platform/NXP : Add support for DUART library

2017-11-22 Thread Meenakshi Aggarwal
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- Platform/NXP/Library/DUartPortLib/DUart.h | 128 Platform/NXP/Library/DUartPortLib/DUartPortLib.c | 331 +

Re: [edk2] EDK2 build issues

2017-11-22 Thread Andrew Fish
> On Nov 16, 2017, at 1:37 PM, Desimone, Nathaniel L > wrote: > > Hi Liming, > > I chatted with Aaron on the phone today. The VfrCompiler race condition was > discovered using "make -j " (where n > 1). I have filed the bug in > Bugzilla: > I think there are

Re: [edk2] [PATCH] MdeModulePkg/Core: Fix potential array overflow

2017-11-22 Thread Wu, Hao A
Reviewed-by: Hao Wu Best Regards, Hao Wu > -Original Message- > From: Wang, Jian J > Sent: Thursday, November 23, 2017 9:06 AM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A; Zeng, Star; Dong, Eric > Subject: [PATCH] MdeModulePkg/Core: Fix potential array overflow >

Re: [edk2] EDK2 build issues

2017-11-22 Thread Desimone, Nathaniel L
https://bugzilla.tianocore.org/show_bug.cgi?id=793 Thanks, Nate -Original Message- From: Gao, Liming Sent: Friday, November 17, 2017 12:46 AM To: Desimone, Nathaniel L ; Aaron Durbin Cc: edk2-devel@lists.01.org Subject: RE: [edk2]

[edk2] [PATCH] MdeModulePkg/Core: Fix potential array overflow

2017-11-22 Thread Jian J Wang
In the method DumpGuardedMemoryBitmap() and SetAllGuardPages(), the code didn't check if the global mMapLevel is legal value or not, which leaves a logic hole causing potential array overflow in code followed. This patch adds sanity check before any array reference in those methods. Cc: Wu Hao

Re: [edk2] [PATCH 1/5] MdeModulePkg/BdsDxe: fall back to a Boot Manager Menu loop before hanging

2017-11-22 Thread Ni, Ruiyu
Thanks for the patch. It follows the idea described in: https://lists.01.org/pipermail/edk2-devel/2017-April/010294.html. Reviewed-by: Ruiyu Ni Thanks/Ray > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Thursday, November 23, 2017 7:59

Re: [edk2] [Patch] MdeModulePkg: Free NET_BUF data after it is sent out to avoid memory leak

2017-11-22 Thread Wu, Jiaxin
Hi Fan, Looks this patch will cause the null pointer dereference issue, see below analysis: With this patch, the NET_BUF will be freed and the corresponding Arg (Packet) will also be freed in DhcpReleasePacket. Wrap = NetbufFromExt (, 1, 0, 0, DhcpReleasePacket, Packet); That's

Re: [edk2] [PATCH v2 0/8] Implement stack guard feature

2017-11-22 Thread Yao, Jiewen
For test, can we test boot OS (windows/Linux) with PcdCpuStackGuard enabled? Thank you Yao Jiewen > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jian J > Wang > Sent: Wednesday, November 22, 2017 4:46 PM > To: edk2-devel@lists.01.org >

Re: [edk2] [PATCH] MdeModulePkg/Core: Add missing header files into inf

2017-11-22 Thread Bi, Dandan
Reviewed-by: Dandan Bi Thanks, Dandan -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jian J Wang Sent: Thursday, November 23, 2017 9:19 AM To: edk2-devel@lists.01.org Cc: Bi, Dandan ; Dong, Eric

[edk2] [Patch][edk2-platforms] Minor BIOS ID.

2017-11-22 Thread lushifex
Update Minor version of BIOS ID. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex --- Platform/BroxtonPlatformPkg/BiosId.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/BroxtonPlatformPkg/BiosId.env

Re: [edk2] [PATCH v2 2/8] MdeModulePkg/CpuExceptionHandlerLib.h: Add a new API

2017-11-22 Thread Yao, Jiewen
Hi I am a little worried about the way to use VOID * to pass arch dependent data. Can we define it clearly in each ARCH in the header file, and use a UNION to include all arch? I think both the caller and the callee need parse it. As such, VOID * is not a good way. Thank you Yao Jiewen >

[edk2] [PATCH v8 2/2] MdeModulePkg/DxeCore: Filter out all paging capabilities

2017-11-22 Thread Jian J Wang
> v8: > Remove merge code but keep code to remain MemoryMapStart > v7: > Merge memory map after filtering code > v6: > Add code filter out all paging capabilities Some OSs will treat EFI_MEMORY_DESCRIPTOR.Attribute as really set attributes and change memory paging attribute accordingly.

[edk2] [PATCH v8 1/2] UefiCpuPkg/CpuDxe: Fix multiple entries of RT_CODE in memory map

2017-11-22 Thread Jian J Wang
> v7/v8: >No change. > v6: >Add ExecuteDisable feature check to include/exclude EFI_MEMORY_XP > v5: >Coding style clean-up > v4: > a. Remove DoUpdate and check attributes mismatch all the time to avoid >a logic hole > b. Add warning message if failed to update capability > c.

[edk2] [PATCH v8 0/2] Fix multiple entries of RT_CODE in memory map

2017-11-22 Thread Jian J Wang
> v8: >Remove merge code but keep code to remain MemoryMapStart > v7: >Merge memory map after filtering paging attributes > v6: >Add ExecuteDisable feature check to include/exclude EFI_MEMORY_XP > v5: >Coding style clean-up > v4: > a. Remove DoUpdate and check attributes

Re: [edk2] [PATCH v2 8/8] UefiCpuPkg/CpuDxe: Initialize stack switch for MP

2017-11-22 Thread Yao, Jiewen
Hi 1) Can we enable this feature in early DxeCore? Current DxeCore still calling InitializeCpuExceptionHandlers(). But I hope InitializeExceptionStackSwitchHandlers() can be used here. In order to handle buffer from different arch, the DxeIpl can help provide some data in hob and pass to

Re: [edk2] [PATCH] MdeModulePkg UhciPei: Also check TempPtr against NULL to return error

2017-11-22 Thread Wu, Hao A
Reviewed-by: Hao Wu Best Regards, Hao Wu > -Original Message- > From: Zeng, Star > Sent: Thursday, November 23, 2017 9:04 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star; Wu, Hao A; Yao, Jiewen > Subject: [PATCH] MdeModulePkg UhciPei: Also check TempPtr against

[edk2] [PATCH 5/5] OvmfPkg: disable EFI_DEBUG_CODE reporting in RELEASE builds

2017-11-22 Thread Laszlo Ersek
Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Ruiyu Ni Cc: Anthony Perard Cc: Julien Grall Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1515418 Contributed-under:

[edk2] [PATCH 0/5] MdeModulePkg, OvmfPkg: more easily visible boot progress reporting

2017-11-22 Thread Laszlo Ersek
Repo: https://github.com/lersek/edk2.git Branch: boot_diags The point of this series is to communicate OVMF boot progress and boot failure in a way that is easier to consume for users who aren't versed in OVMF debug log capturing and analysis. This means that we have to write stuff about

[edk2] [PATCH 2/5] MdeModulePkg: introduce the EDKII_OS_LOADER_DETAIL status code payload

2017-11-22 Thread Laszlo Ersek
The EfiBootManagerBoot() function in UefiBootManagerLib is the central function for loading and starting Boot options. The library is built into multiple drivers and applications (such as BdsDxe and UiApp), therefore it is careful not to print anything to the system console. All progress

[edk2] [PATCH 1/5] MdeModulePkg/BdsDxe: fall back to a Boot Manager Menu loop before hanging

2017-11-22 Thread Laszlo Ersek
Under the following scenario: - no UEFI bootable application available anywhere in the system, - ... not even for the default platform recovery option, - no shell is built into the firmware image, - but UiApp is available in the firmware image, we should preferably not just hang in BdsEntry()

[edk2] [PATCH 3/5] MdeModulePkg/UefiBootManagerLib: report EDKII_OS_LOADER_DETAIL status code

2017-11-22 Thread Laszlo Ersek
The EfiBootManagerBoot() function reports progress codes about LoadImage() preparation and failure, and StartImage() preparation and failure. These codes are flat (scalar) constants. Extend this by "broadcasting" the Boot option number, description, device path, and -- on load / start failure

[edk2] [PATCH] MdeModulePkg/Core: Add missing header files into inf

2017-11-22 Thread Jian J Wang
The coding style requires that header files must be also added in module's inf file, as long as they're included by c files. This patch will fix this issue. Cc: Dandan Bi Cc: Star Zeng Cc: Eric Dong Contributed-under: TianoCore

Re: [edk2] [PATCH] MdeModulePkg/AtaAtapiPassThru: disable only BM-DMA at ExitBootServices()

2017-11-22 Thread Ni, Ruiyu
I cannot explain precisely why the S4 resume fails. I can just guess: Windows might have some assumptions on the BM bit. Thanks/Ray > -Original Message- > From: Zeng, Star > Sent: Wednesday, November 22, 2017 6:26 PM > To: Ni, Ruiyu ; Laszlo Ersek ;

[edk2] [PATCH] IntelFsp2WrapperPkg: Support UPD allocation outside FspWrapper

2017-11-22 Thread Chasel, Chiu
UPD allocation and patching can be done outside FspWrapper as implementation choice so adding a PCD to select between original FspWrapper allocation model or outside model Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chasel Chiu

[edk2] [PATCH] IntelSiliconPkg IntelVTdDxe: Do not SetupVtd again

2017-11-22 Thread Star Zeng
Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c | 3 +++ IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h | 5 +++--

Re: [edk2] [RFC] ACPI table HID/CID allocation

2017-11-22 Thread Udit Kumar
Hi Daniel > > For external devices (for which HID is not available), you suggest to > > go with PRP0001 + compatible or that device driver needs add ACPI HID > support. > > I don't think internal or external to the SoC would be any kind of deciding > factor > in how to best to bind, simply

Re: [edk2] [RFC] ACPI table HID/CID allocation

2017-11-22 Thread Daniel Thompson
On 21/11/17 18:10, Udit Kumar wrote: Thanks Ard, For internal SOC devices, this is perfectly ok to drop PRP0001 from CID. This could be a valid reason to use PRP0001 + compatible, for things like I2C slaves that are external to the SoC For external devices (for which HID is not available),

[edk2] [PATCH 4/5] OvmfPkg/PlatformBootManagerLib: print EDKII_OS_LOADER_DETAIL to ConOut

2017-11-22 Thread Laszlo Ersek
Parse and print the EDKII_OS_LOADER_DETAIL debug codes from UefiBootManagerLib (when it acts as part of BdsDxe -- not as part of UiApp, for example). In effect this displays LoadImage() and StartImage() attempts and failures on the splash screen, visibly to end-users. While at it, print two other

[edk2] [PATCH] MdeModulePkg UhciPei: Also check TempPtr against NULL to return error

2017-11-22 Thread Star Zeng
Cc: Hao Wu Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [edk2] [PATCH] IntelSiliconPkg IntelVTdDxe: Do not SetupVtd again

2017-11-22 Thread Yao, Jiewen
Tested-by: jiewen@intel.com Reviewed-by: jiewen@intel.com > -Original Message- > From: Zeng, Star > Sent: Thursday, November 23, 2017 9:11 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen > Subject: [PATCH]

Re: [edk2] [PATCH v2 2/8] MdeModulePkg/CpuExceptionHandlerLib.h: Add a new API

2017-11-22 Thread Wang, Jian J
Good idea. I think it should be defined in also in following file besides the new API MdeModulePkg\Include\Library\CpuExceptionHandlerLib.h > -Original Message- > From: Yao, Jiewen > Sent: Thursday, November 23, 2017 12:08 PM > To: Wang, Jian J ;

Re: [edk2] EDK2 build issues

2017-11-22 Thread Gao, Liming
Andrew: To compile BaseTools C tools is a separate step. It happens before build. I review BaseTools C tool top GNUmakefile. It can be enhanced to support make -j N that has the better performance. I will provide my patch for code review. Thanks Liming >-Original Message- >From:

Re: [edk2] [PATCH 3/5] MdeModulePkg/UefiBootManagerLib: report EDKII_OS_LOADER_DETAIL status code

2017-11-22 Thread Ni, Ruiyu
Laszlo, When booting a boot option, UefiBootManagerBoot() sets a Boot variable and saves to BootCurrent variable. So all the details (except the EDKII_OS_LOADER_DETAIL.Status) can be retrieved from reading Boot variable. 4 more comments below. Thanks/Ray > -Original

Re: [edk2] [PATCH v2 0/8] Implement stack guard feature

2017-11-22 Thread Wang, Jian J
I did test it with disabled. I'll try it enabled. Do you think this feature should be enabled by default or not, just like the PcdCpuSmmStackGuard? > -Original Message- > From: Yao, Jiewen > Sent: Thursday, November 23, 2017 11:48 AM > To: Wang, Jian J ;

Re: [edk2] [PATCH v2 0/8] Implement stack guard feature

2017-11-22 Thread Yao, Jiewen
If we do not see any compatibility problem with Linux or Windows, we can enable it by default. Or we have to disable it by default. It is always good to have a try. Let's see. Thank you Yao Jiewen > -Original Message- > From: Wang, Jian J > Sent: Thursday, November 23, 2017 1:09 PM >

Re: [edk2] SCT Test crashes After HTTPS boot success.

2017-11-22 Thread Wu, Jiaxin
Hi Karunakar, We're going to update the below description in UEFI Spec section of 2.6.2, not SCT Spec: If the network environment requires TLS features, EFI_TLS_SERVICE_BINDING_PROTOCOL,EFI_TLS_PROTOCOL and EFI_TLS_CONFIGURATION_PROTOCOL are required. The SCT test case was drafted by according

Re: [edk2] [PATCH v2 7/8] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support

2017-11-22 Thread Wang, Jian J
> -Original Message- > From: Yao, Jiewen > Sent: Thursday, November 23, 2017 1:50 PM > To: Wang, Jian J ; edk2-devel@lists.01.org > Cc: Zeng, Star ; Dong, Eric ; > Kinney, Michael D > Subject:

Re: [edk2] [PATCH v2 7/8] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support

2017-11-22 Thread Wang, Jian J
1.1) Got your point. I'll add dummy function in this patch. 1.2) Yep, we're on the same page. 1.3) Here's my opinion: Actually almost all MP code has such assumption: any AP configuration will copy from BSP. If we allow AP to call InitializeCpuExceptionHandlers(), we have to do a lot of other

Re: [edk2] [PATCH v2 7/8] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support

2017-11-22 Thread Wang, Jian J
1) No impact at all. 2) Page at stack base will be disabled. If Arch == IA32, The stack switch for handler of #PF/#DD will be setup for BSP and AP Else The handler of #PF/#DD keeps the same EndIf If StackOverFlow, If Arch == IA32, #PF is

Re: [edk2] [PATCH v2 7/8] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support

2017-11-22 Thread Wang, Jian J
If PcdCpuStackGuard is not enabled, there's no impact. If it's enabled, the only issue is that the exception dump cannot be done but no other impact. From this point of view, maybe PcdCpuStackGuard should be FALSE by default. > -Original Message- > From: Yao, Jiewen > Sent: Thursday,

[edk2] [Patch][edk2-platforms] Toolchain

2017-11-22 Thread lushifex
Add toolchain for VS2015 build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex --- .../PlatformSetupDxe/SetupInfoRecords.c| 30 +++ .../SmBiosMiscDxe/MiscProcessorCacheFunction.c | 8 ++--

Re: [edk2] [PATCH v2 7/8] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support

2017-11-22 Thread Yao, Jiewen
I am ok to keep FALSE by default. But I still suggest we test existing UEFI OS behavior. Please help me understand below condition, if we do not change a platform specific CPU driver: 1) If PcdCpuStackGuard is FALSE, and CPU driver is still consuming existing API in ExceptionLib. Is there any

Re: [edk2] SCT Test crashes After HTTPS boot success.

2017-11-22 Thread Wu, Jiaxin
Hi Karunakar, I think most cases failure are related to the lack of modules in your platform, detailed see below: c:\work\sct\utwg\uefi-sct\SctPkg\TestCase\UEFI\EFI\Generic\EfiCompliant\BlackBoxTest\EfiCompliantBBTestPlatform_uefi.c:1428:SetupMode equal zero - No Jiaxin: That's because you set

Re: [edk2] [PATCH v2 8/8] UefiCpuPkg/CpuDxe: Initialize stack switch for MP

2017-11-22 Thread Wang, Jian J
Hi, > -Original Message- > From: Yao, Jiewen > Sent: Thursday, November 23, 2017 12:14 PM > To: Wang, Jian J ; edk2-devel@lists.01.org > Cc: Dong, Eric ; Laszlo Ersek ; > Kinney, Michael D >

Re: [edk2] [PATCH v2 8/8] UefiCpuPkg/CpuDxe: Initialize stack switch for MP

2017-11-22 Thread Yao, Jiewen
Got it. I like this idea. It is better to hide it from DxeCore. Thank you Yao Jiewen > -Original Message- > From: Wang, Jian J > Sent: Thursday, November 23, 2017 1:19 PM > To: Wang, Jian J ; Yao, Jiewen ; > edk2-devel@lists.01.org > Cc:

Re: [edk2] [PATCH v2 7/8] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support

2017-11-22 Thread Yao, Jiewen
One more question: I notice not all platforms are using the CpuDxe in UefiCpuPkg. If so, is there any impact to the platform whose CPU driver does not have such InitializeCpuExceptionStackSwitchHandlers() call? Have you tested that condition? Thank you Yao Jiewen > -Original Message- >

Re: [edk2] [PATCH v2 7/8] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support

2017-11-22 Thread Yao, Jiewen
Here is my thought for 1) 1.1) We must provide the InitializeCpuExceptionStackSwitchHandlers() implementation in Pei instance and Smm instance. The basic requirement is a library instance must provide symbol for functions declared in header file. It is ok to return unsupported. But we MUST

Re: [edk2] [PATCH v2 8/8] UefiCpuPkg/CpuDxe: Initialize stack switch for MP

2017-11-22 Thread Wang, Jian J
About 1), the code is in [PATCH v2 7/8]. Following is part of it. @@ -63,10 +67,34 @@ InitializeCpuExceptionHandlers ( IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL ) { + EFI_STATUSStatus; + EXCEPTION_STACK_SWITCH_DATA StackSwitchData; +

Re: [edk2] [PATCH v2 7/8] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support

2017-11-22 Thread Yao, Jiewen
Some thought: 1) I found InitializeCpuExceptionStackSwitchHandlers() is only implemented in DxeException.c. What about Pei/Smm instance? I think it is OK to not implement it at this moment. But we need make sure no architecture issue if we want to enable it some time later. 2) #define

Re: [edk2] [PATCH v2 2/4] BaseTools: Add VS2017 tool chain in BaseTools tools_def.template

2017-11-22 Thread Gao, Liming
Yes. I mean to update comments in tools_def.template. Edk2 BaseTools doesn't include the party tools. And, without vswhere.exe, we don't know whether VS2017 is installed or not. For now, we only mention it in comments. Thanks Liming > -Original Message- > From: Pete Batard

[edk2] [PATCH v3 0/4] Add VS2017 tool chain for evaluation

2017-11-22 Thread Pete Batard
This is a re-send of v2, with a small comment update to indicate that VS2017 v15.2 or later is required, due to the vswhere.exe requirement. This patch serial adds VS2017 tool chain in BaseTools tools_def.template. It enables /WHOLEARCHIVE option to detect the potential code issue. It can be used

[edk2] [PATCH v3 4/4] Nt32Pkg: Add VS2017 support in SecMain

2017-11-22 Thread Pete Batard
From: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao --- Nt32Pkg/Sec/SecMain.inf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Nt32Pkg/Sec/SecMain.inf b/Nt32Pkg/Sec/SecMain.inf index

[edk2] [PATCH v3 2/4] BaseTools: Add VS2017 tool chain in BaseTools tools_def.template

2017-11-22 Thread Pete Batard
From: Liming Gao VS2017 tool chain enables /WHOLEARCHIVE linker option Split host-related and arch-related elements Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Signed-off-by: Pete Batard ---

[edk2] [PATCH v3 3/4] BaseTools: Update VS batch file to auto detect VS2017

2017-11-22 Thread Pete Batard
From: Liming Gao This way depends on VS vswhere.exe to find VS2017 installed directory. vswhere.exe starts in Visual Studio 2017 version 15.2. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Signed-off-by: Pete

[edk2] [PATCH v3 1/4] MdePkg: Disable VS warning 4701 & 4703 for VS2017

2017-11-22 Thread Pete Batard
From: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao --- MdePkg/Include/Ia32/ProcessorBind.h | 4 ++-- MdePkg/Include/X64/ProcessorBind.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff

Re: [edk2] [PATCH v2 10/14] ArmVirtPkg/ArmVirtXen: add ArmVirtMemInfoLib implementation

2017-11-22 Thread Julien Grall
Hi Ard, On 11/22/2017 10:07 AM, Ard Biesheuvel wrote: Clone the existing ArmPlatformGetVirtualMemoryMap () for this platform, clean it up slightly (by using a static buffer rather than a heap allocation, and removing the support for uncached DRAM mappings), and turn it into a new

  1   2   >