[OpenBIOS] [PATCH 4/5] Introduce physical address type

Andreas Färber andreas.faerber at web.de
Wed Oct 27 01:08:43 CEST 2010


Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
 TODO: Add a comment on PAE needing 36 bits.
 
 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(+), 0 deletions(-)

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 <endian.h>
 
+/* 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..16f355f 100644
--- a/include/arch/x86/types.h
+++ b/include/arch/x86/types.h
@@ -17,6 +17,9 @@
 
 #include "autoconf.h"
 
+/* physical address */
+typedef uint32_t phys_addr_t;
+
 /* cell based types */
 
 typedef int32_t		cell;
-- 
1.7.3




More information about the OpenBIOS mailing list