Daniel Carvalho has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/45397 )

Change subject: arch-x86: Rename SMBios namespace as smbios
......................................................................

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 <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45397
Tested-by: kokoro <[email protected]>
Reviewed-by: Bobby R. Bruce <[email protected]>
Reviewed-by: Hoa Nguyen <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
---
M src/arch/x86/bios/SMBios.py
M src/arch/x86/bios/smbios.cc
M src/arch/x86/bios/smbios.hh
M src/arch/x86/fs_workload.hh
4 files changed, 26 insertions(+), 23 deletions(-)

Approvals:
  Hoa Nguyen: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/x86/bios/SMBios.py b/src/arch/x86/bios/SMBios.py
index 7493caa..24d28e3 100644
--- a/src/arch/x86/bios/SMBios.py
+++ b/src/arch/x86/bios/SMBios.py
@@ -38,7 +38,7 @@

 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 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 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 e6f7934..bd5210c 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 <class T>
@@ -70,7 +70,7 @@
 }

 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 @@
     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 @@
 }

 int
-X86ISA::SMBios::SMBiosStructure::getStringLength()
+X86ISA::smbios::SMBiosStructure::getStringLength()
 {
     int size = 0;
     std::vector<std::string>::iterator it;
@@ -125,7 +125,7 @@
 }

 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 @@
 }

 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 @@
     }

 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 @@
     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 @@
 }

 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 bb49e99..b3c4cf9 100644
--- a/src/arch/x86/bios/smbios.hh
+++ b/src/arch/x86/bios/smbios.hh
@@ -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 @@
 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 9e6fa80..787c702 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 @@

   protected:

-    SMBios::SMBiosTable *smbiosTable;
+    smbios::SMBiosTable *smbiosTable;
     IntelMP::FloatingPointer *mpFloatingPointer;
     IntelMP::ConfigTable *mpConfigTable;
     ACPI::RSDP *rsdp;



6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45397
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: Ifc90a7833562801999941e038a6267070fcddcac
Gerrit-Change-Number: 45397
Gerrit-PatchSet: 8
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to