/* Initialize the kernel's page tables. Linux puts the vptb in
the last slot of the L1 page table. */
memset(swapper_pg_dir, 0, PAGE_SIZE);
newptbr = ((unsignedlong) swapper_pg_dir - PAGE_OFFSET) >> PAGE_SHIFT;
pgd_val(swapper_pg_dir[1023]) =
(newptbr << 32) | pgprot_val(PAGE_KERNEL);
/* Set the vptb. This is often done by the bootloader, but
shouldn't be required. */ if (hwrpb->vptb != 0xfffffffe00000000UL) {
wrvptptr(0xfffffffe00000000UL);
hwrpb->vptb = 0xfffffffe00000000UL;
hwrpb_update_checksum(hwrpb);
}
/* Also set up the real kernel PCB while we're at it. */
init_thread_info.pcb.ptbr = newptbr;
init_thread_info.pcb.flags = 1; /* set FEN, clear everything else */
original_pcb_ptr = load_PCB(&init_thread_info.pcb);
tbia();
/* Save off the contents of the original PCB so that we can restoretheoriginalconsole'spagetablesforacleanreboot.
NotethatthePCBissupposedtobeaphysicaladdress,but sinceKSEGvaluesalsohappentowork,folksgetconfused.
Check this here. */
/* Starting at the HWRPB, locate the CRB. */
crb = (struct crb_struct *)((char *)hwrpb + hwrpb->crb_offset);
if (alpha_using_srm) { /* Tell the console whither it is to be remapped. */ if (srm_fixup(VMALLOC_START, (unsignedlong)hwrpb))
__halt(); /* "We're boned." --Bender */
/* Allocate one PGD and one PMD. In the case of SRM, we'll need thesetoactuallyremaptheconsole.Thereisanassumption herethatonlyoneofeachisneeded,andthisallowsfor8MB. Onsystemswithlargerconsoles,additionalpageswillbe allocatedasneededduringthemappingprocess.
InthecaseofnotSRM,butnotCONFIG_ALPHA_LARGE_VMALLOC, weneedtoallocatethePGDweuseforvmallocbeforewestart
forking other tasks. */
/* Initialize the kernel's ZERO_PGE. */
memset(absolute_pointer(ZERO_PGE), 0, PAGE_SIZE);
}
#ifdefined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM) void
srm_paging_stop (void)
{ /* Move the vptb back to where the SRM console expects it. */
swapper_pg_dir[1] = swapper_pg_dir[1023];
tbia();
wrvptptr(0x200000000UL);
hwrpb->vptb = 0x200000000UL;
hwrpb_update_checksum(hwrpb);
/* Reload the page tables that the console had in use. */
load_PCB(&original_pcb);
tbia();
} #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.