diff options
-rw-r--r-- | ddb/db_examine.c | 2 | ||||
-rw-r--r-- | ddb/db_macro.c | 2 | ||||
-rw-r--r-- | ddb/db_macro.h | 2 | ||||
-rw-r--r-- | ddb/db_sym.c | 2 | ||||
-rw-r--r-- | ddb/db_task_thread.c | 4 | ||||
-rw-r--r-- | ddb/db_variables.h | 4 | ||||
-rw-r--r-- | i386/i386/db_interface.c | 8 | ||||
-rw-r--r-- | i386/i386/db_machdep.h | 2 | ||||
-rw-r--r-- | i386/i386/db_trace.c | 129 | ||||
-rw-r--r-- | i386/i386/debug_i386.c | 14 | ||||
-rw-r--r-- | i386/i386/ktss.c | 2 | ||||
-rw-r--r-- | i386/i386/pcb.c | 2 | ||||
-rw-r--r-- | i386/i386/thread.h | 78 | ||||
-rw-r--r-- | i386/i386/trap.c | 8 | ||||
-rw-r--r-- | kern/ast.h | 2 | ||||
-rw-r--r-- | kern/boot_script.c | 8 | ||||
-rw-r--r-- | kern/boot_script.h | 2 | ||||
-rw-r--r-- | kern/bootstrap.c | 2 | ||||
-rw-r--r-- | kern/lock.c | 8 | ||||
-rw-r--r-- | linux/dev/kernel/softirq.c | 2 |
20 files changed, 143 insertions, 140 deletions
diff --git a/ddb/db_examine.c b/ddb/db_examine.c index 2df261f..96c5eee 100644 --- a/ddb/db_examine.c +++ b/ddb/db_examine.c @@ -480,7 +480,7 @@ db_xcdump(addr, size, count, task) if (!DB_CHECK_ACCESS(next_page_addr, sizeof(int), task)) bcount = next_page_addr - addr; } - db_read_bytes((char *)addr, bcount, data, task); + db_read_bytes(addr, bcount, data, task); for (i = 0; i < bcount && off != 0; i += size) { if (i % 4 == 0) db_printf(" "); diff --git a/ddb/db_macro.c b/ddb/db_macro.c index e372c23..43bb583 100644 --- a/ddb/db_macro.c +++ b/ddb/db_macro.c @@ -165,7 +165,7 @@ db_exec_macro(name) return(0); } -int +long /* ARGSUSED */ db_arg_variable(vp, valuep, flag, ap) struct db_variable *vp; diff --git a/ddb/db_macro.h b/ddb/db_macro.h index 12ed16e..da5626f 100644 --- a/ddb/db_macro.h +++ b/ddb/db_macro.h @@ -32,7 +32,7 @@ extern void db_show_macro (void); extern int db_exec_macro (char *name); -extern int db_arg_variable ( +extern long db_arg_variable ( struct db_variable *vp, db_expr_t *valuep, int flag, diff --git a/ddb/db_sym.c b/ddb/db_sym.c index dd72138..5c5f700 100644 --- a/ddb/db_sym.c +++ b/ddb/db_sym.c @@ -445,7 +445,7 @@ db_symbol_values(stab, sym, namep, valuep) * not accept symbols whose value is zero (and use plain hex). */ -unsigned int db_maxoff = 0x4000; +unsigned long db_maxoff = 0x4000; void db_task_printsym(off, strategy, task) diff --git a/ddb/db_task_thread.c b/ddb/db_task_thread.c index 3762942..1146223 100644 --- a/ddb/db_task_thread.c +++ b/ddb/db_task_thread.c @@ -245,7 +245,7 @@ db_init_default_thread(void) * in the command line */ /* ARGSUSED */ -int +long db_set_default_thread(vp, valuep, flag) struct db_variable *vp; db_expr_t *valuep; @@ -270,7 +270,7 @@ db_set_default_thread(vp, valuep, flag) /* * convert $taskXXX[.YYY] type DDB variable to task or thread address */ -int +long db_get_task_thread(vp, valuep, flag, ap) struct db_variable *vp; db_expr_t *valuep; diff --git a/ddb/db_variables.h b/ddb/db_variables.h index c01a5e2..5249d18 100644 --- a/ddb/db_variables.h +++ b/ddb/db_variables.h @@ -42,7 +42,7 @@ struct db_variable { char *name; /* Name of variable */ db_expr_t *valuep; /* pointer to value of variable */ /* function to call when reading/writing */ - int (*fcn)(struct db_variable *, db_expr_t *, int, db_var_aux_param_t); + long (*fcn)(struct db_variable *, db_expr_t *, int, db_var_aux_param_t); short min_level; /* number of minimum suffix levels */ short max_level; /* number of maximum suffix levels */ short low; /* low value of level 1 suffix */ @@ -50,7 +50,7 @@ struct db_variable { #define DB_VAR_GET 0 #define DB_VAR_SET 1 }; -#define FCN_NULL ((int (*)())0) +#define FCN_NULL ((long (*)())0) #define DB_VAR_LEVEL 3 /* maximum number of suffix level */ diff --git a/i386/i386/db_interface.c b/i386/i386/db_interface.c index c07884d..66cc8b5 100644 --- a/i386/i386/db_interface.c +++ b/i386/i386/db_interface.c @@ -188,10 +188,10 @@ kdb_trap( * instead of those at its call to KDB. */ struct int_regs { - int edi; - int esi; - int ebp; - int ebx; + long edi; + long esi; + long ebp; + long ebx; struct i386_interrupt_state *is; }; diff --git a/i386/i386/db_machdep.h b/i386/i386/db_machdep.h index 95e3797..1dba2cd 100644 --- a/i386/i386/db_machdep.h +++ b/i386/i386/db_machdep.h @@ -39,7 +39,7 @@ #include <i386/trap.h> typedef vm_offset_t db_addr_t; /* address - unsigned */ -typedef int db_expr_t; /* expression - signed */ +typedef long db_expr_t; /* expression - signed */ typedef struct i386_saved_state db_regs_t; db_regs_t ddb_regs; /* register state */ diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c index c4019b5..4e3bea3 100644 --- a/i386/i386/db_trace.c +++ b/i386/i386/db_trace.c @@ -45,7 +45,7 @@ #include "trap.h" -int +long db_i386_reg_value( struct db_variable *vp, db_expr_t *valuep, @@ -56,22 +56,22 @@ db_i386_reg_value( * Machine register set. */ struct db_variable db_regs[] = { - { "cs", (int *)&ddb_regs.cs, db_i386_reg_value }, - { "ds", (int *)&ddb_regs.ds, db_i386_reg_value }, - { "es", (int *)&ddb_regs.es, db_i386_reg_value }, - { "fs", (int *)&ddb_regs.fs, db_i386_reg_value }, - { "gs", (int *)&ddb_regs.gs, db_i386_reg_value }, - { "ss", (int *)&ddb_regs.ss, db_i386_reg_value }, - { "eax",(int *)&ddb_regs.eax, db_i386_reg_value }, - { "ecx",(int *)&ddb_regs.ecx, db_i386_reg_value }, - { "edx",(int *)&ddb_regs.edx, db_i386_reg_value }, - { "ebx",(int *)&ddb_regs.ebx, db_i386_reg_value }, - { "esp",(int *)&ddb_regs.uesp,db_i386_reg_value }, - { "ebp",(int *)&ddb_regs.ebp, db_i386_reg_value }, - { "esi",(int *)&ddb_regs.esi, db_i386_reg_value }, - { "edi",(int *)&ddb_regs.edi, db_i386_reg_value }, - { "eip",(int *)&ddb_regs.eip, db_i386_reg_value }, - { "efl",(int *)&ddb_regs.efl, db_i386_reg_value }, + { "cs", (long *)&ddb_regs.cs, db_i386_reg_value }, + { "ds", (long *)&ddb_regs.ds, db_i386_reg_value }, + { "es", (long *)&ddb_regs.es, db_i386_reg_value }, + { "fs", (long *)&ddb_regs.fs, db_i386_reg_value }, + { "gs", (long *)&ddb_regs.gs, db_i386_reg_value }, + { "ss", (long *)&ddb_regs.ss, db_i386_reg_value }, + { "eax",(long *)&ddb_regs.eax, db_i386_reg_value }, + { "ecx",(long *)&ddb_regs.ecx, db_i386_reg_value }, + { "edx",(long *)&ddb_regs.edx, db_i386_reg_value }, + { "ebx",(long *)&ddb_regs.ebx, db_i386_reg_value }, + { "esp",(long *)&ddb_regs.uesp,db_i386_reg_value }, + { "ebp",(long *)&ddb_regs.ebp, db_i386_reg_value }, + { "esi",(long *)&ddb_regs.esi, db_i386_reg_value }, + { "edi",(long *)&ddb_regs.edi, db_i386_reg_value }, + { "eip",(long *)&ddb_regs.eip, db_i386_reg_value }, + { "efl",(long *)&ddb_regs.efl, db_i386_reg_value }, }; struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]); @@ -82,8 +82,8 @@ struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]); struct i386_frame { struct i386_frame *f_frame; - int f_retaddr; - int f_arg0; + long f_retaddr; + long f_arg0; }; #define TRAP 1 @@ -99,18 +99,18 @@ boolean_t db_trace_symbols_found = FALSE; struct i386_kregs { char *name; - int offset; + long offset; } i386_kregs[] = { - { "ebx", (int)(&((struct i386_kernel_state *)0)->k_ebx) }, - { "esp", (int)(&((struct i386_kernel_state *)0)->k_esp) }, - { "ebp", (int)(&((struct i386_kernel_state *)0)->k_ebp) }, - { "edi", (int)(&((struct i386_kernel_state *)0)->k_edi) }, - { "esi", (int)(&((struct i386_kernel_state *)0)->k_esi) }, - { "eip", (int)(&((struct i386_kernel_state *)0)->k_eip) }, + { "ebx", (long)(&((struct i386_kernel_state *)0)->k_ebx) }, + { "esp", (long)(&((struct i386_kernel_state *)0)->k_esp) }, + { "ebp", (long)(&((struct i386_kernel_state *)0)->k_ebp) }, + { "edi", (long)(&((struct i386_kernel_state *)0)->k_edi) }, + { "esi", (long)(&((struct i386_kernel_state *)0)->k_esi) }, + { "eip", (long)(&((struct i386_kernel_state *)0)->k_eip) }, { 0 }, }; -int * +long * db_lookup_i386_kreg( char *name, int *kregp) @@ -119,19 +119,19 @@ db_lookup_i386_kreg( for (kp = i386_kregs; kp->name; kp++) { if (strcmp(name, kp->name) == 0) - return (int *)((int)kregp + kp->offset); + return (long *)((long)kregp + kp->offset); } return 0; } -int +long db_i386_reg_value( struct db_variable *vp, db_expr_t *valuep, int flag, db_var_aux_param_t ap) { - int *dp = 0; + long *dp = 0; db_expr_t null_reg = 0; register thread_t thread = ap->thread; extern unsigned int_stack_high; @@ -153,15 +153,15 @@ db_i386_reg_value( } else if ((thread->state & TH_SWAPPED) == 0 && thread->kernel_stack) { dp = db_lookup_i386_kreg(vp->name, - (int *)(STACK_IKS(thread->kernel_stack))); + (long *)(STACK_IKS(thread->kernel_stack))); if (dp == 0) dp = &null_reg; } else if ((thread->state & TH_SWAPPED) && thread->swap_func != thread_exception_return) { /*.....this breaks t/t $taskN.0...*/ /* only EIP is valid */ - if (vp->valuep == (int *) &ddb_regs.eip) { - dp = (int *)(&thread->swap_func); + if (vp->valuep == (long *) &ddb_regs.eip) { + dp = (long *)(&thread->swap_func); } else { dp = &null_reg; } @@ -170,8 +170,8 @@ db_i386_reg_value( if (dp == 0) { if (thread->pcb == 0) db_error("no pcb\n"); - dp = (int *)((int)(&thread->pcb->iss) + - ((int)vp->valuep - (int)&ddb_regs)); + dp = (long *)((long)(&thread->pcb->iss) + + ((long)vp->valuep - (long)&ddb_regs)); } if (flag == DB_VAR_SET) *dp = *valuep; @@ -212,18 +212,18 @@ db_numargs( struct i386_frame *fp, task_t task) { - int *argp; - int inst; - int args; + long *argp; + long inst; + long args; extern char etext[]; - argp = (int *)db_get_task_value((int)&fp->f_retaddr, 4, FALSE, task); - if (argp < (int *)VM_MIN_KERNEL_ADDRESS || argp > (int *)etext) + argp = (long *)db_get_task_value((long)&fp->f_retaddr, sizeof(long), FALSE, task); + if (argp < (long *)VM_MIN_KERNEL_ADDRESS || argp > (long *)etext) args = db_numargs_default; - else if (!DB_CHECK_ACCESS((int)argp, 4, task)) + else if (!DB_CHECK_ACCESS((long)argp, sizeof(long), task)) args = db_numargs_default; else { - inst = db_get_task_value((int)argp, 4, FALSE, task); + inst = db_get_task_value((long)argp, sizeof(long), FALSE, task); if ((inst & 0xff) == 0x59) /* popl %ecx */ args = 1; else if ((inst & 0xffff) == 0xc483) /* addl %n, %esp */ @@ -236,16 +236,16 @@ db_numargs( struct interrupt_frame { struct i386_frame *if_frame; /* point to next frame */ - int if_retaddr; /* return address to _interrupt */ - int if_unit; /* unit number */ + long if_retaddr; /* return address to _interrupt */ + long if_unit; /* unit number */ spl_t if_spl; /* saved spl */ - int if_iretaddr; /* _return_to_{iret,iret_i} */ - int if_edx; /* old sp(iret) or saved edx(iret_i) */ - int if_ecx; /* saved ecx(iret_i) */ - int if_eax; /* saved eax(iret_i) */ - int if_eip; /* saved eip(iret_i) */ - int if_cs; /* saved cs(iret_i) */ - int if_efl; /* saved efl(iret_i) */ + long if_iretaddr; /* _return_to_{iret,iret_i} */ + long if_edx; /* old sp(iret) or saved edx(iret_i) */ + long if_ecx; /* saved ecx(iret_i) */ + long if_eax; /* saved eax(iret_i) */ + long if_eip; /* saved eip(iret_i) */ + long if_cs; /* saved cs(iret_i) */ + long if_efl; /* saved efl(iret_i) */ }; /* @@ -263,7 +263,7 @@ db_nextframe( struct i386_frame **lfp, /* in/out */ struct i386_frame **fp, /* in/out */ db_addr_t *ip, /* out */ - int frame_type, /* in */ + long frame_type, /* in */ thread_t thread) /* in */ { struct i386_saved_state *saved_regs; @@ -277,7 +277,7 @@ db_nextframe( * it is an (struct i386_saved_state *). */ saved_regs = (struct i386_saved_state *) - db_get_task_value((int)&((*fp)->f_arg0),4,FALSE,task); + db_get_task_value((long)&((*fp)->f_arg0),sizeof(long),FALSE,task); db_printf(">>>>> %s (%d) at ", trap_name(saved_regs->trapno), saved_regs->trapno); db_task_printsym(saved_regs->eip, DB_STGY_PROC, task); @@ -310,10 +310,10 @@ db_nextframe( default: miss_frame: *ip = (db_addr_t) - db_get_task_value((int)&(*fp)->f_retaddr, 4, FALSE, task); + db_get_task_value((long)&(*fp)->f_retaddr, sizeof(long), FALSE, task); *lfp = *fp; *fp = (struct i386_frame *) - db_get_task_value((int)&(*fp)->f_frame, 4, FALSE, task); + db_get_task_value((long)&(*fp)->f_frame, sizeof(long), FALSE, task); break; } } @@ -401,7 +401,7 @@ db_stack_trace_cmd( } else { frame = (struct i386_frame *)addr; th = (db_default_thread)? db_default_thread: current_thread(); - callpc = (db_addr_t)db_get_task_value((int)&frame->f_retaddr, 4, + callpc = (db_addr_t)db_get_task_value((long)&frame->f_retaddr, sizeof(long), FALSE, (th == THREAD_NULL) ? TASK_NULL : th->task); } @@ -420,13 +420,13 @@ db_i386_stack_trace( { task_t task; boolean_t kernel_only; - int *argp; - int user_frame = 0; + long *argp; + long user_frame = 0; struct i386_frame *lastframe; int frame_type; char *filename; int linenum; - extern unsigned int db_maxoff; + extern unsigned long db_maxoff; if (count == -1) count = 65535; @@ -438,7 +438,7 @@ db_i386_stack_trace( if (!db_trace_symbols_found) db_find_trace_symbols(); - if (!INKERNEL((unsigned)callpc) && !INKERNEL((unsigned)frame)) { + if (!INKERNEL((unsigned long)callpc) && !INKERNEL((unsigned long)frame)) { db_printf(">>>>> user space <<<<<\n"); user_frame++; } @@ -449,7 +449,7 @@ db_i386_stack_trace( char * name; db_expr_t offset; - if (INKERNEL((unsigned)callpc) && user_frame == 0) { + if (INKERNEL((unsigned long)callpc) && user_frame == 0) { db_addr_t call_func = 0; db_sym_t sym_tmp; @@ -474,7 +474,7 @@ db_i386_stack_trace( frame_type = 0; narg = db_numargs(frame, task); } - } else if (INKERNEL((unsigned)callpc) ^ INKERNEL((unsigned)frame)) { + } else if (INKERNEL((unsigned long)callpc) ^ INKERNEL((unsigned long)frame)) { frame_type = 0; narg = -1; } else { @@ -492,7 +492,7 @@ db_i386_stack_trace( argp = &frame->f_arg0; while (narg > 0) { - db_printf("%x", db_get_task_value((int)argp,4,FALSE,task)); + db_printf("%x", db_get_task_value((long)argp,sizeof(long),FALSE,task)); argp++; if (--narg != 0) db_printf(","); @@ -519,7 +519,7 @@ db_i386_stack_trace( break; } if (!INKERNEL(lastframe) || - (!INKERNEL((unsigned)callpc) && !INKERNEL((unsigned)frame))) + (!INKERNEL((unsigned long)callpc) && !INKERNEL((unsigned long)frame))) user_frame++; if (user_frame == 1) { db_printf(">>>>> user space <<<<<\n"); @@ -570,6 +570,7 @@ static void db_cproc_state( } /* offsets in a cproc structure */ +/* TODO: longs? */ int db_cproc_next_offset = 0 * 4; int db_cproc_incarnation_offset = 1 * 4; int db_cproc_list_offset = 2 * 4; diff --git a/i386/i386/debug_i386.c b/i386/i386/debug_i386.c index f3e1883..937d7b4 100644 --- a/i386/i386/debug_i386.c +++ b/i386/i386/debug_i386.c @@ -30,19 +30,21 @@ void dump_ss(struct i386_saved_state *st) { printf("Dump of i386_saved_state %p:\n", st); - printf("EAX %08x EBX %08x ECX %08x EDX %08x\n", + printf("EAX %08lx EBX %08lx ECX %08lx EDX %08lx\n", st->eax, st->ebx, st->ecx, st->edx); - printf("ESI %08x EDI %08x EBP %08x ESP %08x\n", + printf("ESI %08lx EDI %08lx EBP %08lx ESP %08lx\n", st->esi, st->edi, st->ebp, st->uesp); - printf("CS %04x SS %04x DS %04x ES %04x FS %04x GS %04x\n", + printf("CS %04lx SS %04lx " + "DS %04lx ES %04lx " + "FS %04lx GS %04lx\n", st->cs & 0xffff, st->ss & 0xffff, st->ds & 0xffff, st->es & 0xffff, st->fs & 0xffff, st->gs & 0xffff); - printf("v86: DS %04x ES %04x FS %04x GS %04x\n", + printf("v86: DS %04lx ES %04lx FS %04lx GS %04lx\n", st->v86_segs.v86_ds & 0xffff, st->v86_segs.v86_es & 0xffff, st->v86_segs.v86_gs & 0xffff, st->v86_segs.v86_gs & 0xffff); - printf("EIP %08x EFLAGS %08x\n", st->eip, st->efl); - printf("trapno %d: %s, error %08x\n", + printf("EIP %08lx EFLAGS %08lx\n", st->eip, st->efl); + printf("trapno %ld: %s, error %08lx\n", st->trapno, trap_name(st->trapno), st->err); } diff --git a/i386/i386/ktss.c b/i386/i386/ktss.c index e2c4425..453aad9 100644 --- a/i386/i386/ktss.c +++ b/i386/i386/ktss.c @@ -58,7 +58,7 @@ ktss_init() /* Initialize the master TSS. */ ktss.tss.ss0 = KERNEL_DS; - ktss.tss.esp0 = (unsigned)(exception_stack+1024); + ktss.tss.esp0 = (unsigned long)(exception_stack+1024); ktss.tss.io_bit_map_offset = IOPB_INVAL; /* Set the last byte in the I/O bitmap to all 1's. */ ktss.barrier = 0xff; diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c index dfe0444..4f34391 100644 --- a/i386/i386/pcb.c +++ b/i386/i386/pcb.c @@ -810,7 +810,7 @@ set_user_regs(stack_base, stack_size, exec_info, arg_size) arg_addr = stack_base + stack_size - arg_size; saved_state = USER_REGS(current_thread()); - saved_state->uesp = (int)arg_addr; + saved_state->uesp = (long)arg_addr; saved_state->eip = exec_info->entry; return (arg_addr); diff --git a/i386/i386/thread.h b/i386/i386/thread.h index f2ae8bf..eddd25c 100644 --- a/i386/i386/thread.h +++ b/i386/i386/thread.h @@ -51,31 +51,31 @@ */ struct i386_saved_state { - unsigned int gs; - unsigned int fs; - unsigned int es; - unsigned int ds; - unsigned int edi; - unsigned int esi; - unsigned int ebp; - unsigned int cr2; /* kernel esp stored by pusha - + unsigned long gs; + unsigned long fs; + unsigned long es; + unsigned long ds; + unsigned long edi; + unsigned long esi; + unsigned long ebp; + unsigned long cr2; /* kernel esp stored by pusha - we save cr2 here later */ - unsigned int ebx; - unsigned int edx; - unsigned int ecx; - unsigned int eax; - unsigned int trapno; - unsigned int err; - unsigned int eip; - unsigned int cs; - unsigned int efl; - unsigned int uesp; - unsigned int ss; + unsigned long ebx; + unsigned long edx; + unsigned long ecx; + unsigned long eax; + unsigned long trapno; + unsigned long err; + unsigned long eip; + unsigned long cs; + unsigned long efl; + unsigned long uesp; + unsigned long ss; struct v86_segs { - unsigned int v86_es; /* virtual 8086 segment registers */ - unsigned int v86_ds; - unsigned int v86_fs; - unsigned int v86_gs; + unsigned long v86_es; /* virtual 8086 segment registers */ + unsigned long v86_ds; + unsigned long v86_fs; + unsigned long v86_gs; } v86_segs; }; @@ -97,12 +97,12 @@ struct i386_exception_link { */ struct i386_kernel_state { - int k_ebx; /* kernel context */ - int k_esp; - int k_ebp; - int k_edi; - int k_esi; - int k_eip; + long k_ebx; /* kernel context */ + long k_esp; + long k_ebp; + long k_edi; + long k_esi; + long k_eip; }; /* @@ -144,16 +144,16 @@ struct v86_assist_state { */ struct i386_interrupt_state { - int gs; - int fs; - int es; - int ds; - int edx; - int ecx; - int eax; - int eip; - int cs; - int efl; + long gs; + long fs; + long es; + long ds; + long edx; + long ecx; + long eax; + long eip; + long cs; + long efl; }; /* diff --git a/i386/i386/trap.c b/i386/i386/trap.c index d594907..0ca0a3f 100644 --- a/i386/i386/trap.c +++ b/i386/i386/trap.c @@ -220,7 +220,7 @@ dump_ss(regs); || (subcode >= (long)_start && subcode < (long)etext)) { printf("Kernel page fault at address 0x%x, " - "eip = 0x%x\n", + "eip = 0x%lx\n", subcode, regs->eip); goto badtrap; } @@ -328,7 +328,7 @@ dump_ss(regs); printf("%s trap", trap_type[type]); else printf("trap %d", type); - printf(", eip 0x%x\n", regs->eip); + printf(", eip 0x%lx\n", regs->eip); #if MACH_TTD if (kttd_enabled && kttd_trap(type, code, regs)) return; @@ -362,7 +362,7 @@ int user_trap(regs) if ((vm_offset_t)thread < phys_last_addr) { printf("user_trap: bad thread pointer 0x%p\n", thread); - printf("trap type %d, code 0x%x, va 0x%x, eip 0x%x\n", + printf("trap type %ld, code 0x%lx, va 0x%lx, eip 0x%lx\n", regs->trapno, regs->err, regs->cr2, regs->eip); asm volatile ("1: hlt; jmp 1b"); } @@ -540,7 +540,7 @@ printf("user trap %d error %d sub %08x\n", type, code, subcode); return 0; #endif /* MACH_KDB */ splhigh(); - printf("user trap, type %d, code = %x\n", + printf("user trap, type %d, code = %lx\n", type, regs->err); dump_ss(regs); panic("trap"); @@ -68,7 +68,7 @@ #define AST_PER_THREAD (AST_HALT | AST_TERMINATE | MACHINE_AST_PER_THREAD) -typedef unsigned int ast_t; +typedef unsigned long ast_t; extern volatile ast_t need_ast[NCPUS]; diff --git a/kern/boot_script.c b/kern/boot_script.c index aa6833b..b2e9393 100644 --- a/kern/boot_script.c +++ b/kern/boot_script.c @@ -67,7 +67,7 @@ static int symtab_index = 0; /* Create a task and suspend it. */ static int -create_task (struct cmd *cmd, int *val) +create_task (struct cmd *cmd, long *val) { int err = boot_script_task_create (cmd); *val = (long) cmd->task; @@ -76,14 +76,14 @@ create_task (struct cmd *cmd, int *val) /* Resume a task. */ static int -resume_task (struct cmd *cmd, int *val) +resume_task (struct cmd *cmd, long *val) { return boot_script_task_resume (cmd); } /* Resume a task when the user hits return. */ static int -prompt_resume_task (struct cmd *cmd, int *val) +prompt_resume_task (struct cmd *cmd, long *val) { return boot_script_prompt_task_resume (cmd); } @@ -659,7 +659,7 @@ boot_script_exec () /* Create an entry for the variable NAME with TYPE and value VAL, in the symbol table. */ int -boot_script_set_variable (const char *name, int type, int val) +boot_script_set_variable (const char *name, int type, long val) { struct sym *sym = sym_enter (name); diff --git a/kern/boot_script.h b/kern/boot_script.h index c436ac2..c5ad673 100644 --- a/kern/boot_script.h +++ b/kern/boot_script.h @@ -102,7 +102,7 @@ int boot_script_exec (void); /* Create an entry in the symbol table for variable NAME, whose type is TYPE and value is VAL. Returns 0 on success, non-zero otherwise. */ -int boot_script_set_variable (const char *name, int type, int val); +int boot_script_set_variable (const char *name, int type, long val); /* Define the function NAME, which will return type RET_TYPE. */ int boot_script_define_function (const char *name, int ret_type, diff --git a/kern/bootstrap.c b/kern/bootstrap.c index 2b74073..c98b0a2 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -211,7 +211,7 @@ void bootstrap_create() char *var = memcpy (alloca (len), *ep, len); char *val = strchr (var, '='); *val++ = '\0'; - losers = boot_script_set_variable (var, VAL_STR, (int) val); + losers = boot_script_set_variable (var, VAL_STR, (long) val); if (losers) panic ("cannot set boot-script variable %s: %s", var, boot_script_error_string (losers)); diff --git a/kern/lock.c b/kern/lock.c index 2bcfa8b..44d4448 100644 --- a/kern/lock.c +++ b/kern/lock.c @@ -163,8 +163,8 @@ void simple_lock( info->l = l; /* XXX we want our return address, if possible */ #if defined(__i386__) - info->ra = *((unsigned int *)&l - 1); -#endif /* __i386__ */ + info->ra = *((unsigned long *)&l - 1); +#endif /* i386 */ } boolean_t simple_lock_try( @@ -181,8 +181,8 @@ boolean_t simple_lock_try( info->l = l; /* XXX we want our return address, if possible */ #if defined(__i386__) - info->ra = *((unsigned int *)&l - 1); -#endif /* __i386__ */ + info->ra = *((unsigned long *)&l - 1); +#endif /* i386 */ return TRUE; } diff --git a/linux/dev/kernel/softirq.c b/linux/dev/kernel/softirq.c index 82e1442..ac95a7d 100644 --- a/linux/dev/kernel/softirq.c +++ b/linux/dev/kernel/softirq.c @@ -44,5 +44,5 @@ linux_soft_intr (void) } return; bad_bh: - printk ("linux_soft_intr:bad interrupt handler entry %08lx\n", mask); + printk ("linux_soft_intr:bad interrupt handler entry %08x\n", mask); } |