public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ashraf Ali S" <ashraf.ali.s@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"mikuback@linux.microsoft.com" <mikuback@linux.microsoft.com>
Cc: "Ni, Ray" <ray.ni@intel.com>,
	"Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>,
	"Lautner, Kenneth" <klautner@microsoft.com>
Subject: Re: [edk2-devel] [edk2-platforms][PATCH v1 1/2] IntelSiliconPkg: Compiler and linker fixes
Date: Wed, 17 Jul 2024 18:11:20 +0000	[thread overview]
Message-ID: <DM4PR11MB528051B3EC5D749845A002FDD7A32@DM4PR11MB5280.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20240717175440.229-2-mikuback@linux.microsoft.com>

Reviewed-by: S, Ashraf Ali <ashraf.ali.s@intel.com>

Thanks.,
S, Ashraf Ali

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael Kubacki
Sent: Wednesday, July 17, 2024 11:25 PM
To: devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; S, Ashraf Ali <ashraf.ali.s@intel.com>; Lautner, Kenneth <klautner@microsoft.com>
Subject: [edk2-devel] [edk2-platforms][PATCH v1 1/2] IntelSiliconPkg: Compiler and linker fixes

From: Michael Kubacki <michael.kubacki@microsoft.com>

Some code is currently not being built in the package. This fixes GCC compiler errors and MSVC linker failures in the code so the package can build with these modules included.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>

Co-authored-by: Ken Lautner <klautner@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
---
 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/BmDma.c           |  4 ++--
 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/VtdLog.c          | 12 ++++++------
 Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/IntelVTdCorePei.c |  6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/BmDma.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/BmDma.c
index 41917a004880..47fd3674cd56 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/BmDma.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/BmDma.c
@@ -464,7 +464,7 @@ IoMmuAllocateBuffer (
   if (!EFI_ERROR (Status)) {
     *HostAddress = (VOID *) (UINTN) PhysicalAddress;
 
-    VTdLogAddEvent (VTDLOG_DXE_IOMMU_ALLOC_BUFFER, (UINT64) Pages, (UINT64) (*HostAddress));
+    VTdLogAddEvent (VTDLOG_DXE_IOMMU_ALLOC_BUFFER, (UINT64) Pages, 
+ (UINT64) (UINTN) (*HostAddress));
   }
 
   DEBUG ((DEBUG_VERBOSE, "IoMmuAllocateBuffer: 0x%08x <==\n", *HostAddress)); @@ -494,7 +494,7 @@ IoMmuFreeBuffer (  {
   DEBUG ((DEBUG_VERBOSE, "IoMmuFreeBuffer: 0x%\n", Pages));
 
-  VTdLogAddEvent (VTDLOG_DXE_IOMMU_FREE_BUFFER, Pages, (UINT64) HostAddress);
+  VTdLogAddEvent (VTDLOG_DXE_IOMMU_FREE_BUFFER, Pages, (UINT64) (UINTN) 
+ HostAddress);
 
   return gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress, Pages);  } diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/VtdLog.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/VtdLog.c
index 91c27e2a1f2c..6a44424395c9 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/VtdLog.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/VtdLog.c
@@ -77,7 +77,7 @@ VTdLogAddEvent (
     Item->Data2 = Data2;
 
     Item->Header.DataSize  = sizeof (VTDLOG_EVENT_2PARAM);
-    Item->Header.LogType   = (UINT64) 1 << EventType;
+    Item->Header.LogType   = LShiftU64 (1, EventType);
     Item->Header.Timestamp = AsmReadTsc ();
   }
 }
@@ -117,11 +117,11 @@ VTdLogAddDataEvent (
     CopyMem (Item->Data, Data, DataSize);
 
     Item->Header.DataSize  = EventSize;
-    Item->Header.LogType   = (UINT64) 1 << EventType;
+    Item->Header.LogType   = LShiftU64 (1, EventType);
     Item->Header.Timestamp = AsmReadTsc ();
   }
 }
-  
+
 /**
   Get Event Items From Pei Pre-Mem Buffer
 
@@ -154,10 +154,10 @@ VTdGetEventItemsFromPeiPreMemBuffer (
       Event.Header.DataSize = sizeof (VTDLOG_EVENT_2PARAM);
       Event.Header.Timestamp = 0;
 
-      Event.Header.LogType = ((UINT64) 1) << VTDLOG_PEI_PRE_MEM_DMA_PROTECT;
+      Event.Header.LogType = LShiftU64 (1, 
+ VTDLOG_PEI_PRE_MEM_DMA_PROTECT);
       Event.Data1 = InfoBuffer[Index].BarAddress;
       Event.Data2 = InfoBuffer[Index].Mode;
-      Event.Data2 |= InfoBuffer[Index].Status<<8;
+      Event.Data2 |= LShiftU64 (InfoBuffer[Index].Status, 8);
       CallbackHandle (Context, &Event.Header);
     }
     EventCount++;
@@ -231,7 +231,7 @@ VTdGenerateStateEvent (
   Item.Data2 = Data2;
 
   Item.Header.DataSize  = sizeof (VTDLOG_EVENT_2PARAM);
-  Item.Header.LogType   = (UINT64) 1 << EventType;
+  Item.Header.LogType   = LShiftU64 (1, EventType);
   Item.Header.Timestamp = 0;
 
   if (CallbackHandle) {
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/IntelVTdCorePei.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/IntelVTdCorePei.c
index 0160c3604541..7c72055e73dd 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/IntelVTdCorePei.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/IntelVTd
+++ CorePei.c
@@ -152,7 +152,7 @@ VTdLogAddDataEvent (
 
     Item->Header.DataSize  = EventSize;
     Item->Header.LogType   = (UINT64) (1 << EventType);
-    Item->Header.Timestamp = AsmReadTsc ();    
+    Item->Header.Timestamp = AsmReadTsc ();
   }
 }
 /**
@@ -372,7 +372,7 @@ PeiIoMmuMap (
       );
   }
 
-  VTdLogAddEvent (VTDLOG_PEI_PPI_MAP, (UINT64) HostAddress, Length);
+  VTdLogAddEvent (VTDLOG_PEI_PPI_MAP, (UINT64) (UINTN) HostAddress, 
+ Length);
   return EFI_SUCCESS;
 }
 
@@ -498,7 +498,7 @@ PeiIoMmuAllocateBuffer (
 
   DEBUG ((DEBUG_INFO, "PeiIoMmuAllocateBuffer - allocate - %x\n", *HostAddress));
 
-  VTdLogAddEvent (VTDLOG_PEI_PPI_ALLOC_BUFFER, (UINT64) (*HostAddress), Length);
+  VTdLogAddEvent (VTDLOG_PEI_PPI_ALLOC_BUFFER, (UINT64) (UINTN) 
+ (*HostAddress), Length);
 
   return EFI_SUCCESS;
 }
--
2.45.2.windows.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119956): https://edk2.groups.io/g/devel/message/119956
Mute This Topic: https://groups.io/mt/107402756/6226280
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [ashraf.ali.s@intel.com]
-=-=-=-=-=-=




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119958): https://edk2.groups.io/g/devel/message/119958
Mute This Topic: https://groups.io/mt/107402756/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-07-17 18:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-17 17:54 [edk2-devel] [edk2-platforms][PATCH v1 0/2] IntelSiliconPkg: Add missing components Michael Kubacki
2024-07-17 17:54 ` [edk2-devel] [edk2-platforms][PATCH v1 1/2] IntelSiliconPkg: Compiler and linker fixes Michael Kubacki
2024-07-17 18:11   ` Ashraf Ali S [this message]
2024-07-18  4:15   ` Chaganty, Rangasai V
2024-07-18 15:34     ` Michael Kubacki
2024-07-17 17:54 ` [edk2-devel] [edk2-platforms][PATCH v1 2/2] IntelSiliconPkg: Add missing components to build Michael Kubacki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM4PR11MB528051B3EC5D749845A002FDD7A32@DM4PR11MB5280.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox