arch-x86: Rename SMBios namespace as smbios

As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

X86ISA::SMBios became X86ISA::smbios.

Change-Id: Ifc90a7833562801999941e038a6267070fcddcac
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45397
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
This commit is contained in:
Daniel R. Carvalho
2021-05-07 14:27:42 -03:00
committed by Daniel Carvalho
parent 3016478068
commit 2a3b729b55
4 changed files with 26 additions and 23 deletions

View File

@@ -38,7 +38,7 @@ from m5.SimObject import SimObject
class X86SMBiosSMBiosStructure(SimObject):
type = 'X86SMBiosSMBiosStructure'
cxx_class = 'X86ISA::SMBios::SMBiosStructure'
cxx_class = 'X86ISA::smbios::SMBiosStructure'
cxx_header = 'arch/x86/bios/smbios.hh'
abstract = True
@@ -91,7 +91,7 @@ class ExtCharacteristic(Enum):
class X86SMBiosBiosInformation(X86SMBiosSMBiosStructure):
type = 'X86SMBiosBiosInformation'
cxx_class = 'X86ISA::SMBios::BiosInformation'
cxx_class = 'X86ISA::smbios::BiosInformation'
cxx_header = 'arch/x86/bios/smbios.hh'
vendor = Param.String("", "vendor name string")
@@ -114,7 +114,7 @@ class X86SMBiosBiosInformation(X86SMBiosSMBiosStructure):
class X86SMBiosSMBiosTable(SimObject):
type = 'X86SMBiosSMBiosTable'
cxx_class = 'X86ISA::SMBios::SMBiosTable'
cxx_class = 'X86ISA::smbios::SMBiosTable'
cxx_header = 'arch/x86/bios/smbios.hh'
major_version = Param.UInt8(2, "major version number")

View File

@@ -47,14 +47,14 @@
#include "params/X86SMBiosSMBiosTable.hh"
#include "sim/byteswap.hh"
const char X86ISA::SMBios::SMBiosTable::SMBiosHeader::anchorString[] = "_SM_";
const uint8_t X86ISA::SMBios::SMBiosTable::
const char X86ISA::smbios::SMBiosTable::SMBiosHeader::anchorString[] = "_SM_";
const uint8_t X86ISA::smbios::SMBiosTable::
SMBiosHeader::formattedArea[] = {0,0,0,0,0};
const uint8_t X86ISA::SMBios::SMBiosTable::
const uint8_t X86ISA::smbios::SMBiosTable::
SMBiosHeader::entryPointLength = 0x1F;
const uint8_t X86ISA::SMBios::SMBiosTable::
const uint8_t X86ISA::smbios::SMBiosTable::
SMBiosHeader::entryPointRevision = 0;
const char X86ISA::SMBios::SMBiosTable::
const char X86ISA::smbios::SMBiosTable::
SMBiosHeader::IntermediateHeader::anchorString[] = "_DMI_";
template <class T>
@@ -70,7 +70,7 @@ composeBitVector(T vec)
}
uint16_t
X86ISA::SMBios::SMBiosStructure::writeOut(PortProxy& proxy, Addr addr)
X86ISA::smbios::SMBiosStructure::writeOut(PortProxy& proxy, Addr addr)
{
proxy.writeBlob(addr, &type, 1);
@@ -83,13 +83,13 @@ X86ISA::SMBios::SMBiosStructure::writeOut(PortProxy& proxy, Addr addr)
return length + getStringLength();
}
X86ISA::SMBios::SMBiosStructure::SMBiosStructure(
X86ISA::smbios::SMBiosStructure::SMBiosStructure(
const Params &p, uint8_t _type) :
SimObject(p), type(_type), handle(0), stringFields(false)
{}
void
X86ISA::SMBios::SMBiosStructure::writeOutStrings(
X86ISA::smbios::SMBiosStructure::writeOutStrings(
PortProxy& proxy, Addr addr)
{
std::vector<std::string>::iterator it;
@@ -112,7 +112,7 @@ X86ISA::SMBios::SMBiosStructure::writeOutStrings(
}
int
X86ISA::SMBios::SMBiosStructure::getStringLength()
X86ISA::smbios::SMBiosStructure::getStringLength()
{
int size = 0;
std::vector<std::string>::iterator it;
@@ -125,7 +125,7 @@ X86ISA::SMBios::SMBiosStructure::getStringLength()
}
int
X86ISA::SMBios::SMBiosStructure::addString(const std::string &new_string)
X86ISA::smbios::SMBiosStructure::addString(const std::string &new_string)
{
stringFields = true;
// If a string is empty, treat it as not existing. The index for empty
@@ -137,21 +137,21 @@ X86ISA::SMBios::SMBiosStructure::addString(const std::string &new_string)
}
std::string
X86ISA::SMBios::SMBiosStructure::readString(int n)
X86ISA::smbios::SMBiosStructure::readString(int n)
{
assert(n > 0 && n <= strings.size());
return strings[n - 1];
}
void
X86ISA::SMBios::SMBiosStructure::setString(
X86ISA::smbios::SMBiosStructure::setString(
int n, const std::string &new_string)
{
assert(n > 0 && n <= strings.size());
strings[n - 1] = new_string;
}
X86ISA::SMBios::BiosInformation::BiosInformation(const Params &p) :
X86ISA::smbios::BiosInformation::BiosInformation(const Params &p) :
SMBiosStructure(p, Type),
startingAddrSegment(p.starting_addr_segment),
romSize(p.rom_size),
@@ -169,7 +169,7 @@ X86ISA::SMBios::BiosInformation::BiosInformation(const Params &p) :
}
uint16_t
X86ISA::SMBios::BiosInformation::writeOut(PortProxy& proxy, Addr addr)
X86ISA::smbios::BiosInformation::writeOut(PortProxy& proxy, Addr addr)
{
uint8_t size = SMBiosStructure::writeOut(proxy, addr);
@@ -199,7 +199,7 @@ X86ISA::SMBios::BiosInformation::writeOut(PortProxy& proxy, Addr addr)
return size;
}
X86ISA::SMBios::SMBiosTable::SMBiosTable(const Params &p) :
X86ISA::smbios::SMBiosTable::SMBiosTable(const Params &p) :
SimObject(p), structures(p.structures)
{
smbiosHeader.majorVersion = p.major_version;
@@ -211,7 +211,7 @@ X86ISA::SMBios::SMBiosTable::SMBiosTable(const Params &p) :
}
void
X86ISA::SMBios::SMBiosTable::writeOut(PortProxy& proxy, Addr addr,
X86ISA::smbios::SMBiosTable::writeOut(PortProxy& proxy, Addr addr,
Addr &headerSize, Addr &structSize)
{
headerSize = 0x1F;

View File

@@ -44,6 +44,7 @@
#include <string>
#include <vector>
#include "base/compiler.hh"
#include "base/types.hh"
#include "enums/Characteristic.hh"
#include "enums/ExtCharacteristic.hh"
@@ -57,7 +58,8 @@ struct X86SMBiosSMBiosTableParams;
namespace X86ISA
{
namespace SMBios
GEM5_DEPRECATED_NAMESPACE(SMBios, smbios);
namespace smbios
{
class SMBiosStructure : public SimObject

View File

@@ -51,12 +51,13 @@
namespace X86ISA
{
namespace SMBios
GEM5_DEPRECATED_NAMESPACE(SMBios, smbios);
namespace smbios
{
class SMBiosTable;
} // namespace SMBios
} // namespace smbios
namespace IntelMP
{
@@ -79,7 +80,7 @@ class FsWorkload : public KernelWorkload
protected:
SMBios::SMBiosTable *smbiosTable;
smbios::SMBiosTable *smbiosTable;
IntelMP::FloatingPointer *mpFloatingPointer;
IntelMP::ConfigTable *mpConfigTable;
ACPI::RSDP *rsdp;