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