]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1) Update comments.
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 16 May 2008 09:45:09 +0000 (09:45 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 16 May 2008 09:45:09 +0000 (09:45 +0000)
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

EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.c
EdkCompatibilityPkg/Compatibility/Fv2ToFvThunk/Fv2ToFvThunk.inf

index da2ada6899e4f6219557d0150201e1532225c921..5a89866b0d4473b2929d4bcd9d5db28d0c693ef6 100644 (file)
@@ -1,4 +1,13 @@
-/*++\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
@@ -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.\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
@@ -933,11 +936,14 @@ Fv2SetVolumeAttributes (
   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
index b7a3862605a01db217c49496004abfd2182b4d59..c023df78e58fe67cfc59c93fcb80c3f8bc9bb5ae 100644 (file)
@@ -1,7 +1,14 @@
 #/** @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