smbios.hh (7087:fb8d5786ff30) smbios.hh (8706:b1838faf3bcc)
1/*
2 * Copyright (c) 2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

46#include <string>
47#include <vector>
48
49#include "base/types.hh"
50#include "enums/Characteristic.hh"
51#include "enums/ExtCharacteristic.hh"
52#include "sim/sim_object.hh"
53
1/*
2 * Copyright (c) 2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

46#include <string>
47#include <vector>
48
49#include "base/types.hh"
50#include "enums/Characteristic.hh"
51#include "enums/ExtCharacteristic.hh"
52#include "sim/sim_object.hh"
53
54class FunctionalPort;
54class PortProxy;
55class X86SMBiosBiosInformationParams;
56class X86SMBiosSMBiosStructureParams;
57class X86SMBiosSMBiosTableParams;
58
59namespace X86ISA
60{
61
62namespace SMBios

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

84
85 virtual uint8_t
86 getLength()
87 {
88 // This is the size of a structure with nothing but the header
89 return 4;
90 }
91
55class X86SMBiosBiosInformationParams;
56class X86SMBiosSMBiosStructureParams;
57class X86SMBiosSMBiosTableParams;
58
59namespace X86ISA
60{
61
62namespace SMBios

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

84
85 virtual uint8_t
86 getLength()
87 {
88 // This is the size of a structure with nothing but the header
89 return 4;
90 }
91
92 virtual uint16_t writeOut(FunctionalPort * port, Addr addr);
92 virtual uint16_t writeOut(PortProxy* proxy, Addr addr);
93
94 protected:
95 bool stringFields;
96
97 SMBiosStructure(Params * p, uint8_t _type);
98
99 std::vector<std::string> strings;
100
93
94 protected:
95 bool stringFields;
96
97 SMBiosStructure(Params * p, uint8_t _type);
98
99 std::vector<std::string> strings;
100
101 void writeOutStrings(FunctionalPort * port, Addr addr);
101 void writeOutStrings(PortProxy* proxy, Addr addr);
102
103 int getStringLength();
104
105 public:
106
107 int addString(std::string & newString);
108 std::string readString(int n);
109 void setString(int n, std::string & newString);

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

140 // Offset 16h, 1 byte
141 uint8_t embContFirmwareMajor;
142 // Offset 17h, 1 byte
143 uint8_t embContFirmwareMinor;
144
145 BiosInformation(Params * p);
146
147 uint8_t getLength() { return 0x18; }
102
103 int getStringLength();
104
105 public:
106
107 int addString(std::string & newString);
108 std::string readString(int n);
109 void setString(int n, std::string & newString);

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

140 // Offset 16h, 1 byte
141 uint8_t embContFirmwareMajor;
142 // Offset 17h, 1 byte
143 uint8_t embContFirmwareMinor;
144
145 BiosInformation(Params * p);
146
147 uint8_t getLength() { return 0x18; }
148 uint16_t writeOut(FunctionalPort * port, Addr addr);
148 uint16_t writeOut(PortProxy* proxy, Addr addr);
149};
150
151class SMBiosTable : public SimObject
152{
153 protected:
154 typedef X86SMBiosSMBiosTableParams Params;
155
156 struct SMBiosHeader

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

218 return smbiosHeader.intermediateHeader.tableAddr;
219 }
220
221 void setTableAddr(Addr addr)
222 {
223 smbiosHeader.intermediateHeader.tableAddr = addr;
224 }
225
149};
150
151class SMBiosTable : public SimObject
152{
153 protected:
154 typedef X86SMBiosSMBiosTableParams Params;
155
156 struct SMBiosHeader

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

218 return smbiosHeader.intermediateHeader.tableAddr;
219 }
220
221 void setTableAddr(Addr addr)
222 {
223 smbiosHeader.intermediateHeader.tableAddr = addr;
224 }
225
226 void writeOut(FunctionalPort * port, Addr addr,
226 void writeOut(PortProxy* proxy, Addr addr,
227 Addr &headerSize, Addr &structSize);
228};
229
230} //SMBios
231} //X86ISA
232
233#endif
227 Addr &headerSize, Addr &structSize);
228};
229
230} //SMBios
231} //X86ISA
232
233#endif