Don't pretend to support ix86's with 16-bit ints by using longs just

to ensure 32-bit variables.  Doing so broke ix86's with 64-bit longs.
This commit is contained in:
bde 1998-09-29 09:06:00 +00:00
parent fd94b4c920
commit dc111a9a45
13 changed files with 53 additions and 53 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: busdma_machdep.c,v 1.7 1998/07/11 07:45:28 bde Exp $
* $Id: busdma_machdep.c,v 1.8 1998/09/15 10:03:42 gibbs Exp $
*/
#include <sys/param.h>
@ -459,7 +459,7 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
if (buflen != 0) {
printf("bus_dmamap_load: Too many segs! buf_len = 0x%lx\n",
buflen);
(u_long)buflen);
error = EFBIG;
}

View File

@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: bus.h,v 1.2 1998/04/19 15:28:30 bde Exp $ */
/* $Id: bus.h,v 1.3 1998/05/06 01:45:47 gibbs Exp $ */
#ifndef _I386_BUS_H_
#define _I386_BUS_H_
@ -83,8 +83,8 @@
/*
* Bus address and size types
*/
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
typedef u_int bus_addr_t;
typedef u_int bus_size_t;
#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
@ -99,7 +99,7 @@ typedef u_long bus_size_t;
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
typedef u_int bus_space_handle_t;
/*
* Map a region of device bus space into CPU virtual address space.

View File

@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: bus.h,v 1.2 1998/04/19 15:28:30 bde Exp $ */
/* $Id: bus.h,v 1.3 1998/05/06 01:45:47 gibbs Exp $ */
#ifndef _I386_BUS_H_
#define _I386_BUS_H_
@ -83,8 +83,8 @@
/*
* Bus address and size types
*/
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
typedef u_int bus_addr_t;
typedef u_int bus_size_t;
#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
@ -99,7 +99,7 @@ typedef u_long bus_size_t;
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
typedef u_int bus_space_handle_t;
/*
* Map a region of device bus space into CPU virtual address space.

View File

@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: bus.h,v 1.2 1998/04/19 15:28:30 bde Exp $ */
/* $Id: bus.h,v 1.3 1998/05/06 01:45:47 gibbs Exp $ */
#ifndef _I386_BUS_H_
#define _I386_BUS_H_
@ -83,8 +83,8 @@
/*
* Bus address and size types
*/
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
typedef u_int bus_addr_t;
typedef u_int bus_size_t;
#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
@ -99,7 +99,7 @@ typedef u_long bus_size_t;
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
typedef u_int bus_space_handle_t;
/*
* Map a region of device bus space into CPU virtual address space.

View File

@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: bus.h,v 1.2 1998/04/19 15:28:30 bde Exp $ */
/* $Id: bus.h,v 1.3 1998/05/06 01:45:47 gibbs Exp $ */
#ifndef _I386_BUS_H_
#define _I386_BUS_H_
@ -83,8 +83,8 @@
/*
* Bus address and size types
*/
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
typedef u_int bus_addr_t;
typedef u_int bus_size_t;
#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
@ -99,7 +99,7 @@ typedef u_long bus_size_t;
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
typedef u_int bus_space_handle_t;
/*
* Map a region of device bus space into CPU virtual address space.

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: busdma_machdep.c,v 1.7 1998/07/11 07:45:28 bde Exp $
* $Id: busdma_machdep.c,v 1.8 1998/09/15 10:03:42 gibbs Exp $
*/
#include <sys/param.h>
@ -459,7 +459,7 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
if (buflen != 0) {
printf("bus_dmamap_load: Too many segs! buf_len = 0x%lx\n",
buflen);
(u_long)buflen);
error = EFBIG;
}

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: vm86.c,v 1.14 1998/08/11 16:06:10 bde Exp $
* $Id: vm86.c,v 1.15 1998/08/16 00:05:05 bde Exp $
*/
#include "opt_vm86.h"
@ -77,13 +77,13 @@ MAKE_ADDR(u_short sel, u_short off)
}
static __inline void
GET_VEC(u_long vec, u_short *sel, u_short *off)
GET_VEC(u_int vec, u_short *sel, u_short *off)
{
*sel = vec >> 16;
*off = vec & 0xffff;
}
static __inline u_long
static __inline u_int
MAKE_VEC(u_short sel, u_short off)
{
return ((sel << 16) | off);
@ -97,7 +97,7 @@ PUSH(u_short x, struct vm86frame *vmf)
}
static __inline void
PUSHL(u_long x, struct vm86frame *vmf)
PUSHL(u_int x, struct vm86frame *vmf)
{
vmf->vmf_sp -= 4;
suword(MAKE_ADDR(vmf->vmf_ss, vmf->vmf_sp), x);
@ -112,10 +112,10 @@ POP(struct vm86frame *vmf)
return (x);
}
static __inline u_long
static __inline u_int
POPL(struct vm86frame *vmf)
{
u_long x = fuword(MAKE_ADDR(vmf->vmf_ss, vmf->vmf_sp));
u_int x = fuword(MAKE_ADDR(vmf->vmf_ss, vmf->vmf_sp));
vmf->vmf_sp += 4;
return (x);
@ -128,7 +128,7 @@ vm86_emulate(vmf)
struct vm86_kernel *vm86;
caddr_t addr;
u_char i_byte;
u_long temp_flags;
u_int temp_flags;
int inc_ip = 1;
int retcode = 0;
@ -354,7 +354,7 @@ static void
vm86_initialize(void)
{
int i;
u_long *addr;
u_int *addr;
struct vm86_layout *vml = (struct vm86_layout *)vm86paddr;
struct pcb *pcb;
struct pcb_ext *ext;
@ -438,8 +438,8 @@ vm86_initialize(void)
if (cpu_feature & CPUID_VME)
ext->ext_vm86.vm86_has_vme = (rcr4() & CR4_VME ? 1 : 0);
addr = (u_long *)ext->ext_vm86.vm86_intmap;
for (i = 0; i < (INTMAP_SIZE + IOMAP_SIZE) / sizeof(u_long); i++)
addr = (u_int *)ext->ext_vm86.vm86_intmap;
for (i = 0; i < (INTMAP_SIZE + IOMAP_SIZE) / sizeof(u_int); i++)
*addr++ = 0;
vml->vml_iomap_trailer = 0xff;

View File

@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: bus.h,v 1.2 1998/04/19 15:28:30 bde Exp $ */
/* $Id: bus.h,v 1.3 1998/05/06 01:45:47 gibbs Exp $ */
#ifndef _I386_BUS_H_
#define _I386_BUS_H_
@ -83,8 +83,8 @@
/*
* Bus address and size types
*/
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
typedef u_int bus_addr_t;
typedef u_int bus_size_t;
#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
@ -99,7 +99,7 @@ typedef u_long bus_size_t;
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
typedef u_int bus_space_handle_t;
/*
* Map a region of device bus space into CPU virtual address space.

View File

@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: bus.h,v 1.2 1998/04/19 15:28:30 bde Exp $ */
/* $Id: bus.h,v 1.3 1998/05/06 01:45:47 gibbs Exp $ */
#ifndef _I386_BUS_H_
#define _I386_BUS_H_
@ -83,8 +83,8 @@
/*
* Bus address and size types
*/
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
typedef u_int bus_addr_t;
typedef u_int bus_size_t;
#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
@ -99,7 +99,7 @@ typedef u_long bus_size_t;
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
typedef u_int bus_space_handle_t;
/*
* Map a region of device bus space into CPU virtual address space.

View File

@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: bus.h,v 1.2 1998/04/19 15:28:30 bde Exp $ */
/* $Id: bus.h,v 1.3 1998/05/06 01:45:47 gibbs Exp $ */
#ifndef _I386_BUS_H_
#define _I386_BUS_H_
@ -83,8 +83,8 @@
/*
* Bus address and size types
*/
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
typedef u_int bus_addr_t;
typedef u_int bus_size_t;
#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
@ -99,7 +99,7 @@ typedef u_long bus_size_t;
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
typedef u_int bus_space_handle_t;
/*
* Map a region of device bus space into CPU virtual address space.

View File

@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: bus.h,v 1.2 1998/04/19 15:28:30 bde Exp $ */
/* $Id: bus.h,v 1.3 1998/05/06 01:45:47 gibbs Exp $ */
#ifndef _I386_BUS_H_
#define _I386_BUS_H_
@ -83,8 +83,8 @@
/*
* Bus address and size types
*/
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
typedef u_int bus_addr_t;
typedef u_int bus_size_t;
#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
@ -99,7 +99,7 @@ typedef u_long bus_size_t;
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
typedef u_int bus_space_handle_t;
/*
* Map a region of device bus space into CPU virtual address space.

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: vm86.h,v 1.6 1998/06/08 09:47:35 bde Exp $
* $Id: vm86.h,v 1.7 1998/07/14 17:13:23 msmith Exp $
*/
#ifndef _MACHINE_VM86_H_
@ -34,7 +34,7 @@
/* standard register representation */
typedef union {
u_long r_ex;
u_int r_ex;
struct {
u_short r_x;
u_int :16;
@ -103,7 +103,7 @@ struct vm86frame {
struct vm86_kernel {
caddr_t vm86_intmap; /* interrupt map */
u_long vm86_eflags; /* emulated flags */
u_int vm86_eflags; /* emulated flags */
int vm86_has_vme; /* VME support */
int vm86_inited; /* we were initialized */
int vm86_debug;

View File

@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: bus.h,v 1.2 1998/04/19 15:28:30 bde Exp $ */
/* $Id: bus.h,v 1.3 1998/05/06 01:45:47 gibbs Exp $ */
#ifndef _I386_BUS_H_
#define _I386_BUS_H_
@ -83,8 +83,8 @@
/*
* Bus address and size types
*/
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
typedef u_int bus_addr_t;
typedef u_int bus_size_t;
#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF
#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF
@ -99,7 +99,7 @@ typedef u_long bus_size_t;
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
typedef u_int bus_space_handle_t;
/*
* Map a region of device bus space into CPU virtual address space.