summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wright <jonathan.wright@arm.com>2018-02-28 17:33:21 +0000
committerJonathan Wright <jonathan.wright@arm.com>2018-03-01 10:45:46 +0000
commitf74cf29eac110e776c01f3098318fc18a97e4599 (patch)
tree93e0b2d9a1381b39c42adf3f8c69c5c52a03eeb3
parent458dc17aa5485e90ede863a753c0bef2edb5dba7 (diff)
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
-rw-r--r--framework/include/nvm.h4
-rw-r--r--include/common/fwu_nvm.h4
-rw-r--r--include/lib/tftf_lib.h2
-rw-r--r--plat/common/fwu_nvm_accessors.c4
-rw-r--r--plat/common/tftf_nvm_accessors.c4
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 <string.h>
-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;