summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-05-01 23:56:36 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-05-01 23:56:35 -0700
commit68bf2e864dd16b0906525e1834bb42ce0d3cd12c (patch)
tree9e63510f6baa70ef0169c285e6e68aaf2ee6b6eb
parentd297ef0110cba13785dc22a15ce7bf5dfaf8dc57 (diff)
parentad8bfc36dfb79131f4a3d83dcac20c935d155e3a (diff)
Merge "app: aboot: modify api declaration"
-rw-r--r--app/aboot/aboot.c6
-rw-r--r--app/aboot/mdtp.c6
-rwxr-xr-xplatform/msm_shared/dev_tree.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index f5e4a01d..bc485dd8 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -820,7 +820,7 @@ void boot_linux(void *kernel, unsigned *tags,
* start: Start of the memory region
* size: Size of the memory region
*/
-int check_aboot_addr_range_overlap(uint32_t start, uint32_t size)
+int check_aboot_addr_range_overlap(uintptr_t start, uint32_t size)
{
/* Check for boundary conditions. */
if ((UINT_MAX - start) < size)
@@ -1129,7 +1129,7 @@ int boot_linux_from_mmc(void)
boot_verifier_init();
#endif
- if (check_aboot_addr_range_overlap((uint32_t) image_addr, imagesize_actual))
+ if (check_aboot_addr_range_overlap((uintptr_t) image_addr, imagesize_actual))
{
dprintf(CRITICAL, "Boot image buffer address overlaps with aboot addresses.\n");
return -1;
@@ -1180,7 +1180,7 @@ int boot_linux_from_mmc(void)
if((target_use_signed_kernel() && (!device.is_unlocked)) || is_test_mode_enabled())
{
offset = imagesize_actual;
- if (check_aboot_addr_range_overlap((uint32_t)image_addr + offset, page_size))
+ if (check_aboot_addr_range_overlap((uintptr_t)image_addr + offset, page_size))
{
dprintf(CRITICAL, "Signature read buffer address overlaps with aboot addresses.\n");
return -1;
diff --git a/app/aboot/mdtp.c b/app/aboot/mdtp.c
index a8de4748..2f7b70c1 100644
--- a/app/aboot/mdtp.c
+++ b/app/aboot/mdtp.c
@@ -62,7 +62,7 @@ static void mdtp_tzbsp_disallow_cipher_DIP(void);
uint32_t g_mdtp_version = (((MDTP_MAJOR_VERSION << 16) & 0xFFFF0000) | (MDTP_MINOR_VERSION & 0x0000FFFF));
static int is_mdtp_activated = -1;
-int check_aboot_addr_range_overlap(uint32_t start, uint32_t size);
+extern int check_aboot_addr_range_overlap(uintptr_t start, uint32_t size);
int scm_random(uint32_t * rbuf, uint32_t r_len);
void free_mdtp_image(void);
@@ -261,7 +261,7 @@ static int verify_partition_block_hash(char *name,
/* initiating parameters for hash calculation using HW crypto */
target_crypto_init_params();
- if (check_aboot_addr_range_overlap((uint32_t)buf, ROUNDUP(MDTP_FWLOCK_BLOCK_SIZE, block_size)))
+ if (check_aboot_addr_range_overlap((uintptr_t)buf, ROUNDUP(MDTP_FWLOCK_BLOCK_SIZE, block_size)))
{
dprintf(CRITICAL, "mdtp: verify_partition_block_hash: %s: image buffer address overlaps with aboot addresses.\n", name);
return -1;
@@ -502,7 +502,7 @@ static int verify_ext_partition(mdtp_ext_partition_verification_t *ext_partition
/* 3) Signature may or may not be at the end of the image. Read the signature if needed. */
if (!ext_partition->sig_avail)
{
- if (check_aboot_addr_range_overlap((uint32_t)(ext_partition->image_addr + ext_partition->image_size), ext_partition->page_size))
+ if (check_aboot_addr_range_overlap((uintptr_t)(ext_partition->image_addr + ext_partition->image_size), ext_partition->page_size))
{
dprintf(CRITICAL, "ERROR: Signature read buffer address overlaps with aboot addresses.\n");
return -1;
diff --git a/platform/msm_shared/dev_tree.c b/platform/msm_shared/dev_tree.c
index 5cd65761..e00aaff7 100755
--- a/platform/msm_shared/dev_tree.c
+++ b/platform/msm_shared/dev_tree.c
@@ -58,7 +58,7 @@ extern uint32_t target_dev_tree_mem(void *fdt, uint32_t memory_node_offset);
/* TODO: This function needs to be moved to target layer to check violations
* against all the other regions as well.
*/
-extern int check_aboot_addr_range_overlap(uint32_t start, uint32_t size);
+extern int check_aboot_addr_range_overlap(uintptr_t start, uint32_t size);
/* Returns soc version if platform id and hardware id matches
otherwise return 0xFFFFFFFF */
@@ -459,7 +459,7 @@ void *dev_tree_appended(void *kernel, uint32_t kernel_size, uint32_t dtb_offset,
break;
dtb_size = fdt_totalsize(&dtb_hdr);
- if (check_aboot_addr_range_overlap((uint32_t)tags, dtb_size)) {
+ if (check_aboot_addr_range_overlap((uintptr_t)tags, dtb_size)) {
dprintf(CRITICAL, "Tags addresses overlap with aboot addresses.\n");
return NULL;
}