From 70bbfcf6cec64f83cd6461011cba1411153bfead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 30 Oct 2010 16:18:08 +0000 Subject: [PATCH] Introduce physical address type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Define phys_addr_t type for all architectures. v2: * Add comment on PAE for x86, pointed out by Blue. Signed-off-by: Andreas Färber git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@932 f158a5a8-5612-0410-a976-696ce0be7e32 --- include/arch/amd64/types.h | 3 +++ include/arch/ia64/types.h | 3 +++ include/arch/ppc/types.h | 7 +++++++ include/arch/sparc32/types.h | 3 +++ include/arch/sparc64/types.h | 3 +++ include/arch/x86/types.h | 3 +++ 6 files changed, 22 insertions(+) diff --git a/include/arch/amd64/types.h b/include/arch/amd64/types.h index ffe8194..672f02c 100644 --- a/include/arch/amd64/types.h +++ b/include/arch/amd64/types.h @@ -16,6 +16,9 @@ /* endianess */ #include "autoconf.h" +/* physical address */ +typedef uint64_t phys_addr_t; + /* cell based types */ typedef long long cell; diff --git a/include/arch/ia64/types.h b/include/arch/ia64/types.h index 5bf065a..d423461 100644 --- a/include/arch/ia64/types.h +++ b/include/arch/ia64/types.h @@ -17,6 +17,9 @@ #include +/* physical address */ +typedef uint64_t phys_addr_t; + /* cell based types */ typedef int64_t cell; diff --git a/include/arch/ppc/types.h b/include/arch/ppc/types.h index d6df2a1..aaa66fc 100644 --- a/include/arch/ppc/types.h +++ b/include/arch/ppc/types.h @@ -30,6 +30,13 @@ typedef long intptr_t; /* endianess */ #include "autoconf.h" +/* physical address */ +#if defined(__powerpc64__) +typedef uint64_t phys_addr_t; +#else +typedef uint32_t phys_addr_t; +#endif + /* cell based types */ typedef int32_t cell; diff --git a/include/arch/sparc32/types.h b/include/arch/sparc32/types.h index 500bcd1..bf96f57 100644 --- a/include/arch/sparc32/types.h +++ b/include/arch/sparc32/types.h @@ -30,6 +30,9 @@ typedef long intptr_t; /* endianess */ #include "autoconf.h" +/* physical address: 36 bits */ +typedef uint64_t phys_addr_t; + /* cell based types */ typedef int32_t cell; diff --git a/include/arch/sparc64/types.h b/include/arch/sparc64/types.h index 112b53e..8baa5ee 100644 --- a/include/arch/sparc64/types.h +++ b/include/arch/sparc64/types.h @@ -30,6 +30,9 @@ typedef long intptr_t; /* endianess */ #include "autoconf.h" +/* physical address */ +typedef uint64_t phys_addr_t; + /* cell based types */ typedef long long cell; typedef unsigned long long ucell; diff --git a/include/arch/x86/types.h b/include/arch/x86/types.h index 9491eae..3ba4807 100644 --- a/include/arch/x86/types.h +++ b/include/arch/x86/types.h @@ -17,6 +17,9 @@ #include "autoconf.h" +/* physical address: XXX theoretically 36 bits for PAE */ +typedef uint32_t phys_addr_t; + /* cell based types */ typedef int32_t cell;