Deleted Added
sdiff udiff text old ( 8706:b1838faf3bcc ) new ( 8885:52bbd95b31ed )
full compact
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
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
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
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 ---