j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: afaerber Date: Sat Oct 30 18:18:08 2010 New Revision: 932 URL: http://tracker.coreboot.org/trac/openbios/changeset/932
Log: Introduce physical address type
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 andreas.faerber@web.de
Modified: trunk/openbios-devel/include/arch/amd64/types.h trunk/openbios-devel/include/arch/ia64/types.h trunk/openbios-devel/include/arch/ppc/types.h trunk/openbios-devel/include/arch/sparc32/types.h trunk/openbios-devel/include/arch/sparc64/types.h trunk/openbios-devel/include/arch/x86/types.h
Modified: trunk/openbios-devel/include/arch/amd64/types.h ============================================================================== --- trunk/openbios-devel/include/arch/amd64/types.h Sat Oct 30 18:15:17 2010 (r931) +++ trunk/openbios-devel/include/arch/amd64/types.h Sat Oct 30 18:18:08 2010 (r932) @@ -16,6 +16,9 @@ /* endianess */ #include "autoconf.h"
+/* physical address */ +typedef uint64_t phys_addr_t; + /* cell based types */
typedef long long cell;
Modified: trunk/openbios-devel/include/arch/ia64/types.h ============================================================================== --- trunk/openbios-devel/include/arch/ia64/types.h Sat Oct 30 18:15:17 2010 (r931) +++ trunk/openbios-devel/include/arch/ia64/types.h Sat Oct 30 18:18:08 2010 (r932) @@ -17,6 +17,9 @@
#include <endian.h>
+/* physical address */ +typedef uint64_t phys_addr_t; + /* cell based types */
typedef int64_t cell;
Modified: trunk/openbios-devel/include/arch/ppc/types.h ============================================================================== --- trunk/openbios-devel/include/arch/ppc/types.h Sat Oct 30 18:15:17 2010 (r931) +++ trunk/openbios-devel/include/arch/ppc/types.h Sat Oct 30 18:18:08 2010 (r932) @@ -30,6 +30,13 @@ /* 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;
Modified: trunk/openbios-devel/include/arch/sparc32/types.h ============================================================================== --- trunk/openbios-devel/include/arch/sparc32/types.h Sat Oct 30 18:15:17 2010 (r931) +++ trunk/openbios-devel/include/arch/sparc32/types.h Sat Oct 30 18:18:08 2010 (r932) @@ -30,6 +30,9 @@ /* endianess */ #include "autoconf.h"
+/* physical address: 36 bits */ +typedef uint64_t phys_addr_t; + /* cell based types */
typedef int32_t cell;
Modified: trunk/openbios-devel/include/arch/sparc64/types.h ============================================================================== --- trunk/openbios-devel/include/arch/sparc64/types.h Sat Oct 30 18:15:17 2010 (r931) +++ trunk/openbios-devel/include/arch/sparc64/types.h Sat Oct 30 18:18:08 2010 (r932) @@ -30,6 +30,9 @@ /* endianess */ #include "autoconf.h"
+/* physical address */ +typedef uint64_t phys_addr_t; + /* cell based types */ typedef long long cell; typedef unsigned long long ucell;
Modified: trunk/openbios-devel/include/arch/x86/types.h ============================================================================== --- trunk/openbios-devel/include/arch/x86/types.h Sat Oct 30 18:15:17 2010 (r931) +++ trunk/openbios-devel/include/arch/x86/types.h Sat Oct 30 18:18:08 2010 (r932) @@ -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;