58a59
> #include "arch/x86/bios/intelmp.hh"
62c63
< #include "base/remote_gdb.hh"
---
> #include "base/intmath.hh"
64a66
> #include "base/remote_gdb.hh"
75,76c77,80
< X86System::X86System(Params *p)
< : System(p), smbiosTable(p->smbios_table)
---
> X86System::X86System(Params *p) :
> System(p), smbiosTable(p->smbios_table),
> mpFloatingPointer(p->intel_mp_pointer),
> mpConfigTable(p->intel_mp_table)
234a239
> Addr fixed, table;
236d240
< Addr headerSize, structSize;
238,239c242,248
< writeOutSMBiosTable(ebdaPos, headerSize, structSize);
< ebdaPos += (headerSize + structSize);
---
> writeOutSMBiosTable(ebdaPos, fixed, table);
> ebdaPos += (fixed + table);
> ebdaPos = roundUp(ebdaPos, 16);
>
> //Write out the Intel MP Specification configuration table
> writeOutMPTable(ebdaPos, fixed, table);
> ebdaPos += (fixed + table);
262a272,277
> void
> X86System::writeOutMPTable(Addr fp,
> Addr &fpSize, Addr &tableSize, Addr table)
> {
> // Get a port to write the table and header to memory.
> FunctionalPort * physPort = threadContexts[0]->getPhysPort();
263a279,301
> // If the table location isn't specified and it exists, just put
> // it after the floating pointer. The fp size as of the 1.4 Intel MP
> // specification is 0x10 bytes.
> if (mpConfigTable) {
> if (!table)
> table = fp + 0x10;
> mpFloatingPointer->setTableAddr(table);
> }
>
> fpSize = mpFloatingPointer->writeOut(physPort, fp);
> if (mpConfigTable)
> tableSize = mpConfigTable->writeOut(physPort, table);
> else
> tableSize = 0;
>
> // Do some bounds checking to make sure we at least didn't step on
> // ourselves and the fp structure was the size we thought it was.
> assert(fp > table || fp + fpSize <= table);
> assert(table > fp || table + tableSize <= fp);
> assert(fpSize == 0x10);
> }
>
>