From f74cf29eac110e776c01f3098318fc18a97e4599 Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Wed, 28 Feb 2018 17:33:21 +0000 Subject: Remove type UINTN from the codebase The UINTN type was meant to represent a 'native' integer, i.e. a 32-bit integer on 32-bit platforms and a 64-bit integer on 64-bit platforms. The type has been removed because it was used inconsistently across the codebase. Change-Id: Id45afde5c110ae807ce8fbbaa1cc48cff61ff76d --- framework/include/nvm.h | 4 ++-- include/common/fwu_nvm.h | 4 ++-- include/lib/tftf_lib.h | 2 -- plat/common/fwu_nvm_accessors.c | 4 ++-- plat/common/tftf_nvm_accessors.c | 4 ++-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/framework/include/nvm.h b/framework/include/nvm.h index 455f5ef..1231c68 100644 --- a/framework/include/nvm.h +++ b/framework/include/nvm.h @@ -113,13 +113,13 @@ STATUS tftf_clean_nvm(void); * size * Returns: STATUS_FAIL, STATUS_SUCCESS, STATUS_OUT_OF_RESOURCES */ -STATUS tftf_nvm_write(UINTN offset, const void *buffer, UINTN size); +STATUS tftf_nvm_write(unsigned long long offset, const void *buffer, size_t size); /* Reads the flash into buffer at offset with length equal to * size * Returns: STATUS_FAIL, STATUS_SUCCESS, STATUS_OUT_OF_RESOURCES */ -STATUS tftf_nvm_read(UINTN offset, void *buffer, UINTN size); +STATUS tftf_nvm_read(unsigned long long offset, void *buffer, size_t size); #endif /*__ASSEMBLY__*/ #endif diff --git a/include/common/fwu_nvm.h b/include/common/fwu_nvm.h index fd6a746..fd77565 100644 --- a/include/common/fwu_nvm.h +++ b/include/common/fwu_nvm.h @@ -49,13 +49,13 @@ * size * Returns: STATUS_FAIL, STATUS_SUCCESS, STATUS_OUT_OF_RESOURCES */ -STATUS fwu_nvm_write(UINTN offset, const void *buffer, UINTN size); +STATUS fwu_nvm_write(unsigned long long offset, const void *buffer, size_t size); /* Reads the flash into buffer at offset with length equal to * size * Returns: STATUS_FAIL, STATUS_SUCCESS, STATUS_OUT_OF_RESOURCES */ -STATUS fwu_nvm_read(UINTN offset, void *buffer, UINTN size); +STATUS fwu_nvm_read(unsigned long long offset, void *buffer, size_t size); /* * This function is used to replace the original fip.bin diff --git a/include/lib/tftf_lib.h b/include/lib/tftf_lib.h index 95982bf..2e6f30f 100644 --- a/include/lib/tftf_lib.h +++ b/include/lib/tftf_lib.h @@ -177,8 +177,6 @@ smc_ret_values tftf_smc(const smc_args *args); __attribute__((format(printf, 1, 2))) int tftf_testcase_printf(const char *format, ...); -typedef unsigned long long UINTN; - /* * This function is meant to be used by tests. * It tells the framework that the test is going to reset the platform. diff --git a/plat/common/fwu_nvm_accessors.c b/plat/common/fwu_nvm_accessors.c index 4cffde1..9972e50 100644 --- a/plat/common/fwu_nvm_accessors.c +++ b/plat/common/fwu_nvm_accessors.c @@ -41,7 +41,7 @@ #include -STATUS fwu_nvm_write(UINTN offset, const void *buffer, UINTN size) +STATUS fwu_nvm_write(unsigned long long offset, const void *buffer, size_t size) { uintptr_t nvm_handle; int ret; @@ -67,7 +67,7 @@ STATUS fwu_nvm_write(UINTN offset, const void *buffer, UINTN size) return STATUS_SUCCESS; } -STATUS fwu_nvm_read(UINTN offset, void *buffer, UINTN size) +STATUS fwu_nvm_read(unsigned long long offset, void *buffer, size_t size) { uintptr_t nvm_handle; int ret; diff --git a/plat/common/tftf_nvm_accessors.c b/plat/common/tftf_nvm_accessors.c index 853b8a8..d6eb73b 100644 --- a/plat/common/tftf_nvm_accessors.c +++ b/plat/common/tftf_nvm_accessors.c @@ -42,7 +42,7 @@ static spinlock_t flash_access_lock; #endif -STATUS tftf_nvm_write(UINTN offset, const void *buffer, UINTN size) +STATUS tftf_nvm_write(unsigned long long offset, const void *buffer, size_t size) { #if USE_NVM int ret; @@ -84,7 +84,7 @@ fail: return STATUS_SUCCESS; } -STATUS tftf_nvm_read(UINTN offset, void *buffer, UINTN size) +STATUS tftf_nvm_read(unsigned long long offset, void *buffer, size_t size) { #if USE_NVM int ret; -- cgit v1.2.3