system.cc (5795:72ce7502dc71) | system.cc (5823:9f7efe90084e) |
---|---|
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; --- 81 unchanged lines hidden (view full) --- 90 virtPort.setPeer(mem_port); 91 mem_port->setPeer(&virtPort); 92 93 94 /** 95 * Load the kernel code into memory 96 */ 97 if (params()->kernel == "") { | 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; --- 81 unchanged lines hidden (view full) --- 90 virtPort.setPeer(mem_port); 91 mem_port->setPeer(&virtPort); 92 93 94 /** 95 * Load the kernel code into memory 96 */ 97 if (params()->kernel == "") { |
98 warn("No kernel set for full system simulation. Assuming you know what" | 98 inform("No kernel set for full system simulation. Assuming you know what" |
99 " you're doing...\n"); 100 } else { 101 // Load kernel code 102 kernel = createObjectFile(params()->kernel); | 99 " you're doing...\n"); 100 } else { 101 // Load kernel code 102 kernel = createObjectFile(params()->kernel); |
103 warn("kernel located at: %s", params()->kernel); | 103 inform("kernel located at: %s", params()->kernel); |
104 105 if (kernel == NULL) 106 fatal("Could not load kernel file %s", params()->kernel); 107 108 // Load program sections into memory 109 kernel->loadSections(&functionalPort, LoadAddrMask); 110 111 // setup entry points 112 kernelStart = kernel->textBase(); 113 kernelEnd = kernel->bssBase() + kernel->bssSize(); 114 kernelEntry = kernel->entryPoint(); 115 116 // load symbols 117 if (!kernel->loadGlobalSymbols(kernelSymtab)) | 104 105 if (kernel == NULL) 106 fatal("Could not load kernel file %s", params()->kernel); 107 108 // Load program sections into memory 109 kernel->loadSections(&functionalPort, LoadAddrMask); 110 111 // setup entry points 112 kernelStart = kernel->textBase(); 113 kernelEnd = kernel->bssBase() + kernel->bssSize(); 114 kernelEntry = kernel->entryPoint(); 115 116 // load symbols 117 if (!kernel->loadGlobalSymbols(kernelSymtab)) |
118 panic("could not load kernel symbols\n"); | 118 fatal("could not load kernel symbols\n"); |
119 120 if (!kernel->loadLocalSymbols(kernelSymtab)) | 119 120 if (!kernel->loadLocalSymbols(kernelSymtab)) |
121 panic("could not load kernel local symbols\n"); | 121 fatal("could not load kernel local symbols\n"); |
122 123 if (!kernel->loadGlobalSymbols(debugSymbolTable)) | 122 123 if (!kernel->loadGlobalSymbols(debugSymbolTable)) |
124 panic("could not load kernel symbols\n"); | 124 fatal("could not load kernel symbols\n"); |
125 126 if (!kernel->loadLocalSymbols(debugSymbolTable)) | 125 126 if (!kernel->loadLocalSymbols(debugSymbolTable)) |
127 panic("could not load kernel local symbols\n"); | 127 fatal("could not load kernel local symbols\n"); |
128 129 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart); 130 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd); 131 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry); 132 DPRINTF(Loader, "Kernel loaded...\n"); 133 } 134#endif // FULL_SYSTEM 135 --- 43 unchanged lines hidden (view full) --- 179 threadContexts.resize(id + 1); 180 } else { 181 if (threadContexts.size() <= assigned) 182 threadContexts.resize(assigned + 1); 183 id = assigned; 184 } 185 186 if (threadContexts[id]) | 128 129 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart); 130 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd); 131 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry); 132 DPRINTF(Loader, "Kernel loaded...\n"); 133 } 134#endif // FULL_SYSTEM 135 --- 43 unchanged lines hidden (view full) --- 179 threadContexts.resize(id + 1); 180 } else { 181 if (threadContexts.size() <= assigned) 182 threadContexts.resize(assigned + 1); 183 id = assigned; 184 } 185 186 if (threadContexts[id]) |
187 panic("Cannot have two CPUs with the same id (%d)\n", id); | 187 fatal("Cannot have two CPUs with the same id (%d)\n", id); |
188 189 threadContexts[id] = tc; 190 _numContexts++; 191 192 int port = getRemoteGDBPort(); 193 if (rgdb_enable && port) { 194 RemoteGDB *rgdb = new RemoteGDB(this, tc); 195 GDBListener *gdbl = new GDBListener(rgdb, port + id); --- 116 unchanged lines hidden --- | 188 189 threadContexts[id] = tc; 190 _numContexts++; 191 192 int port = getRemoteGDBPort(); 193 if (rgdb_enable && port) { 194 RemoteGDB *rgdb = new RemoteGDB(this, tc); 195 GDBListener *gdbl = new GDBListener(rgdb, port + id); --- 116 unchanged lines hidden --- |