From: Andy P. <at...@us...> - 2001-07-31 17:28:30
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/boot In directory usw-pr-cvs1:/tmp/cvs-serv32129/boot Modified Files: head.S tmp_init.c Log Message: New mm layer, start of signals implementation + other misc fixes Index: head.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/head.S,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- head.S 2001/07/02 12:09:24 1.11 +++ head.S 2001/07/31 17:28:26 1.12 @@ -198,13 +198,17 @@ # PAGE_OFFSET here is 0x80000000 - the start of system space. # # swapper_pg_dir is actually a pgd_t. The spt is the third entry. -# p0br/p0lr, p1br/p1lr, sbr/slr +# see include/asm-vax/mm/pagelet.h for details of the pgd_t structure. +# # First find a suitable start position for the SPT. This must be # longword aligned - addl3 $4, r9, r5 # R9 holds kernel end - bicl2 $3, r5 # R5 is R9 rounded up to longword aligned +# +# Correction, for 3100/85 it needs to be page aligned. + + addl3 $0x200, r9, r5 # R9 holds kernel end + bicl2 $0x1ff, r5 # R5 is R9 rounded up to page aligned moval swapper_pg_dir, r0 - movl r5, 16(r0) # save address of base of system page table + movl r5, 48(r0) # save address of base of system page table # Fill in the main part of the SPT (the entries that map physical # memory) @@ -253,8 +257,8 @@ blssu sparefill2 # system page table is setup. Save SPT length and zap processor registers moval swapper_pg_dir, r0 - movl r7, 20(r0) - mtpr 16(r0), $PR_SBR # set SBR + movl r7, 52(r0) + mtpr 48(r0), $PR_SBR # set SBR mtpr r7, $PR_SLR # set SLR # PCBB # set up the process control block. Some machines need a valid PCB for @@ -273,7 +277,7 @@ calls $0, VAX_start_mm # do that ole black magic # made it moval swapper_pg_dir, r0 - addl2 $PAGE_OFFSET, 16(r0) # fix up our reference to the system page tbl. + addl2 $PAGE_OFFSET, 48(r0) # fix up our reference to the system page tbl. addl2 $PAGE_OFFSET, iomap_base # ... and the IOMAP PTEs addl2 $PAGE_OFFSET, vmallocmap_base # ... and the IOMAP PTEs addl2 $PAGE_OFFSET, mv # fix up machine vector pointer Index: tmp_init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/tmp_init.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- tmp_init.c 2001/03/04 23:45:50 1.9 +++ tmp_init.c 2001/07/31 17:28:26 1.10 @@ -31,7 +31,7 @@ #include <asm/bugs.h> -extern void init_IRQ(void); +/* extern void init_IRQ(void); extern void sched_init(void); extern void time_init(void); extern void calibrate_delay(void); @@ -60,13 +60,15 @@ extern void fork_init(unsigned long); extern void cpu_idle(void); - +*/ + /* stuff that is declared in head.S */ extern unsigned long int phys_start; /* physical address of kernel*/ extern unsigned long int virt_start; /* virtual address of kernel */ extern unsigned long int boot_ap; /* argument pointer */ extern unsigned long int boot_r11; /* rpb pointer */ extern unsigned long int boot_scb; /* scb pointer */ +extern unsigned long int iomap_base; /* head.S copies the RPB into this structure */ struct rpb_struct boot_rpb; @@ -104,6 +106,9 @@ * bit of arch-specific C code before starting the main start_kernel */ +#define IOMAP_START (PAGE_OFFSET+((iomap_base-swapper_pg_dir[2].br)<<(PAGELET_SHIFT-2))) + + void vax_start_kernel(void) { /* set the number of 4k pages */ @@ -141,168 +146,12 @@ max_hwpfn, max_pfn, max_hwpfn/2); printk("CPU type: %s, SID: %08x\n", mv->cpu_type_str(), vax_cpu.sid); - + + printk("VM: mapped physical from %x to %x, iomap from %x\n", PAGE_OFFSET, PAGE_OFFSET+(max_hwpfn*512), IOMAP_START); + printk("VM: vmalloc from %x to %x\n", VMALLOC_START, VMALLOC_END); + printk("VM: ptemap from %x to %x for %d processes\n",TASKPTE_START, TASKPTE_END,TASK_MAXUPRC); printk("calling start_kernel...\n"); start_kernel(); -} - -void tmp_start_kernel(void) -{ - char * command_line; - unsigned long mempages; - -/* - * Interrupts are still disabled. Do necessary setups, then - * enable them - */ - /* set the number of 4k pages */ - max_pfn = max_hwpfn/8; - - /* Protect us from interrupt stack overflows */ - guard_int_stack(); - - /* If it is possible to register a console for your - machine at this point in the boot sequence, do so - in post_vm_init(). Otherwise, implement mv->console_init() - which will be called later. */ - - mv->post_vm_init(); - - #ifdef __SMP__ - static int boot_cpu = 1; - /* "current" has been set up, we need to load it now */ - if (!boot_cpu) - initialize_secondary(); - boot_cpu = 0; - #endif - - /* - * Interrupts are still disabled. Do necessary setups, then - * enable them - */ - lock_kernel(); - printk(linux_banner); - - printk("RPB info: l_pfncnt: %08x, .l_vmb_version: %08x .l_badpgs: %08x\n", - boot_rpb.l_pfncnt, boot_rpb.l_vmb_version, boot_rpb.l_badpgs); - - printk("Physical memory: %08x HW pagelets, %08lx pages (%dKB)\n", - max_hwpfn, max_pfn, max_hwpfn/2); - - setup_arch(&command_line); - - printk("CPU type: %s, SID: %08x\n", mv->cpu_type_str(), vax_cpu.sid); - - trap_init(); - init_IRQ(); - sched_init(); - time_init(); - softirq_init(); - - console_init(); - - kmem_cache_init(); - - printk("Dropping IPL to 0 to allow clock interrupts\n"); - - sti(); - - calibrate_delay(); - - /* mem_init finishes up memory init. It places all remaining - memory on the free list */ - - mem_init(); - kmem_cache_sizes_init(); - -#ifdef CONFIG_PROC_FS - proc_root_init(); -#endif - - mempages = num_physpages; - - fork_init(mempages); - proc_caches_init(); - vfs_caches_init(mempages); - buffer_init(mempages); - page_cache_init(mempages); - kiobuf_setup(); - signals_init(); - inode_init(mempages); - -#if defined(CONFIG_SYSVIPC) - ipc_init(); -#endif -#if defined(CONFIG_QUOTA) - dquot_init_hash(); -#endif - - check_bugs(); - printk("POSIX conformance testing by UNIFIX\n"); - - kernel_thread(tmp_init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND); - - unlock_kernel(); - - current->need_resched = 1; - cpu_idle(); - - printk("\nThis is as far as we've got... - halting\n"); - machine_halt(); -} - -static void __init do_initcalls(void) -{ - initcall_t *call; - - call = &__initcall_start; - do { - (*call)(); - call++; - } while (call < &__initcall_end); - - /* Make sure there is no pending stuff from the initcall sequence */ - flush_scheduled_tasks(); -} - -static void tmp_do_basic_setup(void) -{ - /* - * Tell the world that we're going to be the grim - * reaper of innocent orphaned children. - * - * We don't want people to have to make incorrect - * assumptions about where in the task array this - * can be found. - */ - child_reaper = current; - - if (mv->init_devices) { - mv->init_devices(); - } - -#if defined(CONFIG_NET) - sock_init(); -#endif - - start_context_thread(); - do_initcalls(); - - /* .. filesystems .. */ - filesystem_setup(); - - /* Mount the root filesystem.. */ - mount_root(); - -} - -static int tmp_init(void * unused) -{ - printk("tmp_init: in init thread\n"); - - tmp_do_basic_setup(); - - panic("No init found."); } |