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>
#/** @file\r
#\r
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
#/** @file\r
#\r
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-# Copyright (c) 2011-2014, ARM Ltd. All rights reserved.<BR>\r
+# Copyright (c) 2011-2017, ARM Ltd. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
\r
[Guids]\r
gArmMpCoreInfoGuid\r
\r
[Guids]\r
gArmMpCoreInfoGuid\r
+ gEfiFirmwarePerformanceGuid\r
\r
[FeaturePcd]\r
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob\r
\r
[FeaturePcd]\r
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob\r
#/** @file\r
#\r
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
#/** @file\r
#\r
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-# Copyright (c) 2011-2014, ARM Ltd. All rights reserved.<BR>\r
+# Copyright (c) 2011-2017, ARM Ltd. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
\r
[Guids]\r
gArmMpCoreInfoGuid\r
\r
[Guids]\r
gArmMpCoreInfoGuid\r
+ gEfiFirmwarePerformanceGuid\r
\r
[FeaturePcd]\r
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob\r
\r
[FeaturePcd]\r
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob\r
-* Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+* Copyright (c) 2011-2017, ARM Limited. All rights reserved.\r
*\r
* This program and the accompanying materials\r
* are licensed and made available under the terms and conditions of the BSD License\r
*\r
* This program and the accompanying materials\r
* are licensed and made available under the terms and conditions of the BSD License\r
\r
#include <Ppi/GuidedSectionExtraction.h>\r
#include <Ppi/ArmMpCoreInfo.h>\r
\r
#include <Ppi/GuidedSectionExtraction.h>\r
#include <Ppi/ArmMpCoreInfo.h>\r
+#include <Ppi/SecPerformance.h>\r
#include <Guid/LzmaDecompress.h>\r
\r
#include "PrePi.h"\r
#include <Guid/LzmaDecompress.h>\r
\r
#include "PrePi.h"\r
CHAR8 Buffer[100];\r
UINTN CharCount;\r
UINTN StacksSize;\r
CHAR8 Buffer[100];\r
UINTN CharCount;\r
UINTN StacksSize;\r
+ FIRMWARE_SEC_PERFORMANCE Performance;\r
\r
// If ensure the FD is either part of the System Memory or totally outside of the System Memory (XIP)\r
ASSERT (IS_XIP() ||\r
\r
// If ensure the FD is either part of the System Memory or totally outside of the System Memory (XIP)\r
ASSERT (IS_XIP() ||\r
+ // Store timer value logged at the beginning of firmware image execution\r
+ Performance.ResetEnd = GetTimeInNanoSecond (StartTimeStamp);\r
+\r
+ // Build SEC Performance Data Hob\r
+ BuildGuidDataHob (&gEfiFirmwarePerformanceGuid, &Performance, sizeof (Performance));\r
+\r
// Set the Boot Mode\r
SetBootMode (ArmPlatformGetBootMode ());\r
\r
// Set the Boot Mode\r
SetBootMode (ArmPlatformGetBootMode ());\r
\r