summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-16 09:45:09 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-16 09:45:09 +0000
commit3e5b4527437d7b2e23c7cd4a38bc999f8a525711 (patch)
tree9c4972adbeea862405f866b34fe9500a2cc259ac /EdkCompatibilityPkg
parentd7152a15f5258cc23651656381926dba56b1fae8 (diff)
downloadedk2-3e5b4527437d7b2e23c7cd4a38bc999f8a525711.zip
edk2-3e5b4527437d7b2e23c7cd4a38bc999f8a525711.tar.gz
edk2-3e5b4527437d7b2e23c7cd4a38bc999f8a525711.tar.bz2
1) Update comments.
2) Remove reference to ">>" as it cause the generated code to link with other libraries. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5214 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.c24
-rw-r--r--EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.inf11
2 files changed, 24 insertions, 11 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.c b/EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.c
index da2ada6..5a89866 100644
--- a/EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.c
+++ b/EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.c
@@ -1,4 +1,13 @@
-/*++
+/**
+Module produce FV2 on top of FV.
+
+UEFI PI specification supersedes Inte's Framework Specification.
+EFI_FIRMWARE_VOLUME_PROTOCOL defined in Intel Framework Pkg is replaced by
+EFI_FIRMWARE_VOLUME2_PROTOCOL in MdePkg.
+This module produces FV2 on top of FV. This module is used on platform when both of
+these two conditions are true:
+1) Framework module producing FV is present
+2) And the rest of modules on the platform consume FV2
Copyright (c) 2006 - 2008 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
@@ -10,13 +19,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
- FvToFv2Thunk.c
-
-Abstract:
-
- DXE driver
-
---*/
+**/
#include <PiDxe.h>
#include <Protocol/FirmwareVolume2.h>
@@ -933,11 +936,14 @@ Fv2SetVolumeAttributes (
FIRMWARE_VOLUME2_PRIVATE_DATA *Private;
EFI_FIRMWARE_VOLUME_PROTOCOL *FirmwareVolume;
FRAMEWORK_EFI_FV_ATTRIBUTES FrameworkFvAttributes;
+ UINTN Shift;
Private = FIRMWARE_VOLUME2_PRIVATE_DATA_FROM_THIS (This);
FirmwareVolume = Private->FirmwareVolume;
- FrameworkFvAttributes = (*FvAttributes & 0x1ff) | ((UINTN)EFI_FV_ALIGNMENT_2 << ((*FvAttributes & EFI_FV2_ALIGNMENT) >> 16));
+ FrameworkFvAttributes = (*FvAttributes & 0x1ff);
+ Shift = (UINTN) RShiftU64(*FvAttributes & EFI_FV2_ALIGNMENT, 16);
+ FrameworkFvAttributes = FrameworkFvAttributes | LShiftU64 (EFI_FV_ALIGNMENT_2, Shift);
return FirmwareVolume->SetVolumeAttributes (
FirmwareVolume,
diff --git a/EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.inf b/EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.inf
index b7a3862..c023df7 100644
--- a/EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.inf
+++ b/EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.inf
@@ -1,7 +1,14 @@
#/** @file
-# Component description file for PeiVariable module.
+# Module produce FV2 on top of FV.
+#
+# UEFI PI specification supersedes Inte's Framework Specification.
+# EFI_FIRMWARE_VOLUME_PROTOCOL defined in Intel Framework Pkg is replaced by
+# EFI_FIRMWARE_VOLUME2_PROTOCOL in MdePkg.
+# This module produces FV2 on top of FV. This module is used on platform when both of
+# these two conditions are true:
+# 1) Framework module producing FV is present
+# 2) And the rest of modules on the platform consume FV2
#
-# PEIM to provide the Variable functionality.
# Copyright (c) 2006 - 2007, Intel Corporation
#
# All rights reserved. This program and the accompanying materials