]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/types/amd64/types-arch.h
update
[l4.git] / kernel / fiasco / src / types / amd64 / types-arch.h
1 #ifndef TYPES_ARCH_H__
2 #define TYPES_ARCH_H__
3
4 #define L4_PTR_ARG(a) ((Address)(a)) 
5
6 #define L4_PTR_FMT              "%016lx"
7 #define L4_MWORD_FMT            "%016lx"
8 #define L4_X64_FMT              "%016llx"
9 #define L4_ADDR_INPUT_FMT       "%16lx"
10 #define L4_FRAME_INPUT_FMT      "%13lx"
11
12 /// standard fixed-width types
13 typedef unsigned char           Unsigned8;
14 typedef signed char             Signed8;
15 typedef unsigned short          Unsigned16;
16 typedef signed short            Signed16;
17 typedef unsigned int            Unsigned32;
18 typedef signed int              Signed32;
19 typedef unsigned long long int  Unsigned64;
20 typedef signed long long int    Signed64;
21
22 /// machine word
23 typedef signed long int         Smword;
24 typedef unsigned long int       Mword;
25
26 enum {
27   MWORD_BITS = 64,
28   ARCH_PAGE_SHIFT = 12,
29 };
30
31 /// virtual or physical address in 32 bit mode (bootup)
32 /// (virtual or physical address) should be addr_t or something
33 typedef Mword                   Address;
34 enum Address_vals
35 #ifdef __cplusplus
36 : Address
37 #endif
38 {
39   Invalid_address = ~0UL
40 };
41
42 typedef Unsigned64              Cpu_time;
43
44 #ifdef __cplusplus
45
46 #include <cxx/cxx_int>
47 typedef cxx::int_type<Unsigned32, struct Cpu_phys_id_t> Cpu_phys_id;
48
49 #endif
50
51 #endif