process.cc (10223:34f48d0dac97) process.cc (10318:98771a936b61)
1/*
2 * Copyright (c) 2007-2008 The Florida State University
3 * Copyright (c) 2009 The University of Edinburgh
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

51{
52 stack_base = 0xbf000000L;
53
54 // Set pointer for next thread stack. Reserve 8M for main stack.
55 next_thread_stack_base = stack_base - (8 * 1024 * 1024);
56
57 // Set up break point (Top of Heap)
58 brk_point = objFile->dataBase() + objFile->dataSize() + objFile->bssSize();
1/*
2 * Copyright (c) 2007-2008 The Florida State University
3 * Copyright (c) 2009 The University of Edinburgh
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

51{
52 stack_base = 0xbf000000L;
53
54 // Set pointer for next thread stack. Reserve 8M for main stack.
55 next_thread_stack_base = stack_base - (8 * 1024 * 1024);
56
57 // Set up break point (Top of Heap)
58 brk_point = objFile->dataBase() + objFile->dataSize() + objFile->bssSize();
59 brk_point = roundUp(brk_point, VMPageSize);
59 brk_point = roundUp(brk_point, PageBytes);
60
61 // Set up region for mmaps. For now, start at bottom of kuseg space.
62 mmap_start = mmap_end = 0x70000000L;
63}
64
65void
66PowerLiveProcess::initState()
67{
68 Process::initState();
69
60
61 // Set up region for mmaps. For now, start at bottom of kuseg space.
62 mmap_start = mmap_end = 0x70000000L;
63}
64
65void
66PowerLiveProcess::initState()
67{
68 Process::initState();
69
70 argsInit(MachineBytes, VMPageSize);
70 argsInit(MachineBytes, PageBytes);
71}
72
73void
74PowerLiveProcess::argsInit(int intSize, int pageSize)
75{
76 typedef AuxVector<uint32_t> auxv_t;
77 std::vector<auxv_t> auxv;
78

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

93 ElfObject * elfObject = dynamic_cast<ElfObject *>(objFile);
94 if (elfObject) {
95 uint32_t features = 0;
96
97 //Bits which describe the system hardware capabilities
98 //XXX Figure out what these should be
99 auxv.push_back(auxv_t(M5_AT_HWCAP, features));
100 //The system page size
71}
72
73void
74PowerLiveProcess::argsInit(int intSize, int pageSize)
75{
76 typedef AuxVector<uint32_t> auxv_t;
77 std::vector<auxv_t> auxv;
78

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

93 ElfObject * elfObject = dynamic_cast<ElfObject *>(objFile);
94 if (elfObject) {
95 uint32_t features = 0;
96
97 //Bits which describe the system hardware capabilities
98 //XXX Figure out what these should be
99 auxv.push_back(auxv_t(M5_AT_HWCAP, features));
100 //The system page size
101 auxv.push_back(auxv_t(M5_AT_PAGESZ, PowerISA::VMPageSize));
101 auxv.push_back(auxv_t(M5_AT_PAGESZ, PowerISA::PageBytes));
102 //Frequency at which times() increments
103 auxv.push_back(auxv_t(M5_AT_CLKTCK, 0x64));
104 // For statically linked executables, this is the virtual address of the
105 // program header tables if they appear in the executable image
106 auxv.push_back(auxv_t(M5_AT_PHDR, elfObject->programHeaderTable()));
107 // This is the size of a program header entry from the elf file.
108 auxv.push_back(auxv_t(M5_AT_PHENT, elfObject->programHeaderSize()));
109 // This is the number of program headers from the original elf file.

--- 181 unchanged lines hidden ---
102 //Frequency at which times() increments
103 auxv.push_back(auxv_t(M5_AT_CLKTCK, 0x64));
104 // For statically linked executables, this is the virtual address of the
105 // program header tables if they appear in the executable image
106 auxv.push_back(auxv_t(M5_AT_PHDR, elfObject->programHeaderTable()));
107 // This is the size of a program header entry from the elf file.
108 auxv.push_back(auxv_t(M5_AT_PHENT, elfObject->programHeaderSize()));
109 // This is the number of program headers from the original elf file.

--- 181 unchanged lines hidden ---