diff --git a/include/arch/amd64/types.h b/include/arch/amd64/types.h index 672f02c..44d2182 100644 --- a/include/arch/amd64/types.h +++ b/include/arch/amd64/types.h @@ -17,8 +17,11 @@ #include "autoconf.h" /* physical address */ + typedef uint64_t phys_addr_t; +#define FMT_plx "%016" PRIx64 + /* cell based types */ typedef long long cell; diff --git a/include/arch/ia64/types.h b/include/arch/ia64/types.h index d423461..3bd2edb 100644 --- a/include/arch/ia64/types.h +++ b/include/arch/ia64/types.h @@ -18,8 +18,11 @@ #include /* physical address */ + typedef uint64_t phys_addr_t; +#define FMT_plx "%016" PRIx64 + /* cell based types */ typedef int64_t cell; diff --git a/include/arch/ppc/types.h b/include/arch/ppc/types.h index aaa66fc..ed9100c 100644 --- a/include/arch/ppc/types.h +++ b/include/arch/ppc/types.h @@ -25,6 +25,9 @@ typedef short int16_t; typedef int int32_t; typedef long long int64_t; typedef long intptr_t; + +#define PRIx32 "x" +#define PRIx64 "llx" #endif /* endianess */ @@ -33,8 +36,10 @@ typedef long intptr_t; /* physical address */ #if defined(__powerpc64__) typedef uint64_t phys_addr_t; +#define FMT_plx "%016" PRIx64 #else typedef uint32_t phys_addr_t; +#define FMT_plx "%08" PRIx32 #endif /* cell based types */ diff --git a/include/arch/sparc32/types.h b/include/arch/sparc32/types.h index bf96f57..444d648 100644 --- a/include/arch/sparc32/types.h +++ b/include/arch/sparc32/types.h @@ -25,14 +25,20 @@ typedef short int16_t; typedef int int32_t; typedef long long int64_t; typedef long intptr_t; + +#define PRIx32 "x" +#define PRIx64 "llx" #endif /* endianess */ #include "autoconf.h" /* physical address: 36 bits */ + typedef uint64_t phys_addr_t; +#define FMT_plx "%09" PRIx64 + /* cell based types */ typedef int32_t cell; diff --git a/include/arch/sparc64/types.h b/include/arch/sparc64/types.h index 8baa5ee..14d0e41 100644 --- a/include/arch/sparc64/types.h +++ b/include/arch/sparc64/types.h @@ -25,6 +25,9 @@ typedef short int16_t; typedef int int32_t; typedef long long int64_t; typedef long intptr_t; + +#define PRIx32 "x" +#define PRIx64 "llx" #endif /* endianess */ @@ -33,6 +36,8 @@ typedef long intptr_t; /* physical address */ typedef uint64_t phys_addr_t; +#define FMT_plx "%016" PRIx64 + /* 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 3ba4807..3b1b331 100644 --- a/include/arch/x86/types.h +++ b/include/arch/x86/types.h @@ -18,8 +18,11 @@ #include "autoconf.h" /* physical address: XXX theoretically 36 bits for PAE */ + typedef uint32_t phys_addr_t; +#define FMT_plx "%08" PRIx32 + /* cell based types */ typedef int32_t cell;