mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Introduce FMT_plx for phys_addr_t
Define a zero-padded format string to be used for phys_addr_t arguments.
Introduce PRIx{32,64} macros as needed.
v2:
* Also define PRIx32 for sparc32 and sparc64, requested by Blue.
Cc: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@949 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Andreas Färber
parent
54c0ea8a54
commit
8e46cc4cb1
@@ -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;
|
||||
|
||||
@@ -18,8 +18,11 @@
|
||||
#include <endian.h>
|
||||
|
||||
/* physical address */
|
||||
|
||||
typedef uint64_t phys_addr_t;
|
||||
|
||||
#define FMT_plx "%016" PRIx64
|
||||
|
||||
/* cell based types */
|
||||
|
||||
typedef int64_t cell;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user