mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 08:04:07 +02:00
ArmVirtPkg/ArmVirtPlatformLib: eliminate unchecked PcdSetXX() calls
These are deprecated / disabled under the DISABLE_NEW_DEPRECATED_INTERFACES feature test macro. Introduce a variable called PcdStatus, and use it to assert the success of these operations (there is no reason for them to fail here). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=165 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> # RVCT Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
a79d29b6d3
commit
a9f63d697f
@ -70,13 +70,14 @@ ArmPlatformInitializeSystemMemory (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
VOID *DeviceTreeBase;
|
VOID *DeviceTreeBase;
|
||||||
INT32 Node, Prev;
|
INT32 Node, Prev;
|
||||||
UINT64 NewBase, CurBase;
|
UINT64 NewBase, CurBase;
|
||||||
UINT64 NewSize, CurSize;
|
UINT64 NewSize, CurSize;
|
||||||
CONST CHAR8 *Type;
|
CONST CHAR8 *Type;
|
||||||
INT32 Len;
|
INT32 Len;
|
||||||
CONST UINT64 *RegProp;
|
CONST UINT64 *RegProp;
|
||||||
|
RETURN_STATUS PcdStatus;
|
||||||
|
|
||||||
NewBase = 0;
|
NewBase = 0;
|
||||||
NewSize = 0;
|
NewSize = 0;
|
||||||
@ -131,7 +132,8 @@ ArmPlatformInitializeSystemMemory (
|
|||||||
// Make sure the start of DRAM matches our expectation
|
// Make sure the start of DRAM matches our expectation
|
||||||
//
|
//
|
||||||
ASSERT (FixedPcdGet64 (PcdSystemMemoryBase) == NewBase);
|
ASSERT (FixedPcdGet64 (PcdSystemMemoryBase) == NewBase);
|
||||||
PcdSet64 (PcdSystemMemorySize, NewSize);
|
PcdStatus = PcdSet64S (PcdSystemMemorySize, NewSize);
|
||||||
|
ASSERT_RETURN_ERROR (PcdStatus);
|
||||||
|
|
||||||
//
|
//
|
||||||
// We need to make sure that the machine we are running on has at least
|
// We need to make sure that the machine we are running on has at least
|
||||||
|
Loading…
x
Reference in New Issue
Block a user