Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/45243 )
Change subject: arch: Stop using deprecated M5_AT_* constants.
......................................................................
arch: Stop using deprecated M5_AT_* constants.
Change-Id: I26fc0cf1f27c1a1dcae479096b183ab1f5abc8e2
---
M src/arch/arm/process.cc
M src/arch/mips/process.cc
M src/arch/power/process.cc
M src/arch/riscv/process.cc
M src/arch/sparc/process.cc
M src/arch/x86/process.cc
M src/arch/x86/process.hh
7 files changed, 110 insertions(+), 110 deletions(-)
diff --git a/src/arch/arm/process.cc b/src/arch/arm/process.cc
index a9cf4bd..2acfc02 100644
--- a/src/arch/arm/process.cc
+++ b/src/arch/arm/process.cc
@@ -279,41 +279,41 @@
//Bits which describe the system hardware capabilities
//XXX Figure out what these should be
- auxv.emplace_back(M5_AT_HWCAP, features);
+ auxv.emplace_back(Gem5AtHwcap, features);
//Frequency at which times() increments
- auxv.emplace_back(M5_AT_CLKTCK, 0x64);
+ auxv.emplace_back(Gem5AtClktck, 0x64);
//Whether to enable "secure mode" in the executable
- auxv.emplace_back(M5_AT_SECURE, 0);
+ auxv.emplace_back(Gem5AtSecure, 0);
// Pointer to 16 bytes of random data
- auxv.emplace_back(M5_AT_RANDOM, 0);
+ auxv.emplace_back(Gem5AtRandom, 0);
//The filename of the program
- auxv.emplace_back(M5_AT_EXECFN, 0);
+ auxv.emplace_back(Gem5AtExecfn, 0);
//The string "v71" -- ARM v7 architecture
- auxv.emplace_back(M5_AT_PLATFORM, 0);
+ auxv.emplace_back(Gem5AtPlatform, 0);
}
//The system page size
- auxv.emplace_back(M5_AT_PAGESZ, ArmISA::PageBytes);
+ auxv.emplace_back(Gem5AtPagesz, ArmISA::PageBytes);
// For statically linked executables, this is the virtual address
of
// the program header tables if they appear in the executable image
- auxv.emplace_back(M5_AT_PHDR, elfObject->programHeaderTable());
+ auxv.emplace_back(Gem5AtPhdr, elfObject->programHeaderTable());
// This is the size of a program header entry from the elf file.
- auxv.emplace_back(M5_AT_PHENT, elfObject->programHeaderSize());
+ auxv.emplace_back(Gem5AtPhent, elfObject->programHeaderSize());
// This is the number of program headers from the original elf
file.
- auxv.emplace_back(M5_AT_PHNUM, elfObject->programHeaderCount());
+ auxv.emplace_back(Gem5AtPhnum, elfObject->programHeaderCount());
// This is the base address of the ELF interpreter; it should be
// zero for static executables or contain the base address for
// dynamic executables.
- auxv.emplace_back(M5_AT_BASE, getBias());
+ auxv.emplace_back(Gem5AtBase, getBias());
//XXX Figure out what this should be.
- auxv.emplace_back(M5_AT_FLAGS, 0);
+ auxv.emplace_back(Gem5AtFlags, 0);
//The entry point to the program
- auxv.emplace_back(M5_AT_ENTRY, objFile->entryPoint());
+ auxv.emplace_back(Gem5AtEntry, objFile->entryPoint());
//Different user and group IDs
- auxv.emplace_back(M5_AT_UID, uid());
- auxv.emplace_back(M5_AT_EUID, euid());
- auxv.emplace_back(M5_AT_GID, gid());
- auxv.emplace_back(M5_AT_EGID, egid());
+ auxv.emplace_back(Gem5AtUid, uid());
+ auxv.emplace_back(Gem5AtEuid, euid());
+ auxv.emplace_back(Gem5AtGid, gid());
+ auxv.emplace_back(Gem5AtEgid, egid());
}
//Figure out how big the initial stack nedes to be
@@ -414,13 +414,13 @@
//Fix up the aux vectors which point to other data
for (int i = auxv.size() - 1; i >= 0; i--) {
- if (auxv[i].type == M5_AT_PLATFORM) {
+ if (auxv[i].type == Gem5AtPlatform) {
auxv[i].val = platform_base;
initVirtMem->writeString(platform_base, platform.c_str());
- } else if (auxv[i].type == M5_AT_EXECFN) {
+ } else if (auxv[i].type == Gem5AtExecfn) {
auxv[i].val = aux_data_base;
initVirtMem->writeString(aux_data_base, filename.c_str());
- } else if (auxv[i].type == M5_AT_RANDOM) {
+ } else if (auxv[i].type == Gem5AtRandom) {
auxv[i].val = aux_random_base;
// Just leave the value 0, we don't want randomness
}
diff --git a/src/arch/mips/process.cc b/src/arch/mips/process.cc
index 9810d67..4f7debe 100644
--- a/src/arch/mips/process.cc
+++ b/src/arch/mips/process.cc
@@ -94,31 +94,31 @@
if (elfObject)
{
// Set the system page size
- auxv.emplace_back(M5_AT_PAGESZ, MipsISA::PageBytes);
+ auxv.emplace_back(Gem5AtPagesz, MipsISA::PageBytes);
// Set the frequency at which time() increments
- auxv.emplace_back(M5_AT_CLKTCK, 100);
+ auxv.emplace_back(Gem5AtClktck, 100);
// For statically linked executables, this is the virtual
// address of the program header tables if they appear in the
// executable image.
- auxv.emplace_back(M5_AT_PHDR, elfObject->programHeaderTable());
+ auxv.emplace_back(Gem5AtPhdr, elfObject->programHeaderTable());
DPRINTF(Loader, "auxv at PHDR %08p\n",
elfObject->programHeaderTable());
// This is the size of a program header entry from the elf file.
- auxv.emplace_back(M5_AT_PHENT, elfObject->programHeaderSize());
+ auxv.emplace_back(Gem5AtPhent, elfObject->programHeaderSize());
// This is the number of program headers from the original elf
file.
- auxv.emplace_back(M5_AT_PHNUM, elfObject->programHeaderCount());
+ auxv.emplace_back(Gem5AtPhnum, elfObject->programHeaderCount());
// This is the base address of the ELF interpreter; it should be
// zero for static executables or contain the base address for
// dynamic executables.
- auxv.emplace_back(M5_AT_BASE, getBias());
+ auxv.emplace_back(Gem5AtBase, getBias());
//The entry point to the program
- auxv.emplace_back(M5_AT_ENTRY, objFile->entryPoint());
+ auxv.emplace_back(Gem5AtEntry, objFile->entryPoint());
//Different user and group IDs
- auxv.emplace_back(M5_AT_UID, uid());
- auxv.emplace_back(M5_AT_EUID, euid());
- auxv.emplace_back(M5_AT_GID, gid());
- auxv.emplace_back(M5_AT_EGID, egid());
- auxv.emplace_back(M5_AT_RANDOM, 0);
+ auxv.emplace_back(Gem5AtUid, uid());
+ auxv.emplace_back(Gem5AtEuid, euid());
+ auxv.emplace_back(Gem5AtGid, gid());
+ auxv.emplace_back(Gem5AtEgid, egid());
+ auxv.emplace_back(Gem5AtRandom, 0);
}
// Calculate how much space we need for arg & env & auxv arrays.
@@ -179,7 +179,7 @@
// Fix up the aux vectors which point to data.
for (auto &aux: auxv) {
- if (aux.type == M5_AT_RANDOM)
+ if (aux.type == Gem5AtRandom)
aux.val = aux_data_base;
}
diff --git a/src/arch/power/process.cc b/src/arch/power/process.cc
index d8643ee..9c37a50 100644
--- a/src/arch/power/process.cc
+++ b/src/arch/power/process.cc
@@ -107,39 +107,39 @@
//Bits which describe the system hardware capabilities
//XXX Figure out what these should be
- auxv.emplace_back(M5_AT_HWCAP, features);
+ auxv.emplace_back(Gem5AtHwcap, features);
//The system page size
- auxv.emplace_back(M5_AT_PAGESZ, PowerISA::PageBytes);
+ auxv.emplace_back(Gem5AtPagesz, PowerISA::PageBytes);
//Frequency at which times() increments
- auxv.emplace_back(M5_AT_CLKTCK, 0x64);
+ auxv.emplace_back(Gem5AtClktck, 0x64);
// For statically linked executables, this is the virtual address
of
// the program header tables if they appear in the executable image
- auxv.emplace_back(M5_AT_PHDR, elfObject->programHeaderTable());
+ auxv.emplace_back(Gem5AtPhdr, elfObject->programHeaderTable());
// This is the size of a program header entry from the elf file.
- auxv.emplace_back(M5_AT_PHENT, elfObject->programHeaderSize());
+ auxv.emplace_back(Gem5AtPhent, elfObject->programHeaderSize());
// This is the number of program headers from the original elf
file.
- auxv.emplace_back(M5_AT_PHNUM, elfObject->programHeaderCount());
+ auxv.emplace_back(Gem5AtPhnum, elfObject->programHeaderCount());
// This is the base address of the ELF interpreter; it should be
// zero for static executables or contain the base address for
// dynamic executables.
- auxv.emplace_back(M5_AT_BASE, getBias());
+ auxv.emplace_back(Gem5AtBase, getBias());
//XXX Figure out what this should be.
- auxv.emplace_back(M5_AT_FLAGS, 0);
+ auxv.emplace_back(Gem5AtFlags, 0);
//The entry point to the program
- auxv.emplace_back(M5_AT_ENTRY, objFile->entryPoint());
+ auxv.emplace_back(Gem5AtEntry, objFile->entryPoint());
//Different user and group IDs
- auxv.emplace_back(M5_AT_UID, uid());
- auxv.emplace_back(M5_AT_EUID, euid());
- auxv.emplace_back(M5_AT_GID, gid());
- auxv.emplace_back(M5_AT_EGID, egid());
+ auxv.emplace_back(Gem5AtUid, uid());
+ auxv.emplace_back(Gem5AtEuid, euid());
+ auxv.emplace_back(Gem5AtGid, gid());
+ auxv.emplace_back(Gem5AtEgid, egid());
//Whether to enable "secure mode" in the executable
- auxv.emplace_back(M5_AT_SECURE, 0);
+ auxv.emplace_back(Gem5AtSecure, 0);
//The address of 16 "random" bytes
- auxv.emplace_back(M5_AT_RANDOM, 0);
+ auxv.emplace_back(Gem5AtRandom, 0);
//The filename of the program
- auxv.emplace_back(M5_AT_EXECFN, 0);
+ auxv.emplace_back(Gem5AtExecfn, 0);
//The string "v51" with unknown meaning
- auxv.emplace_back(M5_AT_PLATFORM, 0);
+ auxv.emplace_back(Gem5AtPlatform, 0);
}
//Figure out how big the initial stack nedes to be
@@ -239,13 +239,13 @@
//Fix up the aux vectors which point to other data
for (int i = auxv.size() - 1; i >= 0; i--) {
- if (auxv[i].type == M5_AT_PLATFORM) {
+ if (auxv[i].type == Gem5AtPlatform) {
auxv[i].val = platform_base;
initVirtMem->writeString(platform_base, platform.c_str());
- } else if (auxv[i].type == M5_AT_EXECFN) {
+ } else if (auxv[i].type == Gem5AtExecfn) {
auxv[i].val = aux_data_base + numRandomBytes;
initVirtMem->writeString(aux_data_base, filename.c_str());
- } else if (auxv[i].type == M5_AT_RANDOM) {
+ } else if (auxv[i].type == Gem5AtRandom) {
auxv[i].val = aux_data_base;
}
}
diff --git a/src/arch/riscv/process.cc b/src/arch/riscv/process.cc
index 30aebd6..82cde98 100644
--- a/src/arch/riscv/process.cc
+++ b/src/arch/riscv/process.cc
@@ -137,14 +137,14 @@
std::vector<AuxVector<IntType>> auxv;
if (elfObject != nullptr) {
- auxv.emplace_back(M5_AT_ENTRY, objFile->entryPoint());
- auxv.emplace_back(M5_AT_PHNUM, elfObject->programHeaderCount());
- auxv.emplace_back(M5_AT_PHENT, elfObject->programHeaderSize());
- auxv.emplace_back(M5_AT_PHDR, elfObject->programHeaderTable());
- auxv.emplace_back(M5_AT_PAGESZ, PageBytes);
- auxv.emplace_back(M5_AT_SECURE, 0);
- auxv.emplace_back(M5_AT_RANDOM, stack_top);
- auxv.emplace_back(M5_AT_NULL, 0);
+ auxv.emplace_back(Gem5AtEntry, objFile->entryPoint());
+ auxv.emplace_back(Gem5AtPhnum, elfObject->programHeaderCount());
+ auxv.emplace_back(Gem5AtPhent, elfObject->programHeaderSize());
+ auxv.emplace_back(Gem5AtPhdr, elfObject->programHeaderTable());
+ auxv.emplace_back(Gem5AtPagesz, PageBytes);
+ auxv.emplace_back(Gem5AtSecure, 0);
+ auxv.emplace_back(Gem5AtRandom, stack_top);
+ auxv.emplace_back(Gem5AtNull, 0);
}
stack_top -= (1 + argv.size()) * addrSize +
(1 + envp.size()) * addrSize +
@@ -223,14 +223,14 @@
// Push aux vector onto stack
std::map<IntType, std::string> aux_keys = {
- {M5_AT_ENTRY, "M5_AT_ENTRY"},
- {M5_AT_PHNUM, "M5_AT_PHNUM"},
- {M5_AT_PHENT, "M5_AT_PHENT"},
- {M5_AT_PHDR, "M5_AT_PHDR"},
- {M5_AT_PAGESZ, "M5_AT_PAGESZ"},
- {M5_AT_SECURE, "M5_AT_SECURE"},
- {M5_AT_RANDOM, "M5_AT_RANDOM"},
- {M5_AT_NULL, "M5_AT_NULL"}
+ {Gem5AtEntry, "Gem5AtEntry"},
+ {Gem5AtPhnum, "Gem5AtPhnum"},
+ {Gem5AtPhent, "Gem5AtPhent"},
+ {Gem5AtPhdr, "Gem5AtPhdr"},
+ {Gem5AtPagesz, "Gem5AtPagesz"},
+ {Gem5AtSecure, "Gem5AtSecure"},
+ {Gem5AtRandom, "Gem5AtRandom"},
+ {Gem5AtNull, "Gem5AtNull"}
};
for (const auto &aux: auxv) {
DPRINTF(Stack, "Wrote aux key %s to address %#x\n",
diff --git a/src/arch/sparc/process.cc b/src/arch/sparc/process.cc
index 51a0b7d..f0c6d94 100644
--- a/src/arch/sparc/process.cc
+++ b/src/arch/sparc/process.cc
@@ -179,36 +179,36 @@
auto *elfObject = dynamic_cast<::Loader::ElfObject *>(objFile);
if (elfObject) {
// Bits which describe the system hardware capabilities
- auxv.emplace_back(M5_AT_HWCAP, hwcap);
+ auxv.emplace_back(Gem5AtHwcap, hwcap);
// The system page size
- auxv.emplace_back(M5_AT_PAGESZ, SparcISA::PageBytes);
+ auxv.emplace_back(Gem5AtPagesz, SparcISA::PageBytes);
// Defined to be 100 in the kernel source.
// Frequency at which times() increments
- auxv.emplace_back(M5_AT_CLKTCK, 100);
+ auxv.emplace_back(Gem5AtClktck, 100);
// For statically linked executables, this is the virtual address
of
// the program header tables if they appear in the executable image
- auxv.emplace_back(M5_AT_PHDR, elfObject->programHeaderTable());
+ auxv.emplace_back(Gem5AtPhdr, elfObject->programHeaderTable());
// This is the size of a program header entry from the elf file.
- auxv.emplace_back(M5_AT_PHENT, elfObject->programHeaderSize());
+ auxv.emplace_back(Gem5AtPhent, elfObject->programHeaderSize());
// This is the number of program headers from the original elf
file.
- auxv.emplace_back(M5_AT_PHNUM, elfObject->programHeaderCount());
+ auxv.emplace_back(Gem5AtPhnum, elfObject->programHeaderCount());
// This is the base address of the ELF interpreter; it should be
// zero for static executables or contain the base address for
// dynamic executables.
- auxv.emplace_back(M5_AT_BASE, getBias());
+ auxv.emplace_back(Gem5AtBase, getBias());
// This is hardwired to 0 in the elf loading code in the kernel
- auxv.emplace_back(M5_AT_FLAGS, 0);
+ auxv.emplace_back(Gem5AtFlags, 0);
// The entry point to the program
- auxv.emplace_back(M5_AT_ENTRY, objFile->entryPoint());
+ auxv.emplace_back(Gem5AtEntry, objFile->entryPoint());
// Different user and group IDs
- auxv.emplace_back(M5_AT_UID, uid());
- auxv.emplace_back(M5_AT_EUID, euid());
- auxv.emplace_back(M5_AT_GID, gid());
- auxv.emplace_back(M5_AT_EGID, egid());
+ auxv.emplace_back(Gem5AtUid, uid());
+ auxv.emplace_back(Gem5AtEuid, euid());
+ auxv.emplace_back(Gem5AtGid, gid());
+ auxv.emplace_back(Gem5AtEgid, egid());
// Whether to enable "secure mode" in the executable
- auxv.emplace_back(M5_AT_SECURE, 0);
+ auxv.emplace_back(Gem5AtSecure, 0);
// The address of 16 "random" bytes.
- auxv.emplace_back(M5_AT_RANDOM, 0);
+ auxv.emplace_back(Gem5AtRandom, 0);
}
// Figure out how big the initial stack needs to be
@@ -318,7 +318,7 @@
// Fix up the aux vectors which point to data.
for (auto &aux: auxv) {
- if (aux.type == M5_AT_RANDOM)
+ if (aux.type == Gem5AtRandom)
aux.val = aux_data_base;
}
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index 4119ad8..a9e490a 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -806,40 +806,40 @@
// Bits which describe the system hardware capabilities
// XXX Figure out what these should be
- auxv.emplace_back(M5_AT_HWCAP, features);
+ auxv.emplace_back(Gem5AtHwcap, features);
// The system page size
- auxv.emplace_back(M5_AT_PAGESZ, X86ISA::PageBytes);
+ auxv.emplace_back(Gem5AtPagesz, X86ISA::PageBytes);
// Frequency at which times() increments
// Defined to be 100 in the kernel source.
- auxv.emplace_back(M5_AT_CLKTCK, 100);
+ auxv.emplace_back(Gem5AtClktck, 100);
// This is the virtual address of the program header tables if they
// appear in the executable image.
- auxv.emplace_back(M5_AT_PHDR, elfObject->programHeaderTable());
+ auxv.emplace_back(Gem5AtPhdr, elfObject->programHeaderTable());
// This is the size of a program header entry from the elf file.
- auxv.emplace_back(M5_AT_PHENT, elfObject->programHeaderSize());
+ auxv.emplace_back(Gem5AtPhent, elfObject->programHeaderSize());
// This is the number of program headers from the original elf
file.
- auxv.emplace_back(M5_AT_PHNUM, elfObject->programHeaderCount());
+ auxv.emplace_back(Gem5AtPhnum, elfObject->programHeaderCount());
// This is the base address of the ELF interpreter; it should be
// zero for static executables or contain the base address for
// dynamic executables.
- auxv.emplace_back(M5_AT_BASE, getBias());
+ auxv.emplace_back(Gem5AtBase, getBias());
// XXX Figure out what this should be.
- auxv.emplace_back(M5_AT_FLAGS, 0);
+ auxv.emplace_back(Gem5AtFlags, 0);
// The entry point to the program
- auxv.emplace_back(M5_AT_ENTRY, objFile->entryPoint());
+ auxv.emplace_back(Gem5AtEntry, objFile->entryPoint());
// Different user and group IDs
- auxv.emplace_back(M5_AT_UID, uid());
- auxv.emplace_back(M5_AT_EUID, euid());
- auxv.emplace_back(M5_AT_GID, gid());
- auxv.emplace_back(M5_AT_EGID, egid());
+ auxv.emplace_back(Gem5AtUid, uid());
+ auxv.emplace_back(Gem5AtEuid, euid());
+ auxv.emplace_back(Gem5AtGid, gid());
+ auxv.emplace_back(Gem5AtEgid, egid());
// Whether to enable "secure mode" in the executable
- auxv.emplace_back(M5_AT_SECURE, 0);
+ auxv.emplace_back(Gem5AtSecure, 0);
// The address of 16 "random" bytes.
- auxv.emplace_back(M5_AT_RANDOM, 0);
+ auxv.emplace_back(Gem5AtRandom, 0);
// The name of the program
- auxv.emplace_back(M5_AT_EXECFN, 0);
+ auxv.emplace_back(Gem5AtExecfn, 0);
// The platform string
- auxv.emplace_back(M5_AT_PLATFORM, 0);
+ auxv.emplace_back(Gem5AtPlatform, 0);
}
// Figure out how big the initial stack needs to be
@@ -953,11 +953,11 @@
initVirtMem->writeString(file_name_base, filename.c_str());
// Fix up the aux vectors which point to data
- assert(auxv[auxv.size() - 3].type == M5_AT_RANDOM);
+ assert(auxv[auxv.size() - 3].type == Gem5AtRandom);
auxv[auxv.size() - 3].val = aux_data_base;
- assert(auxv[auxv.size() - 2].type == M5_AT_EXECFN);
+ assert(auxv[auxv.size() - 2].type == Gem5AtExecfn);
auxv[auxv.size() - 2].val = argv_array_base;
- assert(auxv[auxv.size() - 1].type == M5_AT_PLATFORM);
+ assert(auxv[auxv.size() - 1].type == Gem5AtPlatform);
auxv[auxv.size() - 1].val = aux_data_base + numRandomBytes;
@@ -997,7 +997,7 @@
X86_64Process::argsInit(int pageSize)
{
std::vector<AuxVector<uint64_t> > extraAuxvs;
- extraAuxvs.emplace_back(M5_AT_SYSINFO_EHDR, vsyscallPage.base);
+ extraAuxvs.emplace_back(Gem5AtSysinfoEhdr, vsyscallPage.base);
X86Process::argsInit<uint64_t>(pageSize, extraAuxvs);
}
@@ -1006,9 +1006,9 @@
{
std::vector<AuxVector<uint32_t> > extraAuxvs;
//Tell the binary where the vsyscall part of the vsyscall page is.
- extraAuxvs.emplace_back(M5_AT_SYSINFO,
+ extraAuxvs.emplace_back(Gem5AtSysinfo,
vsyscallPage.base + vsyscallPage.vsyscallOffset);
- extraAuxvs.emplace_back(M5_AT_SYSINFO_EHDR, vsyscallPage.base);
+ extraAuxvs.emplace_back(Gem5AtSysinfoEhdr, vsyscallPage.base);
X86Process::argsInit<uint32_t>(pageSize, extraAuxvs);
}
diff --git a/src/arch/x86/process.hh b/src/arch/x86/process.hh
index 56f1353..363b898 100644
--- a/src/arch/x86/process.hh
+++ b/src/arch/x86/process.hh
@@ -52,8 +52,8 @@
{
enum X86AuxiliaryVectorTypes
{
- M5_AT_SYSINFO = 32,
- M5_AT_SYSINFO_EHDR = 33
+ Gem5AtSysinfo = 32,
+ Gem5AtSysinfoEhdr = 33
};
class X86Process : public Process
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45243
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I26fc0cf1f27c1a1dcae479096b183ab1f5abc8e2
Gerrit-Change-Number: 45243
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s