summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2012-01-11 21:11:36 -0800
committerGerrit <chrome-bot@google.com>2012-01-13 20:11:58 -0800
commita1891ae371e1ff70e973c6224beaf6d074e63ace (patch)
treef00ead521c9b7a02c498f607ff989431ca1f44c9 /arch
parent3b736f1c94547ea5afe5b13d4ad6f7565d1a9c24 (diff)
X86: Increase the size of the phys_size_t and phys_addr_t types
These types should be 64 bits long to reflect the fact that physical addresses and the size of physical areas of memory are more than 32 bits long. BUG=None TEST=Built and booted on Lumpy. Change-Id: I58bc69051db027d6eb718ec1c92a3d4afa2b7561 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/14150 Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/global_data.h10
-rw-r--r--arch/x86/include/asm/io.h4
-rw-r--r--arch/x86/include/asm/types.h4
-rw-r--r--arch/x86/lib/board.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h
index 39df699ccd..14653d525f 100644
--- a/arch/x86/include/asm/global_data.h
+++ b/arch/x86/include/asm/global_data.h
@@ -78,12 +78,12 @@ extern gd_t *gd;
#define GD_RELOC_ADDR 10
#define GD_START_ADDR_SP 11
#define GD_RAM_SIZE 12
-#define GD_RESET_STATUS 13
-#define GD_BLOB 14
-#define GD_JT 15
-#define GD_ENV_BUF 16
+#define GD_RESET_STATUS 14
+#define GD_BLOB 15
+#define GD_JT 16
+#define GD_ENV_BUF 17
-#define GD_SIZE 24
+#define GD_SIZE 25
/*
* Global Data Flags
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 8e93e2be94..38b83ad132 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -220,7 +220,7 @@ static inline void sync(void)
static inline void *
map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
{
- return (void *)paddr;
+ return (void *)(uintptr_t)paddr;
}
/*
@@ -233,7 +233,7 @@ static inline void unmap_physmem(void *vaddr, unsigned long flags)
static inline phys_addr_t virt_to_phys(void * vaddr)
{
- return (phys_addr_t)(vaddr);
+ return (phys_addr_t)(uintptr_t)(vaddr);
}
#endif
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index 9a40e383eb..e9fde88f7d 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -45,8 +45,8 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t;
-typedef unsigned long phys_addr_t;
-typedef unsigned long phys_size_t;
+typedef unsigned long long phys_addr_t;
+typedef unsigned long long phys_size_t;
#endif /* __KERNEL__ */
diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c
index a480ac0513..31a4de22e4 100644
--- a/arch/x86/lib/board.c
+++ b/arch/x86/lib/board.c
@@ -197,7 +197,7 @@ static int calculate_relocation_address(void)
ulong rel_offset;
/* Calculate destination RAM Address and relocation offset */
- dest_addr = (void *)gd->ram_size;
+ dest_addr = (void *)(uintptr_t)gd->ram_size;
dest_addr -= (bss_end - text_start);
rel_offset = dest_addr - text_start;