Updated kern/* code so we can have one console code and the simulator
authorAli Saidi <saidi@eecs.umich.edu>
Wed, 17 Mar 2004 21:12:13 +0000 (16:12 -0500)
committerAli Saidi <saidi@eecs.umich.edu>
Wed, 17 Mar 2004 21:12:13 +0000 (16:12 -0500)
changes the HWRPB to the correct system type/variation.

kern/linux/linux_system.cc:
kern/tru64/tru64_system.cc:
    Added code to change system type/variation so that we can have one console

--HG--
extra : convert_revision : 5f35f7d965419cd3038e2e85e05a20884b2f6068

kern/linux/linux_system.cc
kern/tru64/tru64_system.cc

index d863ffd0acf1ca44b023d515c8d1b107cbcc367e..12c1f5c32b7148c37c11c2bbbf2019f97e9d028a 100644 (file)
@@ -300,6 +300,20 @@ LinuxSystem::LinuxSystem(const string _name, const uint64_t _init_param,
             strcpy(osflags, boot_osflags.c_str());
     }
 
+    if (consoleSymtab->findAddress("xxm_rpb", addr)) {
+        Addr paddr = vtophys(physmem, addr);
+        char *hwprb = (char *)physmem->dma_addr(paddr, sizeof(uint64_t));
+
+        if (hwprb) {
+            *(uint64_t*)(hwprb+0x50) = 34;      // Tsunami
+            *(uint64_t*)(hwprb+0x58) = (1<<10);
+        }
+        else
+            panic("could not translate hwprb addr to set system type/variation\n");
+
+    } else
+        panic("could not find hwprb to set system type/variation\n");
+
     if (kernelSymtab->findAddress("panic", addr))
         kernelPanicEvent->schedule(addr);
     else
index b03d7bf2631af38a5bd6f658236e4ae602a55693..f8dda6f840269aab87b6775f417de26660e9fea1 100644 (file)
@@ -124,6 +124,20 @@ Tru64System::Tru64System(const string _name, const uint64_t _init_param,
             strcpy(osflags, boot_osflags.c_str());
     }
 
+    if (consoleSymtab->findAddress("xxm_rpb", addr)) {
+        Addr paddr = vtophys(physmem, addr);
+        char *hwprb = (char *)physmem->dma_addr(paddr, sizeof(uint64_t));
+
+        if (hwprb) {
+            *(uint64_t*)(hwprb+0x50) = 12;      // Tlaser
+            *(uint64_t*)(hwprb+0x58) = (2<<1);
+        }
+        else
+            panic("could not translate hwprb addr to set system type/variation\n");
+    } else
+        panic("could not find hwprb to set system type/variation\n");
+
+
 #ifdef DEBUG
     if (kernelSymtab->findAddress("panic", addr))
         kernelPanicEvent->schedule(addr);