]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
MdeModulePkg/NvmExpressDxe: Fix MS toolchain /Od 32bit build failure
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / NvmExpressDxe / NvmExpressHci.c
index f6b6288f652f1053511debe25eb52166bdb2ff66..60b06b45e6a3fef25ff32279b162d435fe03f93c 100644 (file)
@@ -2,7 +2,7 @@
   NvmExpressDxe driver is used to manage non-volatile memory subsystem which follows\r
   NVM Express specification.\r
 \r
-  Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2013 - 2016, 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
@@ -328,7 +328,7 @@ WriteNvmeAdminSubmissionQueueBaseAddress (
     return Status;\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "Asq.Asqb: %lx\n", Asq->Asqb));\r
+  DEBUG ((EFI_D_INFO, "Asq: %lx\n", *Asq));\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -408,7 +408,7 @@ WriteNvmeAdminCompletionQueueBaseAddress (
     return Status;\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "Acq.Acqb: %lxh\n", Acq->Acqb));\r
+  DEBUG ((EFI_D_INFO, "Acq: %lxh\n", *Acq));\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -861,14 +861,12 @@ NvmeControllerInit (
   //\r
   // Address of admin submission queue.\r
   //\r
-  Asq.Rsvd1 = 0;\r
-  Asq.Asqb  = (UINT64)(UINTN)(Private->BufferPciAddr) >> 12;\r
+  Asq = (UINT64)(UINTN)(Private->BufferPciAddr) & ~0xFFF;\r
 \r
   //\r
   // Address of admin completion queue.\r
   //\r
-  Acq.Rsvd1 = 0;\r
-  Acq.Acqb  = (UINT64)(UINTN)(Private->BufferPciAddr + EFI_PAGE_SIZE) >> 12;\r
+  Acq = (UINT64)(UINTN)(Private->BufferPciAddr + EFI_PAGE_SIZE) & ~0xFFF;\r
 \r
   //\r
   // Address of I/O submission & completion queue.\r