Commit 1abfd7a6 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by G Edhaya Chandran
Browse files

uefi-sct/SctPkg: correct print code for EFI_MEMORY_TYPE

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2284



EFI_MEMORY_TYPE is an enum. SctPrint expects an UINTN when printing with %d. Add missing conversions in MemoryAllocationServicesBBTestFunction.
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Samer El-Haj-Mahmoud's avatarSamer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
parent 6756aa25
......@@ -418,7 +418,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -438,7 +438,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
......@@ -456,7 +456,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
......@@ -479,7 +479,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
......@@ -513,7 +513,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -533,7 +533,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory <= Descriptor.PhysicalStart +
SctLShiftU64 (Descriptor.NumberOfPages, EFI_PAGE_SHIFT) -
......@@ -555,7 +555,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex],
(UINTN)AllocatePagesMemoryType[TypeIndex],
Descriptor.PhysicalStart,
Descriptor.NumberOfPages,
Memory
......@@ -590,7 +590,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory2 & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -610,7 +610,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if ( Memory2 <= Descriptor.PhysicalStart +
SctLShiftU64 (Descriptor.NumberOfPages, EFI_PAGE_SHIFT) -
......@@ -632,7 +632,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex],
(UINTN)AllocatePagesMemoryType[TypeIndex],
Memory2
);
if (Memory != 0) {
......@@ -651,7 +651,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
......@@ -671,7 +671,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
......@@ -695,7 +695,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
......@@ -743,7 +743,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -763,7 +763,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -783,7 +783,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
......@@ -801,7 +801,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
......@@ -828,7 +828,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
......@@ -876,7 +876,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -896,7 +896,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -916,7 +916,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
......@@ -934,7 +934,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
......@@ -954,7 +954,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
......@@ -1002,7 +1002,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -1022,7 +1022,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start + (SctLShiftU64 (PageNum/3, EFI_PAGE_SHIFT) & 0xFFFFFFFFFFFF0000)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -1042,7 +1042,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
......@@ -1060,7 +1060,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
......@@ -1080,7 +1080,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
......@@ -1128,7 +1128,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -1148,7 +1148,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start + (SctLShiftU64 (PageNum * 2 / 3, EFI_PAGE_SHIFT) & 0xFFFFFFFFFFFF0000)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -1168,7 +1168,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
......@@ -1186,7 +1186,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
......@@ -1213,7 +1213,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
......@@ -1261,7 +1261,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -1281,7 +1281,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -1301,7 +1301,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
......@@ -1319,7 +1319,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
......@@ -1339,7 +1339,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
......@@ -1396,7 +1396,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -1416,7 +1416,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -1436,7 +1436,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
if (PageNum != 1) {
......@@ -1461,7 +1461,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
......@@ -1481,7 +1481,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
......@@ -1529,7 +1529,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -1549,7 +1549,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
......@@ -1569,7 +1569,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
......@@ -1587,7 +1587,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
......@@ -1678,7 +1678,7 @@ BBTestFreePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
continue;
}
......@@ -1707,7 +1707,7 @@ BBTestFreePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
AllocatePagesMemoryType[TypeIndex]
(UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment