Beispiel #1
0
void scan_platform()
{
	uint32_t	cpuid_reg[4];

	build_pci_dt();

	calculate_freq();
	
	// Copy the values from calculate_freq()
	Platform.CPU.TSCFrequency = tscFrequency;
	Platform.CPU.FSBFrequency = fsbFrequency;
	Platform.CPU.CPUFrequency = cpuFrequency;
	
	do_cpuid(0, cpuid_reg);
	Platform.CPU.Vendor = cpuid_reg[1];
	
	do_cpuid(1, cpuid_reg);
	Platform.CPU.Model = bitfield(cpuid_reg[0], 7, 4);
	Platform.CPU.Family = bitfield(cpuid_reg[0], 11, 8);
	Platform.CPU.ExtModel = bitfield(cpuid_reg[0], 19, 16);
	Platform.CPU.ExtFamily = bitfield(cpuid_reg[0], 27, 20);

	// Get vendor specific cpu data 
	if((Platform.CPU.Vendor == 0x756E6547 /* Intel */) && ((Platform.CPU.Family == 0x06) || (Platform.CPU.Family == 0x0f)))
		scan_cpu_intel();
	else if((Platform.CPU.Vendor == 0x68747541 /* AMD */) && (Platform.CPU.Family == 0x0f))
		scan_cpu_amd();
}
Beispiel #2
0
/** 
    Scan platform hardware information, called by the main entry point (common_boot() ) 
    _before_ bootConfig xml parsing settings are loaded
*/
void scan_platform(void)
{
	memset(&Platform, 0, sizeof(Platform));
	build_pci_dt();
	scan_cpu(&Platform);
	//scan_mem(); Rek: called after pci devs init in fake_efi now ...
}
Beispiel #3
0
/** 
    Scan platform hardware information, called by the main entry point (common_boot() ) 
    _before_ bootConfig xml parsing settings are loaded
*/
void scan_platform(void)
{	
	Platform = malloc(sizeof(PlatformInfo_t));
	memset(Platform, 0, sizeof(PlatformInfo_t));
	gPlatform = (void*)Platform;
	BootOrder = malloc(sizeof(BLESS_EFI_LOAD_OPTION));
	memset(BootOrder, 0, sizeof(BLESS_EFI_LOAD_OPTION));
	gBootOrder = (void*)BootOrder;
	
	build_pci_dt();
	scan_cpu(); //Platform);
	//scan_mem(); Rek: called after pci devs init in fake_efi now ...
}