- remove some trailing spaces/tabs
- minor style nits
This commit is contained in:
aymeric 2002-01-26 13:24:53 +00:00
parent aa99e59f3d
commit 08fd7bc990
25 changed files with 348 additions and 352 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: amiga_bus_simple_4.c,v 1.2 2000/02/01 05:21:24 mhitch Exp $ */
/* $NetBSD: amiga_bus_simple_4.c,v 1.3 2002/01/26 13:24:53 aymeric Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -52,16 +52,13 @@ bsrm(oabs(bsrm2_swap_), u_int16_t);
bswm(oabs(bswm2_swap_), u_int16_t);
void
oabs(bsrm2_swap_)(handle, offset, pointer, count)
bus_space_handle_t handle;
bus_size_t offset;
u_int16_t *pointer;
bus_size_t count;
oabs(bsrm2_swap_)(bus_space_handle_t handle, bus_size_t offset,
u_int16_t *pointer, bus_size_t count)
{
volatile u_int16_t *p;
p = (volatile u_int16_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*pointer++ = bswap16(*p);
--count;
@ -69,16 +66,13 @@ oabs(bsrm2_swap_)(handle, offset, pointer, count)
}
void
oabs(bswm2_swap_)(handle, offset, pointer, count)
bus_space_handle_t handle;
bus_size_t offset;
const u_int16_t *pointer;
bus_size_t count;
oabs(bswm2_swap_)(bus_space_handle_t handle, bus_size_t offset,
const u_int16_t *pointer, bus_size_t count)
{
volatile u_int16_t *p;
p = (volatile u_int16_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*p = bswap16(*pointer);
++pointer;
@ -93,7 +87,7 @@ const struct amiga_bus_space_methods amiga_bus_stride_4swap = {
oabs(bsu_),
0,
0,
oabs(bsr1_),
oabs(bsw1_),
oabs(bsrm1_),

View File

@ -1,4 +1,4 @@
/* $NetBSD: amiga_init.c,v 1.74 2001/03/02 16:29:41 mhitch Exp $ */
/* $NetBSD: amiga_init.c,v 1.75 2002/01/26 13:24:53 aymeric Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@ -117,19 +117,18 @@ static u_long boot_flags;
u_long scsi_nosync;
int shift_nosync;
void start_c __P((int, u_int, u_int, u_int, char *, u_int, u_long, u_long));
void rollcolor __P((int));
static int kernel_image_magic_size __P((void));
static void kernel_image_magic_copy __P((u_char *));
int kernel_reload_write __P((struct uio *));
extern void kernel_reload __P((char *, u_long, u_long, u_long, u_long,
u_long, u_long, u_long, u_long, u_long, u_long));
extern void etext __P((void));
void start_c_cleanup __P((void));
void start_c(int, u_int, u_int, u_int, char *, u_int, u_long, u_long);
void rollcolor(int);
static int kernel_image_magic_size(void);
static void kernel_image_magic_copy(u_char *);
int kernel_reload_write(struct uio *);
extern void kernel_reload(char *, u_long, u_long, u_long, u_long,
u_long, u_long, u_long, u_long, u_long, u_long);
extern void etext(void);
void start_c_cleanup(void);
void *
chipmem_steal(amount)
long amount;
chipmem_steal(long amount)
{
/*
* steal from top of chipmem, so we don't collide with
@ -366,8 +365,8 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
ptpa = pstart;
#ifdef DRACO
if ((id>>24)==0x7D) {
ptextra = NDRCCPG
+ RELOC(NZTWOMEMPG, u_int)
ptextra = NDRCCPG
+ RELOC(NZTWOMEMPG, u_int)
+ btoc(RELOC(ZBUSAVAIL, u_int));
} else
#endif
@ -493,8 +492,8 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
}
sg = (u_int *)RELOC(Sysseg_pa, u_int);
sg = (u_int *)(sg[loadbase >> SG4_SHIFT1] & SG4_ADDR1);
shadow_pt =
((u_int *)(sg[(loadbase & SG4_MASK2) >> SG4_SHIFT2]
shadow_pt =
((u_int *)(sg[(loadbase & SG4_MASK2) >> SG4_SHIFT2]
& SG4_ADDR1)) +
((loadbase & SG4_MASK3) >> SG4_SHIFT3); /* XXX is */
@ -560,8 +559,8 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
vstart += NBPG;
avail -= NBPG;
}
shadow_pt =
((u_int *)(sg[loadbase >> SG_ISHIFT] & 0xffffff00))
shadow_pt =
((u_int *)(sg[loadbase >> SG_ISHIFT] & 0xffffff00))
+ ((loadbase & SG_PMASK) >> SG_PSHIFT);
}
}
@ -583,7 +582,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
#if defined(M68040) || defined(M68060)
/*
* map the kernel segment table cache invalidated for
* map the kernel segment table cache invalidated for
* these machines (for the 68040 not strictly necessary, but
* recommended by Motorola; for the 68060 mandatory)
*/
@ -639,7 +638,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
#ifdef DEBUG_KERNEL_START
/*
* early rollcolor Altais mapping
* early rollcolor Altais mapping
* XXX (only works if in slot 0)
*/
*pg++ = 0x20000000 | PG_RW | PG_CI | PG_V;
@ -647,7 +646,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
} else
#endif
{
pg_proto = CHIPMEMBASE | PG_RW | PG_CI | PG_V;
pg_proto = CHIPMEMBASE | PG_RW | PG_CI | PG_V;
/* CI needed here?? */
while (pg_proto < CHIPMEMTOP) {
*pg++ = pg_proto;
@ -688,10 +687,10 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
pg = shadow_pt;
*pg++ = PG_NV; /* Make page 0 invalid */
pg_proto += NBPG;
for (i = NBPG; i < (u_int)etext; i += NBPG, pg_proto += NBPG)
for (i = NBPG; i < (u_int)etext; i += NBPG, pg_proto += NBPG)
*pg++ = pg_proto;
pg_proto = (pg_proto & PG_FRAME) | PG_RW | PG_V;
for (; i < vstart + USPACE; i += NBPG, pg_proto += NBPG)
for (; i < vstart + USPACE; i += NBPG, pg_proto += NBPG)
*pg++ = pg_proto;
}
@ -749,7 +748,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
RELOC(DRCCADDR, u_int) + NDRCCPG * NBPG;
RELOC(ZBUSADDR, vaddr_t) =
RELOC(ZTWOMEMADDR, u_int) +
RELOC(ZTWOMEMADDR, u_int) +
RELOC(NZTWOMEMPG, u_int)*NBPG;
} else {
RELOC(ZBUSADDR, vaddr_t) =
@ -760,7 +759,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
* some nice variables for pmap to use
*/
RELOC(amigahwaddr, vaddr_t) = RELOC(DRCCADDR, u_int);
} else
} else
#endif
{
RELOC(CHIPMEMADDR, u_int) =
@ -836,8 +835,8 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
if (id & AMIGA_68060) {
/* do i need to clear the branch cache? */
asm volatile ( ".word 0x4e7a,0x0002;"
"orl #0x400000,%%d0;"
asm volatile ( ".word 0x4e7a,0x0002;"
"orl #0x400000,%%d0;"
".word 0x4e7b,0x0002" : : : "d0");
}
@ -855,7 +854,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
((volatile struct Custom *)0xdff000)->color[0] = 0xA70; /* ORANGE */
#endif
asm volatile ("movel #0xc000,%%d0; .word 0x4e7b,0x0003"
asm volatile ("movel #0xc000,%%d0; .word 0x4e7b,0x0003"
: : :"d0" );
} else
#endif
@ -909,7 +908,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
draco_intfrc = draco_intpen + NBPG;
draco_misc = draco_intfrc + NBPG;
draco_ioct = (struct drioct *)(DRCCADDR + DRIOCTLPG*NBPG);
} else
} else
#endif
{
INTREQRaddr = (vaddr_t)&custom.intreqr;
@ -954,11 +953,11 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
*(volatile u_int8_t *)(DRCCADDR + 1 +
DRSUPIOPG*NBPG + 4*(0x2F8 + 1)) = 0; /* and com1 */
draco_ioct->io_control |= DRCNTRL_WDOGDIS; /* stop Fido */
*draco_misc &= ~1/*DRMISC_FASTZ2*/;
} else
} else
#endif
{
custom.intena = 0x7fff; /* disable ints */
@ -992,10 +991,10 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
#ifdef P5PPC68KBOARD
/*
* Are we an P5 PPC/68K board? install different reset
* Are we an P5 PPC/68K board? install different reset
* routine.
*/
for (cdp = cfdev, ecdp = &cfdev[ncfdev]; cdp < ecdp; cdp++) {
if (cdp->rom.manid == 8512 &&
(cdp->rom.prodid == 100 || cdp->rom.prodid == 110)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.78 2001/02/02 21:52:12 is Exp $ */
/* $NetBSD: autoconf.c,v 1.79 2002/01/26 13:24:53 aymeric Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -42,10 +42,10 @@
#include <amiga/amiga/device.h>
#include <amiga/amiga/custom.h>
static void findroot __P((void));
void mbattach __P((struct device *, struct device *, void *));
int mbprint __P((void *, const char *));
int mbmatch __P((struct device *, struct cfdata *, void *));
static void findroot(void);
void mbattach(struct device *, struct device *, void *);
int mbprint(void *, const char *);
int mbmatch(struct device *, struct cfdata *, void *);
#include <sys/kernel.h>
@ -82,7 +82,7 @@ cpu_configure()
#ifdef DEBUG_KERNEL_START
printf("survived autoconf, going to enable interrupts\n");
#endif
#ifdef DRACO
if (is_draco()) {
*draco_intena |= DRIRQ_GLOBAL;
@ -147,8 +147,8 @@ matchname(fp, sp)
/*
* use config_search to find appropriate device, then call that device
* directly with NULL device variable storage. A device can then
* always tell the difference betwean the real and console init
* directly with NULL device variable storage. A device can then
* always tell the difference betwean the real and console init
* by checking for NULL.
*/
int
@ -179,12 +179,12 @@ amiga_config_found(pcfp, pdp, auxp, pfn)
/*
* this function needs to get enough configured to do a console
* basically this means start attaching the grfxx's that support
* basically this means start attaching the grfxx's that support
* the console. Kinda hacky but it works.
*/
void
config_console()
{
{
struct cfdata *cf;
/*
@ -214,8 +214,8 @@ config_console()
amiga_config_found(cf, NULL, "zbus", NULL);
}
/*
* mainbus driver
/*
* mainbus driver
*/
struct cfattach mainbus_ca = {
sizeof(struct device), mbmatch, mbattach
@ -267,7 +267,7 @@ mbattach(pdp, dp, auxp)
config_found(dp, "kbd", simple_devprint);
config_found(dp, "drsc", simple_devprint);
config_found(dp, "drsupio", simple_devprint);
} else
} else
#endif
{
config_found(dp, "ser", simple_devprint);

View File

@ -1,4 +1,4 @@
/* $NetBSD: busfuncs.c,v 1.6 1999/02/16 23:34:12 is Exp $ */
/* $NetBSD: busfuncs.c,v 1.7 2002/01/26 13:24:53 aymeric Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -115,8 +115,8 @@ const struct amiga_bus_space_methods amiga_interleaved_wordaccess_methods = {
/*
* Contiguous methods
* Be sure to only create word accesses.
* For busses that _need_ split byte accesses, use the interleaved functions.
*/
* For busses that _need_ split byte accesses, use the interleaved functions.
*/
u_int16_t
amiga_contiguous_read_2(t, h, o)

View File

@ -1,4 +1,4 @@
/* $NetBSD: cc.c,v 1.12 1998/08/20 19:55:06 veego Exp $ */
/* $NetBSD: cc.c,v 1.13 2002/01/26 13:24:53 aymeric Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -60,7 +60,7 @@ custom_chips_init()
*/
LIST_HEAD(vbllist, vbl_node) vbl_list;
void
void
turn_vbl_function_off(n)
struct vbl_node *n;
{
@ -68,7 +68,7 @@ turn_vbl_function_off(n)
return;
n->flags |= VBLNF_TURNOFF;
while ((n->flags & VBLNF_OFF) == 0)
while ((n->flags & VBLNF_OFF) == 0)
;
}
@ -80,7 +80,7 @@ turn_vbl_function_on(n)
n->flags &= (short) ~(VBLNF_OFF);
}
void
void
add_vbl_function(add, priority, data)
struct vbl_node *add;
short priority;
@ -88,7 +88,7 @@ add_vbl_function(add, priority, data)
{
int s;
struct vbl_node *n, *prev;
s = spl3();
prev = NULL;
for (n = vbl_list.lh_first; n != NULL; n = n->link.le_next) {
@ -151,7 +151,7 @@ cc_init_vbl()
/*
* enable vertical blank interrupts
*/
custom.intena = INTF_SETCLR | INTF_VERTB;
custom.intena = INTF_SETCLR | INTF_VERTB;
}
@ -171,7 +171,7 @@ is_blitter_busy()
u_short bb;
bb = (custom.dmaconr & DMAF_BLTDONE);
if ((custom.dmaconr & DMAF_BLTDONE) || bb)
if ((custom.dmaconr & DMAF_BLTDONE) || bb)
return (1);
return (0);
}
@ -182,7 +182,7 @@ wait_blit()
/*
* V40 state this covers all blitter bugs.
*/
while (is_blitter_busy())
while (is_blitter_busy())
;
}
@ -262,13 +262,13 @@ wait_tof()
*/
while ((custom.vposr & 0x0007) == 0)
;
/*
* wait until until top of frame.
*/
while (custom.vposr & 0x0007)
while (custom.vposr & 0x0007)
;
if (custom.vposr & 0x8000)
return;
/*
@ -316,7 +316,7 @@ cc_init_copper()
void
copper_handler()
{
custom.intreq = INTF_COPER;
custom.intreq = INTF_COPER;
}
/*
@ -329,7 +329,7 @@ copper_handler()
struct audio_channel channel[4];
/* audio vbl node for vbl function */
struct vbl_node audio_vbl_node;
struct vbl_node audio_vbl_node;
void
cc_init_audio()
@ -483,13 +483,13 @@ cc_init_chipmem()
chip_size = chipmem_end - (chipmem_start + NBPG);
chip_total = chip_size - sizeof(*mem);
mem = (struct mem_node *)chipmem_steal(chip_size);
mem->size = chip_total;
CIRCLEQ_INIT(&chip_list);
CIRCLEQ_INIT(&free_list);
CIRCLEQ_INSERT_HEAD(&chip_list, mem, link);
CIRCLEQ_INSERT_HEAD(&free_list, mem, free_link);
splx(s);
@ -507,7 +507,7 @@ alloc_chipmem(size)
s = splhigh();
if (size & ~(CM_BLOCKMASK))
if (size & ~(CM_BLOCKMASK))
size = (size & CM_BLOCKMASK) + CM_BLOCKSIZE;
/*
@ -522,7 +522,7 @@ alloc_chipmem(size)
if ((mn->size - size) <= sizeof (*mn)) {
/*
* our allocation would not leave room
* our allocation would not leave room
* for a new node in between.
*/
CIRCLEQ_REMOVE(&free_list, mn, free_link);
@ -571,7 +571,7 @@ free_chipmem(mem)
/*
* check ahead of us.
*/
if (next->link.cqe_next != (void *)&chip_list &&
if (next->link.cqe_next != (void *)&chip_list &&
next->free_link.cqe_next) {
/*
* if next is: a valid node and a free node. ==> merge
@ -601,7 +601,7 @@ free_chipmem(mem)
* we still are not on free list and we need to be.
* <-- | -->
*/
while (next->link.cqe_next != (void *)&chip_list &&
while (next->link.cqe_next != (void *)&chip_list &&
prev->link.cqe_prev != (void *)&chip_list) {
if (next->free_link.cqe_next) {
CIRCLEQ_INSERT_BEFORE(&free_list, next, mn,
@ -660,10 +660,10 @@ avail_chipmem(largest)
s = splhigh();
for (mn = free_list.cqh_first; mn != (void *)&free_list;
mn = mn->free_link.cqe_next) {
if (mn->size > val)
if (mn->size > val)
val = mn->size;
}
splx(s);
}
return (val);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cc.h,v 1.12 2001/12/01 13:44:22 aymeric Exp $ */
/* $NetBSD: cc.h,v 1.13 2002/01/26 13:24:53 aymeric Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -42,14 +42,14 @@
#if ! defined (HIADDR)
#define HIADDR(x) (u_short)((((unsigned long)(x))>>16)&0xffff)
#endif
#endif
#if ! defined (LOADDR)
#define LOADDR(x) (u_short)(((unsigned long)(x))&0xffff)
#endif
/*
* Audio stuff
/*
* Audio stuff
*/
struct audio_channel {
u_short play_count;
@ -58,10 +58,10 @@ struct audio_channel {
};
#ifdef LEV6_DEFER
#define AUCC_MAXINT 3
#define AUCC_MAXINT 3
#define AUCC_ALLINTF (INTF_AUD0|INTF_AUD1|INTF_AUD2)
#else
#define AUCC_MAXINT 4
#else
#define AUCC_MAXINT 4
#define AUCC_ALLINTF (INTF_AUD0|INTF_AUD1|INTF_AUD2|INTF_AUD3)
#endif
/*
@ -90,7 +90,7 @@ enum vbl_node_bits {
enum vlb_node_flags {
VBLNF_OFF = 1 << VBLNB_OFF,
VBLNF_TURNOFF = 1 << VBLNB_TURNOFF,
};
};
/*
* Blitter stuff.
@ -157,7 +157,7 @@ typedef struct copper_list {
*/
struct mem_node {
CIRCLEQ_ENTRY(mem_node) link;
CIRCLEQ_ENTRY(mem_node) link;
CIRCLEQ_ENTRY(mem_node) free_link;
u_long size; /* size of memory following node. */
};
@ -177,43 +177,43 @@ vaddr_t chipmem_end;
/*
* Prototypes.
*/
void custom_chips_init __P((void));
void custom_chips_init(void);
/* vertical blank server chain */
void cc_init_vbl __P((void));
void add_vbl_function __P((struct vbl_node *, short, void *));
void remove_vbl_function __P((struct vbl_node *));
void turn_vbl_function_off __P((struct vbl_node *));
void turn_vbl_function_on __P((struct vbl_node *));
void cc_init_vbl(void);
void add_vbl_function(struct vbl_node *, short, void *);
void remove_vbl_function(struct vbl_node *);
void turn_vbl_function_off(struct vbl_node *);
void turn_vbl_function_on(struct vbl_node *);
/* blitter */
void cc_init_blitter __P((void));
int is_blitter_busy __P((void));
void wait_blit __P((void));
void blitter_handler __P((void));
void do_blit __P((u_short));
void set_blitter_control __P((u_short, u_short));
void set_blitter_mods __P((u_short, u_short, u_short, u_short));
void set_blitter_masks __P((u_short, u_short));
void set_blitter_data __P((u_short, u_short, u_short));
void set_blitter_pointers __P((void *, void *, void *, void *));
void cc_init_blitter(void);
int is_blitter_busy(void);
void wait_blit(void);
void blitter_handler(void);
void do_blit(u_short);
void set_blitter_control(u_short, u_short);
void set_blitter_mods(u_short, u_short, u_short, u_short);
void set_blitter_masks(u_short, u_short);
void set_blitter_data(u_short, u_short, u_short);
void set_blitter_pointers(void *, void *, void *, void *);
/* copper */
void install_copper_list __P((cop_t *));
cop_t *find_copper_inst __P((cop_t *, u_short));
void cc_init_copper __P((void));
void copper_handler __P((void));
void install_copper_list(cop_t *);
cop_t *find_copper_inst(cop_t *, u_short);
void cc_init_copper(void);
void copper_handler(void);
/* audio */
void cc_init_audio __P((void));
void play_sample __P((u_short, u_short *, u_short, u_short, u_short, u_long));
void audio_handler __P((void));
void cc_init_audio(void);
void play_sample(u_short, u_short *, u_short, u_short, u_short, u_long);
void audio_handler(void);
/* chipmem */
void cc_init_chipmem __P((void));
void * alloc_chipmem __P((u_long));
void free_chipmem __P((void *));
u_long avail_chipmem __P((int));
u_long sizeof_chipmem __P((void *));
void cc_init_chipmem(void);
void * alloc_chipmem(u_long);
void free_chipmem(void *);
u_long avail_chipmem(int);
u_long sizeof_chipmem(void *);
void wait_tof __P((void));
void vbl_handler __P((void));
void *chipmem_steal __P((long));
void wait_tof(void);
void vbl_handler(void);
void *chipmem_steal(long);
#endif /* _CC_H */

View File

@ -1,4 +1,4 @@
/* $NetBSD: cia.c,v 1.6 1995/02/12 19:34:17 chopps Exp $ */
/* $NetBSD: cia.c,v 1.7 2002/01/26 13:24:53 aymeric Exp $ */
/*
* Copyright (c) 1993 Markus Wild
@ -34,14 +34,14 @@
* Since the interrupt control register of a CIA is cleared
* when it's read, it is essential that different interrupt
* sources are managed from one central handler, or interrupts
* can get lost.
* can get lost.
*
* if you write a handler dealing with a yet unused interrupt
* bit (handler == not_used), enter your interrupt handler
* bit (handler == not_used), enter your interrupt handler
* in the appropriate table below. If your handler must poll
* for an interrupt flag to come active, *always* call
* dispatch_cia_ints() afterwards with bits in the mask
* register your code didn't already deal with.
* register your code didn't already deal with.
*/
#include <sys/types.h>
#include <sys/cdefs.h>
@ -51,12 +51,12 @@
struct cia_intr_dispatch {
u_char mask;
void (*handler) __P ((int));
void (*handler)(int);
};
static void not_used __P((int));
void kbdintr __P((int));
void parintr __P((int));
static void not_used(int);
void kbdintr(int);
void parintr(int);
/* handlers for CIA-A (IPL-2) */
static struct cia_intr_dispatch ciaa_ints[] = {

View File

@ -1,4 +1,4 @@
/* $NetBSD: cia.h,v 1.11 2001/08/31 04:44:55 simonb Exp $ */
/* $NetBSD: cia.h,v 1.12 2002/01/26 13:24:53 aymeric Exp $ */
/*
* Mach Operating System
@ -29,7 +29,7 @@
/*
* This is a rewrite (retype) of the Amiga's CIA chip register map, based
* on the Hardware Reference Manual. It is NOT based on the Amiga's
* hardware/cia.h.
* hardware/cia.h.
*/
#ifndef _AMIGA_CIA_
@ -138,8 +138,8 @@ vaddr_t CIAAbase, CIABbase, CIAADDR;
#define CLRDSR(c) (c |= CIAB_PRA_DSR)
#define ISDSR(c) (!(c & CIAB_PRA_DSR))
void dispatch_cia_ints __P((int, int));
void ciaa_intr __P((void));
void ciab_intr __P((void));
void dispatch_cia_ints(int, int);
void ciaa_intr(void);
void ciab_intr(void);
#endif /* _AMIGA_CIA_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: color.h,v 1.8 1995/02/12 19:34:17 chopps Exp $ */
/* $NetBSD: color.h,v 1.9 2002/01/26 13:24:53 aymeric Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -30,7 +30,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* some colors, handy for debugging
* some colors, handy for debugging
*/
#ifdef DEBUG
#define COL_BLACK 0x000
@ -56,5 +56,5 @@
#define COL24_LGREY 0x0880
#define COL24_WHITE 0xffff
void rollcolor __P((int));
void rollcolor(int);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.62 2001/03/21 22:25:53 lukem Exp $ */
/* $NetBSD: conf.c,v 1.63 2002/01/26 13:24:53 aymeric Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@ -193,9 +193,9 @@ struct cdevsw cdevsw[] =
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
#ifdef BANKEDDEVPAGER
extern int grfbanked_get __P((int, int, int));
extern int grfbanked_set __P((int, int));
extern int grfbanked_cur __P((int));
extern int grfbanked_get(int, int, int);
extern int grfbanked_set(int, int);
extern int grfbanked_cur(int);
struct bankeddevsw bankeddevsw[sizeof (cdevsw) / sizeof (cdevsw[0])] = {
{ 0, 0, 0 }, /* 0 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_memrw.c,v 1.11 2000/06/29 08:44:03 mrg Exp $ */
/* $NetBSD: db_memrw.c,v 1.12 2002/01/26 13:24:53 aymeric Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -26,7 +26,7 @@
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
@ -57,11 +57,11 @@
#include <m68k/cacheops.h>
static char db_read_data __P((char *src));
void db_read_bytes __P((db_addr_t addr, register int size, register char *data));
static void db_write_text __P((char *dst, int ch));
static void db_write_data __P((char *dst, int ch));
void db_write_bytes __P((db_addr_t addr, int size, char *data));
static char db_read_data(char *src);
void db_read_bytes(db_addr_t addr, register int size, register char *data);
static void db_write_text(char *dst, int ch);
static void db_write_data(char *dst, int ch);
void db_write_bytes(db_addr_t addr, int size, char *data);
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: device.h,v 1.6 1996/08/27 21:54:26 cgd Exp $ */
/* $NetBSD: device.h,v 1.7 2002/01/26 13:24:54 aymeric Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -32,16 +32,15 @@
#ifndef _AMIGA_DEVICE_H_
#define _AMIGA_DEVICE_H_
/*
/*
* devices that need to configure before console use this
* *and know it* (i.e. everything is really tight certain params won't be
* *and know it* (i.e. everything is really tight certain params won't be
* passed in some cases and the devices will deal with it)
*/
void config_console __P((void));
int amiga_config_found __P((struct cfdata *, struct device *,
void *, cfprint_t ));
int simple_devprint __P((void *, const char *));
int matchname __P((char *, char *));
void config_console(void);
int amiga_config_found(struct cfdata *, struct device *, void *, cfprint_t );
int simple_devprint(void *, const char *);
int matchname(char *, char *);
/*
* false when initing for the console.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: disksubr.c,v 1.37 2001/05/06 20:49:43 is Exp $ */
/* $NetBSD: disksubr.c,v 1.38 2002/01/26 13:24:54 aymeric Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -81,10 +81,10 @@ struct rdbmap {
#define baddr(bp) (void *)((bp)->b_data)
u_long rdbchksum __P((void *));
struct adostype getadostype __P((u_long));
struct rdbmap *getrdbmap __P((dev_t, void (*)(struct buf *), struct disklabel *,
struct cpu_disklabel *));
u_long rdbchksum(void *);
struct adostype getadostype(u_long);
struct rdbmap *getrdbmap(dev_t, void (*)(struct buf *), struct disklabel *,
struct cpu_disklabel *);
/*
* Attempt to read a disk label from a device
@ -190,7 +190,7 @@ readdisklabel(dev, strat, lp, clp)
lp->d_nsectors = rbp->nsectors;
lp->d_ntracks = rbp->nheads;
/*
* should be rdb->ncylinders however this is a bogus value
* should be rdb->ncylinders however this is a bogus value
* sometimes it seems
*/
if (rbp->highcyl == 0)
@ -214,7 +214,7 @@ readdisklabel(dev, strat, lp, clp)
rbp->nsectors, rbp->nheads);
#endif
lp->d_sparespercyl =
max(rbp->secpercyl, lp->d_nsectors * lp->d_ntracks)
max(rbp->secpercyl, lp->d_nsectors * lp->d_ntracks)
- lp->d_secpercyl;
if (lp->d_sparespercyl == 0)
lp->d_sparespertrack = 0;
@ -233,7 +233,7 @@ readdisklabel(dev, strat, lp, clp)
lp->d_rpm = 3600; /* good guess I suppose. */
lp->d_interleave = rbp->interleave;
lp->d_headswitch = lp->d_flags = lp->d_trackskew = lp->d_cylskew = 0;
lp->d_trkseek = /* rbp->steprate */ 0;
lp->d_trkseek = /* rbp->steprate */ 0;
/*
* raw partition gets the entire disk
@ -255,7 +255,7 @@ readdisklabel(dev, strat, lp, clp)
bp->b_blkno *= (lp->d_secsize / DEV_BSIZE);
#endif
strat(bp);
if (biowait(bp)) {
msg = "partition scan I/O error";
goto done;
@ -341,7 +341,7 @@ readdisklabel(dev, strat, lp, clp)
*/
while ((pp - lp->d_partitions) > RAW_PART + 1) {
daddr_t boff;
boff = pbp->e.lowcyl * pbp->e.secpertrk
* pbp->e.numheads;
if (boff > (pp - 1)->p_offset)
@ -352,11 +352,11 @@ readdisklabel(dev, strat, lp, clp)
i = (pp - lp->d_partitions);
if (nopname || i == 1) {
/*
* either we have no packname yet or we found
* either we have no packname yet or we found
* the swap partition. copy BCPL string into packname
* [the reason we use the swap partition: the user
* can supply a decent packname without worry
* of having to access an odly named partition
* of having to access an odly named partition
* under AmigaDos]
*/
s = lp->d_packname;
@ -479,7 +479,7 @@ setdisklabel(olp, nlp, openmask, clp)
/*
* Write disk label back to device after modification.
* this means write out the Rigid disk blocks to represent the
* this means write out the Rigid disk blocks to represent the
* label. Hope the user was carefull.
*/
int
@ -528,7 +528,7 @@ bounds_check_with_label(bp, lp, wlabel)
#endif
if (bp->b_blkno < 0 || bp->b_blkno + sz > maxsz) {
if (bp->b_blkno == maxsz) {
/*
/*
* trying to get one block beyond return EOF.
*/
bp->b_resid = bp->b_bcount;
@ -540,7 +540,7 @@ bounds_check_with_label(bp, lp, wlabel)
bp->b_flags |= B_ERROR;
return(-1);
}
/*
/*
* adjust count down
*/
if (bp->b_flags & B_RAW)
@ -571,7 +571,7 @@ rdbchksum(bdata)
return(val);
}
struct adostype
struct adostype
getadostype(dostype)
u_long dostype;
{
@ -605,7 +605,7 @@ getadostype(dostype)
else
adt.fstype = FS_ADOS;
return(adt);
case DOST_AMIX:
adt.archtype = ADT_AMIX;
if (b1 == 2)
@ -645,7 +645,7 @@ getadostype(dostype)
adt.archtype = ADT_UNKNOWN;
adt.fstype = FS_UNUSED;
return(adt);
}
}
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: dkbad.c,v 1.7 1996/04/21 21:07:00 veego Exp $ */
/* $NetBSD: dkbad.c,v 1.8 2002/01/26 13:24:54 aymeric Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@ -40,7 +40,7 @@
#include <sys/buf.h>
#include <sys/dkbad.h>
int isbad __P((struct dkbad *, int, int, int));
int isbad(struct dkbad *, int, int, int);
/*
* Search the bad sector table looking for

View File

@ -1,13 +1,13 @@
/*
* $NetBSD: drcustom.h,v 1.4 1999/09/25 21:47:04 is Exp $
*
/*
* $NetBSD: drcustom.h,v 1.5 2002/01/26 13:24:54 aymeric Exp $
*
* Motherboard addresses for the DraCo.
*
*/
#ifndef _DRACO_HARDWARE
#define _DRACO_HARDWARE
/*
* CIA-B is available only in very early models.
* CIA-A is available only up to revision 3.

View File

@ -1,4 +1,6 @@
/* $NetBSD: gayle.h,v 1.1 2000/01/23 20:53:18 aymeric Exp $ */
/* $NetBSD: gayle.h,v 1.2 2002/01/26 13:24:54 aymeric Exp $ */
#ifndef AMIGA_GAYLE_H_
#define AMIGA_GAYLE_H_
#include <sys/types.h>
@ -51,4 +53,6 @@ struct gayle_struct {
extern struct gayle_struct *gayle_base_virtual_address;
#define gayle (*gayle_base_virtual_address)
void gayle_init __P((void));
void gayle_init(void);
#endif /* AMIGA_GAYLE_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: isr.h,v 1.8 1996/04/21 21:07:02 veego Exp $ */
/* $NetBSD: isr.h,v 1.9 2002/01/26 13:24:54 aymeric Exp $ */
/*
* Copyright (c) 1982 Regents of the University of California.
@ -38,7 +38,7 @@
struct isr {
struct isr *isr_forw;
struct isr *isr_back;
int (*isr_intr) __P((void *));
int (*isr_intr)(void *);
void *isr_arg;
int isr_ipl;
};
@ -47,10 +47,10 @@ struct isr {
#define ISRIPL(x) ((x) - 3)
#ifdef _KERNEL
void add_isr __P((struct isr *));
void remove_isr __P((struct isr *));
typedef void (*sifunc_t) __P((void *, void *));
void alloc_sicallback __P((void));
void add_sicallback __P((sifunc_t, void *, void *));
void rem_sicallback __P((sifunc_t));
void add_isr(struct isr *);
void remove_isr(struct isr *);
typedef void (*sifunc_t)(void *, void *);
void alloc_sicallback(void);
void add_sicallback(sifunc_t, void *, void *);
void rem_sicallback(sifunc_t);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.129 2002/01/12 11:45:26 aymeric Exp $ */
/* $NetBSD: locore.s,v 1.130 2002/01/26 13:24:54 aymeric Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -129,7 +129,7 @@ ENTRY_NOPROFILE(buserr60)
movl %a0,%sp@(FR_SP) | in the savearea
movel %sp@(FR_HW+12),%d0 | FSLW
btst #2,%d0 | branch prediction error?
jeq Lnobpe
jeq Lnobpe
movc %cacr,%d2
orl #IC60_CABC,%d2 | clear all branch cache entries
movc %d2,%cacr
@ -149,7 +149,7 @@ Lnobpe:
Lberr3:
movl %d1,%sp@-
movl %d0,%sp@- | code is FSLW now.
andw #0x1f80,%d0
andw #0x1f80,%d0
jeq Lisberr
movl #T_MMUFLT,%sp@- | show that we are an MMU fault
jra _ASM_LABEL(faultstkadj) | and deal with it
@ -290,7 +290,7 @@ ENTRY_NOPROFILE(fpemuli)
movql #T_FPEMULI,%d0 | denote as FP emulation trap
jra _ASM_LABEL(fault) | do it
#endif
ENTRY_NOPROFILE(fpunsupp)
#if defined(M68040)
cmpl #MMU_68040,_C_LABEL(mmutype) | 68040?
@ -328,7 +328,7 @@ ENTRY_NOPROFILE(fpfault)
andb #0x90,%d0 | AMIGA_68060 | AMIGA_68040
jne Lfptnull | XXX
#endif
tstb %a0@ | null state frame?
tstb %a0@ | null state frame?
jeq Lfptnull | yes, safe
clrw %d0 | no, need to tweak BIU
movb %a0@(1),%d0 | get frame size
@ -479,14 +479,14 @@ ENTRY_NOPROFILE(DraCoLev2intr)
jge Ldrintrcommon | CIAA IR not set, go through isr chain
movel _C_LABEL(draco_intpen),%a0
| andib #4,%a0@
|XXX this would better be
|XXX this would better be
bclr #2,%a0@
btst #0,%d0 | timerA interrupt?
jeq Ldraciaend
lea %sp@(16),%a1 | get pointer to PS
movl %a1,%sp@- | push pointer to PS, PC
movw #PSL_HIGHIPL,%sr | hardclock at high IPL
jbsr _C_LABEL(hardclock) | call generic clock int routine
addql #4,%sp | pop params
@ -550,7 +550,7 @@ Ldrintrcommon:
subql #1,_C_LABEL(interrupt_depth)
jra _ASM_LABEL(rei)
#endif
ENTRY_NOPROFILE(lev1intr)
ENTRY_NOPROFILE(lev2intr)
@ -798,7 +798,7 @@ ASENTRY_NOPROFILE(start)
movl %d5,%sp@- | pass machine id
/*
* initialize some hw addresses to their physical address
* initialize some hw addresses to their physical address
* for early running
*/
#ifdef DRACO
@ -888,7 +888,7 @@ Lsetcpu040:
btst #7,%sp@(3)
jeq Lstartnot040
movl #CPU_68060,%a0@ | and in the cputype
orl #IC60_CABC,%d0 | XXX and clear all 060 branch cache
orl #IC60_CABC,%d0 | XXX and clear all 060 branch cache
#else
movc %d0,%cacr
bset #30,%d0 | not allocate data cache bit
@ -898,10 +898,10 @@ Lsetcpu040:
jeq Lstartnot040
bset #7,%sp@(3) | note it is '60 family in machineid
movl #CPU_68060,%a0@ | and in the cputype
orl #IC60_CABC,%d0 | XXX and clear all 060 branch cache
orl #IC60_CABC,%d0 | XXX and clear all 060 branch cache
.word 0x4e7a,0x1808 | movc pcr,d1
swap %d1
cmpw #0x430,%d1
cmpw #0x430,%d1
jne Lstartnot040 | but no FPU
bset #6,%sp@(3) | yes, we have FPU, note that
swap %d1
@ -948,7 +948,7 @@ Lunshadow:
#endif
/* flush TLB and turn on caches */
jbsr _ASM_LABEL(__TBIA) | invalidate TLB
movl #CACHE_ON,%d0
tstl %d5
@ -987,7 +987,7 @@ Lcacheon:
movl %sp,%a0@(P_MD + MD_REGS) | save frame for proc0
movl %usp,%a1
movl %a1,%sp@(FR_SP) | save user stack pointer in frame
pea %sp@ | addr of space for D0
pea %sp@ | addr of space for D0
jbsr _C_LABEL(main) | main(firstaddr, r0)
addql #4,%sp | pop args
@ -1581,7 +1581,7 @@ Lflustp060:
movc %d1,%cacr
rts
#endif
ENTRY(ploadw)
movl %sp@(4),%a0 | address to load

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.165 2001/11/07 23:25:03 aymeric Exp $ */
/* $NetBSD: machdep.c,v 1.166 2002/01/26 13:24:54 aymeric Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -106,20 +106,20 @@
#include "ser.h"
/* prototypes */
void identifycpu __P((void));
vm_offset_t reserve_dumppages __P((vm_offset_t));
void dumpsys __P((void));
void initcpu __P((void));
void straytrap __P((int, u_short));
static void netintr __P((void));
static void call_sicallbacks __P((void));
static void _softintr_callit __P((void *, void *));
void intrhand __P((int));
void identifycpu(void);
vm_offset_t reserve_dumppages(vm_offset_t);
void dumpsys(void);
void initcpu(void);
void straytrap(int, u_short);
static void netintr(void);
static void call_sicallbacks(void);
static void _softintr_callit(void *, void *);
void intrhand(int);
#if NSER > 0
void ser_outintr __P((void));
void ser_outintr(void);
#endif
#if NFD > 0
void fdintr __P((int));
void fdintr(int);
#endif
volatile unsigned int interrupt_depth = 0;
@ -129,7 +129,7 @@ volatile unsigned int interrupt_depth = 0;
*/
u_int16_t amiga_serialspl = PSL_S|PSL_IPL4;
struct vm_map *exec_map = NULL;
struct vm_map *exec_map = NULL;
struct vm_map *mb_map = NULL;
struct vm_map *phys_map = NULL;
@ -139,7 +139,7 @@ paddr_t msgbufpa;
int maxmem; /* max memory per process */
int physmem = MAXMEM; /* max supported memory, changes to actual */
/*
* extender "register" for software interrupts. Moved here
* extender "register" for software interrupts. Moved here
* from locore.s, since softints are no longer dealt with
* in locore.s.
*/
@ -159,7 +159,7 @@ char machine[] = MACHINE; /* from <machine/param.h> */
/* Our exported CPU info; we can have only one. */
struct cpu_info cpu_info_store;
/*
* current open serial device speed; used by some SCSI drivers to reduce
* DMA transfer lengths.
@ -290,7 +290,7 @@ cpu_startup()
while (curbufsize) {
pg = uvm_pagealloc(NULL, 0, NULL, 0);
if (pg == NULL)
if (pg == NULL)
panic("cpu_startup: not enough memory for "
"buffer cache");
pmap_kenter_pa(curbuf, VM_PAGE_TO_PHYS(pg),
@ -328,14 +328,14 @@ cpu_startup()
printf("avail memory = %s\n", pbuf);
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
/*
* display memory configuration passed from loadbsd
*/
if (memlist->m_nseg > 0 && memlist->m_nseg < 16)
for (i = 0; i < memlist->m_nseg; i++)
printf("memory segment %d at %08x size %08x\n", i,
memlist->m_seg[i].ms_start,
memlist->m_seg[i].ms_start,
memlist->m_seg[i].ms_size);
#ifdef DEBUG_KERNEL_START
@ -349,7 +349,7 @@ cpu_startup()
#ifdef DEBUG_KERNEL_START
printf("survived initcpu...\n");
#endif
/*
* Set up buffers, so they can be used to read disk labels.
*/
@ -370,7 +370,7 @@ setregs(p, pack, stack)
u_long stack;
{
struct frame *frame = (struct frame *)p->p_md.md_regs;
frame->f_sr = PSL_USERSET;
frame->f_pc = pack->ep_entry & ~1;
frame->f_regs[D0] = 0;
@ -409,7 +409,7 @@ char cpu_model[120];
int m68060_pcr_init = 0x21; /* make this patchable */
#endif
void
identifycpu()
{
@ -427,7 +427,7 @@ identifycpu()
if (is_draco()) {
sprintf(machbuf, "DraCo rev.%d", is_draco());
mach = machbuf;
} else
} else
#endif
if (is_a4000())
mach = "Amiga 4000";
@ -456,7 +456,7 @@ identifycpu()
fpu = "/FPU";
fputype = FPU_68040; /* XXX */
}
} else
} else
#endif
if (machineid & AMIGA_68040) {
cpu_type = "m68040";
@ -679,7 +679,7 @@ dumpsys()
unsigned bytes, i, n, seg;
int maddr, psize;
daddr_t blkno;
int (*dump) __P((dev_t, daddr_t, caddr_t, size_t));
int (*dump)(dev_t, daddr_t, caddr_t, size_t);
int error = 0;
kcore_seg_t *kseg_p;
cpu_kcore_hdr_t *chdr_p;
@ -822,7 +822,7 @@ microtime(tvp)
void
initcpu()
{
typedef void trapfun __P((void));
typedef void trapfun(void);
/* XXX should init '40 vecs here, too */
#if defined(M68060) || defined(M68040) || defined(DRACO) || defined(FPU_EMULATE)
@ -861,7 +861,7 @@ initcpu()
#ifdef M68060
if (machineid & AMIGA_68060) {
if (machineid & AMIGA_FPU40 && m68060_pcr_init & 2) {
/*
/*
* in this case, we're about to switch the FPU off;
* do a FNOP to avoid stray FP traps later
*/
@ -869,7 +869,7 @@ initcpu()
/* ... and mark FPU as absent for identifyfpu() */
machineid &= ~(AMIGA_FPU40|AMIGA_68882|AMIGA_68881);
}
asm volatile ("movl %0,%%d0; .word 0x4e7b,0x0808" : :
asm volatile ("movl %0,%%d0; .word 0x4e7b,0x0808" : :
"d"(m68060_pcr_init):"d0" );
/* bus/addrerr vectors */
@ -905,7 +905,7 @@ initcpu()
#endif
/*
* Vector initialization for special motherboards
* Vector initialization for special motherboards
*/
#ifdef M68040
#ifdef M68060
@ -926,7 +926,7 @@ initcpu()
#endif
/*
* Vector initialization for special motherboards
* Vector initialization for special motherboards
*/
#ifdef DRACO
@ -1019,7 +1019,7 @@ netintr()
/*
* this is a handy package to have asynchronously executed
* function calls executed at very low interrupt priority.
* Example for use is keyboard repeat, where the repeat
* Example for use is keyboard repeat, where the repeat
* handler running at splclock() triggers such a (hardware
* aided) software interrupt.
* Note: the installed functions are currently called in a
@ -1028,7 +1028,7 @@ netintr()
*/
struct si_callback {
struct si_callback *next;
void (*function) __P((void *rock1, void *rock2));
void (*function)(void *rock1, void *rock2);
void *rock1, *rock2;
};
static struct si_callback *si_callbacks;
@ -1057,7 +1057,7 @@ _softintr_callit(rock1, rock2)
void *
softintr_establish(ipl, func, arg)
int ipl;
void func __P((void *));
void func(void *);
void *arg;
{
struct si_callback *si;
@ -1086,7 +1086,7 @@ softintr_disestablish(hook)
* this will be automatically repaired once we rewirte the soft
* interupt functions.
*/
free(hook, M_TEMP);
}
@ -1120,7 +1120,7 @@ softintr_schedule(vsi)
void
add_sicallback (function, rock1, rock2)
void (*function) __P((void *rock1, void *rock2));
void (*function)(void *rock1, void *rock2);
void *rock1, *rock2;
{
struct si_callback *si;
@ -1166,7 +1166,7 @@ add_sicallback (function, rock1, rock2)
void
rem_sicallback(function)
void (*function) __P((void *rock1, void *rock2));
void (*function)(void *rock1, void *rock2);
{
struct si_callback *si, *psi, *nsi;
int s;
@ -1198,7 +1198,7 @@ call_sicallbacks()
struct si_callback *si;
int s;
void *rock1, *rock2;
void (*function) __P((void *, void *));
void (*function)(void *, void *);
do {
s = splhigh ();
@ -1277,9 +1277,9 @@ add_isr(isr)
default:
break;
}
else
else
#endif
custom.intena = isr->isr_ipl == 2 ?
custom.intena = isr->isr_ipl == 2 ?
INTF_SETCLR | INTF_PORTS :
INTF_SETCLR | INTF_EXTER;
}
@ -1351,7 +1351,7 @@ remove_isr(isr)
}
} else
#endif
custom.intena = isr->isr_ipl == 6 ?
custom.intena = isr->isr_ipl == 6 ?
INTF_EXTER : INTF_PORTS;
}
}
@ -1403,7 +1403,7 @@ intrhand(sr)
/*
* first clear the softint-bit
* then process all classes of softints.
* this order is dicated by the nature of
* this order is dicated by the nature of
* software interrupts. The other order
* allows software interrupts to be missed.
* Also copy and clear ssir to prevent
@ -1462,13 +1462,13 @@ intrhand(sr)
break;
#endif
case 3:
case 3:
/* VBL */
if (ireq & INTF_BLIT)
if (ireq & INTF_BLIT)
blitter_handler();
if (ireq & INTF_COPER)
if (ireq & INTF_COPER)
copper_handler();
if (ireq & INTF_VERTB)
if (ireq & INTF_VERTB)
vbl_handler();
break;
#ifdef DRACO
@ -1522,7 +1522,7 @@ intrhand(sr)
int panicbutton = 1; /* non-zero if panic buttons are enabled */
int crashandburn = 0;
int candbdelay = 50; /* give em half a second */
void candbtimer __P((void));
void candbtimer(void);
struct callout candbtimer_ch = CALLOUT_INITIALIZER;
void
@ -1618,7 +1618,7 @@ int _spllkm6() {
int _spllkm7() {
return spl7();
};
};
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: memlist.h,v 1.4 1994/10/26 02:02:02 cgd Exp $ */
/* $NetBSD: memlist.h,v 1.5 2002/01/26 13:24:54 aymeric Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -31,7 +31,7 @@
*/
/*
* memory list passed by loadbsd
* memory list passed by loadbsd
*/
struct boot_memlist {

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.97 2002/01/02 00:51:33 chs Exp $ */
/* $NetBSD: pmap.c,v 1.98 2002/01/26 13:24:54 aymeric Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
* Copyright (c) 1991 Regents of the University of California.
* All rights reserved.
*
@ -186,8 +186,8 @@ int pmapdebug = PDB_PARANOIA;
#define PMAP_DPRINTF(l, x) if (pmapdebug & (l)) printf x
static void pmap_check_wiring __P((char *, vaddr_t));
static void pmap_pvdump __P((paddr_t));
static void pmap_check_wiring(char *, vaddr_t);
static void pmap_pvdump(paddr_t);
#else
#define PMAP_DPRINTF(l, x)
#endif
@ -302,25 +302,25 @@ extern const vaddr_t amiga_uptbase;
extern paddr_t z2mem_start;
extern vaddr_t reserve_dumppages __P((vaddr_t));
extern vaddr_t reserve_dumppages(vaddr_t);
boolean_t pmap_testbit __P((paddr_t, int));
void pmap_enter_ptpage __P((pmap_t, vaddr_t));
static void pmap_ptpage_addref __P((vaddr_t));
static int pmap_ptpage_delref __P((vaddr_t));
static void pmap_changebit __P((vaddr_t, int, boolean_t));
struct pv_entry * pmap_alloc_pv __P((void));
void pmap_free_pv __P((struct pv_entry *));
void pmap_pinit __P((pmap_t));
void pmap_release __P((pmap_t));
static void pmap_remove_mapping __P((pmap_t, vaddr_t, pt_entry_t *, int));
boolean_t pmap_testbit(paddr_t, int);
void pmap_enter_ptpage(pmap_t, vaddr_t);
static void pmap_ptpage_addref(vaddr_t);
static int pmap_ptpage_delref(vaddr_t);
static void pmap_changebit(vaddr_t, int, boolean_t);
struct pv_entry * pmap_alloc_pv(void);
void pmap_free_pv(struct pv_entry *);
void pmap_pinit(pmap_t);
void pmap_release(pmap_t);
static void pmap_remove_mapping(pmap_t, vaddr_t, pt_entry_t *, int);
static void amiga_protection_init __P((void));
void pmap_collect1 __P((pmap_t, paddr_t, paddr_t));
static void amiga_protection_init(void);
void pmap_collect1(pmap_t, paddr_t, paddr_t);
/* pmap_remove_mapping flags */
#define PRM_TFLUSH 0x01
#define PRM_CFLUSH 0x02
#define PRM_CFLUSH 0x02
#define PRM_KEEPPTPAGE 0x04
@ -427,12 +427,12 @@ pmap_bootstrap(firstaddr, loadaddr)
* XXX is: enabled again, but check real size and position.
* We check z2mem_start is in this segment, and set its end
* to the z2mem_start.
*
*
*/
if ((fromads <= z2mem_start) && (toads > z2mem_start))
toads = z2mem_start;
uvm_page_physload(atop(fromads), atop(toads),
uvm_page_physload(atop(fromads), atop(toads),
atop(fromads), atop(toads), (fromads & 0xff000000) ?
VM_FREELIST_DEFAULT : VM_FREELIST_ZORROII);
physmem += (toads - fromads) / NBPG;
@ -481,7 +481,7 @@ pmap_bootstrap(firstaddr, loadaddr)
SYSMAP(caddr_t ,CMAP2 ,CADDR2 ,1 )
SYSMAP(caddr_t ,vmpte ,vmmap ,1 )
SYSMAP(caddr_t ,msgbufmap ,msgbufaddr ,btoc(MSGBUFSIZE) )
DCIS();
virtual_avail = reserve_dumppages(va);
@ -599,7 +599,7 @@ pmap_init()
/*
* Allocate physical memory for kernel PT pages and their management.
* we need enough pages to map the page tables for each process
* we need enough pages to map the page tables for each process
* plus some slop.
*/
npg = howmany(((maxproc + 16) * AMIGA_UPTSIZE / NPTEPG), NBPG);
@ -1289,19 +1289,19 @@ validate:
*/
#if defined(M68040) || defined(M68060)
#if DEBUG
if (pmapdebug & 0x10000 && mmutype == MMU_68040 &&
if (pmapdebug & 0x10000 && mmutype == MMU_68040 &&
pmap == pmap_kernel()) {
char *s;
if (va >= amiga_uptbase &&
if (va >= amiga_uptbase &&
va < (amiga_uptbase + AMIGA_UPTMAXSIZE))
s = "UPT";
else if (va >= (u_int)Sysmap &&
else if (va >= (u_int)Sysmap &&
va < ((u_int)Sysmap + AMIGA_KPTSIZE))
s = "KPT";
else if (va >= (u_int)pmap->pm_stab &&
else if (va >= (u_int)pmap->pm_stab &&
va < ((u_int)pmap->pm_stab + AMIGA_STSIZE))
s = "KST";
else if (curproc &&
else if (curproc &&
va >= (u_int)curproc->p_vmspace->vm_map.pmap->pm_stab &&
va < ((u_int)curproc->p_vmspace->vm_map.pmap->pm_stab +
AMIGA_STSIZE))
@ -1381,7 +1381,7 @@ pmap_kenter_pa(va, pa, prot)
* Segment table entry not valid, we need a new PT page
*/
if (!pmap_ste_v(pmap, va)) {
if (!pmap_ste_v(pmap, va)) {
s = splvm();
pmap_enter_ptpage(pmap, va);
splx(s);
@ -2465,7 +2465,7 @@ pmap_enter_ptpage(pmap, va)
#if defined(M68060)
stpa = (u_int)pmap->pm_stpa;
if (cputype == CPU_68060) {
while (stpa < (u_int)pmap->pm_stpa +
while (stpa < (u_int)pmap->pm_stpa +
AMIGA_STSIZE) {
pmap_changebit(stpa, PG_CCB, 0);
pmap_changebit(stpa, PG_CI, 1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: simple_busfuncs.c,v 1.2 2000/01/23 21:02:18 aymeric Exp $ */
/* $NetBSD: simple_busfuncs.c,v 1.3 2002/01/26 13:24:55 aymeric Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
/*
* Do NOT use this standalone.
* Instead define the stride (linear, not logarithmic!) in the enclosing
* Instead define the stride (linear, not logarithmic!) in the enclosing
* file (AMIGA_SIMPLE_BUS_STRIDE), then include this one.
* If you want to use it only to provide the functions without creating the
* method array, also define AMIGA_SIMPLE_BUS_NO_ARRAY
@ -56,13 +56,13 @@ Error AMIGA_SIMPLE_BUS_STRIDE not defined in __FILE__, line __LINE__ .
/* function declarations */
int oabs(bsm_)__P((bus_space_tag_t, bus_addr_t, bus_size_t, int,
bus_space_handle_t *));
int oabs(bsm_)(bus_space_tag_t, bus_addr_t, bus_size_t, int,
bus_space_handle_t *);
int oabs(bsms_)__P((bus_space_handle_t, bus_size_t, bus_size_t,
bus_space_handle_t *));
int oabs(bsms_)(bus_space_handle_t, bus_size_t, bus_size_t,
bus_space_handle_t *);
void oabs(bsu_)__P((bus_space_handle_t, bus_size_t));
void oabs(bsu_)(bus_space_handle_t, bus_size_t);
bsr (oabs(bsr1_), u_int8_t);
bsw (oabs(bsw1_), u_int8_t);
@ -141,7 +141,7 @@ oabs(bsrm1_)(handle, offset, pointer, count)
volatile u_int8_t *p;
p = (volatile u_int8_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*pointer++ = *p;
--count;
@ -158,7 +158,7 @@ oabs(bswm1_)(handle, offset, pointer, count)
volatile u_int8_t *p;
p = (volatile u_int8_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*p = *pointer++;
--count;
@ -175,7 +175,7 @@ oabs(bsrr1_)(handle, offset, pointer, count)
volatile u_int8_t *p;
p = (volatile u_int8_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*pointer++ = *p;
p += AMIGA_SIMPLE_BUS_STRIDE;
@ -193,7 +193,7 @@ oabs(bswr1_)(handle, offset, pointer, count)
volatile u_int8_t *p;
p = (volatile u_int8_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*p = *pointer++;
p += AMIGA_SIMPLE_BUS_STRIDE;
@ -211,7 +211,7 @@ oabs(bssr1_)(handle, offset, value, count)
volatile u_int8_t *p;
p = (volatile u_int8_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*p = value;
p += AMIGA_SIMPLE_BUS_STRIDE;
@ -229,7 +229,7 @@ oabs(bscr1_)(handlefrom, from, handleto, to, count)
p = (volatile u_int8_t *)(handlefrom + from * AMIGA_SIMPLE_BUS_STRIDE);
q = (volatile u_int8_t *)(handleto + to * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*q = *p;
p += AMIGA_SIMPLE_BUS_STRIDE;
@ -285,7 +285,7 @@ oabs(bsrm2_)(handle, offset, pointer, count)
volatile u_int16_t *p;
p = (volatile u_int16_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*pointer++ = *p;
--count;
@ -302,7 +302,7 @@ oabs(bswm2_)(handle, offset, pointer, count)
volatile u_int16_t *p;
p = (volatile u_int16_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*p = *pointer++;
--count;
@ -319,7 +319,7 @@ oabs(bsrr2_)(handle, offset, pointer, count)
volatile u_int8_t *p;
p = (volatile u_int8_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*pointer++ = *(volatile u_int16_t *)p;
p += AMIGA_SIMPLE_BUS_STRIDE * sizeof(u_int16_t);
@ -337,7 +337,7 @@ oabs(bswr2_)(handle, offset, pointer, count)
volatile u_int8_t *p;
p = (volatile u_int8_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*(volatile u_int16_t *)p = *pointer++;
p += AMIGA_SIMPLE_BUS_STRIDE * sizeof(u_int16_t);
@ -355,7 +355,7 @@ oabs(bssr2_)(handle, offset, value, count)
volatile u_int8_t *p;
p = (volatile u_int8_t *)(handle + offset * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*(volatile u_int16_t *)p = (unsigned)value;
p += AMIGA_SIMPLE_BUS_STRIDE * sizeof(u_int16_t);
@ -373,7 +373,7 @@ oabs(bscr2_)(handlefrom, from, handleto, to, count)
p = (volatile u_int8_t *)(handlefrom + from * AMIGA_SIMPLE_BUS_STRIDE);
q = (volatile u_int8_t *)(handleto + to * AMIGA_SIMPLE_BUS_STRIDE);
while (count > 0) {
*(volatile u_int16_t *)q = *(volatile u_int16_t *)p;
p += AMIGA_SIMPLE_BUS_STRIDE * sizeof(u_int16_t);
@ -394,7 +394,7 @@ const struct amiga_bus_space_methods oabs(amiga_bus_stride_) = {
oabs(bsu_),
0,
0,
oabs(bsr1_),
oabs(bsw1_),
oabs(bsrm1_),

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.29 2000/12/13 18:13:05 jdolecek Exp $ */
/* $NetBSD: sys_machdep.c,v 1.30 2002/01/26 13:24:55 aymeric Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
@ -122,7 +122,7 @@ cachectl1(req, addr, len, p)
ICPP(pa);
}
break;
case CC_EXTPURGE|CC_PURGE:
case CC_PURGE:
if (doall)
@ -142,7 +142,7 @@ cachectl1(req, addr, len, p)
else if (inc == NBPG)
DCFP(pa);
break;
default:
error = EINVAL;
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.85 2001/06/02 18:09:09 chs Exp $ */
/* $NetBSD: trap.c,v 1.86 2002/01/26 13:24:55 aymeric Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -180,18 +180,18 @@ int mmudebug = 0;
extern struct pcb *curpcb;
extern char fubail[], subail[];
int _write_back __P((u_int, u_int, u_int, u_int, struct vm_map *));
static void userret __P((struct proc *, int, u_quad_t));
void panictrap __P((int, u_int, u_int, struct frame *));
void trapcpfault __P((struct proc *, struct frame *));
void trapmmufault __P((int, u_int, u_int, struct frame *, struct proc *,
u_quad_t));
void trap __P((int, u_int, u_int, struct frame));
int _write_back(u_int, u_int, u_int, u_int, struct vm_map *);
static void userret(struct proc *, int, u_quad_t);
void panictrap(int, u_int, u_int, struct frame *);
void trapcpfault(struct proc *, struct frame *);
void trapmmufault(int, u_int, u_int, struct frame *, struct proc *,
u_quad_t);
void trap(int, u_int, u_int, struct frame);
#ifdef DDB
#include <m68k/db_machdep.h>
int kdb_trap __P((int, db_regs_t *));
int kdb_trap(int, db_regs_t *);
#endif
void _wb_fault __P((void));
void _wb_fault(void);
static void
@ -220,7 +220,7 @@ userret(p, pc, oticks)
*/
if (p->p_flag & P_PROFIL) {
extern int psratio;
addupc_task(p, pc, (int)(p->p_sticks - oticks) * psratio);
}
curcpu()->ci_schedstate.spc_curpriority = p->p_priority;
@ -284,7 +284,7 @@ trapcpfault(p, fp)
int donomore = 0;
void
void
trapmmufault(type, code, v, fp, p, sticks)
int type;
u_int code, v;
@ -326,13 +326,13 @@ trapmmufault(type, code, v, fp, p, sticks)
if (--donomore == 0 || mmudebug & 1) {
char bits[64];
printf ("68060 access error: pc %x, code %s,"
" ea %x\n", fp->f_pc,
" ea %x\n", fp->f_pc,
bitmask_snprintf(code, FSLW_STRING,
bits, sizeof(bits)), v);
}
if (p == oldp && v == oldv && code == oldcode)
panic("Identical fault backtoback!");
if (donomore == 0)
if (donomore == 0)
panic("Tired of faulting.");
oldp = p;
oldv = v;
@ -343,7 +343,7 @@ trapmmufault(type, code, v, fp, p, sticks)
" ea %x, fa %x\n", fp->f_pc, code, fp->f_fmt7.f_ea, v);
if (curpcb)
printf(" curpcb %p\n", curpcb);
#ifdef DDB /* XXX PAGE0 */
if (v < NBPG) /* XXX PAGE0 */
@ -358,7 +358,7 @@ trapmmufault(type, code, v, fp, p, sticks)
if (p)
vm = p->p_vmspace;
if (type == T_MMUFLT &&
if (type == T_MMUFLT &&
(!p || !p->p_addr || p->p_addr->u_pcb.pcb_onfault == 0 || (
#ifdef M68060
machineid & AMIGA_68060 ? code & FSLW_TM_SV :
@ -420,7 +420,7 @@ trapmmufault(type, code, v, fp, p, sticks)
goto nogo;
}
/*
/*
* The 68040 doesn't re-run instructions that cause
* write page faults (unless due to a move16 isntruction).
* So once the page is repaired, we have to write the
@ -430,10 +430,10 @@ trapmmufault(type, code, v, fp, p, sticks)
* address to see if they are in the same page or not.
* If not, then we need to make sure the second page
* is valid, and bring it into memory if it's not.
*
*
* This whole process needs to be repeated for WB3 as well.
* <sigh>
*/
*/
/* Check WB1 */
if (fp->f_fmt7.f_wb1s & WBS_VALID) {
@ -443,14 +443,14 @@ trapmmufault(type, code, v, fp, p, sticks)
/*
* Check WB2
* skip if it's for a move16 instruction
* skip if it's for a move16 instruction
*/
if(fp->f_fmt7.f_wb2s & WBS_VALID &&
((fp->f_fmt7.f_wb2s & WBS_TTMASK)==WBS_TT_MOVE16) == 0) {
if (_write_back(2, fp->f_fmt7.f_wb2s,
if (_write_back(2, fp->f_fmt7.f_wb2s,
fp->f_fmt7.f_wb2d, fp->f_fmt7.f_wb2a, map) != 0)
goto nogo;
if ((fp->f_fmt7.f_wb2s & WBS_TMMASK)
if ((fp->f_fmt7.f_wb2s & WBS_TMMASK)
!= (code & SSW_TMMASK))
panictrap(type, code, v, fp);
}
@ -463,7 +463,7 @@ trapmmufault(type, code, v, fp, p, sticks)
wb3_map = kernel_map;
else
wb3_map = &vm->vm_map;
if (_write_back(3, fp->f_fmt7.f_wb3s,
if (_write_back(3, fp->f_fmt7.f_wb3s,
fp->f_fmt7.f_wb3d, fp->f_fmt7.f_wb3a, wb3_map) != 0)
goto nogo;
}
@ -489,7 +489,7 @@ trapmmufault(type, code, v, fp, p, sticks)
if (rv == 0) {
if (type == T_MMUFLT)
return;
userret(p, fp->f_pc, sticks);
userret(p, fp->f_pc, sticks);
return;
}
#else /* use hacky 386bsd_code */
@ -501,7 +501,7 @@ trapmmufault(type, code, v, fp, p, sticks)
vm->vm_ssize = nss;
if (type == T_MMUFLT)
return;
userret(p, fp->f_pc, sticks);
userret(p, fp->f_pc, sticks);
return;
}
nogo:
@ -522,12 +522,12 @@ nogo:
p->p_pid, p->p_comm,
p->p_cred && p->p_ucred ? p->p_ucred->cr_uid : -1);
trapsignal(p, SIGKILL, v);
} else {
} else {
trapsignal(p, SIGSEGV, v);
}
if ((type & T_USER) == 0)
return;
userret(p, fp->f_pc, sticks);
userret(p, fp->f_pc, sticks);
}
/*
* Trap is called from locore to handle most types of processor traps,
@ -595,7 +595,7 @@ trap(type, code, v, frame)
i = SIGILL;
break;
/*
* divde by zero, CHK/TRAPV inst
* divde by zero, CHK/TRAPV inst
*/
case T_ZERODIV|T_USER:
case T_CHKINST|T_USER:
@ -603,7 +603,7 @@ trap(type, code, v, frame)
ucode = frame.f_format;
i = SIGFPE;
break;
case T_FPEMULI|T_USER:
case T_FPEMULD|T_USER:
#ifdef FPU_EMULATE
@ -616,15 +616,15 @@ trap(type, code, v, frame)
break;
#ifdef FPCOPROC
/*
/*
* User coprocessor violation
*/
case T_COPERR|T_USER:
ucode = 0;
i = SIGFPE; /* XXX What is a proper response here? */
break;
/*
* 6888x exceptions
/*
* 6888x exceptions
*/
case T_FPERR|T_USER:
/*
@ -640,7 +640,7 @@ trap(type, code, v, frame)
ucode = code;
i = SIGFPE;
break;
/*
/*
* Kernel coprocessor violation
*/
case T_COPERR:
@ -698,7 +698,7 @@ trap(type, code, v, frame)
frame.f_sr &= ~PSL_T;
i = SIGTRAP;
break;
/*
/*
* Kernel AST (should not happen)
*/
case T_ASTFLT:
@ -713,7 +713,7 @@ trap(type, code, v, frame)
p->p_flag &= ~P_OWEUPC;
ADDUPROF(p);
}
userret(p, frame.f_pc, sticks);
userret(p, frame.f_pc, sticks);
return;
/*
* Kernel/User page fault
@ -740,7 +740,7 @@ trap(type, code, v, frame)
trapsignal(p, i, ucode);
if ((type & T_USER) == 0)
return;
userret(p, frame.f_pc, sticks);
userret(p, frame.f_pc, sticks);
}
/*
@ -790,8 +790,8 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
if (mmudebug)
printf("wb3: need to bring in first page\n");
#endif
wb_rc = uvm_fault(wb_map,
trunc_page((vm_offset_t)wb_addr),
wb_rc = uvm_fault(wb_map,
trunc_page((vm_offset_t)wb_addr),
0, VM_PROT_READ | VM_PROT_WRITE);
if (wb_rc != 0)
@ -812,7 +812,7 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
#ifdef DEBUG
if (mmudebug)
printf("wb%d: probeva %x %x = %x\n",
wb, wb_addr + wb_extra_page,
wb, wb_addr + wb_extra_page,
wb_sts & WBS_TMMASK,mmusr);
#endif
@ -823,7 +823,7 @@ _write_back (wb, wb_sts, wb_data, wb_addr, wb_map)
" Bringing in extra page.\n",wb);
#endif
wb_rc = uvm_fault(wb_map,
wb_rc = uvm_fault(wb_map,
trunc_page((vm_offset_t)wb_addr + wb_extra_page),
0, VM_PROT_READ | VM_PROT_WRITE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.61 2001/09/10 21:19:10 chris Exp $ */
/* $NetBSD: vm_machdep.c,v 1.62 2002/01/26 13:24:55 aymeric Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -64,7 +64,7 @@
/*
* Finish a fork operation, with process p2 nearly set up.
* Copy and update the pcb and trap frame, making the child ready to run.
*
*
* Rig the child's kernel stack so that it will start out in
* proc_trampoline() and call child_return() with p2 as an
* argument. This causes the newly-created child process to go
@ -84,7 +84,7 @@ cpu_fork(p1, p2, stack, stacksize, func, arg)
register struct proc *p1, *p2;
void *stack;
size_t stacksize;
void (*func) __P((void *));
void (*func)(void *);
void *arg;
{
register struct pcb *pcb = &p2->p_addr->u_pcb;
@ -179,7 +179,7 @@ pagemove(from, to, size)
* Map `size' bytes of physical memory starting at `paddr' into
* kernel VA space at `vaddr'. Read/write and cache-inhibit status
* are specified by `prot'.
*/
*/
void
physaccess(vaddr, paddr, size, prot)
caddr_t vaddr, paddr;