Deleted Added
sdiff udiff text old ( 13397:9fd4c9dedfda ) new ( 13531:e6f1bf55d038 )
full compact
1/*
2 * Copyright (c) 2010, 2012-2013, 2015,2017-2018 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

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

43#include "arch/arm/system.hh"
44
45#include <iostream>
46
47#include "arch/arm/semihosting.hh"
48#include "base/loader/object_file.hh"
49#include "base/loader/symtab.hh"
50#include "cpu/thread_context.hh"
51#include "mem/fs_translating_port_proxy.hh"
52#include "mem/physical.hh"
53#include "sim/full_system.hh"
54
55using namespace std;
56using namespace Linux;
57
58ArmSystem::ArmSystem(Params *p)
59 : System(p),
60 bootLoaders(), bootldr(nullptr),
61 _haveSecurity(p->have_security),
62 _haveLPAE(p->have_lpae),
63 _haveVirtualization(p->have_virtualization),
64 _haveCrypto(p->have_crypto),
65 _genericTimer(nullptr),
66 _resetAddr(p->auto_reset_addr ?
67 (kernelEntry & loadAddrMask) + loadAddrOffset :
68 p->reset_addr),
69 _highestELIs64(p->highest_el_is_64),
70 _physAddrRange64(p->phys_addr_range_64),
71 _haveLargeAsid64(p->have_large_asid_64),
72 _m5opRange(p->m5ops_base ?
73 RangeSize(p->m5ops_base, 0x10000) :

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

131 // address map being resolved in the interconnect
132
133 // Call the initialisation of the super class
134 System::initState();
135
136 const Params* p = params();
137
138 if (bootldr) {
139 bootldr->loadSections(physProxy);
140
141 inform("Using bootloader at address %#x\n", bootldr->entryPoint());
142
143 // Put the address of the boot loader into r7 so we know
144 // where to branch to after the reset fault
145 // All other values needed by the boot loader to know what to do
146 if (!p->gic_cpu_addr || !p->flags_addr)
147 fatal("gic_cpu_addr && flags_addr must be set with bootloader\n");
148
149 for (int i = 0; i < threadContexts.size(); i++) {
150 if (!_highestELIs64)
151 threadContexts[i]->setIntReg(3, (kernelEntry & loadAddrMask) +
152 loadAddrOffset);
153
154 threadContexts[i]->setIntReg(4, params()->gic_cpu_addr);
155 threadContexts[i]->setIntReg(5, params()->flags_addr);
156 }
157 inform("Using kernel entry physical address at %#x\n",
158 (kernelEntry & loadAddrMask) + loadAddrOffset);
159 } else {
160 // Set the initial PC to be at start of the kernel code
161 if (!_highestELIs64)
162 threadContexts[0]->pcState((kernelEntry & loadAddrMask) +

--- 145 unchanged lines hidden ---