diff --git a/src/arch/x86/bios/SMBios.py b/src/arch/x86/bios/SMBios.py index 7493caa0d1..24d28e37a2 100644 --- a/src/arch/x86/bios/SMBios.py +++ b/src/arch/x86/bios/SMBios.py @@ -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") diff --git a/src/arch/x86/bios/smbios.cc b/src/arch/x86/bios/smbios.cc index e6f793479c..bd5210cbf5 100644 --- a/src/arch/x86/bios/smbios.cc +++ b/src/arch/x86/bios/smbios.cc @@ -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 @@ -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::iterator it; @@ -112,7 +112,7 @@ X86ISA::SMBios::SMBiosStructure::writeOutStrings( } int -X86ISA::SMBios::SMBiosStructure::getStringLength() +X86ISA::smbios::SMBiosStructure::getStringLength() { int size = 0; std::vector::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; diff --git a/src/arch/x86/bios/smbios.hh b/src/arch/x86/bios/smbios.hh index bb49e99e57..b3c4cf9da3 100644 --- a/src/arch/x86/bios/smbios.hh +++ b/src/arch/x86/bios/smbios.hh @@ -44,6 +44,7 @@ #include #include +#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 diff --git a/src/arch/x86/fs_workload.hh b/src/arch/x86/fs_workload.hh index 9e6fa80091..787c70270f 100644 --- a/src/arch/x86/fs_workload.hh +++ b/src/arch/x86/fs_workload.hh @@ -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;