Sent from my BlackBerry 10 smartphone. From: [email protected] Sent: Jumat, 24 Oktober 2014 7.03 AM To: [email protected] Reply To: [email protected] Subject: edk2-devel Digest, Vol 58, Issue 112
Send edk2-devel mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/edk2-devel
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of edk2-devel digest..."
Today's Topics:
1. Re: EDK2: Add #ifndef/#endif and remove trailing white space
(Bjorge, Erik C)
2. MemoryFence function: no-op for MSFT? (Bruce Cran)
3. Re: MemoryFence function: no-op for MSFT? (Andrew Fish)
----------------------------------------------------------------------
Message: 1
Date: Thu, 23 Oct 2014 22:23:19 +0000
From: "Bjorge, Erik C" <[email protected]>
Subject: Re: [edk2] EDK2: Add #ifndef/#endif and remove trailing white
space
To: "Leahy, Leroy P" <[email protected]>, "Carsey, Jaben"
<[email protected]>, "Kinney, Michael D"
<[email protected]>, "Mudusuru, Giri P"
<[email protected]>, "Hale, Robert P"
<[email protected]>, "Gao, Liming" <[email protected]>,
"Tian, Hot" <[email protected]>
Cc: "[email protected]"
<[email protected]>
Message-ID:
<7fe3244ebb31f1449e4ec79cfe44e3f46cad9...@orsmsx110.amr.corp.intel.com>
Content-Type: text/plain; charset="us-ascii"
Reviewed-by: Erik Bjorge <[email protected]>
From: Leahy, Leroy P
Sent: Thursday, October 23, 2014 12:00 PM
To: Bjorge, Erik C; Carsey, Jaben; Kinney, Michael D; Mudusuru, Giri P; Hale,
Robert P; Gao, Liming; Tian, Hot
Cc: [email protected]
Subject: RE: EDK2: Add #ifndef/#endif and remove trailing white space
Attached is an updated patch without the comments.
Attestation:
I have made the following change to support Google.
Submission:
Code clean-up: Remove trailing spaces and add #ifndef/#endif around NULL, MAX
and MIN.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lee Leahy
<[email protected]<mailto:[email protected]>>
From: Bjorge, Erik C
Sent: Thursday, October 23, 2014 11:04 AM
To: Leahy, Leroy P; Carsey, Jaben; Kinney, Michael D; Mudusuru, Giri P; Hale,
Robert P; Gao, Liming; Tian, Hot
Cc: [email protected]<mailto:[email protected]>
Subject: RE: EDK2: Add #ifndef/#endif and remove trailing white space
You should not reference specific source files in comments from other projects.
These values could be defined in a number of different locations by any number
of projects.
Thanks,
-Erik
From: Leahy, Leroy P
Sent: Thursday, October 23, 2014 10:51 AM
To: Bjorge, Erik C; Carsey, Jaben; Kinney, Michael D; Mudusuru, Giri P; Hale,
Robert P; Gao, Liming; Tian, Hot
Cc: [email protected]<mailto:[email protected]>
Subject: EDK2: Add #ifndef/#endif and remove trailing white space
Attestation:
I have made the following change to support Google.
Submission:
Code clean-up: Remove trailing spaces and add #ifndef/#endif around NULL, MAX
and MIN.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lee Leahy
<[email protected]<mailto:[email protected]>>
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 2
Date: Thu, 23 Oct 2014 16:53:33 -0600
From: Bruce Cran <[email protected]>
Subject: [edk2] MemoryFence function: no-op for MSFT?
To: "[email protected]"
<[email protected]>
Message-ID:
<CANdOk1uy9b_xRv=dy_jK=_=6WPNuuaLm=9maietuvkfd+ci...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
I've been looking through BaseLib and found the MemoryFence function.
I can see the implementations in Ia32/GccInline.c and X64/GccInline.c,
but I don't see anything for VC++ except the empty function in
X86MemoryFence.c . There's _ReadWriteBarrier in BaseIoLibIntrinsic
(the comment in IoLibMsc.c should probably read "...to the compiler
and does _not_ emit code" - the "not" is currently missing) but
MemoryFence doesn't appear to make use of it.
Also, since MemoryFence appears similar to the x86 mfence instruction,
should the documentation be updated to make it clear it's only an
instruction to the compiler and doesn't issue a CPU fence operation?
--
Bruce
------------------------------
Message: 3
Date: Thu, 23 Oct 2014 17:02:26 -0700
From: Andrew Fish <[email protected]>
Subject: Re: [edk2] MemoryFence function: no-op for MSFT?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
> On Oct 23, 2014, at 3:53 PM, Bruce Cran <[email protected]> wrote:
>
> I've been looking through BaseLib and found the MemoryFence function.
> I can see the implementations in Ia32/GccInline.c and X64/GccInline.c,
> but I don't see anything for VC++ except the empty function in
> X86MemoryFence.c . There's _ReadWriteBarrier in BaseIoLibIntrinsic
> (the comment in IoLibMsc.c should probably read "...to the compiler
> and does _not_ emit code" - the "not" is currently missing) but
> MemoryFence doesn't appear to make use of it.
>
> Also, since MemoryFence appears similar to the x86 mfence instruction,
> should the documentation be updated to make it clear it's only an
> instruction to the compiler and doesn't issue a CPU fence operation?
The MemoryFence() BaseLib API definition is based on Itanium processor memory
model. So they basically enforce the same memory consistency that you see on
X86.
I can?t think of a UP usage case for X86 mfence on X86, as it solve a complex
MP memory order issue we generally don?t see in EFI. UP does ?what you want?
on X86.
__asm__ __volatile__ ("" ::: "memory?); and _ReadWriteBarrier() are
notifications to the compiler about order, and have nothing to do with hardware
as they are just about compiler optimization.
The only thing that having the __asm__ __volatile__ ("" ::: "memory?); would
buy you is it could fix a bug in the calling code (forgetting to make something
volatile etc.). If the calling code is correctly constructed I can?t think of
an issue you we see by not having the _ReadWriteBarrier. It would not hurt to
add the _ReadWriteBarrier to make things constant.
Itanium:
MemoryFence::
mf;; // memory access ordering
// do we need the mf.a also here?
mf.a // wait for any IO to complete?
// not sure if we need serialization here, just put it, in case...
srlz.d;;
srlz.i;;
br.ret.dpnt b0;;
ARM:
ASM_PFX(MemoryFence):
// System wide Data Memory Barrier.
dmb
bx lr
X86 is a no-op.
Thanks,
Andrew Fish
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
------------------------------------------------------------------------------
------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel
End of edk2-devel Digest, Vol 58, Issue 112
*******************************************
my cv.docx
Description: MS-Word 2007 document
------------------------------------------------------------------------------
_______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
