1/* 2 * Copyright (c) 2003-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 75 unchanged lines hidden (view full) --- 84 mem_port = physmem->getPort("functional"); 85 virtPort.setPeer(mem_port); 86 mem_port->setPeer(&virtPort); 87 88 89 /** 90 * Load the kernel code into memory 91 */ |
92 if (params()->kernel_path == "") { 93 warn("No kernel set for full system simulation. Assuming you know what" 94 " you're doing...\n"); 95 } else { 96 // Load kernel code 97 kernel = createObjectFile(params()->kernel_path); 98 if (kernel == NULL) 99 fatal("Could not load kernel file %s", params()->kernel_path); |
100 |
101 // Load program sections into memory 102 kernel->loadSections(&functionalPort, LoadAddrMask); |
103 |
104 // setup entry points 105 kernelStart = kernel->textBase(); 106 kernelEnd = kernel->bssBase() + kernel->bssSize(); 107 kernelEntry = kernel->entryPoint(); |
108 |
109 // load symbols 110 if (!kernel->loadGlobalSymbols(kernelSymtab)) 111 panic("could not load kernel symbols\n"); |
112 |
113 if (!kernel->loadLocalSymbols(kernelSymtab)) 114 panic("could not load kernel local symbols\n"); |
115 |
116 if (!kernel->loadGlobalSymbols(debugSymbolTable)) 117 panic("could not load kernel symbols\n"); |
118 |
119 if (!kernel->loadLocalSymbols(debugSymbolTable)) 120 panic("could not load kernel local symbols\n"); |
121 |
122 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart); 123 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd); 124 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry); 125 DPRINTF(Loader, "Kernel loaded...\n"); 126 } |
127#endif // FULL_SYSTEM 128 129 // increment the number of running systms 130 numSystemsRunning++; 131} 132 133System::~System() 134{ --- 171 unchanged lines hidden --- |