From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 03E9A74003A for ; Wed, 17 Jul 2024 17:55:12 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Mt7f4jajntzhJkpYMVMQKYinCA4rR7JOVbrlZJLGq74=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1721238912; v=1; b=AVz5uufpUPvjGC7VvwzSTZ9wjn5Xok03+1yMD5J9vmEW5JAMk6vpdg963DU6qMa6YxDMzK4A gv6my9CaVXQax3bWdxCq30L3HvTa9pwNcIYGsdr21FRwKHZrYEbPAeUezCCaAC9C/RBCp0U0jaO wtXoy9YJJXiJf2ss+dbR3E9An0Q39ZknICiN1sTCNi7zRuUrjkA+j0Taj/fMLgLZo57Pr4mt6tG zgjezjNgWQ8jv5iIv6owS2uXOxCeMSV7RrogQLwDzBa7NCS/YCA3CWukNyly+n0jcR5laJSFCTG LjI9J4bes3bdQqv5M/5czdGHbDw5ruxVzpui+159xNiLw== X-Received: by 127.0.0.2 with SMTP id TdoLYY7687511xmlv1OPg5P0; Wed, 17 Jul 2024 10:55:11 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.4703.1721238910987417034 for ; Wed, 17 Jul 2024 10:55:11 -0700 X-Received: from localhost.localdomain (unknown [47.201.241.198]) by linux.microsoft.com (Postfix) with ESMTPSA id E7E7820B7165; Wed, 17 Jul 2024 10:55:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E7E7820B7165 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Ashraf Ali S , Ken Lautner Subject: [edk2-devel] [edk2-platforms][PATCH v1 1/2] IntelSiliconPkg: Compiler and linker fixes Date: Wed, 17 Jul 2024 13:54:39 -0400 Message-ID: <20240717175440.229-2-mikuback@linux.microsoft.com> In-Reply-To: <20240717175440.229-1-mikuback@linux.microsoft.com> References: <20240717175440.229-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 17 Jul 2024 10:55:11 -0700 Resent-From: mikuback@linux.microsoft.com Reply-To: devel@edk2.groups.io,mikuback@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: tVkz0GeFLb9dQm3Qd4yNqCxDx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=AVz5uufp; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linux.microsoft.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io From: Michael Kubacki 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 Cc: Rangasai V Chaganty Cc: Ashraf Ali S Co-authored-by: Ken Lautner Signed-off-by: Michael Kubacki --- Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/BmDma.c = | 4 ++-- Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/VtdLog.c = | 12 ++++++------ Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/IntelVTdCorePe= i.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/Bm= Dma.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 =3D (VOID *) (UINTN) PhysicalAddress; =20 - VTdLogAddEvent (VTDLOG_DXE_IOMMU_ALLOC_BUFFER, (UINT64) Pages, (UINT= 64) (*HostAddress)); + VTdLogAddEvent (VTDLOG_DXE_IOMMU_ALLOC_BUFFER, (UINT64) Pages, (UINT= 64) (UINTN) (*HostAddress)); } =20 DEBUG ((DEBUG_VERBOSE, "IoMmuAllocateBuffer: 0x%08x <=3D=3D\n", *HostA= ddress)); @@ -494,7 +494,7 @@ IoMmuFreeBuffer ( { DEBUG ((DEBUG_VERBOSE, "IoMmuFreeBuffer: 0x%\n", Pages)); =20 - VTdLogAddEvent (VTDLOG_DXE_IOMMU_FREE_BUFFER, Pages, (UINT64) HostAddr= ess); + VTdLogAddEvent (VTDLOG_DXE_IOMMU_FREE_BUFFER, Pages, (UINT64) (UINTN) = HostAddress); =20 return gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress, Pag= es); } diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreDxe/Vt= dLog.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 =3D Data2; =20 Item->Header.DataSize =3D sizeof (VTDLOG_EVENT_2PARAM); - Item->Header.LogType =3D (UINT64) 1 << EventType; + Item->Header.LogType =3D LShiftU64 (1, EventType); Item->Header.Timestamp =3D AsmReadTsc (); } } @@ -117,11 +117,11 @@ VTdLogAddDataEvent ( CopyMem (Item->Data, Data, DataSize); =20 Item->Header.DataSize =3D EventSize; - Item->Header.LogType =3D (UINT64) 1 << EventType; + Item->Header.LogType =3D LShiftU64 (1, EventType); Item->Header.Timestamp =3D AsmReadTsc (); } } - =20 + /** Get Event Items From Pei Pre-Mem Buffer =20 @@ -154,10 +154,10 @@ VTdGetEventItemsFromPeiPreMemBuffer ( Event.Header.DataSize =3D sizeof (VTDLOG_EVENT_2PARAM); Event.Header.Timestamp =3D 0; =20 - Event.Header.LogType =3D ((UINT64) 1) << VTDLOG_PEI_PRE_MEM_DMA_PR= OTECT; + Event.Header.LogType =3D LShiftU64 (1, VTDLOG_PEI_PRE_MEM_DMA_PROT= ECT); Event.Data1 =3D InfoBuffer[Index].BarAddress; Event.Data2 =3D InfoBuffer[Index].Mode; - Event.Data2 |=3D InfoBuffer[Index].Status<<8; + Event.Data2 |=3D LShiftU64 (InfoBuffer[Index].Status, 8); CallbackHandle (Context, &Event.Header); } EventCount++; @@ -231,7 +231,7 @@ VTdGenerateStateEvent ( Item.Data2 =3D Data2; =20 Item.Header.DataSize =3D sizeof (VTDLOG_EVENT_2PARAM); - Item.Header.LogType =3D (UINT64) 1 << EventType; + Item.Header.LogType =3D LShiftU64 (1, EventType); Item.Header.Timestamp =3D 0; =20 if (CallbackHandle) { diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/In= telVTdCorePei.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCoreP= ei/IntelVTdCorePei.c index 0160c3604541..7c72055e73dd 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/IntelVTdC= orePei.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/IntelVTdC= orePei.c @@ -152,7 +152,7 @@ VTdLogAddDataEvent ( =20 Item->Header.DataSize =3D EventSize; Item->Header.LogType =3D (UINT64) (1 << EventType); - Item->Header.Timestamp =3D AsmReadTsc (); =20 + Item->Header.Timestamp =3D AsmReadTsc (); } } /** @@ -372,7 +372,7 @@ PeiIoMmuMap ( ); } =20 - VTdLogAddEvent (VTDLOG_PEI_PPI_MAP, (UINT64) HostAddress, Length); + VTdLogAddEvent (VTDLOG_PEI_PPI_MAP, (UINT64) (UINTN) HostAddress, Leng= th); return EFI_SUCCESS; } =20 @@ -498,7 +498,7 @@ PeiIoMmuAllocateBuffer ( =20 DEBUG ((DEBUG_INFO, "PeiIoMmuAllocateBuffer - allocate - %x\n", *HostA= ddress)); =20 - VTdLogAddEvent (VTDLOG_PEI_PPI_ALLOC_BUFFER, (UINT64) (*HostAddress), = Length); + VTdLogAddEvent (VTDLOG_PEI_PPI_ALLOC_BUFFER, (UINT64) (UINTN) (*HostAd= dress), Length); =20 return EFI_SUCCESS; } --=20 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-