Deleted Added
sdiff udiff text old ( 8997:f07639e4b676 ) new ( 9261:f795ce1feb5b )
full compact
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

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

117 // to do this permanently, for but early bootup work
118 // it is helpful.
119 if (params()->early_kernel_symbols) {
120 kernel->loadGlobalSymbols(kernelSymtab, loadAddrMask);
121 kernel->loadGlobalSymbols(debugSymbolTable, loadAddrMask);
122 }
123
124 // Setup boot data structure
125 AtagCore *ac = new AtagCore;
126 ac->flags(1); // read-only
127 ac->pagesize(8192);
128 ac->rootdev(0);
129
130 AddrRangeList atagRanges = physmem.getConfAddrRanges();
131 if (atagRanges.size() != 1) {
132 fatal("Expected a single ATAG memory entry but got %d\n",
133 atagRanges.size());
134 }
135 AtagMem *am = new AtagMem;
136 am->memSize(atagRanges.begin()->size());
137 am->memStart(atagRanges.begin()->start);
138
139 AtagCmdline *ad = new AtagCmdline;
140 ad->cmdline(params()->boot_osflags);
141
142 DPRINTF(Loader, "boot command line %d bytes: %s\n", ad->size() <<2, params()->boot_osflags.c_str());
143
144 AtagNone *an = new AtagNone;
145
146 uint32_t size = ac->size() + am->size() + ad->size() + an->size();
147 uint32_t offset = 0;
148 uint8_t *boot_data = new uint8_t[size << 2];
149
150 offset += ac->copyOut(boot_data + offset);
151 offset += am->copyOut(boot_data + offset);
152 offset += ad->copyOut(boot_data + offset);
153 offset += an->copyOut(boot_data + offset);
154
155 DPRINTF(Loader, "Boot atags was %d bytes in total\n", size << 2);
156 DDUMP(Loader, boot_data, size << 2);
157
158 physProxy.writeBlob(params()->atags_addr, boot_data, size << 2);
159
160 for (int i = 0; i < threadContexts.size(); i++) {
161 threadContexts[i]->setIntReg(0, 0);
162 threadContexts[i]->setIntReg(1, params()->machine_type);
163 threadContexts[i]->setIntReg(2, params()->atags_addr);
164 }
165}
166
167LinuxArmSystem::~LinuxArmSystem()

--- 12 unchanged lines hidden ---