system.cc (3536:89aa06409e4d) system.cc (3812:eaa215123a26)
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 */
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 // Load kernel code
93 kernel = createObjectFile(params()->kernel_path);
94 if (kernel == NULL)
95 fatal("Could not load kernel file %s", params()->kernel_path);
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);
96
100
97 // Load program sections into memory
98 kernel->loadSections(&functionalPort, LoadAddrMask);
101 // Load program sections into memory
102 kernel->loadSections(&functionalPort, LoadAddrMask);
99
103
100 // setup entry points
101 kernelStart = kernel->textBase();
102 kernelEnd = kernel->bssBase() + kernel->bssSize();
103 kernelEntry = kernel->entryPoint();
104 // setup entry points
105 kernelStart = kernel->textBase();
106 kernelEnd = kernel->bssBase() + kernel->bssSize();
107 kernelEntry = kernel->entryPoint();
104
108
105 // load symbols
106 if (!kernel->loadGlobalSymbols(kernelSymtab))
107 panic("could not load kernel symbols\n");
109 // load symbols
110 if (!kernel->loadGlobalSymbols(kernelSymtab))
111 panic("could not load kernel symbols\n");
108
112
109 if (!kernel->loadLocalSymbols(kernelSymtab))
110 panic("could not load kernel local symbols\n");
113 if (!kernel->loadLocalSymbols(kernelSymtab))
114 panic("could not load kernel local symbols\n");
111
115
112 if (!kernel->loadGlobalSymbols(debugSymbolTable))
113 panic("could not load kernel symbols\n");
116 if (!kernel->loadGlobalSymbols(debugSymbolTable))
117 panic("could not load kernel symbols\n");
114
118
115 if (!kernel->loadLocalSymbols(debugSymbolTable))
116 panic("could not load kernel local symbols\n");
119 if (!kernel->loadLocalSymbols(debugSymbolTable))
120 panic("could not load kernel local symbols\n");
117
121
118 DPRINTF(Loader, "Kernel start = %#x\n", kernelStart);
119 DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd);
120 DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry);
121 DPRINTF(Loader, "Kernel loaded...\n");
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 }
122#endif // FULL_SYSTEM
123
124 // increment the number of running systms
125 numSystemsRunning++;
126}
127
128System::~System()
129{

--- 171 unchanged lines hidden ---
127#endif // FULL_SYSTEM
128
129 // increment the number of running systms
130 numSystemsRunning++;
131}
132
133System::~System()
134{

--- 171 unchanged lines hidden ---