mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 15:14:02 +02:00
MdePkg: Follow PI1.4a to fix artificial limitation of SkuId range
There is absolutely no reason to artificially limit the SKU range to 1-255. PI1.4a spec fixed the artificial limitation. This patch is to follow PI1.4a spec to remove PCD_MAX_SKU_ID definition, the check to PCD_MAX_SKU_ID and the comments describes the limitation. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
120ca3ceae
commit
c745144407
@ -14,7 +14,7 @@
|
|||||||
There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),
|
There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),
|
||||||
PatchPcdGetXX(), and PatchPcdSetXX().
|
PatchPcdGetXX(), and PatchPcdSetXX().
|
||||||
|
|
||||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -28,8 +28,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#ifndef __PCD_LIB_H__
|
#ifndef __PCD_LIB_H__
|
||||||
#define __PCD_LIB_H__
|
#define __PCD_LIB_H__
|
||||||
|
|
||||||
#define PCD_MAX_SKU_ID 0x100
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieves a token number based on a token name.
|
Retrieves a token number based on a token name.
|
||||||
@ -1074,7 +1072,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
This function provides a means by which SKU support can be established in the PCD infrastructure.
|
This function provides a means by which SKU support can be established in the PCD infrastructure.
|
||||||
|
|
||||||
Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
|
Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
|
||||||
If SkuId >= PCD_MAX_SKU_ID, then ASSERT().
|
|
||||||
|
|
||||||
@param SkuId The SKU value that will be used when the PCD service retrieves and sets values
|
@param SkuId The SKU value that will be used when the PCD service retrieves and sets values
|
||||||
associated with a PCD token.
|
associated with a PCD token.
|
||||||
@ -2250,8 +2247,6 @@ LibPcdGetInfoEx (
|
|||||||
/**
|
/**
|
||||||
Retrieve the currently set SKU Id.
|
Retrieve the currently set SKU Id.
|
||||||
|
|
||||||
If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
|
|
||||||
|
|
||||||
@return The currently set SKU Id. If the platform has not set at a SKU Id, then the
|
@return The currently set SKU Id. If the platform has not set at a SKU Id, then the
|
||||||
default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
|
default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
|
||||||
Id is returned.
|
Id is returned.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
A emptry template implementation of PCD Library.
|
A emptry template implementation of PCD Library.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -26,8 +26,6 @@
|
|||||||
|
|
||||||
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
|
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
|
||||||
set values associated with a PCD token.
|
set values associated with a PCD token.
|
||||||
|
|
||||||
If SkuId >= 0x100, then ASSERT().
|
|
||||||
|
|
||||||
@return Return the SKU ID that just be set.
|
@return Return the SKU ID that just be set.
|
||||||
|
|
||||||
@ -1465,8 +1463,6 @@ LibPcdGetInfoEx (
|
|||||||
/**
|
/**
|
||||||
Retrieve the currently set SKU Id.
|
Retrieve the currently set SKU Id.
|
||||||
|
|
||||||
If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
|
|
||||||
|
|
||||||
@return The currently set SKU Id. If the platform has not set at a SKU Id, then the
|
@return The currently set SKU Id. If the platform has not set at a SKU Id, then the
|
||||||
default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
|
default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
|
||||||
Id is returned.
|
Id is returned.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation of PcdLib class library for DXE phase.
|
Implementation of PcdLib class library for DXE phase.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -125,7 +125,6 @@ GetPcdInfoProtocolPointer (
|
|||||||
This function provides a means by which SKU support can be established in the PCD infrastructure.
|
This function provides a means by which SKU support can be established in the PCD infrastructure.
|
||||||
|
|
||||||
Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
|
Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
|
||||||
If SkuId >= PCD_MAX_SKU_ID, then ASSERT().
|
|
||||||
|
|
||||||
@param SkuId The SKU value that will be used when the PCD service retrieves and sets values
|
@param SkuId The SKU value that will be used when the PCD service retrieves and sets values
|
||||||
associated with a PCD token.
|
associated with a PCD token.
|
||||||
@ -139,8 +138,6 @@ LibPcdSetSku (
|
|||||||
IN UINTN SkuId
|
IN UINTN SkuId
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ASSERT (SkuId < PCD_MAX_SKU_ID);
|
|
||||||
|
|
||||||
GetPcdProtocol()->SetSku (SkuId);
|
GetPcdProtocol()->SetSku (SkuId);
|
||||||
|
|
||||||
return SkuId;
|
return SkuId;
|
||||||
@ -1614,8 +1611,6 @@ LibPcdGetInfoEx (
|
|||||||
/**
|
/**
|
||||||
Retrieve the currently set SKU Id.
|
Retrieve the currently set SKU Id.
|
||||||
|
|
||||||
If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
|
|
||||||
|
|
||||||
@return The currently set SKU Id. If the platform has not set at a SKU Id, then the
|
@return The currently set SKU Id. If the platform has not set at a SKU Id, then the
|
||||||
default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
|
default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
|
||||||
Id is returned.
|
Id is returned.
|
||||||
@ -1626,11 +1621,6 @@ LibPcdGetSku (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN SkuId;
|
return GetPiPcdInfoProtocolPointer()->GetSku ();
|
||||||
|
|
||||||
SkuId = GetPiPcdInfoProtocolPointer()->GetSku ();
|
|
||||||
ASSERT (SkuId < PCD_MAX_SKU_ID);
|
|
||||||
|
|
||||||
return SkuId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation of PcdLib class library for PEI phase.
|
Implementation of PcdLib class library for PEI phase.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -124,7 +124,6 @@ GetPiPcdInfoPpiPointer (
|
|||||||
This function provides a means by which SKU support can be established in the PCD infrastructure.
|
This function provides a means by which SKU support can be established in the PCD infrastructure.
|
||||||
|
|
||||||
Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
|
Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
|
||||||
If SkuId >= PCD_MAX_SKU_ID, then ASSERT().
|
|
||||||
|
|
||||||
@param SkuId The SKU value that will be used when the PCD service retrieves
|
@param SkuId The SKU value that will be used when the PCD service retrieves
|
||||||
and sets values associated with a PCD token.
|
and sets values associated with a PCD token.
|
||||||
@ -138,9 +137,6 @@ LibPcdSetSku (
|
|||||||
IN UINTN SkuId
|
IN UINTN SkuId
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
ASSERT (SkuId < PCD_MAX_SKU_ID);
|
|
||||||
|
|
||||||
GetPiPcdPpiPointer()->SetSku (SkuId);
|
GetPiPcdPpiPointer()->SetSku (SkuId);
|
||||||
|
|
||||||
return SkuId;
|
return SkuId;
|
||||||
@ -1615,8 +1611,6 @@ LibPcdGetInfoEx (
|
|||||||
/**
|
/**
|
||||||
Retrieve the currently set SKU Id.
|
Retrieve the currently set SKU Id.
|
||||||
|
|
||||||
If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().
|
|
||||||
|
|
||||||
@return The currently set SKU Id. If the platform has not set at a SKU Id, then the
|
@return The currently set SKU Id. If the platform has not set at a SKU Id, then the
|
||||||
default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
|
default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
|
||||||
Id is returned.
|
Id is returned.
|
||||||
@ -1627,10 +1621,5 @@ LibPcdGetSku (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN SkuId;
|
return GetPiPcdInfoPpiPointer()->GetSku ();
|
||||||
|
|
||||||
SkuId = GetPiPcdInfoPpiPointer()->GetSku ();
|
|
||||||
ASSERT (SkuId < PCD_MAX_SKU_ID);
|
|
||||||
|
|
||||||
return SkuId;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user