Changeset 7f1c620 in mainline for arch/mips32/include
- Timestamp:
- 2006-07-04T17:17:56Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffa3ef5
- Parents:
- 991779c5
- Location:
- arch/mips32/include
- Files:
-
- 17 edited
-
arg.h (modified) (2 diffs)
-
asm.h (modified) (2 diffs)
-
boot.h (modified) (1 diff)
-
byteorder.h (modified) (1 diff)
-
context.h (modified) (1 diff)
-
cp0.h (modified) (1 diff)
-
cpu.h (modified) (1 diff)
-
debugger.h (modified) (1 diff)
-
drivers/arc.h (modified) (8 diffs)
-
exception.h (modified) (2 diffs)
-
faddr.h (modified) (1 diff)
-
fpu_context.h (modified) (1 diff)
-
memstr.h (modified) (1 diff)
-
mm/asid.h (modified) (1 diff)
-
mm/page.h (modified) (2 diffs)
-
mm/tlb.h (modified) (4 diffs)
-
types.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/include/arg.h
r991779c5 r7f1c620 43 43 */ 44 44 45 typedef __addressva_list;45 typedef uintptr_t va_list; 46 46 47 47 #define va_start(ap, lst) \ … … 49 49 50 50 #define va_arg(ap, type) \ 51 (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? (( __address)((ap) + 2*4 - 1) & (~3)) : ((__address)((ap) + 2*8 -1) & (~7)) )))[-1])51 (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uintptr_t)((ap) + 2*4 - 1) & (~3)) : ((uintptr_t)((ap) + 2*8 -1) & (~7)) )))[-1]) 52 52 53 53 #define va_copy(dst,src) ((dst)=(src)) -
arch/mips32/include/asm.h
r991779c5 r7f1c620 53 53 * The stack must start on page boundary. 54 54 */ 55 static inline __addressget_stack_base(void)55 static inline uintptr_t get_stack_base(void) 56 56 { 57 __addressv;57 uintptr_t v; 58 58 59 59 __asm__ volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1))); … … 63 63 64 64 extern void cpu_halt(void); 65 extern void asm_delay_loop( __u32t);66 extern void userspace_asm( __address ustack, __addressuspace_uarg,67 __addressentry);65 extern void asm_delay_loop(uint32_t t); 66 extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg, 67 uintptr_t entry); 68 68 69 69 #endif -
arch/mips32/include/boot.h
r991779c5 r7f1c620 35 35 36 36 typedef struct { 37 __addressaddr;38 __u32size;37 uintptr_t addr; 38 uint32_t size; 39 39 } utask_t; 40 40 41 41 typedef struct { 42 __u32cnt;42 uint32_t cnt; 43 43 utask_t tasks[TASKMAP_MAX_RECORDS]; 44 44 } bootinfo_t; -
arch/mips32/include/byteorder.h
r991779c5 r7f1c620 40 40 41 41 #ifdef BIG_ENDIAN 42 static inline __u64 __u64_le2host(__u64n)42 static inline uint64_t uint64_t_le2host(uint64_t n) 43 43 { 44 return __u64_byteorder_swap(n);44 return uint64_t_byteorder_swap(n); 45 45 } 46 46 47 static inline __native __native_le2host(__nativen)47 static inline unative_t unative_t_le2host(unative_t n) 48 48 { 49 return __u32_byteorder_swap(n);49 return uint32_t_byteorder_swap(n); 50 50 } 51 51 52 52 #else 53 # define __native_le2host(n) (n)54 # define __u64_le2host(n) (n)53 # define unative_t_le2host(n) (n) 54 # define uint64_t_le2host(n) (n) 55 55 #endif 56 56 -
arch/mips32/include/context.h
r991779c5 r7f1c620 56 56 */ 57 57 struct context { 58 __addresssp;59 __addresspc;58 uintptr_t sp; 59 uintptr_t pc; 60 60 61 __u32s0;62 __u32s1;63 __u32s2;64 __u32s3;65 __u32s4;66 __u32s5;67 __u32s6;68 __u32s7;69 __u32s8;70 __u32gp;61 uint32_t s0; 62 uint32_t s1; 63 uint32_t s2; 64 uint32_t s3; 65 uint32_t s4; 66 uint32_t s5; 67 uint32_t s6; 68 uint32_t s7; 69 uint32_t s8; 70 uint32_t gp; 71 71 72 72 ipl_t ipl; -
arch/mips32/include/cp0.h
r991779c5 r7f1c620 64 64 #define cp0_unmask_int(it) cp0_status_write(cp0_status_read() | (1<<(cp0_status_im_shift+(it)))) 65 65 66 #define GEN_READ_CP0(nm,reg) static inline __u32cp0_ ##nm##_read(void) \66 #define GEN_READ_CP0(nm,reg) static inline uint32_t cp0_ ##nm##_read(void) \ 67 67 { \ 68 __u32retval; \68 uint32_t retval; \ 69 69 asm("mfc0 %0, $" #reg : "=r"(retval)); \ 70 70 return retval; \ 71 71 } 72 72 73 #define GEN_WRITE_CP0(nm,reg) static inline void cp0_ ##nm##_write( __u32val) \73 #define GEN_WRITE_CP0(nm,reg) static inline void cp0_ ##nm##_write(uint32_t val) \ 74 74 { \ 75 75 asm("mtc0 %0, $" #reg : : "r"(val) ); \ -
arch/mips32/include/cpu.h
r991779c5 r7f1c620 39 39 40 40 struct cpu_arch { 41 __u32imp_num;42 __u32rev_num;41 uint32_t imp_num; 42 uint32_t rev_num; 43 43 }; 44 44 -
arch/mips32/include/debugger.h
r991779c5 r7f1c620 51 51 52 52 typedef struct { 53 __addressaddress; /**< Breakpoint address */54 __nativeinstruction; /**< Original instruction */55 __nativenextinstruction; /**< Original instruction following break */53 uintptr_t address; /**< Breakpoint address */ 54 unative_t instruction; /**< Original instruction */ 55 unative_t nextinstruction; /**< Original instruction following break */ 56 56 int flags; /**< Flags regarding breakpoint */ 57 57 count_t counter; -
arch/mips32/include/drivers/arc.h
r991779c5 r7f1c620 57 57 58 58 typedef struct { 59 __u8type;60 __u8sharedisposition;61 __u16flags;59 uint8_t type; 60 uint8_t sharedisposition; 61 uint16_t flags; 62 62 union { 63 63 struct { … … 78 78 79 79 typedef struct { 80 __u16version;81 __u16revision;80 uint16_t version; 81 uint16_t revision; 82 82 unsigned long count; 83 83 cm_resource_descriptor descr[1]; … … 154 154 arc_component_type type; 155 155 arc_component_flags flags; 156 __u16revision;157 __u16version;158 __u32key;159 __u32affinitymask;160 __u32configdatasize;161 __u32identifier_len;156 uint16_t revision; 157 uint16_t version; 158 uint32_t key; 159 uint32_t affinitymask; 160 uint32_t configdatasize; 161 uint32_t identifier_len; 162 162 char *identifier; 163 163 } __attribute__ ((packed)) arc_component; 164 164 165 165 typedef struct { 166 __u16year;167 __u16month;168 __u16day;169 __u16hour;170 __u16minutes;171 __u16seconds;172 __u16mseconds;166 uint16_t year; 167 uint16_t month; 168 uint16_t day; 169 uint16_t hour; 170 uint16_t minutes; 171 uint16_t seconds; 172 uint16_t mseconds; 173 173 } __attribute__ ((packed)) arc_timeinfo; 174 174 … … 187 187 typedef struct { 188 188 arc_memorytype_t type; 189 __u32basepage; /* *4096 = baseaddr */190 __u32basecount;189 uint32_t basepage; /* *4096 = baseaddr */ 190 uint32_t basecount; 191 191 }arc_memdescriptor_t; 192 192 … … 198 198 typedef struct { 199 199 long (*load)(void); /* ... */ 200 long (*invoke)( __u32 eaddr,__u32 saddr,__u32argc,char **argv,200 long (*invoke)(uint32_t eaddr,uint32_t saddr,uint32_t argc,char **argv, 201 201 char **envp); 202 long (*execute)(char *path, __u32argc,char **argv,char **envp);202 long (*execute)(char *path,uint32_t argc,char **argv,char **envp); 203 203 void (*halt)(void); 204 204 void (*powerdown)(void); … … 222 222 long (*reserved2)(void); 223 223 arc_timeinfo * (*gettime)(void); 224 __u32(*getrelativetime)(void);224 uint32_t (*getrelativetime)(void); 225 225 long (*getdirectoryentry)(); 226 226 long (*open)(void); /* ... */ 227 long (*close)( __u32fileid);228 long (*read)( __u32 fileid,void *buf,__u32 n,__u32*cnt);229 long (*getreadstatus)( __u32fileid);230 long (*write)( __u32 fileid, void *buf,__u32 n,__u32*cnt);227 long (*close)(uint32_t fileid); 228 long (*read)(uint32_t fileid,void *buf,uint32_t n,uint32_t *cnt); 229 long (*getreadstatus)(uint32_t fileid); 230 long (*write)(uint32_t fileid, void *buf,uint32_t n,uint32_t *cnt); 231 231 long (*seek)(void); /* ... */ 232 232 /* 30 */ … … 235 235 char * (*setenvironmentvariable)(char *name, char *value); 236 236 long (*getfileinformation)(void); /* ... */ 237 long (*setfileinformation)( __u32 fileid,__u32 attflags,__u32attmask);237 long (*setfileinformation)(uint32_t fileid,uint32_t attflags,uint32_t attmask); 238 238 void (*flushallcaches)(void); 239 239 long (*testunicodecharacter)(void); /* ... */ … … 242 242 243 243 typedef struct { 244 __u32signature;245 __u32length;246 __u16version;247 __u16revision;244 uint32_t signature; 245 uint32_t length; 246 uint16_t version; 247 uint16_t revision; 248 248 void *restartblock; 249 249 void *debugblock; 250 250 void *gevector; 251 251 void *utlbmissvector; 252 __u32firmwarevectorlen;252 uint32_t firmwarevectorlen; 253 253 arc_func_vector_t *firmwarevector; 254 __u32privvectorlen;254 uint32_t privvectorlen; 255 255 void *privvector; 256 __u32adaptercount;256 uint32_t adaptercount; 257 257 }__attribute__ ((packed)) arc_sbp; 258 258 -
arch/mips32/include/exception.h
r991779c5 r7f1c620 63 63 64 64 struct istate { 65 __u32at;66 __u32v0;67 __u32v1;68 __u32a0;69 __u32a1;70 __u32a2;71 __u32a3;72 __u32t0;73 __u32t1;74 __u32t2;75 __u32t3;76 __u32t4;77 __u32t5;78 __u32t6;79 __u32t7;80 __u32s0;81 __u32s1;82 __u32s2;83 __u32s3;84 __u32s4;85 __u32s5;86 __u32s6;87 __u32s7;88 __u32t8;89 __u32t9;90 __u32gp;91 __u32sp;92 __u32s8;93 __u32ra;65 uint32_t at; 66 uint32_t v0; 67 uint32_t v1; 68 uint32_t a0; 69 uint32_t a1; 70 uint32_t a2; 71 uint32_t a3; 72 uint32_t t0; 73 uint32_t t1; 74 uint32_t t2; 75 uint32_t t3; 76 uint32_t t4; 77 uint32_t t5; 78 uint32_t t6; 79 uint32_t t7; 80 uint32_t s0; 81 uint32_t s1; 82 uint32_t s2; 83 uint32_t s3; 84 uint32_t s4; 85 uint32_t s5; 86 uint32_t s6; 87 uint32_t s7; 88 uint32_t t8; 89 uint32_t t9; 90 uint32_t gp; 91 uint32_t sp; 92 uint32_t s8; 93 uint32_t ra; 94 94 95 __u32lo;96 __u32hi;95 uint32_t lo; 96 uint32_t hi; 97 97 98 __u32status; /* cp0_status */99 __u32epc; /* cp0_epc */100 __u32k1; /* We use it as thread-local pointer */98 uint32_t status; /* cp0_status */ 99 uint32_t epc; /* cp0_epc */ 100 uint32_t k1; /* We use it as thread-local pointer */ 101 101 }; 102 102 103 static inline void istate_set_retaddr(istate_t *istate, __addressretaddr)103 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr) 104 104 { 105 105 istate->epc = retaddr; … … 111 111 return istate->status & cp0_status_um_bit; 112 112 } 113 static inline __nativeistate_get_pc(istate_t *istate)113 static inline unative_t istate_get_pc(istate_t *istate) 114 114 { 115 115 return istate->epc; -
arch/mips32/include/faddr.h
r991779c5 r7f1c620 38 38 #include <arch/types.h> 39 39 40 #define FADDR(fptr) (( __address) (fptr))40 #define FADDR(fptr) ((uintptr_t) (fptr)) 41 41 42 42 #endif -
arch/mips32/include/fpu_context.h
r991779c5 r7f1c620 38 38 #include <arch/types.h> 39 39 40 #define FPU_CONTEXT_ALIGN sizeof( __native)40 #define FPU_CONTEXT_ALIGN sizeof(unative_t) 41 41 42 42 struct fpu_context { 43 __nativedregs[32];44 __nativecregs[32];43 unative_t dregs[32]; 44 unative_t cregs[32]; 45 45 }; 46 46 -
arch/mips32/include/memstr.h
r991779c5 r7f1c620 38 38 #define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) 39 39 40 extern void memsetw( __address dst, size_t cnt, __u16x);41 extern void memsetb( __address dst, size_t cnt, __u8x);40 extern void memsetw(uintptr_t dst, size_t cnt, uint16_t x); 41 extern void memsetb(uintptr_t dst, size_t cnt, uint8_t x); 42 42 43 extern int memcmp( __address src, __addressdst, int cnt);43 extern int memcmp(uintptr_t src, uintptr_t dst, int cnt); 44 44 45 45 #endif -
arch/mips32/include/mm/asid.h
r991779c5 r7f1c620 40 40 #define ASID_MAX_ARCH 255 /* 2^8 - 1 */ 41 41 42 typedef __u8asid_t;42 typedef uint8_t asid_t; 43 43 44 44 #endif -
arch/mips32/include/mm/page.h
r991779c5 r7f1c620 42 42 43 43 #ifndef __ASM__ 44 # define KA2PA(x) ((( __address) (x)) - 0x80000000)45 # define PA2KA(x) ((( __address) (x)) + 0x80000000)44 # define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) 45 # define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) 46 46 #else 47 47 # define KA2PA(x) ((x) - 0x80000000) … … 101 101 #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x)) 102 102 103 #define PTE_VALID_ARCH(pte) (*(( __u32*) (pte)) != 0)103 #define PTE_VALID_ARCH(pte) (*((uint32_t *) (pte)) != 0) 104 104 #define PTE_PRESENT_ARCH(pte) ((pte)->p != 0) 105 105 #define PTE_GET_FRAME_ARCH(pte) ((pte)->pfn<<12) -
arch/mips32/include/mm/tlb.h
r991779c5 r7f1c620 76 76 #endif 77 77 } __attribute__ ((packed)); 78 __u32value;78 uint32_t value; 79 79 }; 80 80 … … 104 104 #endif 105 105 } __attribute__ ((packed)); 106 __u32value;106 uint32_t value; 107 107 }; 108 108 … … 119 119 #endif 120 120 } __attribute__ ((packed)); 121 __u32value;121 uint32_t value; 122 122 }; 123 123 … … 134 134 #endif 135 135 } __attribute__ ((packed)); 136 __u32value;136 uint32_t value; 137 137 }; 138 138 -
arch/mips32/include/types.h
r991779c5 r7f1c620 38 38 #define NULL 0 39 39 40 typedef signed char __s8;41 typedef unsigned char __u8;40 typedef signed char int8_t; 41 typedef unsigned char uint8_t; 42 42 43 typedef signed short __s16;44 typedef unsigned short __u16;43 typedef signed short int16_t; 44 typedef unsigned short uint16_t; 45 45 46 typedef unsigned long __u32;47 typedef signed long __s32;46 typedef unsigned long uint32_t; 47 typedef signed long int32_t; 48 48 49 typedef unsigned long long __u64;50 typedef signed long long __s64;49 typedef unsigned long long uint64_t; 50 typedef signed long long int64_t; 51 51 52 typedef __u32 __address;52 typedef uint32_t uintptr_t; 53 53 54 typedef __u32ipl_t;54 typedef uint32_t ipl_t; 55 55 56 typedef __u32 __native;57 typedef __s32 __snative;56 typedef uint32_t unative_t; 57 typedef int32_t native_t; 58 58 59 59 typedef struct pte pte_t; 60 60 61 typedef __u32pfn_t;61 typedef uint32_t pfn_t; 62 62 63 63 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
