On 07/28/2016 06:23 AM, Leif Lindholm wrote:
On Wed, Jul 27, 2016 at 02:24:35PM -0500, Jeremy Linton wrote:
The code to detect what juno revision we are running on is fairly small put it in a common header where it may be used in a couple places.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeremy Linton jeremy.linton@arm.com
ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h | 30 +++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h b/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h index d01d136..d39193d 100644 --- a/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h +++ b/ArmPlatformPkg/ArmJunoPkg/Include/ArmPlatform.h @@ -17,12 +17,18 @@
#include <VExpressMotherBoard.h>
+#define EXTRACT_FIELD(word,offset,len) ((word>>offset)&((1<<(len+1))-1))
So ... I would prefer to not have this new macro here. On the one hand, because its completely generic, and as such shouldn't live in platform specific code. But also because the only user in this file could be implemented with a >> 28.
Am I OK to drop it on commit?
Sure, feel free to tweak away..
Thanks,