INTREG_EDX,
INTREG_ESI,
INTREG_EDI,
+ INTREG_EBP
};
static const int NumArgumentRegs32 = sizeof(ArgumentReg) / sizeof(const int);
// Set up region for mmaps. This was determined empirically and may not
// always be correct.
- mmap_start = mmap_end = (Addr)0x2aaaaaaab000ULL;
+ mmap_end = (Addr)0x2aaaaaaab000ULL;
}
void
// Set up region for mmaps. This was determined empirically and may not
// always be correct.
- mmap_start = mmap_end = (Addr)0xf7ffe000ULL;
+ mmap_end = (Addr)0xf7ffe000ULL;
}
SyscallDesc*
dataAttr.system = 1;
//Initialize the segment registers.
- for(int seg = 0; seg < NUM_SEGMENTREGS; seg++) {
+ for (int seg = 0; seg < NUM_SEGMENTREGS; seg++) {
tc->setMiscRegNoEffect(MISCREG_SEG_BASE(seg), 0);
tc->setMiscRegNoEffect(MISCREG_SEG_EFF_BASE(seg), 0);
tc->setMiscRegNoEffect(MISCREG_SEG_ATTR(seg), dataAttr);
argsInit(sizeof(uint32_t), PageBytes);
- /*
+ /*
* Set up a GDT for this process. The whole GDT wouldn't really be for
* this process, but the only parts we care about are.
*/
dataAttr.system = 1;
//Initialize the segment registers.
- for(int seg = 0; seg < NUM_SEGMENTREGS; seg++) {
+ for (int seg = 0; seg < NUM_SEGMENTREGS; seg++) {
tc->setMiscRegNoEffect(MISCREG_SEG_BASE(seg), 0);
tc->setMiscRegNoEffect(MISCREG_SEG_EFF_BASE(seg), 0);
tc->setMiscRegNoEffect(MISCREG_SEG_ATTR(seg), dataAttr);
std::vector<auxv_t> auxv = extraAuxvs;
string filename;
- if(argv.size() < 1)
+ if (argv.size() < 1)
filename = "";
else
filename = argv[0];
}
//Write out the terminating zeroed auxilliary vector
const uint64_t zero = 0;
- initVirtMem.writeBlob(auxv_array_base + 2 * intSize * auxv.size(),
- (uint8_t*)&zero, 2 * intSize);
+ initVirtMem.writeBlob(auxv_array_base + auxv.size() * 2 * intSize,
+ (uint8_t*)&zero, intSize);
+ initVirtMem.writeBlob(auxv_array_base + (auxv.size() * 2 + 1) * intSize,
+ (uint8_t*)&zero, intSize);
initVirtMem.writeString(aux_data_base, platform.c_str());