Beispiel #1
0
/*
 * Installs all the needed configuration table entries
 */
static void setupEfiConfigurationTable()
{
	smbios_p = (EFI_PTR32)getSmbios(SMBIOS_PATCHED);
	addConfigurationTable(&gEfiSmbiosTableGuid, &smbios_p, NULL);

	setupBoardId(); //need to be called after getSmbios

	// Setup ACPI with DSDT overrides (mackerintel's patch)
	setupAcpi();

	// We've obviously changed the count.. so fix up the CRC32
	if (archCpuType == CPU_TYPE_I386)
	{
		gST32->Hdr.CRC32 = 0;
		gST32->Hdr.CRC32 = crc32(0L, gST32, gST32->Hdr.HeaderSize);
	}
	else
	{
		gST64->Hdr.CRC32 = 0;
		gST64->Hdr.CRC32 = crc32(0L, gST64, gST64->Hdr.HeaderSize);
	}

	// Setup the chosen node
	setupChosenNode();
}
Beispiel #2
0
void finalizeEFITree(void)
{
	_EFI_DEBUG_DUMP("Calling setupEFITables(");

	setupEFITables();

	_EFI_DEBUG_DUMP("done).\nCalling setupSMBIOS(");

	setupSMBIOS();

	_EFI_DEBUG_DUMP("done).\nAdding EFI configuration table for SMBIOS(");

	addConfigurationTable(&gPlatform.SMBIOS.Guid, &gPlatform.SMBIOS.BaseAddress, NULL);

#if INCLUDE_MPS_TABLE
	// This BIOS includes a MP table?
	if (initMultiProcessorTableAdress())
	{
		// The EFI specification dictates that the MP table must be reallocated 
		// when is it not in the right spot. We don't bother about this rule 
		// simply because we're not - pretending to be - EFI compliant.
		addConfigurationTable(&gPlatform.MPS.Guid, &gPlatform.MPS.BaseAddress, NULL);
	}
#endif

	_EFI_DEBUG_DUMP("done)\nCalling setupACPI(");

	// DHP: Pfff. Setting DEBUG to 1 in acpi_patcher.c breaks our layout!
	setupACPI();

	_EFI_DEBUG_DUMP("done).\nAdding EFI configuration table for ACPI(");

	addConfigurationTable(&gPlatform.ACPI.Guid, &gPlatform.ACPI.BaseAddress, "ACPI_20");

	_EFI_DEBUG_DUMP("done).\nFixing checksum... ");

	// Now fixup the CRC32 and we're done here.
	gPlatform.EFI.SystemTable->Hdr.CRC32 = 0;
	gPlatform.EFI.SystemTable->Hdr.CRC32 = crc32(0L, gPlatform.EFI.SystemTable, 
												 gPlatform.EFI.SystemTable->Hdr.HeaderSize);

	_EFI_DEBUG_DUMP("(done).\n");
	_EFI_DEBUG_SLEEP(10);
}
Beispiel #3
0
/* Installs all the needed configuration table entries */
static void setupEfiConfigurationTable()
{
  smbios_p = (EFI_PTR32)getSmbios(SMBIOS_PATCHED);
  addConfigurationTable(&gEfiSmbiosTableGuid, &smbios_p, NULL);

  // Setup ACPI with DSDT overrides (mackerintel's patch)
  setupAcpi();
  
  // We've obviously changed the count.. so fix up the CRC32
  fixupEfiSystemTableCRC32(gST);
}