[ROSLOAD] Initial support for launching OS Loader Entrypoint and returning from it

[ENVIRON]: Implement BlArchGetCpuVendor
[ROSLOAD]: Stub OslPrepareTarget, OslExecuteTransition
[ROSLOAD]: Implement OslpMain
This commit is contained in:
Alex Ionescu 2018-01-28 13:24:20 +01:00
parent b49a2d6356
commit e836d0b56e
3 changed files with 194 additions and 24 deletions

View file

@ -932,3 +932,47 @@ BlArchCpuId (
__cpuidex(Result, Function, SubFunction);
#endif
}
CPU_VENDORS
BlArchGetCpuVendor (
VOID
)
{
INT CpuInfo[4];
INT Temp;
/* Get the CPU Vendor */
BlArchCpuId(0, 0, CpuInfo);
Temp = CpuInfo[2];
CpuInfo[2] = CpuInfo[3];
CpuInfo[3] = Temp;
/* Check against supported values */
if (!strncmp((PCHAR)&CpuInfo[1], "GenuineIntel", 12))
{
return CPU_INTEL;
}
if (!strncmp((PCHAR)&CpuInfo[1], "AuthenticAMD", 12))
{
return CPU_AMD;
}
if (!strncmp((PCHAR)&CpuInfo[1], "CentaurHauls", 12))
{
return CPU_VIA;
}
if (!strncmp((PCHAR)&CpuInfo[1], "CyrixInstead", 12))
{
return CPU_CYRIX;
}
if (!strncmp((PCHAR)&CpuInfo[1], "GenuineTMx86", 12))
{
return CPU_TRANSMETA;
}
if (!strncmp((PCHAR)&CpuInfo[1], "RiseRiseRise", 12))
{
return CPU_RISE;
}
/* Other */
return CPU_UNKNOWN;
}