Changeset 7f1c620 in mainline for arch/mips32


Ignore:
Timestamp:
2006-07-04T17:17:56Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ffa3ef5
Parents:
991779c5
Message:

Replace old u?? types with respective C99 variants (e.g. uint32_t, int64_t, uintptr_t etc.).

Location:
arch/mips32
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/include/arg.h

    r991779c5 r7f1c620  
    4343 */
    4444
    45 typedef __address va_list;
     45typedef uintptr_t va_list;
    4646
    4747#define va_start(ap, lst) \
     
    4949
    5050#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])
    5252
    5353#define va_copy(dst,src) ((dst)=(src))
  • arch/mips32/include/asm.h

    r991779c5 r7f1c620  
    5353 * The stack must start on page boundary.
    5454 */
    55 static inline __address get_stack_base(void)
     55static inline uintptr_t get_stack_base(void)
    5656{
    57         __address v;
     57        uintptr_t v;
    5858       
    5959        __asm__ volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
     
    6363
    6464extern void cpu_halt(void);
    65 extern void asm_delay_loop(__u32 t);
    66 extern void userspace_asm(__address ustack, __address uspace_uarg,
    67                           __address entry);
     65extern void asm_delay_loop(uint32_t t);
     66extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg,
     67                          uintptr_t entry);
    6868
    6969#endif
  • arch/mips32/include/boot.h

    r991779c5 r7f1c620  
    3535
    3636typedef struct {
    37         __address addr;
    38         __u32 size;
     37        uintptr_t addr;
     38        uint32_t size;
    3939} utask_t;
    4040
    4141typedef struct {
    42         __u32 cnt;
     42        uint32_t cnt;
    4343        utask_t tasks[TASKMAP_MAX_RECORDS];
    4444} bootinfo_t;
  • arch/mips32/include/byteorder.h

    r991779c5 r7f1c620  
    4040
    4141#ifdef BIG_ENDIAN
    42 static inline __u64 __u64_le2host(__u64 n)
     42static inline uint64_t uint64_t_le2host(uint64_t n)
    4343{
    44         return __u64_byteorder_swap(n);
     44        return uint64_t_byteorder_swap(n);
    4545}
    4646
    47 static inline __native __native_le2host(__native n)
     47static inline unative_t unative_t_le2host(unative_t n)
    4848{
    49         return __u32_byteorder_swap(n);
     49        return uint32_t_byteorder_swap(n);
    5050}
    5151
    5252#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)
    5555#endif
    5656
  • arch/mips32/include/context.h

    r991779c5 r7f1c620  
    5656 */
    5757struct context {
    58         __address sp;
    59         __address pc;
     58        uintptr_t sp;
     59        uintptr_t pc;
    6060       
    61         __u32 s0;
    62         __u32 s1;
    63         __u32 s2;
    64         __u32 s3;
    65         __u32 s4;
    66         __u32 s5;
    67         __u32 s6;
    68         __u32 s7;
    69         __u32 s8;
    70         __u32 gp;
     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;
    7171
    7272        ipl_t ipl;
  • arch/mips32/include/cp0.h

    r991779c5 r7f1c620  
    6464#define cp0_unmask_int(it) cp0_status_write(cp0_status_read() | (1<<(cp0_status_im_shift+(it))))
    6565
    66 #define GEN_READ_CP0(nm,reg) static inline __u32 cp0_ ##nm##_read(void) \
     66#define GEN_READ_CP0(nm,reg) static inline uint32_t cp0_ ##nm##_read(void) \
    6767  { \
    68       __u32 retval; \
     68      uint32_t retval; \
    6969      asm("mfc0 %0, $" #reg : "=r"(retval)); \
    7070      return retval; \
    7171  }
    7272
    73 #define GEN_WRITE_CP0(nm,reg) static inline void cp0_ ##nm##_write(__u32 val) \
     73#define GEN_WRITE_CP0(nm,reg) static inline void cp0_ ##nm##_write(uint32_t val) \
    7474 { \
    7575    asm("mtc0 %0, $" #reg : : "r"(val) ); \
  • arch/mips32/include/cpu.h

    r991779c5 r7f1c620  
    3939
    4040struct cpu_arch {
    41         __u32 imp_num;
    42         __u32 rev_num;
     41        uint32_t imp_num;
     42        uint32_t rev_num;
    4343};
    4444       
  • arch/mips32/include/debugger.h

    r991779c5 r7f1c620  
    5151
    5252typedef struct  {
    53         __address address;      /**< Breakpoint address */
    54         __native instruction; /**< Original instruction */
    55         __native nextinstruction;  /**< Original instruction following break */
     53        uintptr_t address;      /**< Breakpoint address */
     54        unative_t instruction; /**< Original instruction */
     55        unative_t nextinstruction;  /**< Original instruction following break */
    5656        int flags;        /**< Flags regarding breakpoint */
    5757        count_t counter;
  • arch/mips32/include/drivers/arc.h

    r991779c5 r7f1c620  
    5757
    5858typedef struct {
    59         __u8 type;
    60         __u8 sharedisposition;
    61         __u16 flags;
     59        uint8_t type;
     60        uint8_t sharedisposition;
     61        uint16_t flags;
    6262        union {
    6363                struct {
     
    7878
    7979typedef struct {
    80         __u16 version;
    81         __u16 revision;
     80        uint16_t version;
     81        uint16_t revision;
    8282        unsigned long count;
    8383        cm_resource_descriptor descr[1];
     
    154154        arc_component_type type;
    155155        arc_component_flags flags;
    156         __u16 revision;
    157         __u16 version;
    158         __u32 key;
    159         __u32 affinitymask;
    160         __u32 configdatasize;
    161         __u32 identifier_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;
    162162        char *identifier;
    163163} __attribute__ ((packed)) arc_component;
    164164
    165165typedef struct {
    166         __u16 year;
    167         __u16 month;
    168         __u16 day;
    169         __u16 hour;
    170         __u16 minutes;
    171         __u16 seconds;
    172         __u16 mseconds;
     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;
    173173} __attribute__ ((packed)) arc_timeinfo;
    174174
     
    187187typedef struct  {
    188188        arc_memorytype_t type;
    189         __u32 basepage;  /* *4096 = baseaddr */
    190         __u32 basecount;
     189        uint32_t basepage;  /* *4096 = baseaddr */
     190        uint32_t basecount;
    191191}arc_memdescriptor_t;
    192192
     
    198198typedef struct {
    199199        long (*load)(void); /* ... */
    200         long (*invoke)(__u32 eaddr,__u32 saddr,__u32 argc,char **argv,
     200        long (*invoke)(uint32_t eaddr,uint32_t saddr,uint32_t argc,char **argv,
    201201                       char **envp);
    202         long (*execute)(char *path,__u32 argc,char **argv,char **envp);
     202        long (*execute)(char *path,uint32_t argc,char **argv,char **envp);
    203203        void (*halt)(void);
    204204        void (*powerdown)(void);
     
    222222        long (*reserved2)(void);
    223223        arc_timeinfo * (*gettime)(void);
    224         __u32 (*getrelativetime)(void);
     224        uint32_t (*getrelativetime)(void);
    225225        long (*getdirectoryentry)();
    226226        long (*open)(void); /* ... */
    227         long (*close)(__u32 fileid);
    228         long (*read)(__u32 fileid,void *buf,__u32 n,__u32 *cnt);
    229         long (*getreadstatus)(__u32 fileid);
    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);
    231231        long (*seek)(void); /* ... */
    232232/* 30 */
     
    235235        char * (*setenvironmentvariable)(char *name, char *value);
    236236        long (*getfileinformation)(void); /* ... */
    237         long (*setfileinformation)(__u32 fileid,__u32 attflags,__u32 attmask);
     237        long (*setfileinformation)(uint32_t fileid,uint32_t attflags,uint32_t attmask);
    238238        void (*flushallcaches)(void);
    239239        long (*testunicodecharacter)(void); /* ... */
     
    242242
    243243typedef struct {
    244         __u32 signature;
    245         __u32 length;
    246         __u16 version;
    247         __u16 revision;
     244        uint32_t signature;
     245        uint32_t length;
     246        uint16_t version;
     247        uint16_t revision;
    248248        void *restartblock;
    249249        void *debugblock;
    250250        void *gevector;
    251251        void *utlbmissvector;
    252         __u32 firmwarevectorlen;
     252        uint32_t firmwarevectorlen;
    253253        arc_func_vector_t *firmwarevector;
    254         __u32 privvectorlen;
     254        uint32_t privvectorlen;
    255255        void *privvector;
    256         __u32 adaptercount;
     256        uint32_t adaptercount;
    257257}__attribute__ ((packed)) arc_sbp;
    258258
  • arch/mips32/include/exception.h

    r991779c5 r7f1c620  
    6363
    6464struct istate {
    65         __u32 at;
    66         __u32 v0;
    67         __u32 v1;
    68         __u32 a0;
    69         __u32 a1;
    70         __u32 a2;
    71         __u32 a3;
    72         __u32 t0;
    73         __u32 t1;
    74         __u32 t2;
    75         __u32 t3;
    76         __u32 t4;
    77         __u32 t5;
    78         __u32 t6;
    79         __u32 t7;
    80         __u32 s0;
    81         __u32 s1;
    82         __u32 s2;
    83         __u32 s3;
    84         __u32 s4;
    85         __u32 s5;
    86         __u32 s6;
    87         __u32 s7;
    88         __u32 t8;
    89         __u32 t9;
    90         __u32 gp;
    91         __u32 sp;
    92         __u32 s8;
    93         __u32 ra;
     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;
    9494       
    95         __u32 lo;
    96         __u32 hi;
     95        uint32_t lo;
     96        uint32_t hi;
    9797
    98         __u32 status; /* cp0_status */
    99         __u32 epc; /* cp0_epc */
    100         __u32 k1; /* 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 */
    101101};
    102102
    103 static inline void istate_set_retaddr(istate_t *istate, __address retaddr)
     103static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr)
    104104{
    105105        istate->epc = retaddr;
     
    111111        return istate->status & cp0_status_um_bit;
    112112}
    113 static inline __native istate_get_pc(istate_t *istate)
     113static inline unative_t istate_get_pc(istate_t *istate)
    114114{
    115115        return istate->epc;
  • arch/mips32/include/faddr.h

    r991779c5 r7f1c620  
    3838#include <arch/types.h>
    3939
    40 #define FADDR(fptr)             ((__address) (fptr))
     40#define FADDR(fptr)             ((uintptr_t) (fptr))
    4141
    4242#endif
  • arch/mips32/include/fpu_context.h

    r991779c5 r7f1c620  
    3838#include <arch/types.h>
    3939
    40 #define FPU_CONTEXT_ALIGN    sizeof(__native)
     40#define FPU_CONTEXT_ALIGN    sizeof(unative_t)
    4141
    4242struct fpu_context {
    43         __native dregs[32];
    44         __native cregs[32];
     43        unative_t dregs[32];
     44        unative_t cregs[32];
    4545};
    4646
  • arch/mips32/include/memstr.h

    r991779c5 r7f1c620  
    3838#define memcpy(dst, src, cnt)  __builtin_memcpy((dst), (src), (cnt))
    3939
    40 extern void memsetw(__address dst, size_t cnt, __u16 x);
    41 extern void memsetb(__address dst, size_t cnt, __u8 x);
     40extern void memsetw(uintptr_t dst, size_t cnt, uint16_t x);
     41extern void memsetb(uintptr_t dst, size_t cnt, uint8_t x);
    4242
    43 extern int memcmp(__address src, __address dst, int cnt);
     43extern int memcmp(uintptr_t src, uintptr_t dst, int cnt);
    4444
    4545#endif
  • arch/mips32/include/mm/asid.h

    r991779c5 r7f1c620  
    4040#define ASID_MAX_ARCH           255     /* 2^8 - 1 */
    4141
    42 typedef __u8 asid_t;
     42typedef uint8_t asid_t;
    4343
    4444#endif
  • arch/mips32/include/mm/page.h

    r991779c5 r7f1c620  
    4242
    4343#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)
    4646#else
    4747#  define KA2PA(x)      ((x) - 0x80000000)
     
    101101#define SET_FRAME_FLAGS_ARCH(ptl3, i, x)        set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x))
    102102
    103 #define PTE_VALID_ARCH(pte)                     (*((__u32 *) (pte)) != 0)
     103#define PTE_VALID_ARCH(pte)                     (*((uint32_t *) (pte)) != 0)
    104104#define PTE_PRESENT_ARCH(pte)                   ((pte)->p != 0)
    105105#define PTE_GET_FRAME_ARCH(pte)                 ((pte)->pfn<<12)
  • arch/mips32/include/mm/tlb.h

    r991779c5 r7f1c620  
    7676#endif
    7777        } __attribute__ ((packed));
    78         __u32 value;
     78        uint32_t value;
    7979};
    8080
     
    104104#endif
    105105        } __attribute__ ((packed));
    106         __u32 value;
     106        uint32_t value;
    107107};
    108108
     
    119119#endif
    120120        } __attribute__ ((packed));
    121         __u32 value;
     121        uint32_t value;
    122122};
    123123
     
    134134#endif
    135135        } __attribute__ ((packed));
    136         __u32 value;
     136        uint32_t value;
    137137};
    138138
  • arch/mips32/include/types.h

    r991779c5 r7f1c620  
    3838#define NULL    0
    3939
    40 typedef signed char __s8;
    41 typedef unsigned char __u8;
     40typedef signed char int8_t;
     41typedef unsigned char uint8_t;
    4242
    43 typedef signed short __s16;
    44 typedef unsigned short __u16;
     43typedef signed short int16_t;
     44typedef unsigned short uint16_t;
    4545
    46 typedef unsigned long __u32;
    47 typedef signed long __s32;
     46typedef unsigned long uint32_t;
     47typedef signed long int32_t;
    4848
    49 typedef unsigned long long __u64;
    50 typedef signed long long __s64;
     49typedef unsigned long long uint64_t;
     50typedef signed long long int64_t;
    5151
    52 typedef __u32 __address;
     52typedef uint32_t uintptr_t;
    5353
    54 typedef __u32 ipl_t;
     54typedef uint32_t ipl_t;
    5555
    56 typedef __u32 __native;
    57 typedef __s32 __snative;
     56typedef uint32_t unative_t;
     57typedef int32_t native_t;
    5858
    5959typedef struct pte pte_t;
    6060
    61 typedef __u32 pfn_t;
     61typedef uint32_t pfn_t;
    6262
    6363#endif
  • arch/mips32/src/ddi/ddi.c

    r991779c5 r7f1c620  
    5151 * @return 0 on success or an error code from errno.h.
    5252 */
    53 int ddi_iospace_enable_arch(task_t *task, __address ioaddr, size_t size)
     53int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size)
    5454{
    5555        return 0;
  • arch/mips32/src/debugger.c

    r991779c5 r7f1c620  
    9292
    9393static struct {
    94         __u32 andmask;
    95         __u32 value;
     94        uint32_t andmask;
     95        uint32_t value;
    9696}jmpinstr[] = {
    9797        {0xf3ff0000, 0x41000000}, /* BCzF */
     
    126126 * @return true - it is jump instruction, false otherwise
    127127 */
    128 static bool is_jump(__native instr)
     128static bool is_jump(unative_t instr)
    129129{
    130130        int i;
     
    154154        /* Check, that the breakpoints do not conflict */
    155155        for (i=0; i<BKPOINTS_MAX; i++) {
    156                 if (breakpoints[i].address == (__address)argv->intval) {
     156                if (breakpoints[i].address == (uintptr_t)argv->intval) {
    157157                        printf("Duplicate breakpoint %d.\n", i);
    158158                        spinlock_unlock(&bkpoints_lock);
    159159                        return 0;
    160                 } else if (breakpoints[i].address == (__address)argv->intval + sizeof(__native) || \
    161                            breakpoints[i].address == (__address)argv->intval - sizeof(__native)) {
     160                } else if (breakpoints[i].address == (uintptr_t)argv->intval + sizeof(unative_t) || \
     161                           breakpoints[i].address == (uintptr_t)argv->intval - sizeof(unative_t)) {
    162162                        printf("Adjacent breakpoints not supported, conflict with %d.\n", i);
    163163                        spinlock_unlock(&bkpoints_lock);
     
    178178                return 0;
    179179        }
    180         cur->address = (__address) argv->intval;
     180        cur->address = (uintptr_t) argv->intval;
    181181        printf("Adding breakpoint on address: %p\n", argv->intval);
    182         cur->instruction = ((__native *)cur->address)[0];
    183         cur->nextinstruction = ((__native *)cur->address)[1];
     182        cur->instruction = ((unative_t *)cur->address)[0];
     183        cur->nextinstruction = ((unative_t *)cur->address)[1];
    184184        if (argv == &add_argv) {
    185185                cur->flags = 0;
     
    193193
    194194        /* Set breakpoint */
    195         *((__native *)cur->address) = 0x0d;
     195        *((unative_t *)cur->address) = 0x0d;
    196196
    197197        spinlock_unlock(&bkpoint_lock);
     
    229229                return 0;
    230230        }
    231         ((__u32 *)cur->address)[0] = cur->instruction;
    232         ((__u32 *)cur->address)[1] = cur->nextinstruction;
     231        ((uint32_t *)cur->address)[0] = cur->instruction;
     232        ((uint32_t *)cur->address)[1] = cur->nextinstruction;
    233233
    234234        cur->address = NULL;
     
    299299{
    300300        bpinfo_t *cur = NULL;
    301         __address fireaddr = istate->epc;
     301        uintptr_t fireaddr = istate->epc;
    302302        int i;
    303303
     
    316316                /* Reinst only breakpoint */
    317317                if ((breakpoints[i].flags & BKPOINT_REINST) \
    318                     && (fireaddr ==breakpoints[i].address+sizeof(__native))) {
     318                    && (fireaddr ==breakpoints[i].address+sizeof(unative_t))) {
    319319                        cur = &breakpoints[i];
    320320                        break;
     
    324324                if (cur->flags & BKPOINT_REINST) {
    325325                        /* Set breakpoint on first instruction */
    326                         ((__u32 *)cur->address)[0] = 0x0d;
     326                        ((uint32_t *)cur->address)[0] = 0x0d;
    327327                        /* Return back the second */
    328                         ((__u32 *)cur->address)[1] = cur->nextinstruction;
     328                        ((uint32_t *)cur->address)[1] = cur->nextinstruction;
    329329                        cur->flags &= ~BKPOINT_REINST;
    330330                        spinlock_unlock(&bkpoint_lock);
     
    339339
    340340                /* Return first instruction back */
    341                 ((__u32 *)cur->address)[0] = cur->instruction;
     341                ((uint32_t *)cur->address)[0] = cur->instruction;
    342342
    343343                if (! (cur->flags & BKPOINT_ONESHOT)) {
    344344                        /* Set Breakpoint on next instruction */
    345                         ((__u32 *)cur->address)[1] = 0x0d;
     345                        ((uint32_t *)cur->address)[1] = 0x0d;
    346346                        cur->flags |= BKPOINT_REINST;
    347347                }
  • arch/mips32/src/drivers/arc.c

    r991779c5 r7f1c620  
    143143                case CmResourceTypePort:
    144144                        printf("Port: %p-size:%d ",
    145                                (__address)configdata->descr[i].u.port.start,
     145                               (uintptr_t)configdata->descr[i].u.port.start,
    146146                               configdata->descr[i].u.port.length);
    147147                        break;
     
    153153                case CmResourceTypeMemory:
    154154                        printf("Memory: %p-size:%d ",
    155                                (__address)configdata->descr[i].u.port.start,
     155                               (uintptr_t)configdata->descr[i].u.port.start,
    156156                               configdata->descr[i].u.port.length);
    157157                        break;
     
    237237static void arc_putchar(char ch)
    238238{
    239         __u32 cnt;
     239        uint32_t cnt;
    240240        ipl_t ipl;
    241241
     
    294294{
    295295        char ch;
    296         __u32 count;
     296        uint32_t count;
    297297        long result;
    298298       
     
    317317{
    318318        char ch;
    319         __u32 count;
     319        uint32_t count;
    320320        long result;
    321321
     
    381381        arc_memdescriptor_t *desc;
    382382        int total = 0;
    383         __address base;
     383        uintptr_t base;
    384384        size_t basesize;
    385385
  • arch/mips32/src/exception.c

    r991779c5 r7f1c620  
    9696static void reserved_instr_exception(int n, istate_t *istate)
    9797{
    98         if (*((__u32 *)istate->epc) == 0x7c03e83b) {
     98        if (*((uint32_t *)istate->epc) == 0x7c03e83b) {
    9999                ASSERT(THREAD);
    100100                istate->epc += 4;
     
    140140static void interrupt_exception(int n, istate_t *istate)
    141141{
    142         __u32 cause;
     142        uint32_t cause;
    143143        int i;
    144144       
  • arch/mips32/src/interrupt.c

    r991779c5 r7f1c620  
    133133
    134134/* Reregister irq to be IPC-ready */
    135 void irq_ipc_bind_arch(__native irq)
     135void irq_ipc_bind_arch(unative_t irq)
    136136{
    137137        /* Do not allow to redefine timer */
  • arch/mips32/src/mips32.c

    r991779c5 r7f1c620  
    7272 * when not in .text section ????????
    7373 */
    74 __address supervisor_sp __attribute__ ((section (".text")));
     74uintptr_t supervisor_sp __attribute__ ((section (".text")));
    7575/* Stack pointer saved when entering user mode */
    7676/* TODO: How do we do it on SMP system???? */
     
    8282        init.cnt = bootinfo.cnt;
    8383       
    84         __u32 i;
     84        uint32_t i;
    8585       
    8686        for (i = 0; i < bootinfo.cnt; i++) {
     
    147147                                              cp0_status_um_bit |
    148148                                              cp0_status_ie_enabled_bit));
    149         cp0_epc_write((__address) kernel_uarg->uspace_entry);
    150         userspace_asm(((__address) kernel_uarg->uspace_stack+PAGE_SIZE),
    151                       (__address) kernel_uarg->uspace_uarg,
    152                       (__address) kernel_uarg->uspace_entry);
     149        cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry);
     150        userspace_asm(((uintptr_t) kernel_uarg->uspace_stack+PAGE_SIZE),
     151                      (uintptr_t) kernel_uarg->uspace_uarg,
     152                      (uintptr_t) kernel_uarg->uspace_entry);
    153153        while (1)
    154154                ;
     
    163163void before_thread_runs_arch(void)
    164164{
    165         supervisor_sp = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];
     165        supervisor_sp = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];
    166166}
    167167
     
    175175 * possible to have it separately in the future.
    176176 */
    177 __native sys_tls_set(__native addr)
     177unative_t sys_tls_set(unative_t addr)
    178178{
    179179        return 0;
  • arch/mips32/src/mm/page.c

    r991779c5 r7f1c620  
    4646 *   translate the physical address to uncached area
    4747 */
    48 __address hw_map(__address physaddr, size_t size)
     48uintptr_t hw_map(uintptr_t physaddr, size_t size)
    4949{
    5050        return physaddr + 0xa0000000;
  • arch/mips32/src/mm/tlb.c

    r991779c5 r7f1c620  
    5252static void tlb_modified_fail(istate_t *istate);
    5353
    54 static pte_t *find_mapping_and_check(__address badvaddr, int access, istate_t *istate, int *pfrc);
    55 
    56 static void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, __address pfn);
    57 static void prepare_entry_hi(entry_hi_t *hi, asid_t asid, __address addr);
     54static pte_t *find_mapping_and_check(uintptr_t badvaddr, int access, istate_t *istate, int *pfrc);
     55
     56static void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn);
     57static void prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr);
    5858
    5959/** Initialize TLB
     
    9797        entry_hi_t hi;
    9898        asid_t asid;
    99         __address badvaddr;
     99        uintptr_t badvaddr;
    100100        pte_t *pte;
    101101        int pfrc;
     
    167167{
    168168        tlb_index_t index;
    169         __address badvaddr;
     169        uintptr_t badvaddr;
    170170        entry_lo_t lo;
    171171        entry_hi_t hi;
     
    251251{
    252252        tlb_index_t index;
    253         __address badvaddr;
     253        uintptr_t badvaddr;
    254254        entry_lo_t lo;
    255255        entry_hi_t hi;
     
    384384 * @return PTE on success, NULL otherwise.
    385385 */
    386 pte_t *find_mapping_and_check(__address badvaddr, int access, istate_t *istate, int *pfrc)
     386pte_t *find_mapping_and_check(uintptr_t badvaddr, int access, istate_t *istate, int *pfrc)
    387387{
    388388        entry_hi_t hi;
     
    446446}
    447447
    448 void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, __address pfn)
     448void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn)
    449449{
    450450        lo->value = 0;
     
    456456}
    457457
    458 void prepare_entry_hi(entry_hi_t *hi, asid_t asid, __address addr)
     458void prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr)
    459459{
    460460        hi->value = ALIGN_DOWN(addr, PAGE_SIZE * 2);
     
    568568 * @param cnt Number of entries to invalidate.
    569569 */
    570 void tlb_invalidate_pages(asid_t asid, __address page, count_t cnt)
     570void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt)
    571571{
    572572        int i;
Note: See TracChangeset for help on using the changeset viewer.