system.cc (8527:6bac5b04d588) | system.cc (8706:b1838faf3bcc) |
---|---|
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 --- 35 unchanged lines hidden (view full) --- 44#include "arch/arm/linux/system.hh" 45#include "arch/arm/isa_traits.hh" 46#include "arch/arm/utility.hh" 47#include "base/loader/object_file.hh" 48#include "base/loader/symtab.hh" 49#include "cpu/thread_context.hh" 50#include "debug/Loader.hh" 51#include "kern/linux/events.hh" | 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 --- 35 unchanged lines hidden (view full) --- 44#include "arch/arm/linux/system.hh" 45#include "arch/arm/isa_traits.hh" 46#include "arch/arm/utility.hh" 47#include "base/loader/object_file.hh" 48#include "base/loader/symtab.hh" 49#include "cpu/thread_context.hh" 50#include "debug/Loader.hh" 51#include "kern/linux/events.hh" |
52#include "mem/fs_translating_port_proxy.hh" |
|
52#include "mem/physical.hh" 53 54using namespace ArmISA; 55using namespace Linux; 56 57LinuxArmSystem::LinuxArmSystem(Params *p) 58 : ArmSystem(p) 59{ | 53#include "mem/physical.hh" 54 55using namespace ArmISA; 56using namespace Linux; 57 58LinuxArmSystem::LinuxArmSystem(Params *p) 59 : ArmSystem(p) 60{ |
61} 62 63bool 64LinuxArmSystem::adderBootUncacheable(Addr a) 65{ 66 Addr block = a & ~ULL(0x7F); 67 if (block == secDataPtrAddr || block == secDataAddr || 68 block == penReleaseAddr) 69 return true; 70 return false; 71} 72 73void 74LinuxArmSystem::initState() 75{ 76 // Moved from the constructor to here since it relies on the 77 // address map being resolved in the interconnect 78 79 // Call the initialisation of the super class 80 ArmSystem::initState(); 81 |
|
60 // Load symbols at physical address, we might not want 61 // to do this perminately, for but early bootup work 62 // it is helpfulp. 63 kernel->loadGlobalSymbols(kernelSymtab, loadAddrMask); 64 kernel->loadGlobalSymbols(debugSymbolTable, loadAddrMask); 65 66 // Setup boot data structure 67 AtagCore *ac = new AtagCore; --- 19 unchanged lines hidden (view full) --- 87 offset += ac->copyOut(boot_data + offset); 88 offset += am->copyOut(boot_data + offset); 89 offset += ad->copyOut(boot_data + offset); 90 offset += an->copyOut(boot_data + offset); 91 92 DPRINTF(Loader, "Boot atags was %d bytes in total\n", size << 2); 93 DDUMP(Loader, boot_data, size << 2); 94 | 82 // Load symbols at physical address, we might not want 83 // to do this perminately, for but early bootup work 84 // it is helpfulp. 85 kernel->loadGlobalSymbols(kernelSymtab, loadAddrMask); 86 kernel->loadGlobalSymbols(debugSymbolTable, loadAddrMask); 87 88 // Setup boot data structure 89 AtagCore *ac = new AtagCore; --- 19 unchanged lines hidden (view full) --- 109 offset += ac->copyOut(boot_data + offset); 110 offset += am->copyOut(boot_data + offset); 111 offset += ad->copyOut(boot_data + offset); 112 offset += an->copyOut(boot_data + offset); 113 114 DPRINTF(Loader, "Boot atags was %d bytes in total\n", size << 2); 115 DDUMP(Loader, boot_data, size << 2); 116 |
95 functionalPort->writeBlob(ParamsList, boot_data, size << 2); | 117 physProxy->writeBlob(ParamsList, boot_data, size << 2); |
96 97#ifndef NDEBUG 98 kernelPanicEvent = addKernelFuncEvent<BreakPCEvent>("panic"); 99 if (!kernelPanicEvent) 100 panic("could not find kernel symbol \'panic\'"); 101#endif 102 103 // With ARM udelay() is #defined to __udelay --- 19 unchanged lines hidden (view full) --- 123 penReleaseAddr = 0; 124 kernelSymtab->findAddress("__secondary_data", secDataPtrAddr); 125 kernelSymtab->findAddress("secondary_data", secDataAddr); 126 kernelSymtab->findAddress("pen_release", penReleaseAddr); 127 128 secDataPtrAddr &= ~ULL(0x7F); 129 secDataAddr &= ~ULL(0x7F); 130 penReleaseAddr &= ~ULL(0x7F); | 118 119#ifndef NDEBUG 120 kernelPanicEvent = addKernelFuncEvent<BreakPCEvent>("panic"); 121 if (!kernelPanicEvent) 122 panic("could not find kernel symbol \'panic\'"); 123#endif 124 125 // With ARM udelay() is #defined to __udelay --- 19 unchanged lines hidden (view full) --- 145 penReleaseAddr = 0; 146 kernelSymtab->findAddress("__secondary_data", secDataPtrAddr); 147 kernelSymtab->findAddress("secondary_data", secDataAddr); 148 kernelSymtab->findAddress("pen_release", penReleaseAddr); 149 150 secDataPtrAddr &= ~ULL(0x7F); 151 secDataAddr &= ~ULL(0x7F); 152 penReleaseAddr &= ~ULL(0x7F); |
131} | |
132 | 153 |
133bool 134LinuxArmSystem::adderBootUncacheable(Addr a) 135{ 136 Addr block = a & ~ULL(0x7F); 137 if (block == secDataPtrAddr || block == secDataAddr || 138 block == penReleaseAddr) 139 return true; 140 return false; 141} 142 143void 144LinuxArmSystem::initState() 145{ 146 ArmSystem::initState(); 147 | |
148 for (int i = 0; i < threadContexts.size(); i++) { 149 threadContexts[i]->setIntReg(0, 0); 150 threadContexts[i]->setIntReg(1, params()->machine_type); 151 threadContexts[i]->setIntReg(2, ParamsList); 152 } 153} 154 155LinuxArmSystem::~LinuxArmSystem() --- 12 unchanged lines hidden --- | 154 for (int i = 0; i < threadContexts.size(); i++) { 155 threadContexts[i]->setIntReg(0, 0); 156 threadContexts[i]->setIntReg(1, params()->machine_type); 157 threadContexts[i]->setIntReg(2, ParamsList); 158 } 159} 160 161LinuxArmSystem::~LinuxArmSystem() --- 12 unchanged lines hidden --- |