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 31B717803DE for ; Thu, 18 Jul 2024 15:30:59 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=OrQqQRSWDs/ygJWdLw9sB+/0HjSKGp3owMBYa/+3en0=; 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=1721316658; v=1; b=hedJNLILf2zwdv01VQPquZBFL0Bfcwvpk3S1tSU+V6GAF76+izorEValEG2SdXmjfHO2dfeX fH8AYZ6sgCjvZGc7+lR+jvlcjQdzGB7OH+ENdqMNWy4OUdshVdGm9v4vd6o+9FWg088Yzmc9Z13 ABVfL8j5g/AauMnhCF1PmaJgUdji6GRUrXtmATU5wKB8xteB1It2Bxm9nHNlZSRxiJyHJivFGlp Tf34bMvZvNFKdqIE9l/qdhSJ6rudkLD9dYbkdzXkDrtFWNX7dU2oO5WZDnuMRzbpSt4vtZqfPQ+ Mke2wha6lY+Tv7dV1pkAF5XWNmM19lHKczCkUpP54p9Ig== X-Received: by 127.0.0.2 with SMTP id Y5tOYY7687511xuZdz0KsEBH; Thu, 18 Jul 2024 08:30:57 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.17983.1721316657205164125 for ; Thu, 18 Jul 2024 08:30:57 -0700 X-Received: from localhost.localdomain (unknown [47.201.241.198]) by linux.microsoft.com (Postfix) with ESMTPSA id 0D89020B7165; Thu, 18 Jul 2024 08:30:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0D89020B7165 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Ashraf Ali S , Ken Lautner , S Subject: [edk2-devel] [edk2-platforms][PATCH v2 1/2] IntelSiliconPkg: Compiler and linker fixes Date: Thu, 18 Jul 2024 11:30:33 -0400 Message-ID: <20240718153035.1051-2-mikuback@linux.microsoft.com> In-Reply-To: <20240718153035.1051-1-mikuback@linux.microsoft.com> References: <20240718153035.1051-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: Thu, 18 Jul 2024 08:30:57 -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: TVMAS2b8stXL7Tq2mCvzhROHx7686176AA= 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=hedJNLIL; 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 Reviewed-by: S, Ashraf Ali --- 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 | 10 +++++----- 3 files changed, 13 insertions(+), 13 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..563913bd866b 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/IntelVTdC= orePei.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdCorePei/IntelVTdC= orePei.c @@ -111,7 +111,7 @@ VTdLogAddEvent ( Item->Data1 =3D Data1; Item->Data2 =3D Data2; 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 (); } } @@ -151,8 +151,8 @@ VTdLogAddDataEvent ( CopyMem (Item->Data, Data, DataSize); =20 Item->Header.DataSize =3D EventSize; - Item->Header.LogType =3D (UINT64) (1 << EventType); - Item->Header.Timestamp =3D AsmReadTsc (); =20 + Item->Header.LogType =3D LShiftU64 (1, EventType); + 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 (#119968): https://edk2.groups.io/g/devel/message/119968 Mute This Topic: https://groups.io/mt/107418947/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-