[edk2] [v4 1/4] UefiCpuPkg/MpService: fix trivial typo in cpu state

2015-03-04 Thread Chen Fan
CpuStateBuzy => CpuStateBusy Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan --- UefiCpuPkg/CpuDxe/CpuMp.c | 2 +- UefiCpuPkg/CpuDxe/CpuMp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.

[edk2] [v4 0/4] UefiCpuPkg/MpService: Put APs to sleep when not busy

2015-03-04 Thread Chen Fan
nowadays, APs are busy running when installing MP protocol in multiple processors environment. so it whould consume much power resource unnecessary. this patchs put APs to sleep when not procedure to run, then via sending NMI IPI by BSP to wake up AP with hlt state. there is a proposal several mon

Re: [edk2] [v4 2/4] UefiCpuPkg/MpService: put AP to busy state when execution

2015-03-04 Thread Chen Fan
Thanks. Chen On 03/05/2015 02:53 PM, Fan, Jeff wrote: > Chen, > > I am ok with the new serial of patches. I will help to check-in the patches > at next week. > > Reviewed-by: Jeff Fan > > Thanks! > Jeff > -Original Message- > From: Chen Fan [mailto:chen.fan.f...@cn.fujitsu.com] > Sent:

Re: [edk2] [v4 2/4] UefiCpuPkg/MpService: put AP to busy state when execution

2015-03-04 Thread Fan, Jeff
Chen, I am ok with the new serial of patches. I will help to check-in the patches at next week. Reviewed-by: Jeff Fan Thanks! Jeff -Original Message- From: Chen Fan [mailto:chen.fan.f...@cn.fujitsu.com] Sent: Thursday, March 05, 2015 2:30 PM To: edk2-devel@lists.sourceforge.net Cc: F

[edk2] [v4 3/4] UefiCpuPkg/MpService: Put APs to sleep when not busy

2015-03-04 Thread Chen Fan
Add a new sleeping state for APs, when no procedure execution, put AP to sleep. when need to execute procedure, only need to wake up this AP by sent SIPI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan --- UefiCpuPkg/CpuDxe/CpuMp.c | 61 ++

[edk2] [v4 2/4] UefiCpuPkg/MpService: put AP to busy state when execution

2015-03-04 Thread Chen Fan
CpuState should follow the process: Idle -> Ready -> Busy -> Finished ^ | | | + - - - - - - - - - - - - + Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan --- UefiCpuPkg/CpuDxe/CpuMp.c | 9 +++-

[edk2] [v4 4/4] UefiCpuPkg/MpSerivce: add volatile qualifiers

2015-03-04 Thread Chen Fan
For avoid the compiler optimizing the code, we let Parameter and Procedure in CpuData volatile. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan Signed-off-by: Jeff Fan --- UefiCpuPkg/CpuDxe/CpuMp.c | 4 ++-- UefiCpuPkg/CpuDxe/CpuMp.h | 4 ++-- 2 files changed, 4

Re: [edk2] [v3 4/4] UefiCpuPkg/MpSerivce: add volatile qualifiers

2015-03-04 Thread Chen Fan
it works fine. Thanks, Chen On 03/05/2015 02:07 PM, Fan, Jeff wrote: > Please try the following updating to check if compiling error gone. > > Index: CpuMp.c > === > --- CpuMp.c (revision 17009) > +++ CpuMp.c (working copy) > @@

Re: [edk2] [v3 4/4] UefiCpuPkg/MpSerivce: add volatile qualifiers

2015-03-04 Thread Fan, Jeff
Please try the following updating to check if compiling error gone. Index: CpuMp.c === --- CpuMp.c (revision 17009) +++ CpuMp.c (working copy) @@ -1157,7 +1157,7 @@ UINTN ProcessorNumber; CPU_DATA_BLOCK

Re: [edk2] [v3 4/4] UefiCpuPkg/MpSerivce: add volatile qualifiers

2015-03-04 Thread Chen Fan
On 03/05/2015 01:09 PM, Fan, Jeff wrote: > Please align the volatile's position as below. > + volatile EFI_AP_PROCEDURE Procedure; > + volatile VOID* Parameter; For Parameter should: VOID* volatile Parameter; otherwise, will cause compile error. UefiCpuPkg/CpuDxe/CpuMp.c:1228:23: error:

Re: [edk2] [v3 4/4] UefiCpuPkg/MpSerivce: add volatile qualifiers

2015-03-04 Thread Fan, Jeff
Please align the volatile's position as below. + volatile EFI_AP_PROCEDURE Procedure; + volatile VOID* Parameter; -Original Message- From: Chen Fan [mailto:chen.fan.f...@cn.fujitsu.com] Sent: Thursday, March 05, 2015 11:55 AM To: edk2-devel@lists.sourceforge.net Cc: Fan, Jeff; Ju

Re: [edk2] [MinnowBoard] [EDK2][MNW2]: Problem building MinnowMAX firmware 0.77 on Windows.

2015-03-04 Thread Gerard Bucas
OK – after starting over and (more!) carefully following all the instructions (and advice here!), I got a LOT further (probably close to the end). BUT now I get this error: Building ... c:\.\myworkspace\EdkCompatibilityPkg\Compatibility\AcpiVariableHobOnSm ramReserveHobThunk\AcpiVari

[edk2] [v3 4/4] UefiCpuPkg/MpSerivce: add volatile qualifiers

2015-03-04 Thread Chen Fan
For avoid the compiler optimizing the code, we let Parameter and Procedure in CpuData volatile. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan --- UefiCpuPkg/CpuDxe/CpuMp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/

[edk2] [v3 2/4] UefiCpuPkg/MpService: put AP to busy state when execution

2015-03-04 Thread Chen Fan
CpuState should follow the process: Idle -> Ready -> Busy -> Finished ^ | | | + - - - - - - - - - - - - + Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan --- UefiCpuPkg/CpuDxe/CpuMp.c | 9 +++-

[edk2] [v3 1/4] UefiCpuPkg/MpService: fix trivial typo in cpu state

2015-03-04 Thread Chen Fan
CpuStateBuzy => CpuStateBusy Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan --- UefiCpuPkg/CpuDxe/CpuMp.c | 2 +- UefiCpuPkg/CpuDxe/CpuMp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.

[edk2] [v3 3/4] UefiCpuPkg/MpService: Put APs to sleep when not busy

2015-03-04 Thread Chen Fan
Add a new sleeping state for APs, when no procedure execution, put AP to sleep. when need to execute procedure, only need to wake up this AP by sent SIPI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan --- UefiCpuPkg/CpuDxe/CpuMp.c | 61 ++

[edk2] [v3 0/4] UefiCpuPkg/MpService: Put APs to sleep when not busy

2015-03-04 Thread Chen Fan
nowadays, APs are busy running when installing MP protocol in multiple processors environment. so it whould consume much power resource unnecessary. this patchs put APs to sleep when not procedure to run, then via sending NMI IPI by BSP to wake up AP with hlt state. there is a proposal several mon

Re: [edk2] [v2 4/4] UefiCpuPkg/MpSerivce: remove volatile qualifier

2015-03-04 Thread Chen Fan
I go it. Thanks all of you. Chen On 03/05/2015 10:55 AM, Fan, Jeff wrote: Andrew is right. Volatile makes compiler read variable value from memory each time. Reading from memory does not mean that it will skip the cache. It still could get the value from the cache if cache is enabled and

Re: [edk2] [v2 4/4] UefiCpuPkg/MpSerivce: remove volatile qualifier

2015-03-04 Thread Fan, Jeff
Andrew is right. Volatile makes compiler read variable value from memory each time. Reading from memory does not mean that it will skip the cache. It still could get the value from the cache if cache is enabled and valid. Volatile and cache are different stores. Thanks! Jeff From: Andrew Fish

Re: [edk2] [v2 4/4] UefiCpuPkg/MpSerivce: remove volatile qualifier

2015-03-04 Thread Andrew Fish
> On Mar 4, 2015, at 5:34 PM, Chen Fan wrote: > > Hi Jeff, > > Thanks for your explanation, I didn't encounter any issue if leaving it > there. > > I just think if use Volatile qualifier may cause the problem of > performance. because > access the value need to copy the address value from m

Re: [edk2] [v2 4/4] UefiCpuPkg/MpSerivce: remove volatile qualifier

2015-03-04 Thread Chen Fan
Hi Jeff, Thanks for your explanation, I didn't encounter any issue if leaving it there. I just think if use Volatile qualifier may cause the problem of performance. because access the value need to copy the address value from main memory to cpu cache each time and not use the cache. and IIRC,

Re: [edk2] [MinnowBoard] [EDK2][MNW2]: Problem building MinnowMAX firmware 0.77 on Windows.

2015-03-04 Thread Gerard Bucas
Thanks for that further clarification, Michael. Much appreciated. Your input is of great value - so keep it up!! Regards Gerard > On Mar 4, 2015, at 7:15 PM, Krau, Michael P wrote: > > Hello Gerard, > > You got it in one. The files that are included in that IP bundle are all > tied dir

Re: [edk2] [MinnowBoard] [EDK2][MNW2]: Problem building MinnowMAX firmware 0.77 on Windows.

2015-03-04 Thread Krau, Michael P
Hello Gerard, You got it in one. The files that are included in that IP bundle are all tied directly to the E38xx Silicon initialization and low level operation. The MinnowBoard MAX use the E38xx processor, so that code is needed by the MAX by induction. Though there may also be a RealTek

[edk2] libc for non-shell apps

2015-03-04 Thread Tim Lewis
Daryl - Is there any progress on providing some or all of StdLib for non-shell apps in edk2? Which portions can be used independently now? Tim -- Dive into the World of Parallel Programming The Go Parallel Website, spons

Re: [edk2] [MinnowBoard] [EDK2][MNW2]: Problem building MinnowMAX firmware 0.77 on Windows.

2015-03-04 Thread Gerard Bucas
Hi Michael, Thanks for taking the time to explain all this – enjoyed the “insight”! One thing that confuses me a little is your statement “MinnowBoard MAX requires some Intellectual Property (IP) Binary files to build properly. ” Personally I have no problem with that but I am curious

Re: [edk2] [MinnowBoard] [EDK2][MNW2]: Problem building MinnowMAX firmware 0.77 on Windows.

2015-03-04 Thread Krau, Michael P
Hello Andrew, Clarification question: Is this in regards to the whole of the EDK2 or the interaction of the MinnowBoard MAX project components with the EDK2? EDK2 itself should not be impacted by the MinnowBoard MAX project, though the MinnowBoard MAX project is having problems on the Tip (due

Re: [edk2] [MinnowBoard] [EDK2][MNW2]: Problem building MinnowMAX firmware 0.77 on Windows.

2015-03-04 Thread Krau, Michael P
Thank you Bruce, I appreciate your prompt and well considered response. For the de-synch issue, we are looking at a couple of possible solutions. Your suggestion of setting up another site/mechanism for access to the non-validated binaries is actually one of them. What we are hoping to do is

Re: [edk2] [MinnowBoard] [EDK2][MNW2]: Problem building MinnowMAX firmware 0.77 on Windows.

2015-03-04 Thread Andrew Fish
> On Mar 4, 2015, at 11:25 AM, Krau, Michael P wrote: > > Hello Andrew and Gerard, > > To respond to and to clarify the PS in Andrew’s message below: > > It is not the intention of the MinnowBoard MAX firmware team to complicate or > cause issues within the UEFI Open Source Community. If

Re: [edk2] [MinnowBoard] [EDK2][MNW2]: Problem building MinnowMAX firmware 0.77 on Windows.

2015-03-04 Thread B Cran
On Wed, Mar 4, 2015 at 7:25 PM, Krau, Michael P wrote: > Our development around MinnowBoard MAX are now centered on the Open > Source community site. The BSD content for MinnowBoard MAX is being > developed from the open source repository (including the platform specific > packages – Vlv2Device

Re: [edk2] [MinnowBoard] [EDK2][MNW2]: Problem building MinnowMAX firmware 0.77 on Windows.

2015-03-04 Thread Krau, Michael P
Hello Andrew and Gerard, To respond to and to clarify the PS in Andrew’s message below: It is not the intention of the MinnowBoard MAX firmware team to complicate or cause issues within the UEFI Open Source Community. If the current methods and mechanisms are failing then adjustment is necess

[edk2] [PATCH] MdePkg: fix ARM version of InternalMathSwapBytes64 ()

2015-03-04 Thread Ard Biesheuvel
The ARM asm implementation of InternalMathSwapBytes64 () does interesting things if bit 7 of operand r1 (upper 32 bits of the input value) is set. After the recursive swap, bit 7 ends up in the sign bit position, after which it is right shifted with sign extension, and or'ed with the upper half of

Re: [edk2] [PATCH 0/6] update pool allocator to better support 64 KB runtime regions

2015-03-04 Thread Ard Biesheuvel
On 4 March 2015 at 10:21, Gao, Liming wrote: > Ard: > Got your point. I have no other comments. Your patch is fine to me. If you > require me to commit this change, please let me know. > > Reviewed-by: Liming Gao > Thank you. Could you please go ahead and commit the patches? Regards, Ard.

Re: [edk2] [PATCH 0/6] update pool allocator to better support 64 KB runtime regions

2015-03-04 Thread Gao, Liming
Ard: Got your point. I have no other comments. Your patch is fine to me. If you require me to commit this change, please let me know. Reviewed-by: Liming Gao Thanks Liming -Original Message- From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] Sent: Wednesday, March 04, 2015

Re: [edk2] [PATCH] BaseTools: aarch64: add -fno-asynchronous-unwind-tables to cflags

2015-03-04 Thread Laszlo Ersek
On 02/06/15 14:52, Leif Lindholm wrote: > Some toolchains, at least Fedora GCC, generate inline unwind tables in > object files. These confuses GenFw to no end, leading to build failures: > GenFw: ERROR 3000: Invalid WriteSections64(): ... > unsupported ELF EM_AARCH64 relocation 0x105. >

Re: [edk2] [v2 4/4] UefiCpuPkg/MpSerivce: remove volatile qualifier

2015-03-04 Thread Fan, Jeff
Chen, Volatile is to tell compiler this variable maybe changed by other threads. Compiler must access the value from memory instead of the old value in its registers. This is different with spinlock that is to protect shared memory between multiple threads. For this case, CpuState may be up