Deleted Added
sdiff udiff text old ( 5612:1bd333953e49 ) new ( 5615:1c4b9b1aa500 )
full compact
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

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

68#include "params/X86System.hh"
69#include "sim/byteswap.hh"
70
71
72using namespace LittleEndianGuest;
73using namespace X86ISA;
74
75X86System::X86System(Params *p)
76 : System(p)
77{
78 smbiosTable = new X86ISA::SMBios::SMBiosTable;
79 smbiosTable->smbiosHeader.majorVersion = 2;
80 smbiosTable->smbiosHeader.minorVersion = 5;
81 smbiosTable->smbiosHeader.intermediateHeader.smbiosBCDRevision = 0x25;
82}
83
84void
85X86System::startup()
86{
87 System::startup();
88 // This is the boot strap processor (BSP). Initialize it to look like
89 // the boot loader has just turned control over to the 64 bit OS. We
90 // won't actually set up real mode or legacy protected mode descriptor

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

231 csAttr.longMode = 1;
232 threadContexts[0]->setMiscReg(MISCREG_CS_ATTR, csAttr);
233
234 threadContexts[0]->setPC(threadContexts[0]->getSystemPtr()->kernelEntry);
235 threadContexts[0]->setNextPC(threadContexts[0]->readPC());
236
237 // We should now be in long mode. Yay!
238
239 //Write out the SMBios/DMI table
240 writeOutSMBiosTable(0xF0000);
241}
242
243void
244X86System::writeOutSMBiosTable(Addr header, Addr table)
245{
246 // Get a port to write the table and header to memory.
247 FunctionalPort * physPort = threadContexts[0]->getPhysPort();
248
249 // If the table location isn't specified, just put it after the header.
250 // The header size as of the 2.5 SMBios specification is 0x1F bytes
251 if (!table) {
252 if (!smbiosTable->smbiosHeader.intermediateHeader.tableAddr)
253 smbiosTable->smbiosHeader.
254 intermediateHeader.tableAddr = header + 0x1F;
255 } else {
256 smbiosTable->smbiosHeader.intermediateHeader.tableAddr = table;
257 }
258
259 smbiosTable->writeOut(physPort, header);
260}
261
262
263X86System::~X86System()
264{
265 delete smbiosTable;
266}
267

--- 18 unchanged lines hidden ---