system.cc (8706:b1838faf3bcc) | system.cc (8885:52bbd95b31ed) |
---|---|
1/* 2 * Copyright (c) 2002-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; --- 34 unchanged lines hidden (view full) --- 43 : System(p), sysTick(0) 44{ 45 resetSymtab = new SymbolTable; 46 hypervisorSymtab = new SymbolTable; 47 openbootSymtab = new SymbolTable; 48 nvramSymtab = new SymbolTable; 49 hypervisorDescSymtab = new SymbolTable; 50 partitionDescSymtab = new SymbolTable; | 1/* 2 * Copyright (c) 2002-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; --- 34 unchanged lines hidden (view full) --- 43 : System(p), sysTick(0) 44{ 45 resetSymtab = new SymbolTable; 46 hypervisorSymtab = new SymbolTable; 47 openbootSymtab = new SymbolTable; 48 nvramSymtab = new SymbolTable; 49 hypervisorDescSymtab = new SymbolTable; 50 partitionDescSymtab = new SymbolTable; |
51} | |
52 | 51 |
53void 54SparcSystem::initState() 55{ 56 // Call the initialisation of the super class 57 System::initState(); 58 | |
59 /** 60 * Load the boot code, and hypervisor into memory. 61 */ 62 // Read the reset binary 63 reset = createObjectFile(params()->reset_bin, true); 64 if (reset == NULL) 65 fatal("Could not load reset binary %s", params()->reset_bin); 66 --- 19 unchanged lines hidden (view full) --- 86 params()->hypervisor_desc_bin); 87 88 // Read the partition description image 89 partition_desc = createObjectFile(params()->partition_desc_bin, true); 90 if (partition_desc == NULL) 91 fatal("Could not load partition description image %s", 92 params()->partition_desc_bin); 93 | 52 /** 53 * Load the boot code, and hypervisor into memory. 54 */ 55 // Read the reset binary 56 reset = createObjectFile(params()->reset_bin, true); 57 if (reset == NULL) 58 fatal("Could not load reset binary %s", params()->reset_bin); 59 --- 19 unchanged lines hidden (view full) --- 79 params()->hypervisor_desc_bin); 80 81 // Read the partition description image 82 partition_desc = createObjectFile(params()->partition_desc_bin, true); 83 if (partition_desc == NULL) 84 fatal("Could not load partition description image %s", 85 params()->partition_desc_bin); 86 |
94 95 // Load reset binary into memory 96 reset->setTextBase(params()->reset_addr); 97 reset->loadSections(physProxy); 98 // Load the openboot binary 99 openboot->setTextBase(params()->openboot_addr); 100 openboot->loadSections(physProxy); 101 // Load the hypervisor binary 102 hypervisor->setTextBase(params()->hypervisor_addr); 103 hypervisor->loadSections(physProxy); 104 // Load the nvram image 105 nvram->setTextBase(params()->nvram_addr); 106 nvram->loadSections(physProxy); 107 // Load the hypervisor description image 108 hypervisor_desc->setTextBase(params()->hypervisor_desc_addr); 109 hypervisor_desc->loadSections(physProxy); 110 // Load the partition description image 111 partition_desc->setTextBase(params()->partition_desc_addr); 112 partition_desc->loadSections(physProxy); 113 | |
114 // load symbols 115 if (!reset->loadGlobalSymbols(resetSymtab)) 116 panic("could not load reset symbols\n"); 117 118 if (!openboot->loadGlobalSymbols(openbootSymtab)) 119 panic("could not load openboot symbols\n"); 120 121 if (!hypervisor->loadLocalSymbols(hypervisorSymtab)) --- 27 unchanged lines hidden (view full) --- 149 panic("could not load reset symbols\n"); 150 151 if (!hypervisor_desc->loadGlobalSymbols(debugSymbolTable)) 152 panic("could not load hypervisor description symbols\n"); 153 154 if (!partition_desc->loadLocalSymbols(debugSymbolTable)) 155 panic("could not load partition description symbols\n"); 156 | 87 // load symbols 88 if (!reset->loadGlobalSymbols(resetSymtab)) 89 panic("could not load reset symbols\n"); 90 91 if (!openboot->loadGlobalSymbols(openbootSymtab)) 92 panic("could not load openboot symbols\n"); 93 94 if (!hypervisor->loadLocalSymbols(hypervisorSymtab)) --- 27 unchanged lines hidden (view full) --- 122 panic("could not load reset symbols\n"); 123 124 if (!hypervisor_desc->loadGlobalSymbols(debugSymbolTable)) 125 panic("could not load hypervisor description symbols\n"); 126 127 if (!partition_desc->loadLocalSymbols(debugSymbolTable)) 128 panic("could not load partition description symbols\n"); 129 |
130} |
|
157 | 131 |
132void 133SparcSystem::initState() 134{ 135 // Call the initialisation of the super class 136 System::initState(); 137 138 // Load reset binary into memory 139 reset->setTextBase(params()->reset_addr); 140 reset->loadSections(physProxy); 141 // Load the openboot binary 142 openboot->setTextBase(params()->openboot_addr); 143 openboot->loadSections(physProxy); 144 // Load the hypervisor binary 145 hypervisor->setTextBase(params()->hypervisor_addr); 146 hypervisor->loadSections(physProxy); 147 // Load the nvram image 148 nvram->setTextBase(params()->nvram_addr); 149 nvram->loadSections(physProxy); 150 // Load the hypervisor description image 151 hypervisor_desc->setTextBase(params()->hypervisor_desc_addr); 152 hypervisor_desc->loadSections(physProxy); 153 // Load the partition description image 154 partition_desc->setTextBase(params()->partition_desc_addr); 155 partition_desc->loadSections(physProxy); 156 157 |
|
158 // @todo any fixup code over writing data in binaries on setting break 159 // events on functions should happen here. 160 161} 162 163SparcSystem::~SparcSystem() 164{ 165 delete resetSymtab; --- 43 unchanged lines hidden --- | 158 // @todo any fixup code over writing data in binaries on setting break 159 // events on functions should happen here. 160 161} 162 163SparcSystem::~SparcSystem() 164{ 165 delete resetSymtab; --- 43 unchanged lines hidden --- |