Deleted Added
sdiff udiff text old ( 8852:c744483edfcf ) new ( 8885:52bbd95b31ed )
full compact
1/*
2 * Copyright (c) 2002-2005 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;

--- 49 unchanged lines hidden (view full) ---

58 console = createObjectFile(params()->console);
59 if (console == NULL)
60 fatal("Could not load console file %s", params()->console);
61
62 // Load pal file
63 pal = createObjectFile(params()->pal);
64 if (pal == NULL)
65 fatal("Could not load PALcode file %s", params()->pal);
66}
67
68AlphaSystem::~AlphaSystem()
69{
70 delete consoleSymtab;
71 delete console;
72 delete pal;
73#ifdef DEBUG
74 delete consolePanicEvent;
75#endif
76}
77
78void
79AlphaSystem::initState()
80{
81 // Moved from the constructor to here since it relies on the
82 // address map being resolved in the interconnect
83
84 // Call the initialisation of the super class
85 System::initState();
86
87 // Load program sections into memory
88 pal->loadSections(physProxy, loadAddrMask);
89 console->loadSections(physProxy, loadAddrMask);
90
91 // load symbols
92 if (!console->loadGlobalSymbols(consoleSymtab))
93 panic("could not load console symbols\n");
94
95 if (!pal->loadGlobalSymbols(palSymtab))
96 panic("could not load pal symbols\n");
97
98 if (!pal->loadLocalSymbols(palSymtab))
99 panic("could not load pal symbols\n");
100
101 if (!console->loadGlobalSymbols(debugSymbolTable))
102 panic("could not load console symbols\n");
103
104 if (!pal->loadGlobalSymbols(debugSymbolTable))
105 panic("could not load pal symbols\n");
106
107 if (!pal->loadLocalSymbols(debugSymbolTable))
108 panic("could not load pal symbols\n");
109
110 Addr addr = 0;
111#ifndef NDEBUG
112 consolePanicEvent = addConsoleFuncEvent<BreakPCEvent>("panic");
113#endif
114
115 /**
116 * Copy the osflags (kernel arguments) into the consoles
117 * memory. (Presently Linux does not use the console service
118 * routine to get these command line arguments, but Tru64 and
119 * others do.)
120 */
121 if (consoleSymtab->findAddress("env_booted_osflags", addr)) {
122 virtProxy.writeBlob(addr, (uint8_t*)params()->boot_osflags.c_str(),

--- 7 unchanged lines hidden (view full) ---

130 if (consoleSymtab->findAddress("m5_rpb", addr)) {
131 uint64_t data;
132 data = htog(params()->system_type);
133 virtProxy.write(addr+0x50, data);
134 data = htog(params()->system_rev);
135 virtProxy.write(addr+0x58, data);
136 } else
137 panic("could not find hwrpb\n");
138}
139
140/**
141 * This function fixes up addresses that are used to match PCs for
142 * hooking simulator events on to target function executions.
143 *
144 * Alpha binaries may have multiple global offset table (GOT)
145 * sections. A function that uses the GOT starts with a
146 * two-instruction prolog which sets the global pointer (gp == r29) to
147 * the appropriate GOT section. The proper gp value is calculated

--- 78 unchanged lines hidden ---