From 1d5f38ac2264102518a09c66a7b285f57e81e67e Mon Sep 17 00:00:00 2001 From: dfr Date: Sun, 7 Jun 1998 17:13:14 +0000 Subject: This commit fixes various 64bit portability problems required for FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. --- sys/amd64/amd64/db_interface.c | 6 +++--- sys/amd64/amd64/db_trace.c | 34 +++++++++++++++++----------------- sys/amd64/amd64/machdep.c | 6 +++--- sys/amd64/amd64/mem.c | 4 ++-- 4 files changed, 25 insertions(+), 25 deletions(-) (limited to 'sys/amd64') diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c index 513c97e..1889d0a 100644 --- a/sys/amd64/amd64/db_interface.c +++ b/sys/amd64/amd64/db_interface.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_interface.c,v 1.37 1997/10/27 17:23:12 bde Exp $ + * $Id: db_interface.c,v 1.38 1997/11/20 18:09:36 bde Exp $ */ /* @@ -213,7 +213,7 @@ kdb_trap(type, code, regs) void db_read_bytes(addr, size, data) vm_offset_t addr; - register int size; + register size_t size; register char *data; { register char *src; @@ -233,7 +233,7 @@ db_read_bytes(addr, size, data) void db_write_bytes(addr, size, data) vm_offset_t addr; - register int size; + register size_t size; register char *data; { register char *dst; diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index 7dec82b..ed3ccd7 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_trace.c,v 1.26 1997/10/27 17:23:18 bde Exp $ + * $Id: db_trace.c,v 1.27 1997/11/20 18:24:52 bde Exp $ */ #include @@ -44,24 +44,24 @@ * Machine register set. */ struct db_variable db_regs[] = { - "cs", (int *)&ddb_regs.tf_cs, FCN_NULL, - "ds", (int *)&ddb_regs.tf_ds, FCN_NULL, - "es", (int *)&ddb_regs.tf_es, FCN_NULL, + "cs", (long *)&ddb_regs.tf_cs, FCN_NULL, + "ds", (long *)&ddb_regs.tf_ds, FCN_NULL, + "es", (long *)&ddb_regs.tf_es, FCN_NULL, #if 0 - "fs", (int *)&ddb_regs.tf_fs, FCN_NULL, - "gs", (int *)&ddb_regs.tf_gs, FCN_NULL, + "fs", (long *)&ddb_regs.tf_fs, FCN_NULL, + "gs", (long *)&ddb_regs.tf_gs, FCN_NULL, #endif - "ss", (int *)&ddb_regs.tf_ss, FCN_NULL, - "eax", (int *)&ddb_regs.tf_eax, FCN_NULL, - "ecx", (int *)&ddb_regs.tf_ecx, FCN_NULL, - "edx", (int *)&ddb_regs.tf_edx, FCN_NULL, - "ebx", (int *)&ddb_regs.tf_ebx, FCN_NULL, - "esp", (int *)&ddb_regs.tf_esp,FCN_NULL, - "ebp", (int *)&ddb_regs.tf_ebp, FCN_NULL, - "esi", (int *)&ddb_regs.tf_esi, FCN_NULL, - "edi", (int *)&ddb_regs.tf_edi, FCN_NULL, - "eip", (int *)&ddb_regs.tf_eip, FCN_NULL, - "efl", (int *)&ddb_regs.tf_eflags, FCN_NULL, + "ss", (long *)&ddb_regs.tf_ss, FCN_NULL, + "eax", (long *)&ddb_regs.tf_eax, FCN_NULL, + "ecx", (long *)&ddb_regs.tf_ecx, FCN_NULL, + "edx", (long *)&ddb_regs.tf_edx, FCN_NULL, + "ebx", (long *)&ddb_regs.tf_ebx, FCN_NULL, + "esp", (long *)&ddb_regs.tf_esp,FCN_NULL, + "ebp", (long *)&ddb_regs.tf_ebp, FCN_NULL, + "esi", (long *)&ddb_regs.tf_esi, FCN_NULL, + "edi", (long *)&ddb_regs.tf_edi, FCN_NULL, + "eip", (long *)&ddb_regs.tf_eip, FCN_NULL, + "efl", (long *)&ddb_regs.tf_eflags, FCN_NULL, }; struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]); diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index d57a2f0..331770d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.297 1998/05/28 09:29:57 phk Exp $ + * $Id: machdep.c,v 1.298 1998/06/03 07:56:59 bde Exp $ */ #include "apm.h" @@ -1614,7 +1614,7 @@ f00f_hack(void *unused) { int ptrace_set_pc(p, addr) struct proc *p; - unsigned int addr; + unsigned long addr; { p->p_md.md_regs->tf_eip = addr; return (0); @@ -1653,7 +1653,7 @@ int ptrace_read_u_check(p, addr, len) int ptrace_write_u(p, off, data) struct proc *p; vm_offset_t off; - int data; + long data; { struct trapframe frame_copy; vm_offset_t min; diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index 14343de..8db7d3c 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -38,7 +38,7 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $Id: mem.c,v 1.49 1998/01/24 02:54:13 eivind Exp $ + * $Id: mem.c,v 1.50 1998/03/12 09:14:18 bde Exp $ */ /* @@ -405,7 +405,7 @@ memmmap(dev_t dev, int offset, int nprot) static int mmioctl(dev, cmd, cmdarg, flags, p) dev_t dev; - int cmd; + u_long cmd; caddr_t cmdarg; int flags; struct proc *p; -- cgit v1.1