Merge zed.eecs.umich.edu:/.automount/fox/y/mserrano/alpha-system
authorBenjamin Nash <benash@umich.edu>
Thu, 28 Jul 2005 17:45:36 +0000 (13:45 -0400)
committerBenjamin Nash <benash@umich.edu>
Thu, 28 Jul 2005 17:45:36 +0000 (13:45 -0400)
into  zed.eecs.umich.edu:/z/benash/bk/alpha-system

console/console.c:
    Clean up code.
h/rpb.h:
    Update CTB struct.

1  2 
system/alpha/console/console.c

index c616c1cdbf45125f0cecd54f5da3109545708370,af4e367b25e26313fd78a3243aa76e398bc59369..6d00203700bc0c62688350d15ce3a8d447d15e8d
@@@ -526,26 -528,15 +528,13 @@@ unixBoot(int argc, char **argv
          panic("kernel too big\n");
      }
      printf_lock("kstart = 0x%x, kend = 0x%x, kentry = 0x%x, numCPUs = 0x%x\n", m5Conf.kernStart, m5Conf.kernEnd, m5Conf.entryPoint, m5Conf.numCPUs);
-     /* Map the kernel's pages into the third level of region 2 */
-     //for (ptr = m5Conf.kernStart; ptr < kernel_end; ptr += PAGE_SIZE) {
-       //  third_kernel[THIRD_XXX(ptr)] = KPTE(PFN(ptr));
-     //}
-     ksp_top = (ulong)unix_boot_alloc(1);
-     ksp = ksp_top + PAGE_SIZE;
--
-     //if (ksp - m5Conf.kernStart > (0x800000*NUM_KERNEL_THIRD)) {
-       //  printf_lock("Kernel stack pushd us over 8MB\n");
-       //  panic("ksp too big\n");
-     //}
-     //if (THIRD_XXX((ulong)ksp_top) >  NUM_KERNEL_THIRD * 1024) {
-       //  panic("increase NUM_KERNEL_THIRD, and change THIRD_XXX\n");
-     //}
-     ptr = (ulong) ksp_top;
-     bzero((char *)ptr, PAGE_SIZE * 2);
-     dbPage[THIRD(0x20040000)] = 0;            /* Stack Guard Page */
-     dbPage[THIRD(0x20042000)] = KPTE(PFN(ptr)); /* Kernel Stack Pages */
-     dbPage[THIRD(0x20046000)] = 0;            /* Stack Guard Page */
+     ksp_bottom = (ulong)unix_boot_alloc(1);
+     ksp_top = ksp_bottom + PAGE_SIZE;
 -
+     ptr = (ulong) ksp_bottom;
+     bzero((char *)ptr, PAGE_SIZE);
+     dbPage[THIRD(KSTACK_REGION_VA)] = 0;                        /* Stack Guard Page */
+     dbPage[THIRD(KSTACK_REGION_VA + PAGE_SIZE)] = KPTE(PFN(ptr)); /* Kernel Stack Page */
+     dbPage[THIRD(KSTACK_REGION_VA + 2*PAGE_SIZE)] = 0;                  /* Stack Guard Page */
  
      /* put argv into the bottom of the stack - argv starts at 1 because
       * the command thatr got us here (i.e. "unixboot) is in argv[0].