55 SMBiosHeader::formattedArea[] = {0,0,0,0,0};
182 uint16_t startingAddrSegmentGuest =
htole(startingAddrSegment);
188 uint64_t characteristicsGuest =
htole(characteristics);
191 uint16_t characteristicExtBytesGuest =
192 htole(characteristicExtBytes);
193 proxy.
writeBlob(
addr + 0x12, &characteristicExtBytesGuest, 2);
200 writeOutStrings(proxy,
addr + getLength());
225 uint8_t mainChecksum = 0;
227 proxy.
writeBlob(
addr, (uint8_t *)smbiosHeader.anchorString, 4);
228 for (
int i = 0;
i < 4;
i++)
229 mainChecksum += smbiosHeader.anchorString[
i];
233 proxy.
writeBlob(
addr + 0x5, &smbiosHeader.entryPointLength, 1);
234 mainChecksum += smbiosHeader.entryPointLength;
236 mainChecksum += smbiosHeader.majorVersion;
238 mainChecksum += smbiosHeader.minorVersion;
240 proxy.
writeBlob(
addr + 0xA, &smbiosHeader.entryPointRevision, 1);
241 mainChecksum += smbiosHeader.entryPointRevision;
243 for (
int i = 0;
i < 5;
i++)
244 mainChecksum += smbiosHeader.formattedArea[
i];
249 uint8_t intChecksum = 0;
252 smbiosHeader.intermediateHeader.anchorString, 5);
253 for (
int i = 0;
i < 5;
i++)
254 intChecksum += smbiosHeader.intermediateHeader.anchorString[
i];
259 uint32_t tableAddrGuest =
260 htole(smbiosHeader.intermediateHeader.tableAddr);
262 for (
int i = 0;
i < 4;
i++) {
263 intChecksum += tableAddrGuest;
264 tableAddrGuest >>= 8;
267 uint16_t numStructs =
letoh(structures.size());
269 for (
int i = 0;
i < 2;
i++) {
270 intChecksum += numStructs;
275 &smbiosHeader.intermediateHeader.smbiosBCDRevision, 1);
276 intChecksum += smbiosHeader.intermediateHeader.smbiosBCDRevision;
282 Addr base = smbiosHeader.intermediateHeader.tableAddr;
284 uint16_t maxSize = 0;
286 for (it = structures.begin(); it != structures.end(); it++) {
287 uint16_t size = (*it)->writeOut(proxy,
base +
offset);
299 maxSize =
htole(maxSize);
301 for (
int i = 0;
i < 2;
i++) {
302 mainChecksum += maxSize;
307 mainChecksum = -mainChecksum;
314 uint16_t tableSize =
offset;
315 tableSize =
htole(tableSize);
317 for (
int i = 0;
i < 2;
i++) {
318 intChecksum += tableSize;
322 intChecksum = -intChecksum;
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...