Fixed the bug that crept into giving support for moving IOMDs during startup.

Initially I gave it the type `int *iomd_base' but some macro's defined in
iomdreg.h calculated with the value asuming it to be an int ... thus all the
registers offsets were multiplied by four and that can only mean trouble !
The kernel boots again ever happily. Sorry for the inconvenience... it was
a good bug hunt though!
This commit is contained in:
reinoud 2001-03-02 01:46:57 +00:00
parent 33090db137
commit 5cc6423696
3 changed files with 12 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: iomd.c,v 1.7 2001/02/25 23:59:48 reinoud Exp $ */
/* $NetBSD: iomd.c,v 1.8 2001/03/02 01:46:57 reinoud Exp $ */
/*
* Copyright (c) 1996-1997 Mark Brinicombe.
@ -91,8 +91,8 @@ struct cfattach iomd_ca = {
extern struct bus_space iomd_bs_tag;
int iomd_found;
int *iomd_base = (int *) IOMD_BASE;
int iomd_found;
u_int32_t iomd_base = IOMD_BASE;
/* Declare prototypes */

View File

@ -1,4 +1,4 @@
/* $NetBSD: iomdvar.h,v 1.2 2001/02/27 20:23:11 reinoud Exp $ */
/* $NetBSD: iomdvar.h,v 1.3 2001/03/02 01:46:57 reinoud Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@ -119,5 +119,6 @@ union iomd_attach_args {
/*
* IOMD_BASE register variable
*/
extern int *iomd_base;
extern u_int32_t iomd_base;
/* End of iomdvar.h */

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpc_machdep.c,v 1.42 2001/02/27 20:23:12 reinoud Exp $ */
/* $NetBSD: rpc_machdep.c,v 1.43 2001/03/02 01:46:57 reinoud Exp $ */
/*
* Copyright (c) 2000-2001 Reinoud Zandijk.
@ -112,8 +112,8 @@ videomemory_t videomemory; /* Video memory descriptor */
char *boot_args = NULL;
char *boot_file = NULL;
extern int *vidc_base;
extern int *iomd_base;
extern int *vidc_base;
extern u_int32_t iomd_base;
vm_offset_t physical_start;
vm_offset_t physical_freestart;
@ -452,7 +452,7 @@ initarm_new_bootloader(bootconf)
videomemory.vidm_type = VIDEOMEM_TYPE_DRAM
;
vidc_base = (int *) VIDC_HW_BASE;
iomd_base = (int *) IOMD_HW_BASE;
iomd_base = IOMD_HW_BASE;
/*
* Initialise the physical console
@ -832,7 +832,7 @@ initarm_new_bootloader(bootconf)
bootconfig.display_start = VMEM_VBASE;
};
vidc_base = (int *) VIDC_BASE;
iomd_base = (int *) IOMD_BASE;
iomd_base = IOMD_BASE;
physcon_display_base(VMEM_VBASE);
vidcrender_reinit();
@ -1275,7 +1275,7 @@ initarm_old_bootloader(bootconf)
videomemory.vidm_type = VIDEOMEM_TYPE_DRAM;
};
vidc_base = (int *) VIDC_BASE;
iomd_base = (int *) IOMD_BASE;
iomd_base = IOMD_BASE;
/*
* Initialise the physical console