1 /* $NetBSD: pmap_bootstrap.c,v 1.48 1998/12/22 08:47:07 scottr Exp $ */ 2 3 /* 4 * Copyright (c) 1991, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * the Systems Programming Group of the University of Utah Computer 9 * Science Department. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 3. All advertising materials mentioning features or use of this software 20 * must display the following acknowledgement: 21 * This product includes software developed by the University of 22 * California, Berkeley and its contributors. 23 * 4. Neither the name of the University nor the names of its contributors 24 * may be used to endorse or promote products derived from this software 25 * without specific prior written permission. 26 * 27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)pmap_bootstrap.c 8.1 (Berkeley) 6/10/93 40 */ 41 42 #include "opt_ddb.h" 43 44 #include <sys/param.h> 45 #include <sys/systm.h> 46 #include <sys/reboot.h> 47 48 #include <vm/vm.h> 49 50 #include <machine/pte.h> 51 #include <mac68k/mac68k/clockreg.h> 52 #include <machine/vmparam.h> 53 #include <machine/cpu.h> 54 #include <machine/pmap.h> 55 #include <machine/autoconf.h> 56 57 #include <ufs/mfs/mfs_extern.h> 58 59 #include <mac68k/mac68k/macrom.h> 60 61 #define PA2VA(v, t) (t)((u_int)(v) - firstpa) 62 63 extern char *etext; 64 extern int Sysptsize; 65 extern char *extiobase, *proc0paddr; 66 extern st_entry_t *Sysseg; 67 extern pt_entry_t *Sysptmap, *Sysmap; 68 69 extern int physmem; 70 extern int avail_remaining, avail_range, avail_end; 71 extern paddr_t avail_start, avail_next; 72 extern vaddr_t virtual_avail, virtual_end; 73 extern vm_size_t mem_size; 74 extern int protection_codes[]; 75 76 extern int zsinited; 77 78 /* 79 * These are used to map the RAM: 80 */ 81 int numranges; /* = 0 == don't use the ranges */ 82 u_long low[8]; 83 u_long high[8]; 84 u_long maxaddr; /* PA of the last physical page */ 85 int vidlen; 86 #define VIDMAPSIZE btoc(vidlen) 87 extern u_int32_t mac68k_vidphys; 88 extern u_int32_t videoaddr; 89 extern u_int32_t videorowbytes; 90 extern u_int32_t videosize; 91 static u_int32_t newvideoaddr; 92 93 extern caddr_t ROMBase; 94 95 /* 96 * Special purpose kernel virtual addresses, used for mapping 97 * physical pages for a variety of temporary or permanent purposes: 98 * 99 * CADDR1, CADDR2: pmap zero/copy operations 100 * vmmap: /dev/mem, crash dumps, parity error checking 101 * msgbufaddr: kernel message buffer 102 */ 103 caddr_t CADDR1, CADDR2, vmmap; 104 extern caddr_t msgbufaddr; 105 106 void pmap_bootstrap __P((paddr_t, paddr_t)); 107 void bootstrap_mac68k __P((int)); 108 109 /* 110 * Bootstrap the VM system. 111 * 112 * This is called with the MMU either on or off. If it's on, we assume 113 * that it's mapped with the same PA <=> LA mapping that we eventually 114 * want. The page sizes and the protections will be wrong, anyway. 115 * 116 * nextpa is the first address following the loaded kernel. On a IIsi 117 * on 12 May 1996, that was 0xf9000 beyond firstpa. 118 */ 119 void 120 pmap_bootstrap(nextpa, firstpa) 121 paddr_t nextpa; 122 paddr_t firstpa; 123 { 124 paddr_t kstpa, kptpa, vidpa, iiopa, rompa, kptmpa, lkptpa, p0upa; 125 u_int nptpages, kstsize; 126 int i; 127 st_entry_t protoste, *ste; 128 pt_entry_t protopte, *pte, *epte; 129 130 vidlen = m68k_round_page(((videosize >> 16) & 0xffff) * videorowbytes + 131 (mac68k_vidphys & PGOFSET)); 132 133 /* 134 * Calculate important physical addresses: 135 * 136 * kstpa kernel segment table 1 page (!040) 137 * N pages (040) 138 * 139 * kptpa statically allocated 140 * kernel PT pages Sysptsize+ pages 141 * 142 * vidpa internal video space for some machines 143 * PT pages VIDMAPSIZE pages 144 * 145 * rompa ROM space 146 * PT pages ROMMAPSIZE pages 147 * 148 * iiopa internal IO space 149 * PT pages IIOMAPSIZE pages 150 * 151 * [ Sysptsize is the number of pages of PT, IIOMAPSIZE and 152 * NBMAPSIZE are the number of PTEs, hence we need to round 153 * the total to a page boundary with IO maps at the end. ] 154 * 155 * kptmpa kernel PT map 1 page 156 * 157 * lkptpa last kernel PT page 1 page 158 * 159 * p0upa proc 0 u-area UPAGES pages 160 * 161 */ 162 if (mmutype == MMU_68040) 163 kstsize = MAXKL2SIZE / (NPTEPG/SG4_LEV2SIZE); 164 else 165 kstsize = 1; 166 kstpa = nextpa; 167 nextpa += kstsize * NBPG; 168 kptpa = nextpa; 169 nptpages = Sysptsize + 170 (IIOMAPSIZE + ROMMAPSIZE + VIDMAPSIZE + NPTEPG - 1) / NPTEPG; 171 nextpa += nptpages * NBPG; 172 vidpa = nextpa - VIDMAPSIZE * sizeof(pt_entry_t); 173 rompa = vidpa - ROMMAPSIZE * sizeof(pt_entry_t); 174 iiopa = rompa - IIOMAPSIZE * sizeof(pt_entry_t); 175 kptmpa = nextpa; 176 nextpa += NBPG; 177 lkptpa = nextpa; 178 nextpa += NBPG; 179 p0upa = nextpa; 180 nextpa += USPACE; 181 182 #if 0 183 if (nextpa > high[0]) { 184 printf("Failure in NetBSD boot; nextpa=0x%lx, high[0]=0x%lx.\n", 185 nextpa, high[0]); 186 printf("You're hosed! Try booting with 32-bit addressing "); 187 printf("enabled in the memory control panel.\n"); 188 printf("Older machines may need Mode32 to get that option.\n"); 189 panic("Cannot work with the current memory mappings.\n"); 190 } 191 #endif 192 193 /* 194 * Initialize segment table and kernel page table map. 195 * 196 * On 68030s and earlier MMUs the two are identical except for 197 * the valid bits so both are initialized with essentially the 198 * same values. On the 68040, which has a mandatory 3-level 199 * structure, the segment table holds the level 1 table and part 200 * (or all) of the level 2 table and hence is considerably 201 * different. Here the first level consists of 128 descriptors 202 * (512 bytes) each mapping 32mb of address space. Each of these 203 * points to blocks of 128 second level descriptors (512 bytes) 204 * each mapping 256kb. Note that there may be additional "segment 205 * table" pages depending on how large MAXKL2SIZE is. 206 * 207 * XXX cramming two levels of mapping into the single "segment" 208 * table on the 68040 is intended as a temporary hack to get things 209 * working. The 224mb of address space that this allows will most 210 * likely be insufficient in the future (at least for the kernel). 211 */ 212 if (mmutype == MMU_68040) { 213 int num; 214 215 /* 216 * First invalidate the entire "segment table" pages 217 * (levels 1 and 2 have the same "invalid" value). 218 */ 219 pte = PA2VA(kstpa, u_int *); 220 epte = &pte[kstsize * NPTEPG]; 221 while (pte < epte) 222 *pte++ = SG_NV; 223 /* 224 * Initialize level 2 descriptors (which immediately 225 * follow the level 1 table). We need: 226 * NPTEPG / SG4_LEV3SIZE 227 * level 2 descriptors to map each of the nptpages+1 228 * pages of PTEs. Note that we set the "used" bit 229 * now to save the HW the expense of doing it. 230 */ 231 num = (nptpages + 1) * (NPTEPG / SG4_LEV3SIZE); 232 pte = &(PA2VA(kstpa, u_int *))[SG4_LEV1SIZE]; 233 epte = &pte[num]; 234 protoste = kptpa | SG_U | SG_RW | SG_V; 235 while (pte < epte) { 236 *pte++ = protoste; 237 protoste += (SG4_LEV3SIZE * sizeof(st_entry_t)); 238 } 239 /* 240 * Initialize level 1 descriptors. We need: 241 * roundup(num, SG4_LEV2SIZE) / SG4_LEV2SIZE 242 * level 1 descriptors to map the `num' level 2's. 243 */ 244 pte = PA2VA(kstpa, u_int *); 245 epte = &pte[roundup(num, SG4_LEV2SIZE) / SG4_LEV2SIZE]; 246 protoste = (u_int)&pte[SG4_LEV1SIZE] | SG_U | SG_RW | SG_V; 247 while (pte < epte) { 248 *pte++ = protoste; 249 protoste += (SG4_LEV2SIZE * sizeof(st_entry_t)); 250 } 251 /* 252 * Initialize the final level 1 descriptor to map the last 253 * block of level 2 descriptors. 254 */ 255 ste = &(PA2VA(kstpa, u_int*))[SG4_LEV1SIZE-1]; 256 pte = &(PA2VA(kstpa, u_int*))[kstsize*NPTEPG - SG4_LEV2SIZE]; 257 *ste = (u_int)pte | SG_U | SG_RW | SG_V; 258 /* 259 * Now initialize the final portion of that block of 260 * descriptors to map the "last PT page". 261 */ 262 pte = &(PA2VA(kstpa, u_int*)) 263 [kstsize*NPTEPG - NPTEPG/SG4_LEV3SIZE]; 264 epte = &pte[NPTEPG/SG4_LEV3SIZE]; 265 protoste = lkptpa | SG_U | SG_RW | SG_V; 266 while (pte < epte) { 267 *pte++ = protoste; 268 protoste += (SG4_LEV3SIZE * sizeof(st_entry_t)); 269 } 270 /* 271 * Initialize Sysptmap 272 */ 273 pte = PA2VA(kptmpa, u_int *); 274 epte = &pte[nptpages+1]; 275 protopte = kptpa | PG_RW | PG_CI | PG_V; 276 while (pte < epte) { 277 *pte++ = protopte; 278 protopte += NBPG; 279 } 280 /* 281 * Invalidate all but the last remaining entries in both. 282 */ 283 epte = &(PA2VA(kptmpa, u_int *))[NPTEPG-1]; 284 while (pte < epte) { 285 *pte++ = PG_NV; 286 } 287 /* 288 * Initialize the last to point to the page 289 * table page allocated earlier. 290 */ 291 *pte = lkptpa | PG_RW | PG_CI | PG_V; 292 } else { 293 /* 294 * Map the page table pages in both the HW segment table 295 * and the software Sysptmap. Note that Sysptmap is also 296 * considered a PT page hence the +1. 297 */ 298 ste = PA2VA(kstpa, u_int*); 299 pte = PA2VA(kptmpa, u_int*); 300 epte = &pte[nptpages+1]; 301 protoste = kptpa | SG_RW | SG_V; 302 protopte = kptpa | PG_RW | PG_CI | PG_V; 303 while (pte < epte) { 304 *ste++ = protoste; 305 *pte++ = protopte; 306 protoste += NBPG; 307 protopte += NBPG; 308 } 309 /* 310 * Invalidate all but the last remaining entries in both. 311 */ 312 epte = &(PA2VA(kptmpa, u_int *))[NPTEPG-1]; 313 while (pte < epte) { 314 *ste++ = SG_NV; 315 *pte++ = PG_NV; 316 } 317 /* 318 * Initialize the last to point to point to the page 319 * table page allocated earlier. 320 */ 321 *ste = lkptpa | SG_RW | SG_V; 322 *pte = lkptpa | PG_RW | PG_CI | PG_V; 323 } 324 /* 325 * Invalidate all entries in the last kernel PT page 326 * (u-area PTEs will be validated later). 327 */ 328 pte = PA2VA(lkptpa, u_int *); 329 epte = &pte[NPTEPG]; 330 while (pte < epte) 331 *pte++ = PG_NV; 332 333 /* 334 * Initialize kernel page table. 335 * Start by invalidating the `nptpages' that we have allocated. 336 */ 337 pte = PA2VA(kptpa, u_int *); 338 epte = &pte[nptpages * NPTEPG]; 339 while (pte < epte) 340 *pte++ = PG_NV; 341 342 /* 343 * Validate PTEs for kernel text (RO) 344 */ 345 pte = &(PA2VA(kptpa, u_int *))[m68k_btop(KERNBASE)]; 346 epte = &pte[m68k_btop(m68k_trunc_page(&etext))]; 347 #if defined(KGDB) || defined(DDB) 348 protopte = firstpa | PG_RW | PG_V; /* XXX RW for now */ 349 #else 350 protopte = firstpa | PG_RO | PG_V; 351 #endif 352 while (pte < epte) { 353 *pte++ = protopte; 354 protopte += NBPG; 355 } 356 /* 357 * Validate PTEs for kernel data/bss, dynamic data allocated 358 * by us so far (nextpa - firstpa bytes), and pages for proc0 359 * u-area and page table allocated below (RW). 360 */ 361 epte = &(PA2VA(kptpa, u_int *))[m68k_btop(nextpa - firstpa)]; 362 protopte = (protopte & ~PG_PROT) | PG_RW; 363 /* 364 * Enable copy-back caching of data pages 365 */ 366 if (mmutype == MMU_68040) 367 protopte |= PG_CCB; 368 while (pte < epte) { 369 *pte++ = protopte; 370 protopte += NBPG; 371 } 372 /* 373 * Finally, validate the internal IO space, ROM space, and 374 * framebuffer PTEs (RW+CI). 375 */ 376 pte = PA2VA(iiopa, u_int *); 377 epte = PA2VA(rompa, u_int *); 378 protopte = IOBase | PG_RW | PG_CI | PG_V; 379 while (pte < epte) { 380 *pte++ = protopte; 381 protopte += NBPG; 382 } 383 384 pte = PA2VA(rompa, u_int *); 385 epte = PA2VA(vidpa, u_int *); 386 protopte = ((u_int) ROMBase) | PG_RO | PG_V; 387 while (pte < epte) { 388 *pte++ = protopte; 389 protopte += NBPG; 390 } 391 392 if (vidlen) { 393 pte = PA2VA(vidpa, u_int *); 394 epte = pte + VIDMAPSIZE; 395 protopte = (mac68k_vidphys & ~PGOFSET) | PG_RW | PG_V | PG_CI; 396 while (pte < epte) { 397 *pte++ = protopte; 398 protopte += NBPG; 399 } 400 } 401 402 /* 403 * Calculate important exported kernel virtual addresses 404 */ 405 /* 406 * Sysseg: base of kernel segment table 407 */ 408 Sysseg = PA2VA(kstpa, st_entry_t *); 409 /* 410 * Sysptmap: base of kernel page table map 411 */ 412 Sysptmap = PA2VA(kptmpa, pt_entry_t *); 413 /* 414 * Sysmap: kernel page table (as mapped through Sysptmap) 415 * Immediately follows `nptpages' of static kernel page table. 416 */ 417 Sysmap = (pt_entry_t *)m68k_ptob(nptpages * NPTEPG); 418 419 IOBase = (u_long)m68k_ptob(nptpages * NPTEPG - 420 (IIOMAPSIZE + ROMMAPSIZE + VIDMAPSIZE)); 421 422 ROMBase = (char *)m68k_ptob(nptpages * NPTEPG - 423 (ROMMAPSIZE + VIDMAPSIZE)); 424 425 if (vidlen) { 426 newvideoaddr = (u_int32_t)m68k_ptob(nptpages * NPTEPG - 427 VIDMAPSIZE) + (mac68k_vidphys & PGOFSET); 428 } 429 430 /* 431 * Setup u-area for process 0. 432 */ 433 /* 434 * Zero the u-area. 435 * NOTE: `pte' and `epte' aren't PTEs here. 436 */ 437 pte = PA2VA(p0upa, u_int *); 438 epte = (u_int *)(PA2VA(p0upa, u_int) + USPACE); 439 while (pte < epte) 440 *pte++ = 0; 441 /* 442 * Remember the u-area address so it can be loaded in the 443 * proc struct p_addr field later. 444 */ 445 proc0paddr = PA2VA(p0upa, char *); 446 447 /* 448 * VM data structures are now initialized, set up data for 449 * the pmap module. 450 * 451 * Note about avail_end: msgbuf is initialized just after 452 * avail_end in machdep.c. Since the last page is used 453 * for rebooting the system (code is copied there and 454 * excution continues from copied code before the MMU 455 * is disabled), the msgbuf will get trounced between 456 * reboots if it's placed in the last physical page. 457 * To work around this, we move avail_end back one more 458 * page so the msgbuf can be preserved. 459 */ 460 avail_next = avail_start = m68k_round_page(nextpa); 461 avail_remaining = 0; 462 avail_range = -1; 463 for (i = 0; i < numranges; i++) { 464 if (low[i] <= avail_next && avail_next < high[i]) { 465 avail_range = i; 466 avail_remaining = high[i] - avail_next; 467 } else if (avail_range != -1) { 468 avail_remaining += (high[i] - low[i]); 469 } 470 } 471 physmem = m68k_btop(avail_remaining + nextpa - firstpa); 472 473 maxaddr = high[numranges - 1] - m68k_ptob(1); 474 high[numranges - 1] -= (m68k_round_page(MSGBUFSIZE) + m68k_ptob(1)); 475 avail_remaining -= (m68k_round_page(MSGBUFSIZE) + m68k_ptob(1)); 476 avail_end = high[numranges - 1]; 477 avail_remaining = m68k_btop(m68k_trunc_page(avail_remaining)); 478 479 mem_size = m68k_ptob(physmem); 480 virtual_avail = VM_MIN_KERNEL_ADDRESS + (nextpa - firstpa); 481 virtual_end = VM_MAX_KERNEL_ADDRESS; 482 483 /* 484 * Initialize protection array. 485 * XXX don't use a switch statement, it might produce an 486 * absolute "jmp" table. 487 */ 488 { 489 int *kp; 490 491 kp = (int *) &protection_codes; 492 kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; 493 kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; 494 kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; 495 kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; 496 kp[VM_PROT_NONE|VM_PROT_WRITE|VM_PROT_NONE] = PG_RW; 497 kp[VM_PROT_NONE|VM_PROT_WRITE|VM_PROT_EXECUTE] = PG_RW; 498 kp[VM_PROT_READ|VM_PROT_WRITE|VM_PROT_NONE] = PG_RW; 499 kp[VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE] = PG_RW; 500 } 501 502 /* 503 * Kernel page/segment table allocated in locore, 504 * just initialize pointers. 505 */ 506 { 507 struct pmap *kpm = (struct pmap *)&kernel_pmap_store; 508 509 kpm->pm_stab = Sysseg; 510 kpm->pm_ptab = Sysmap; 511 simple_lock_init(&kpm->pm_lock); 512 kpm->pm_count = 1; 513 kpm->pm_stpa = (st_entry_t *)kstpa; 514 /* 515 * For the 040 we also initialize the free level 2 516 * descriptor mask noting that we have used: 517 * 0: level 1 table 518 * 1 to `num': map page tables 519 * MAXKL2SIZE-1: maps last-page page table 520 */ 521 if (mmutype == MMU_68040) { 522 int num; 523 524 kpm->pm_stfree = ~l2tobm(0); 525 num = roundup((nptpages + 1) * (NPTEPG / SG4_LEV3SIZE), 526 SG4_LEV2SIZE) / SG4_LEV2SIZE; 527 while (num) 528 kpm->pm_stfree &= ~l2tobm(num--); 529 kpm->pm_stfree &= ~l2tobm(MAXKL2SIZE-1); 530 for (num = MAXKL2SIZE; 531 num < sizeof(kpm->pm_stfree)*NBBY; 532 num++) 533 kpm->pm_stfree &= ~l2tobm(num); 534 } 535 } 536 537 /* 538 * Allocate some fixed, special purpose kernel virtual addresses 539 */ 540 { 541 vaddr_t va = virtual_avail; 542 543 CADDR1 = (caddr_t)va; 544 va += NBPG; 545 CADDR2 = (caddr_t)va; 546 va += NBPG; 547 vmmap = (caddr_t)va; 548 va += NBPG; 549 msgbufaddr = (caddr_t)va; 550 va += m68k_round_page(MSGBUFSIZE); 551 virtual_avail = va; 552 } 553 } 554 555 void 556 bootstrap_mac68k(tc) 557 int tc; 558 { 559 extern void zs_init __P((void)); 560 extern int *esym; 561 paddr_t nextpa; 562 caddr_t oldROMBase; 563 564 if (mac68k_machine.do_graybars) 565 printf("Bootstrapping NetBSD/mac68k.\n"); 566 567 oldROMBase = ROMBase; 568 mac68k_vidphys = videoaddr; 569 570 if (((tc & 0x80000000) && (mmutype == MMU_68030)) || 571 ((tc & 0x8000) && (mmutype == MMU_68040))) { 572 if (mac68k_machine.do_graybars) 573 printf("Getting mapping from MMU.\n"); 574 (void) get_mapping(); 575 if (mac68k_machine.do_graybars) 576 printf("Done.\n"); 577 } else { 578 /* MMU not enabled. Fake up ranges. */ 579 numranges = 1; 580 low[0] = 0; 581 high[0] = mac68k_machine.mach_memsize * (1024 * 1024); 582 if (mac68k_machine.do_graybars) 583 printf("Faked range to byte 0x%lx.\n", high[0]); 584 } 585 nextpa = load_addr + m68k_round_page(esym); 586 587 if (mac68k_machine.do_graybars) 588 printf("Bootstrapping the pmap system.\n"); 589 590 pmap_bootstrap(nextpa, load_addr); 591 592 if (mac68k_machine.do_graybars) 593 printf("Pmap bootstrapped.\n"); 594 595 if (!vidlen) 596 panic("Don't know how to relocate video!\n"); 597 598 if (mac68k_machine.do_graybars) 599 printf("Moving ROMBase from %p to %p.\n", oldROMBase, ROMBase); 600 601 mrg_fixupROMBase(oldROMBase, ROMBase); 602 603 if (mac68k_machine.do_graybars) 604 printf("Video address 0x%lx -> 0x%lx.\n", 605 (unsigned long)videoaddr, (unsigned long)newvideoaddr); 606 607 mac68k_set_io_offsets(IOBase); 608 609 /* 610 * If the serial ports are going (for console or 'echo'), then 611 * we need to make sure the IO change gets propagated properly. 612 * This resets the base addresses for the 8530 (serial) driver. 613 * 614 * WARNING!!! No printfs() (etc) BETWEEN zs_init() and the end 615 * of this function (where we start using the MMU, so the new 616 * address is correct. 617 */ 618 if (zsinited != 0) 619 zs_init(); 620 621 videoaddr = newvideoaddr; 622 } 623