mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg: Store initial timer value
This commit adds support for storing initial timer value logged at the beginning of firmware image execution. This timer value is required for firmware basic boot performance data record referenced by Firmware Performance Data Table (FPDT). Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Alexei Fedorov <Alxei.Fedorov@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
parent
234dbceff1
commit
a63be426f8
|
@ -1,7 +1,7 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
#
|
#
|
||||||
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||||
# Copyright (c) 2011-2014, ARM Ltd. All rights reserved.<BR>
|
# Copyright (c) 2011-2017, ARM Ltd. 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
|
||||||
|
@ -68,6 +68,7 @@
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gArmMpCoreInfoGuid
|
gArmMpCoreInfoGuid
|
||||||
|
gEfiFirmwarePerformanceGuid
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob
|
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
#
|
#
|
||||||
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||||
# Copyright (c) 2011-2014, ARM Ltd. All rights reserved.<BR>
|
# Copyright (c) 2011-2017, ARM Ltd. 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
|
||||||
|
@ -67,6 +67,7 @@
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gArmMpCoreInfoGuid
|
gArmMpCoreInfoGuid
|
||||||
|
gEfiFirmwarePerformanceGuid
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob
|
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011-2014, ARM Limited. All rights reserved.
|
* Copyright (c) 2011-2017, ARM Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include <Ppi/GuidedSectionExtraction.h>
|
#include <Ppi/GuidedSectionExtraction.h>
|
||||||
#include <Ppi/ArmMpCoreInfo.h>
|
#include <Ppi/ArmMpCoreInfo.h>
|
||||||
|
#include <Ppi/SecPerformance.h>
|
||||||
#include <Guid/LzmaDecompress.h>
|
#include <Guid/LzmaDecompress.h>
|
||||||
|
|
||||||
#include "PrePi.h"
|
#include "PrePi.h"
|
||||||
|
@ -86,6 +87,7 @@ PrePiMain (
|
||||||
CHAR8 Buffer[100];
|
CHAR8 Buffer[100];
|
||||||
UINTN CharCount;
|
UINTN CharCount;
|
||||||
UINTN StacksSize;
|
UINTN StacksSize;
|
||||||
|
FIRMWARE_SEC_PERFORMANCE Performance;
|
||||||
|
|
||||||
// If ensure the FD is either part of the System Memory or totally outside of the System Memory (XIP)
|
// If ensure the FD is either part of the System Memory or totally outside of the System Memory (XIP)
|
||||||
ASSERT (IS_XIP() ||
|
ASSERT (IS_XIP() ||
|
||||||
|
@ -146,6 +148,12 @@ PrePiMain (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Store timer value logged at the beginning of firmware image execution
|
||||||
|
Performance.ResetEnd = GetTimeInNanoSecond (StartTimeStamp);
|
||||||
|
|
||||||
|
// Build SEC Performance Data Hob
|
||||||
|
BuildGuidDataHob (&gEfiFirmwarePerformanceGuid, &Performance, sizeof (Performance));
|
||||||
|
|
||||||
// Set the Boot Mode
|
// Set the Boot Mode
|
||||||
SetBootMode (ArmPlatformGetBootMode ());
|
SetBootMode (ArmPlatformGetBootMode ());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue