From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.31807.1676941380813073449 for ; Mon, 20 Feb 2023 17:03:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=V9/6r0ye; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: quicinc.com, ip: 205.220.168.131, mailfrom: quic_rcran@quicinc.com) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31L0fO3j016116; Tue, 21 Feb 2023 01:02:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=oGpvFrjmjbHS3kPl6e6rsJCAGWEbtL5X9ga1YzPZzS4=; b=V9/6r0yenLajHC/nHSbSAh3BjBNLt2QDq8LL1XeIAsvtNxskvSmzlTu6YAVgCyteMNMT Q3zyjKGm1NDamSpbBOHrP8+azIf3dfj0gH7P9NSDDDVP/FwaE5PPQ0H7VahpU5bHpq9/ SkBcRcM9fqsokf8rJZfmCqKg1UKK5W6Jal5l3AGW6Phpy94vu34wHro4aRBAPlCAl1yN SCyS5D4zrCiStdjJlTI7QJhE33RPT65Gyt+MZ/akxlyszbibCmD53PIt5m5+UGyC9Ppz idI9DBRtmIfofSpj2LQSAMBnoD0oyC/epHB67TJ0Pn5ACKTPJ8IG2WnBfSL0TGciSgXq +Q== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ntqene11b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Feb 2023 01:02:57 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 31L12vFh001975 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Feb 2023 01:02:57 GMT Received: from linbox.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 20 Feb 2023 17:02:56 -0800 From: "Rebecca Cran" To: , Pierre Gondois , "Ard Biesheuvel" , Sami Mujawar , Thomas Abraham CC: Rebecca Cran Subject: [PATCH edk2-platforms v2 1/2] Platform/ARM/JunoPkg: Switch to MdeModulePkg/Universal/Metronome driver Date: Mon, 20 Feb 2023 18:02:41 -0700 Message-ID: <20230221010242.1038521-2-rebecca@quicinc.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230221010242.1038521-1-rebecca@quicinc.com> References: <20230221010242.1038521-1-rebecca@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 13_TfQalAEwYaVIVKBPwgNJb2P_dFTq_ X-Proofpoint-ORIG-GUID: 13_TfQalAEwYaVIVKBPwgNJb2P_dFTq_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-20_19,2023-02-20_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 suspectscore=0 mlxscore=0 impostorscore=0 phishscore=0 bulkscore=0 mlxlogscore=983 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302210007 Content-Transfer-Encoding: 8bit Content-Type: text/plain The MetronomeDxe driver uses the PCD PcdMetronomeTickPeriod to calculate how many ticks to wait in MicroSecondDelay. Given that the timer clock on Juno runs at 50 MHz, it ticks every 20 ns; therefore, a setting of 1000 is wrong: for example it causes a call to gBS->Stall (1) to take 10 us. The driver in MdeModulePkg/Universal/Metronome assumes the clock ticks at least every 100 ns, which is the minimum allowed by the Metronome protocol. Since that's the case on Juno, switch from EmbeddedPkg/MetronomeDxe to MdeModulePkg/Universal/Metronome. Signed-off-by: Rebecca Cran --- Platform/ARM/JunoPkg/ArmJuno.dsc | 3 +-- Platform/ARM/JunoPkg/ArmJuno.fdf | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJuno.dsc index a00b866c5e9a..9cde4c862651 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.dsc +++ b/Platform/ARM/JunoPkg/ArmJuno.dsc @@ -189,7 +189,6 @@ # ARM Architectural Timer Frequency # gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|50000000 - gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE @@ -248,10 +247,10 @@ MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf + MdeModulePkg/Universal/Metronome/Metronome.inf MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf - EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf b/Platform/ARM/JunoPkg/ArmJuno.fdf index fca5a78cee6c..836d3cde8781 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.fdf +++ b/Platform/ARM/JunoPkg/ArmJuno.fdf @@ -96,10 +96,10 @@ FvNameGuid = B73FE497-B92E-416e-8326-45AD0D270092 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf + INF MdeModulePkg/Universal/Metronome/Metronome.inf INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf - INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf -- 2.30.2