-/*++\r
+/**\r
+Module produce FV2 on top of FV.\r
+\r
+UEFI PI specification supersedes Inte's Framework Specification.\r
+EFI_FIRMWARE_VOLUME_PROTOCOL defined in Intel Framework Pkg is replaced by\r
+EFI_FIRMWARE_VOLUME2_PROTOCOL in MdePkg.\r
+This module produces FV2 on top of FV. This module is used on platform when both of\r
+these two conditions are true:\r
+1) Framework module producing FV is present\r
+2) And the rest of modules on the platform consume FV2\r
\r
Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
Module Name:\r
\r
- FvToFv2Thunk.c\r
-\r
-Abstract:\r
-\r
- DXE driver \r
-\r
---*/\r
+**/\r
\r
#include <PiDxe.h>\r
#include <Protocol/FirmwareVolume2.h>\r
FIRMWARE_VOLUME2_PRIVATE_DATA *Private;\r
EFI_FIRMWARE_VOLUME_PROTOCOL *FirmwareVolume;\r
FRAMEWORK_EFI_FV_ATTRIBUTES FrameworkFvAttributes; \r
+ UINTN Shift;\r
\r
Private = FIRMWARE_VOLUME2_PRIVATE_DATA_FROM_THIS (This);\r
FirmwareVolume = Private->FirmwareVolume;\r
\r
- FrameworkFvAttributes = (*FvAttributes & 0x1ff) | ((UINTN)EFI_FV_ALIGNMENT_2 << ((*FvAttributes & EFI_FV2_ALIGNMENT) >> 16));\r
+ FrameworkFvAttributes = (*FvAttributes & 0x1ff);\r
+ Shift = (UINTN) RShiftU64(*FvAttributes & EFI_FV2_ALIGNMENT, 16);\r
+ FrameworkFvAttributes = FrameworkFvAttributes | LShiftU64 (EFI_FV_ALIGNMENT_2, Shift);\r
\r
return FirmwareVolume->SetVolumeAttributes (\r
FirmwareVolume,\r
#/** @file\r
-# Component description file for PeiVariable module.\r
+# Module produce FV2 on top of FV.\r
+#\r
+# UEFI PI specification supersedes Inte's Framework Specification.\r
+# EFI_FIRMWARE_VOLUME_PROTOCOL defined in Intel Framework Pkg is replaced by\r
+# EFI_FIRMWARE_VOLUME2_PROTOCOL in MdePkg.\r
+# This module produces FV2 on top of FV. This module is used on platform when both of\r
+# these two conditions are true:\r
+# 1) Framework module producing FV is present\r
+# 2) And the rest of modules on the platform consume FV2\r
#\r
-# PEIM to provide the Variable functionality.\r
# Copyright (c) 2006 - 2007, Intel Corporation\r
#\r
# All rights reserved. This program and the accompanying materials\r