]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
OvmfPkg: PlatformPei: enable larger permanent PEI RAM
[mirror_edk2.git] / OvmfPkg / QemuFlashFvbServicesRuntimeDxe / FwBlockService.c
index 7827b72be17e4cf6a6bd259ad4c6b4dafcd1aba4..9160bb885b422bfdfb0837a8aca6076d4dfb5961 100644 (file)
@@ -1,6 +1,6 @@
 /**@file\r
 \r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -880,7 +880,8 @@ Returns:
   if (Checksum != 0) {\r
     UINT16 Expected;\r
 \r
-    Expected = ((UINTN) FwVolHeader->Checksum + 0x10000 - Checksum) & 0xffff;\r
+    Expected =\r
+      (UINT16) (((UINTN) FwVolHeader->Checksum + 0x10000 - Checksum) & 0xffff);\r
 \r
     DEBUG ((EFI_D_INFO, "FV@%p Checksum is 0x%x, expected 0x%x\n",\r
             FwVolHeader, FwVolHeader->Checksum, Expected));\r
@@ -894,7 +895,7 @@ STATIC
 EFI_STATUS\r
 MarkMemoryRangeForRuntimeAccess (\r
   EFI_PHYSICAL_ADDRESS                BaseAddress,\r
-  UINT64                              Length\r
+  UINT                              Length\r
   )\r
 {\r
   EFI_STATUS                          Status;\r
@@ -918,7 +919,7 @@ MarkMemoryRangeForRuntimeAccess (
   Status = gBS->AllocatePages (\r
                   AllocateAddress,\r
                   EfiRuntimeServicesData,\r
-                  (UINTN) EFI_SIZE_TO_PAGES (Length),\r
+                  EFI_SIZE_TO_PAGES (Length),\r
                   &BaseAddress\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
@@ -978,7 +979,7 @@ InitializeVariableFvHeader (
     // Erase all the blocks\r
     //\r
     for (Offset = Start; Offset < Start + Length; Offset += BlockSize) {\r
-      Status = QemuFlashEraseBlock ((EFI_LBA) Offset / BlockSize);\r
+      Status = QemuFlashEraseBlock (Offset / BlockSize);\r
       ASSERT_EFI_ERROR (Status);\r
     }\r
 \r
@@ -987,7 +988,7 @@ InitializeVariableFvHeader (
     //\r
     WriteLength = GoodFwVolHeader->HeaderLength;\r
     Status = QemuFlashWrite (\r
-               (EFI_LBA) Start / BlockSize,\r
+               Start / BlockSize,\r
                0,\r
                &WriteLength,\r
                (UINT8 *) GoodFwVolHeader);\r
@@ -1025,7 +1026,7 @@ Returns:
   EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *OldFwbInterface;\r
   UINT32                              MaxLbaSize;\r
   EFI_PHYSICAL_ADDRESS                BaseAddress;\r
-  UINT64                              Length;\r
+  UINT                              Length;\r
   UINTN                               NumOfBlocks;\r
   EFI_EVENT                           VirtualAddressChangeEvent;\r
 \r