Get rid of AMIGA_UPTBASE.

Replace it by a variable, which is initialized in amiga_init.c.
This will make the kernel actually work even if we have lots of Zorro-III
(or DraCo direct bus) i/o space.
This commit is contained in:
is 1998-08-12 19:46:12 +00:00
parent c587bae132
commit 8b950c2a65
3 changed files with 19 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: amiga_init.c,v 1.61 1998/05/24 19:32:37 is Exp $ */ /* $NetBSD: amiga_init.c,v 1.62 1998/08/12 19:46:12 is Exp $ */
/* /*
* Copyright (c) 1994 Michael L. Hitch * Copyright (c) 1994 Michael L. Hitch
@ -70,6 +70,7 @@ extern u_int virtual_avail;
extern int protostfree; extern int protostfree;
#endif #endif
extern u_long boot_partition; extern u_long boot_partition;
vm_offset_t amiga_uptbase;
extern char *esym; extern char *esym;
@ -714,6 +715,15 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync, boot_part
RELOC(lowram, u_int) = fphystart; RELOC(lowram, u_int) = fphystart;
RELOC(physmem, u_int) = fphysize >> PGSHIFT; RELOC(physmem, u_int) = fphysize >> PGSHIFT;
/*
* Put user page tables starting at next 16MB boundary, to make kernel
* dumps more readable, with guaranteed 16MB of.
* XXX depends on Sysmap being last.
* XXX maybe even at 256 MB boundary?
*/
RELOC(amiga_uptbase, vm_offset_t) =
roundup(RELOC(Sysmap, u_int) + 0x1000000, 0x1000000);
/* /*
* get the pmap module in sync with reality. * get the pmap module in sync with reality.
*/ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.53 1998/07/14 03:17:05 mhitch Exp $ */ /* $NetBSD: pmap.c,v 1.54 1998/08/12 19:46:13 is Exp $ */
/* /*
* Copyright (c) 1991 Regents of the University of California. * Copyright (c) 1991 Regents of the University of California.
@ -262,6 +262,7 @@ extern caddr_t msgbufaddr;
extern vm_offset_t msgbufpa; extern vm_offset_t msgbufpa;
u_long noncontig_enable; u_long noncontig_enable;
extern const vm_offset_t amiga_uptbase;
extern vm_offset_t z2mem_start; extern vm_offset_t z2mem_start;
@ -660,7 +661,7 @@ pmap_init()
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE, st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
FALSE, &st_map_store); FALSE, &st_map_store);
addr = AMIGA_UPTBASE; addr = amiga_uptbase;
if ((AMIGA_UPTMAXSIZE / AMIGA_UPTSIZE) < maxproc) { if ((AMIGA_UPTMAXSIZE / AMIGA_UPTSIZE) < maxproc) {
s = AMIGA_UPTMAXSIZE; s = AMIGA_UPTMAXSIZE;
/* /*
@ -679,7 +680,7 @@ pmap_init()
* Slightly modified version of kmem_suballoc() to get page table * Slightly modified version of kmem_suballoc() to get page table
* map where we want it. * map where we want it.
*/ */
addr = AMIGA_UPTBASE; addr = amiga_uptbase;
s = min(AMIGA_UPTMAXSIZE, maxproc * AMIGA_UPTSIZE); s = min(AMIGA_UPTMAXSIZE, maxproc * AMIGA_UPTSIZE);
addr2 = addr + s; addr2 = addr + s;
rv = vm_map_find(kernel_map, NULL, 0, &addr, s, TRUE); rv = vm_map_find(kernel_map, NULL, 0, &addr, s, TRUE);
@ -1644,8 +1645,8 @@ validate:
if (pmapdebug & 0x10000 && mmutype == MMU_68040 && if (pmapdebug & 0x10000 && mmutype == MMU_68040 &&
pmap == pmap_kernel()) { pmap == pmap_kernel()) {
char *s; char *s;
if (va >= AMIGA_UPTBASE && if (va >= amiga_uptbase &&
va < (AMIGA_UPTBASE + AMIGA_UPTMAXSIZE)) va < (amiga_uptbase + AMIGA_UPTMAXSIZE))
s = "UPT"; s = "UPT";
else if (va >= (u_int)Sysmap && else if (va >= (u_int)Sysmap &&
va < ((u_int)Sysmap + AMIGA_KPTSIZE)) va < ((u_int)Sysmap + AMIGA_KPTSIZE))
@ -1666,7 +1667,7 @@ validate:
} }
#endif #endif
if (mmutype == MMU_68040 && pmap == pmap_kernel() && ( if (mmutype == MMU_68040 && pmap == pmap_kernel() && (
(va >= AMIGA_UPTBASE && va < (AMIGA_UPTBASE + AMIGA_UPTMAXSIZE)) || (va >= amiga_uptbase && va < (amiga_uptbase + AMIGA_UPTMAXSIZE)) ||
(va >= (u_int)Sysmap && va < ((u_int)Sysmap + AMIGA_KPTSIZE)))) (va >= (u_int)Sysmap && va < ((u_int)Sysmap + AMIGA_KPTSIZE))))
cacheable = FALSE; /* don't cache user page tables */ cacheable = FALSE; /* don't cache user page tables */
#endif #endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: pte.h,v 1.14 1995/09/29 13:52:09 chopps Exp $ */ /* $NetBSD: pte.h,v 1.15 1998/08/12 19:46:13 is Exp $ */
/* /*
* Copyright (c) 1988 University of Utah. * Copyright (c) 1988 University of Utah.
@ -126,7 +126,6 @@ typedef u_int st_entry_t; /* segment table entry */
*/ */
#define AMIGA_MAX_COREUPT 1024 #define AMIGA_MAX_COREUPT 1024
#define AMIGA_UPTSIZE roundup(VM_MAXUSER_ADDRESS / NPTEPG, NBPG) #define AMIGA_UPTSIZE roundup(VM_MAXUSER_ADDRESS / NPTEPG, NBPG)
#define AMIGA_UPTBASE 0x10000000
#define AMIGA_UPTMAXSIZE \ #define AMIGA_UPTMAXSIZE \
roundup((AMIGA_MAX_COREUPT * AMIGA_UPTSIZE), NBPG) roundup((AMIGA_MAX_COREUPT * AMIGA_UPTSIZE), NBPG)
#define AMIGA_MAX_KPTSIZE \ #define AMIGA_MAX_KPTSIZE \