From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by mx.groups.io with SMTP id smtpd.web08.15494.1629058413460976125 for ; Sun, 15 Aug 2021 13:13:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@posteo.de header.s=2017 header.b=q05CGSvD; spf=pass (domain: posteo.de, ip: 185.67.36.65, mailfrom: mhaeuser@posteo.de) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id AB72E24002D for ; Sun, 15 Aug 2021 22:13:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1629058411; bh=E4r6MRIIkjWsAKseqAxANDZGwn8gkYkbu5SryvtapQE=; h=From:To:Cc:Subject:Date:From; b=q05CGSvDdxkFbE0M5A1ubTz6LgVZaVNTcbplCf+EX60uU0NyEHNY7vTGYYEBDOdkh 6m4dA4L63Iiz3KiY4aXIpHEapebJ6D4E1DBWO/E72KNhZJLxKTZ6rUGbiSZtvCJCTb 9FxuIH6ejX4hY6t579o31ghhPyDRTUQMteQIGnAmWdSgCQX4Pp0WUQulwjbP1YXJC4 5jxJFUEFZs8nov8c1WN35d47dV32bbrN7/BJByusWr54dKqBRsni+9aTY3PI3IIPx1 PkmZfTSC5wXE1jEqcmAAv7BLhlEy5zNnUBOxj9Z3/Ppg01T2duaFU5ztwxohUoYtDH +xKGf1/SEJX2A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GnpQM2bMLz9rxL; Sun, 15 Aug 2021 22:13:31 +0200 (CEST) From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Ray Ni Subject: [PATCH V2 1/3] MdeModulePkg: Rename IS_ALIGNED macros to avoid name collisions Date: Sun, 15 Aug 2021 20:11:57 +0000 Message-Id: <69c6e14c4fe944d380d38dcdb851a88f51631f86.1629057790.git.mhaeuser@posteo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable This patch is a preparation for the patches that follow. The subsequent patches will introduce and integrate new alignment-related macros, which collide with existing definitions in MdeModulePkg. Temporarily rename them to avoid build failure, till they can be substituted with the new, shared definitions. Cc: Jian J Wang Cc: Hao A Wu Cc: Ray Ni Signed-off-by: Marvin H=C3=A4user --- MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c | 2 +- MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 6 ++-- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c | 12 +++---- MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c | 2 +- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 4 +-- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 6 ++-- MdeModulePkg/Universal/EbcDxe/EbcExecute.c | 36 ++++++++++--= -------- MdeModulePkg/Bus/Ata/AhciPei/AhciPei.h | 2 +- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h | 2 +- MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h | 2 +- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h | 2 +- MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.h | 2 +- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h | 2 +- MdeModulePkg/Universal/EbcDxe/EbcExecute.h | 2 +- 14 files changed, 41 insertions(+), 41 deletions(-) diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c b/MdeModulePkg/Bus/Ata= /AhciPei/AhciMode.c index 7636ad27c86c..cc32b5de4f98 100644 --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c @@ -2099,7 +2099,7 @@ TrustTransferAtaDevice ( // ATA PassThru PPI.=0D //=0D if ((AtaPassThru->Mode->IoAlign > 1) &&=0D - !IS_ALIGNED (Buffer, AtaPassThru->Mode->IoAlign)) {=0D + !ADDRESS_IS_ALIGNED_ (Buffer, AtaPassThru->Mode->IoAlign)) {=0D NewBuffer =3D AllocateAlignedPages (=0D EFI_SIZE_TO_PAGES (TransferLength),=0D AtaPassThru->Mode->IoAlign=0D diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c b/MdeModulePkg/= Bus/Ata/AhciPei/AhciPeiPassThru.c index 191b78c88541..31ded8a31048 100644 --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c @@ -193,15 +193,15 @@ AhciAtaPassThruPassThru ( }=0D =0D IoAlign =3D This->Mode->IoAlign;=0D - if ((IoAlign > 1) && !IS_ALIGNED (Packet->InDataBuffer, IoAlign)) {=0D + if ((IoAlign > 1) && !ADDRESS_IS_ALIGNED_ (Packet->InDataBuffer, IoAlign= )) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - if ((IoAlign > 1) && !IS_ALIGNED (Packet->OutDataBuffer, IoAlign)) {=0D + if ((IoAlign > 1) && !ADDRESS_IS_ALIGNED_ (Packet->OutDataBuffer, IoAlig= n)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - if ((IoAlign > 1) && !IS_ALIGNED (Packet->Asb, IoAlign)) {=0D + if ((IoAlign > 1) && !ADDRESS_IS_ALIGNED_ (Packet->Asb, IoAlign)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c b/Mde= ModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c index 86fe9d954fdb..cf98fcdaf344 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c @@ -1281,15 +1281,15 @@ AtaPassThruPassThru ( =0D Instance =3D ATA_PASS_THRU_PRIVATE_DATA_FROM_THIS (This);=0D =0D - if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->InDataBuffer, This-= >Mode->IoAlign)) {=0D + if ((This->Mode->IoAlign > 1) && !ADDRESS_IS_ALIGNED_(Packet->InDataBuff= er, This->Mode->IoAlign)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->OutDataBuffer, This= ->Mode->IoAlign)) {=0D + if ((This->Mode->IoAlign > 1) && !ADDRESS_IS_ALIGNED_(Packet->OutDataBuf= fer, This->Mode->IoAlign)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->Asb, This->Mode->Io= Align)) {=0D + if ((This->Mode->IoAlign > 1) && !ADDRESS_IS_ALIGNED_(Packet->Asb, This-= >Mode->IoAlign)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D @@ -2012,15 +2012,15 @@ ExtScsiPassThruPassThru ( return EFI_INVALID_PARAMETER;=0D }=0D =0D - if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->InDataBuffer, This-= >Mode->IoAlign)) {=0D + if ((This->Mode->IoAlign > 1) && !ADDRESS_IS_ALIGNED_(Packet->InDataBuff= er, This->Mode->IoAlign)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->OutDataBuffer, This= ->Mode->IoAlign)) {=0D + if ((This->Mode->IoAlign > 1) && !ADDRESS_IS_ALIGNED_(Packet->OutDataBuf= fer, This->Mode->IoAlign)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->SenseData, This->Mo= de->IoAlign)) {=0D + if ((This->Mode->IoAlign > 1) && !ADDRESS_IS_ALIGNED_(Packet->SenseData,= This->Mode->IoAlign)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c b/MdeModul= ePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c index 79026a4a957d..471fb6a7f440 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c @@ -1036,7 +1036,7 @@ TrustTransferAtaDevice ( // Check the alignment of the incoming buffer prior to invoking underl= ying ATA PassThru=0D //=0D AtaPassThru =3D AtaDevice->AtaBusDriverData->AtaPassThru;=0D - if ((AtaPassThru->Mode->IoAlign > 1) && !IS_ALIGNED (Buffer, AtaPassTh= ru->Mode->IoAlign)) {=0D + if ((AtaPassThru->Mode->IoAlign > 1) && !ADDRESS_IS_ALIGNED_ (Buffer, = AtaPassThru->Mode->IoAlign)) {=0D NewBuffer =3D AllocateAlignedBuffer (AtaDevice, TransferLength);=0D if (NewBuffer =3D=3D NULL) {=0D return EFI_OUT_OF_RESOURCES;=0D diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bu= s/Scsi/ScsiDiskDxe/ScsiDisk.c index c80e78fa8a6b..81c0fa217a0b 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c @@ -1956,7 +1956,7 @@ ScsiDiskReceiveData ( goto Done;=0D }=0D =0D - if ((ScsiDiskDevice->ScsiIo->IoAlign > 1) && !IS_ALIGNED (PayloadBuffe= r, ScsiDiskDevice->ScsiIo->IoAlign)) {=0D + if ((ScsiDiskDevice->ScsiIo->IoAlign > 1) && !ADDRESS_IS_ALIGNED_ (Pay= loadBuffer, ScsiDiskDevice->ScsiIo->IoAlign)) {=0D AlignedBuffer =3D AllocateAlignedBuffer (ScsiDiskDevice, PayloadBuff= erSize);=0D if (AlignedBuffer =3D=3D NULL) {=0D Status =3D EFI_OUT_OF_RESOURCES;=0D @@ -2171,7 +2171,7 @@ ScsiDiskSendData ( goto Done;=0D }=0D =0D - if ((ScsiDiskDevice->ScsiIo->IoAlign > 1) && !IS_ALIGNED (PayloadBuffe= r, ScsiDiskDevice->ScsiIo->IoAlign)) {=0D + if ((ScsiDiskDevice->ScsiIo->IoAlign > 1) && !ADDRESS_IS_ALIGNED_ (Pay= loadBuffer, ScsiDiskDevice->ScsiIo->IoAlign)) {=0D AlignedBuffer =3D AllocateAlignedBuffer (ScsiDiskDevice, PayloadBuff= erSize);=0D if (AlignedBuffer =3D=3D NULL) {=0D Status =3D EFI_OUT_OF_RESOURCES;=0D diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModuleP= kg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c index 92ff958f161e..abfb422d1ea3 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c @@ -170,15 +170,15 @@ UfsPassThruPassThru ( return EFI_INVALID_PARAMETER;=0D }=0D =0D - if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->InDataBuffer, This-= >Mode->IoAlign)) {=0D + if ((This->Mode->IoAlign > 1) && !ADDRESS_IS_ALIGNED_(Packet->InDataBuff= er, This->Mode->IoAlign)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->OutDataBuffer, This= ->Mode->IoAlign)) {=0D + if ((This->Mode->IoAlign > 1) && !ADDRESS_IS_ALIGNED_(Packet->OutDataBuf= fer, This->Mode->IoAlign)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->SenseData, This->Mo= de->IoAlign)) {=0D + if ((This->Mode->IoAlign > 1) && !ADDRESS_IS_ALIGNED_(Packet->SenseData,= This->Mode->IoAlign)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D diff --git a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c b/MdeModulePkg/Univ= ersal/EbcDxe/EbcExecute.c index 1c4a4f5155c9..35f60cabdeb4 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c @@ -2004,7 +2004,7 @@ ExecuteJMP ( // check for alignment, and jump absolute.=0D //=0D Data64 =3D (UINT64) VmReadImmed64 (VmPtr, 2);=0D - if (!IS_ALIGNED ((UINTN) Data64, sizeof (UINT16))) {=0D + if (!ADDRESS_IS_ALIGNED_ ((UINTN) Data64, sizeof (UINT16))) {=0D EbcDebugSignalException (=0D EXCEPT_EBC_ALIGNMENT_CHECK,=0D EXCEPTION_FLAG_FATAL,=0D @@ -2059,7 +2059,7 @@ ExecuteJMP ( // Form: JMP32 @Rx {Index32}=0D //=0D Addr =3D VmReadMemN (VmPtr, (UINTN) Data64 + Index32);=0D - if (!IS_ALIGNED ((UINTN) Addr, sizeof (UINT16))) {=0D + if (!ADDRESS_IS_ALIGNED_ ((UINTN) Addr, sizeof (UINT16))) {=0D EbcDebugSignalException (=0D EXCEPT_EBC_ALIGNMENT_CHECK,=0D EXCEPTION_FLAG_FATAL,=0D @@ -2082,7 +2082,7 @@ ExecuteJMP ( // Form: JMP32 Rx {Immed32}=0D //=0D Addr =3D (UINTN) (Data64 + Index32);=0D - if (!IS_ALIGNED ((UINTN) Addr, sizeof (UINT16))) {=0D + if (!ADDRESS_IS_ALIGNED_ ((UINTN) Addr, sizeof (UINT16))) {=0D EbcDebugSignalException (=0D EXCEPT_EBC_ALIGNMENT_CHECK,=0D EXCEPTION_FLAG_FATAL,=0D @@ -3128,7 +3128,7 @@ ExecuteRET ( // Pull the return address off the VM app's stack and set the IP=0D // to it=0D //=0D - if (!IS_ALIGNED ((UINTN) VmPtr->Gpr[0], sizeof (UINT16))) {=0D + if (!ADDRESS_IS_ALIGNED_ ((UINTN) VmPtr->Gpr[0], sizeof (UINT16))) {=0D EbcDebugSignalException (=0D EXCEPT_EBC_ALIGNMENT_CHECK,=0D EXCEPTION_FLAG_FATAL,=0D @@ -4693,7 +4693,7 @@ VmWriteMem16 ( //=0D // Do a simple write if aligned=0D //=0D - if (IS_ALIGNED (Addr, sizeof (UINT16))) {=0D + if (ADDRESS_IS_ALIGNED_ (Addr, sizeof (UINT16))) {=0D *(UINT16 *) Addr =3D Data;=0D } else {=0D //=0D @@ -4756,7 +4756,7 @@ VmWriteMem32 ( //=0D // Do a simple write if aligned=0D //=0D - if (IS_ALIGNED (Addr, sizeof (UINT32))) {=0D + if (ADDRESS_IS_ALIGNED_ (Addr, sizeof (UINT32))) {=0D *(UINT32 *) Addr =3D Data;=0D } else {=0D //=0D @@ -4819,7 +4819,7 @@ VmWriteMem64 ( //=0D // Do a simple write if aligned=0D //=0D - if (IS_ALIGNED (Addr, sizeof (UINT64))) {=0D + if (ADDRESS_IS_ALIGNED_ (Addr, sizeof (UINT64))) {=0D *(UINT64 *) Addr =3D Data;=0D } else {=0D //=0D @@ -4885,7 +4885,7 @@ VmWriteMemN ( //=0D // Do a simple write if aligned=0D //=0D - if (IS_ALIGNED (Addr, sizeof (UINTN))) {=0D + if (ADDRESS_IS_ALIGNED_ (Addr, sizeof (UINTN))) {=0D *(UINTN *) Addr =3D Data;=0D } else {=0D for (Index =3D 0; Index < sizeof (UINTN) / sizeof (UINT32); Index++) {= =0D @@ -4949,7 +4949,7 @@ VmReadImmed16 ( //=0D // Read direct if aligned=0D //=0D - if (IS_ALIGNED ((UINTN) VmPtr->Ip + Offset, sizeof (INT16))) {=0D + if (ADDRESS_IS_ALIGNED_ ((UINTN) VmPtr->Ip + Offset, sizeof (INT16))) {= =0D return * (INT16 *) (VmPtr->Ip + Offset);=0D } else {=0D //=0D @@ -4993,7 +4993,7 @@ VmReadImmed32 ( //=0D // Read direct if aligned=0D //=0D - if (IS_ALIGNED ((UINTN) VmPtr->Ip + Offset, sizeof (UINT32))) {=0D + if (ADDRESS_IS_ALIGNED_ ((UINTN) VmPtr->Ip + Offset, sizeof (UINT32))) {= =0D return * (INT32 *) (VmPtr->Ip + Offset);=0D }=0D //=0D @@ -5032,7 +5032,7 @@ VmReadImmed64 ( //=0D // Read direct if aligned=0D //=0D - if (IS_ALIGNED ((UINTN) VmPtr->Ip + Offset, sizeof (UINT64))) {=0D + if (ADDRESS_IS_ALIGNED_ ((UINTN) VmPtr->Ip + Offset, sizeof (UINT64))) {= =0D return * (UINT64 *) (VmPtr->Ip + Offset);=0D }=0D //=0D @@ -5069,7 +5069,7 @@ VmReadCode16 ( //=0D // Read direct if aligned=0D //=0D - if (IS_ALIGNED ((UINTN) VmPtr->Ip + Offset, sizeof (UINT16))) {=0D + if (ADDRESS_IS_ALIGNED_ ((UINTN) VmPtr->Ip + Offset, sizeof (UINT16))) {= =0D return * (UINT16 *) (VmPtr->Ip + Offset);=0D } else {=0D //=0D @@ -5110,7 +5110,7 @@ VmReadCode32 ( //=0D // Read direct if aligned=0D //=0D - if (IS_ALIGNED ((UINTN) VmPtr->Ip + Offset, sizeof (UINT32))) {=0D + if (ADDRESS_IS_ALIGNED_ ((UINTN) VmPtr->Ip + Offset, sizeof (UINT32))) {= =0D return * (UINT32 *) (VmPtr->Ip + Offset);=0D }=0D //=0D @@ -5147,7 +5147,7 @@ VmReadCode64 ( //=0D // Read direct if aligned=0D //=0D - if (IS_ALIGNED ((UINTN) VmPtr->Ip + Offset, sizeof (UINT64))) {=0D + if (ADDRESS_IS_ALIGNED_ ((UINTN) VmPtr->Ip + Offset, sizeof (UINT64))) {= =0D return * (UINT64 *) (VmPtr->Ip + Offset);=0D }=0D //=0D @@ -5210,7 +5210,7 @@ VmReadMem16 ( //=0D // Read direct if aligned=0D //=0D - if (IS_ALIGNED (Addr, sizeof (UINT16))) {=0D + if (ADDRESS_IS_ALIGNED_ (Addr, sizeof (UINT16))) {=0D return * (UINT16 *) Addr;=0D }=0D //=0D @@ -5243,7 +5243,7 @@ VmReadMem32 ( //=0D // Read direct if aligned=0D //=0D - if (IS_ALIGNED (Addr, sizeof (UINT32))) {=0D + if (ADDRESS_IS_ALIGNED_ (Addr, sizeof (UINT32))) {=0D return * (UINT32 *) Addr;=0D }=0D //=0D @@ -5280,7 +5280,7 @@ VmReadMem64 ( //=0D // Read direct if aligned=0D //=0D - if (IS_ALIGNED (Addr, sizeof (UINT64))) {=0D + if (ADDRESS_IS_ALIGNED_ (Addr, sizeof (UINT64))) {=0D return * (UINT64 *) Addr;=0D }=0D //=0D @@ -5349,7 +5349,7 @@ VmReadMemN ( //=0D // Read direct if aligned=0D //=0D - if (IS_ALIGNED (Addr, sizeof (UINTN))) {=0D + if (ADDRESS_IS_ALIGNED_ (Addr, sizeof (UINTN))) {=0D return * (UINTN *) Addr;=0D }=0D //=0D diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.h b/MdeModulePkg/Bus/Ata/= AhciPei/AhciPei.h index 2be78076bee7..2a74c9984791 100644 --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.h +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.h @@ -145,7 +145,7 @@ typedef union { #define AHCI_PORT_SERR 0x0030=0D #define AHCI_PORT_CI 0x0038=0D =0D -#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - = 1)) =3D=3D 0)=0D +#define ADDRESS_IS_ALIGNED_(addr, size) (((UINTN) (addr) &= (size - 1)) =3D=3D 0)=0D #define TIMER_PERIOD_SECONDS(Seconds) MultU64x32((UINT64)(Seconds= ), 10000000)=0D =0D #pragma pack(1)=0D diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h b/Mde= ModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h index 5f582b9b3e76..aa3472a71677 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h @@ -147,7 +147,7 @@ struct _ATA_NONBLOCK_TASK { #define ATA_ATAPI_TIMEOUT EFI_TIMER_PERIOD_SECONDS(3)=0D #define ATA_SPINUP_TIMEOUT EFI_TIMER_PERIOD_SECONDS(10)=0D =0D -#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) =3D=3D = 0)=0D +#define ADDRESS_IS_ALIGNED_(addr, size) (((UINTN) (addr) & (size - 1)= ) =3D=3D 0)=0D =0D #define ATA_PASS_THRU_PRIVATE_DATA_FROM_THIS(a) \=0D CR (a, \=0D diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h b/MdeModulePkg/Bus/Ata= /AtaBusDxe/AtaBus.h index a5a865209942..13767a8a13c8 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h @@ -76,7 +76,7 @@ #define ATA_TASK_SIGNATURE SIGNATURE_32 ('A', 'T', 'S', 'K'= )=0D #define ATA_DEVICE_SIGNATURE SIGNATURE_32 ('A', 'B', 'I', 'D'= )=0D #define ATA_SUB_TASK_SIGNATURE SIGNATURE_32 ('A', 'S', 'T', 'S'= )=0D -#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) = =3D=3D 0)=0D +#define ADDRESS_IS_ALIGNED_(addr, size) (((UINTN) (addr) & (siz= e - 1)) =3D=3D 0)=0D =0D //=0D // ATA bus data structure for ATA controller=0D diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h b/MdeModulePkg/Bu= s/Scsi/ScsiDiskDxe/ScsiDisk.h index ed9bbd6f8ba8..abe1d06a98da 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h @@ -39,7 +39,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =0D #define IS_DEVICE_FIXED(a) (a)->FixedDevice ? 1 : 0=0D =0D -#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) =3D=3D 0)= =0D +#define ADDRESS_IS_ALIGNED_(addr, size) (((UINTN) (addr) & (size - 1)) = =3D=3D 0)=0D =0D #define UFS_WLUN_RPMB 0xC4=0D =0D diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.h b/MdeModule= Pkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.h index 6e2305aa2bc2..4802fdc0ab9b 100644 --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.h +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.h @@ -133,7 +133,7 @@ typedef struct _UFS_PEIM_HC_PRIVATE_DATA { =0D #define ROUNDUP8(x) (((x) % 8 =3D=3D 0) ? (x) : ((x) / 8 + 1) * 8)=0D =0D -#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) =3D=3D = 0)=0D +#define ADDRESS_IS_ALIGNED_(addr, size) (((UINTN) (addr) & (size - 1)= ) =3D=3D 0)=0D =0D #define GET_UFS_PEIM_HC_PRIVATE_DATA_FROM_THIS(a) CR (a, UFS_PEIM_HC_PRIVA= TE_DATA, BlkIoPpi, UFS_PEIM_HC_SIG)=0D #define GET_UFS_PEIM_HC_PRIVATE_DATA_FROM_THIS2(a) CR (a, UFS_PEIM_HC_PRIV= ATE_DATA, BlkIo2Ppi, UFS_PEIM_HC_SIG)=0D diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h b/MdeModuleP= kg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h index 79b86f7e6b3d..da3bf78bf9bc 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h @@ -105,7 +105,7 @@ typedef struct { =0D #define ROUNDUP8(x) (((x) % 8 =3D=3D 0) ? (x) : ((x) / 8 + 1) * 8)=0D =0D -#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) =3D= =3D 0)=0D +#define ADDRESS_IS_ALIGNED_(addr, size) (((UINTN) (addr) & (size - = 1)) =3D=3D 0)=0D =0D #define UFS_PASS_THRU_PRIVATE_DATA_FROM_THIS(a) \=0D CR (a, \=0D diff --git a/MdeModulePkg/Universal/EbcDxe/EbcExecute.h b/MdeModulePkg/Univ= ersal/EbcDxe/EbcExecute.h index 1cb68bc5385a..f21c757a75b4 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcExecute.h +++ b/MdeModulePkg/Universal/EbcDxe/EbcExecute.h @@ -15,7 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // Macros to check and set alignment=0D //=0D #define ASSERT_ALIGNED(addr, size) ASSERT (!((UINT32) (addr) & (size - 1)= ))=0D -#define IS_ALIGNED(addr, size) !((UINT32) (addr) & (size - 1))=0D +#define ADDRESS_IS_ALIGNED_(addr, size) !((UINT32) (addr) & (size - 1= ))=0D =0D //=0D // Debug macro=0D --=20 2.31.1