mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-06-14 04:16:15 -07:00
Add GetSocSku/SetSocSku API
This patch added API to Get/SetSocSku. In current code, SBL always read the PCI register to determine the SKU. It is not efficient. Since it is used a lot, it is better to have software API to get this info through a software only method. Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This commit is contained in:
@@ -188,6 +188,7 @@ typedef struct {
|
||||
UINT32 Signature;
|
||||
UINT16 PlatformId;
|
||||
UINT16 PlatformBomId;
|
||||
UINT32 SocSku;
|
||||
UINT8 BootMode;
|
||||
UINT8 LoaderStage;
|
||||
UINT8 CurrentBootPartition;
|
||||
@@ -370,6 +371,29 @@ GetPlatformBomId (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
This function sets current SOC SKU info.
|
||||
|
||||
@param Sku The value of current SOC SKU.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
SetSocSku (
|
||||
IN UINT32 Sku
|
||||
);
|
||||
|
||||
/**
|
||||
This function retrieves current SOC SKU info.
|
||||
|
||||
@retval The current SOC SKU.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
GetSocSku (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
This function sets current debug port index.
|
||||
|
||||
@@ -283,6 +283,35 @@ GetPlatformBomId (
|
||||
return GetLoaderGlobalDataPointer()->PlatformBomId;
|
||||
}
|
||||
|
||||
/**
|
||||
This function sets current SOC SKU info.
|
||||
|
||||
@param Sku The value of current SOC SKU.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
SetSocSku (
|
||||
IN UINT32 Sku
|
||||
)
|
||||
{
|
||||
GetLoaderGlobalDataPointer()->SocSku = Sku;
|
||||
}
|
||||
|
||||
/**
|
||||
This function retrieves current SOC SKU info.
|
||||
|
||||
@retval The current SOC SKU.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
GetSocSku (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return GetLoaderGlobalDataPointer()->SocSku;
|
||||
}
|
||||
|
||||
/**
|
||||
This function sets current debug port index.
|
||||
|
||||
Reference in New Issue
Block a user