diff options
author | bde <bde@FreeBSD.org> | 1998-07-11 05:59:35 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-07-11 05:59:35 +0000 |
commit | a4b7c7a6b332ba36b7bbd82b88b16274e82447f0 (patch) | |
tree | 5966db0f67b42e638ffae43821689203c79c57ec /sys | |
parent | d307f5bacf2f9550df1c42d62baddac56a8153c3 (diff) | |
download | FreeBSD-src-a4b7c7a6b332ba36b7bbd82b88b16274e82447f0.zip FreeBSD-src-a4b7c7a6b332ba36b7bbd82b88b16274e82447f0.tar.gz |
Don't pretend to support ix86's with 16-bit ints by using longs just to
ensure 32-bit variables. Doing so mainly bogotified some printf formats.
Fixed disorder in md_var.h.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/identcpu.c | 16 | ||||
-rw-r--r-- | sys/amd64/include/md_var.h | 21 | ||||
-rw-r--r-- | sys/i386/i386/identcpu.c | 16 | ||||
-rw-r--r-- | sys/i386/include/md_var.h | 21 |
4 files changed, 36 insertions, 38 deletions
diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c index 0c47176..7ac5f5e 100644 --- a/sys/amd64/amd64/identcpu.c +++ b/sys/amd64/amd64/identcpu.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $Id: identcpu.c,v 1.48 1998/05/22 22:15:14 des Exp $ + * $Id: identcpu.c,v 1.49 1998/06/30 19:41:21 phk Exp $ */ #include "opt_cpu.h" @@ -69,9 +69,9 @@ void panicifcpuunsupported(void); static void identifycyrix(void); static void print_AMD_info(void); static void print_AMD_assoc(int i); -static void do_cpuid(u_long ax, u_long *p); +static void do_cpuid(u_int ax, u_int *p); -u_long cyrix_did; /* Device ID of Cyrix CPU */ +u_int cyrix_did; /* Device ID of Cyrix CPU */ int cpu_class = CPUCLASS_386; /* least common denominator */ char machine[] = "i386"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); @@ -98,7 +98,7 @@ static struct cpu_nameclass i386_cpus[] = { }; static void -do_cpuid(u_long ax, u_long *p) +do_cpuid(u_int ax, u_int *p) { __asm __volatile( ".byte 0x0f, 0xa2;" @@ -120,7 +120,7 @@ void printcpuinfo(void) { - u_long regs[4], nreg; + u_int regs[4], nreg; cpu_class = i386_cpus[cpu].cpu_class; printf("CPU: "); strncpy(cpu_model, i386_cpus[cpu].cpu_name, sizeof cpu_model); @@ -673,7 +673,7 @@ identblue(void) static void identifycyrix(void) { - u_long eflags; + u_int eflags; int ccr2_test = 0, dir_test = 0; u_char ccr2, ccr3; @@ -714,7 +714,7 @@ finishidentcpu(void) { int isblue = 0; u_char ccr3; - u_long regs[4]; + u_int regs[4]; if (strcmp(cpu_vendor, "CyrixInstead") == 0) { if (cpu == CPU_486) { @@ -818,7 +818,7 @@ print_AMD_assoc(int i) static void print_AMD_info(void) { - u_long regs[4]; + u_int regs[4]; do_cpuid(0x80000000, regs); if (regs[0] >= 0x80000005) { diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index 726ec7a..0db9334 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: md_var.h,v 1.22 1998/01/21 18:28:46 gibbs Exp $ + * $Id: md_var.h,v 1.23 1998/02/01 23:00:53 bde Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -43,15 +43,19 @@ extern char *bouncememory; extern int bouncepages; #endif extern int busdma_swi_pending; -extern u_long cpu_feature; -extern u_long cpu_high; -extern u_long cpu_id; -extern u_long cyrix_did; +extern u_int cpu_feature; +extern u_int cpu_high; +extern u_int cpu_id; extern char cpu_vendor[]; +extern u_int cyrix_did; extern char kstack[]; #ifdef BOUNCE_BUFFERS extern int maxbkva; #endif +#ifdef PC98 +extern int need_pre_dma_flush; +extern int need_post_dma_flush; +#endif extern void (*netisrs[32]) __P((void)); extern int nfs_diskless_valid; extern char sigcode[]; @@ -63,9 +67,9 @@ struct reg; void bcopyb __P((const void *from, void *to, size_t len)); void busdma_swi __P((void)); -void cpu_reset __P((void)); void cpu_halt __P((void)); void cpu_power_down __P((void)); +void cpu_reset __P((void)); void cpu_switch_load_fs __P((void)) __asm(__STRING(cpu_switch_load_fs)); void cpu_switch_load_gs __P((void)) __asm(__STRING(cpu_switch_load_gs)); void doreti_iret __P((void)) __asm(__STRING(doreti_iret)); @@ -85,9 +89,4 @@ void userconfig __P((void)); void vm_bounce_init __P((void)); int vm_page_zero_idle __P((void)); -#ifdef PC98 -extern int need_pre_dma_flush; -extern int need_post_dma_flush; -#endif - #endif /* !_MACHINE_MD_VAR_H_ */ diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c index 0c47176..7ac5f5e 100644 --- a/sys/i386/i386/identcpu.c +++ b/sys/i386/i386/identcpu.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $Id: identcpu.c,v 1.48 1998/05/22 22:15:14 des Exp $ + * $Id: identcpu.c,v 1.49 1998/06/30 19:41:21 phk Exp $ */ #include "opt_cpu.h" @@ -69,9 +69,9 @@ void panicifcpuunsupported(void); static void identifycyrix(void); static void print_AMD_info(void); static void print_AMD_assoc(int i); -static void do_cpuid(u_long ax, u_long *p); +static void do_cpuid(u_int ax, u_int *p); -u_long cyrix_did; /* Device ID of Cyrix CPU */ +u_int cyrix_did; /* Device ID of Cyrix CPU */ int cpu_class = CPUCLASS_386; /* least common denominator */ char machine[] = "i386"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); @@ -98,7 +98,7 @@ static struct cpu_nameclass i386_cpus[] = { }; static void -do_cpuid(u_long ax, u_long *p) +do_cpuid(u_int ax, u_int *p) { __asm __volatile( ".byte 0x0f, 0xa2;" @@ -120,7 +120,7 @@ void printcpuinfo(void) { - u_long regs[4], nreg; + u_int regs[4], nreg; cpu_class = i386_cpus[cpu].cpu_class; printf("CPU: "); strncpy(cpu_model, i386_cpus[cpu].cpu_name, sizeof cpu_model); @@ -673,7 +673,7 @@ identblue(void) static void identifycyrix(void) { - u_long eflags; + u_int eflags; int ccr2_test = 0, dir_test = 0; u_char ccr2, ccr3; @@ -714,7 +714,7 @@ finishidentcpu(void) { int isblue = 0; u_char ccr3; - u_long regs[4]; + u_int regs[4]; if (strcmp(cpu_vendor, "CyrixInstead") == 0) { if (cpu == CPU_486) { @@ -818,7 +818,7 @@ print_AMD_assoc(int i) static void print_AMD_info(void) { - u_long regs[4]; + u_int regs[4]; do_cpuid(0x80000000, regs); if (regs[0] >= 0x80000005) { diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h index 726ec7a..0db9334 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: md_var.h,v 1.22 1998/01/21 18:28:46 gibbs Exp $ + * $Id: md_var.h,v 1.23 1998/02/01 23:00:53 bde Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -43,15 +43,19 @@ extern char *bouncememory; extern int bouncepages; #endif extern int busdma_swi_pending; -extern u_long cpu_feature; -extern u_long cpu_high; -extern u_long cpu_id; -extern u_long cyrix_did; +extern u_int cpu_feature; +extern u_int cpu_high; +extern u_int cpu_id; extern char cpu_vendor[]; +extern u_int cyrix_did; extern char kstack[]; #ifdef BOUNCE_BUFFERS extern int maxbkva; #endif +#ifdef PC98 +extern int need_pre_dma_flush; +extern int need_post_dma_flush; +#endif extern void (*netisrs[32]) __P((void)); extern int nfs_diskless_valid; extern char sigcode[]; @@ -63,9 +67,9 @@ struct reg; void bcopyb __P((const void *from, void *to, size_t len)); void busdma_swi __P((void)); -void cpu_reset __P((void)); void cpu_halt __P((void)); void cpu_power_down __P((void)); +void cpu_reset __P((void)); void cpu_switch_load_fs __P((void)) __asm(__STRING(cpu_switch_load_fs)); void cpu_switch_load_gs __P((void)) __asm(__STRING(cpu_switch_load_gs)); void doreti_iret __P((void)) __asm(__STRING(doreti_iret)); @@ -85,9 +89,4 @@ void userconfig __P((void)); void vm_bounce_init __P((void)); int vm_page_zero_idle __P((void)); -#ifdef PC98 -extern int need_pre_dma_flush; -extern int need_post_dma_flush; -#endif - #endif /* !_MACHINE_MD_VAR_H_ */ |