system.cc (8931:7a1dfb191e3f) system.cc (9050:ed4378739b6e)
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

48#include "cpu/thread_context.hh"
49#include "mem/physical.hh"
50#include "mem/fs_translating_port_proxy.hh"
51
52using namespace std;
53using namespace Linux;
54
55ArmSystem::ArmSystem(Params *p)
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

48#include "cpu/thread_context.hh"
49#include "mem/physical.hh"
50#include "mem/fs_translating_port_proxy.hh"
51
52using namespace std;
53using namespace Linux;
54
55ArmSystem::ArmSystem(Params *p)
56 : System(p), bootldr(NULL)
56 : System(p), bootldr(NULL), multiProc(p->multi_proc)
57{
58 if (p->boot_loader != "") {
59 bootldr = createObjectFile(p->boot_loader);
60
61 if (!bootldr)
62 fatal("Could not read bootloader: %s\n", p->boot_loader);
63
64 bootldr->loadGlobalSymbols(debugSymbolTable);

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

102 threadContexts[i]->setIntReg(7, bootldr->entryPoint());
103 }
104 } else {
105 // Set the initial PC to be at start of the kernel code
106 threadContexts[0]->pcState(kernelEntry & loadAddrMask);
107 }
108
109 for (int i = 0; i < threadContexts.size(); i++) {
57{
58 if (p->boot_loader != "") {
59 bootldr = createObjectFile(p->boot_loader);
60
61 if (!bootldr)
62 fatal("Could not read bootloader: %s\n", p->boot_loader);
63
64 bootldr->loadGlobalSymbols(debugSymbolTable);

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

102 threadContexts[i]->setIntReg(7, bootldr->entryPoint());
103 }
104 } else {
105 // Set the initial PC to be at start of the kernel code
106 threadContexts[0]->pcState(kernelEntry & loadAddrMask);
107 }
108
109 for (int i = 0; i < threadContexts.size(); i++) {
110 if (p->midr_regval) {
111 threadContexts[i]->setMiscReg(ArmISA::MISCREG_MIDR,
112 p->midr_regval);
113 }
110 threadContexts[i]->setMiscReg(ArmISA::MISCREG_MIDR,
111 p->midr_regval);
114 }
115}
116
117ArmSystem::~ArmSystem()
118{
119 if (debugPrintkEvent)
120 delete debugPrintkEvent;
121}
122
123
124ArmSystem *
125ArmSystemParams::create()
126{
127 return new ArmSystem(this);
128}
112 }
113}
114
115ArmSystem::~ArmSystem()
116{
117 if (debugPrintkEvent)
118 delete debugPrintkEvent;
119}
120
121
122ArmSystem *
123ArmSystemParams::create()
124{
125 return new ArmSystem(this);
126}