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.150163.1669730061003421822 for ; Tue, 29 Nov 2022 05:54:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=UBLEHdw8; 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 (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ATBPOtE021519; Tue, 29 Nov 2022 13:54:17 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=/A+Uzms1SmmK6r0LshUWUQahN/Fyl5tV6iTP1o5puM0=; b=UBLEHdw8ws5oL9Kbd6JNJaHEbkDU6BVKpO1f3uuuFsrbUN/LA9Plb5gMl6hVQXtboAzO +dIcRv4ojGynu58QzfEDpNUga7Ks24/kSTD9ttuTZao4BeiVYrE10c+ubTST2vR4fOpx HXaQPDBAv5LhtdSDtFuZ1Wpqlo1Oc+pUcz6utD6xA5AedsJMhsaE++ElwEvl7dBR6Rk6 3azHZtDAxH1RDy+k7rR5c7NJaUq6e4nJbEljEEOHq+zBnvf+WlZQSyeKGnDoodcwDjGV fmLKljKCwKSzBD9iPFMY2zRneIU3HjTXK1sawZ2JDkf6qu9615/qcOW95TkwjHaBXeyP 9A== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3m56vca02w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Nov 2022 13:54:17 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2ATDsGpV022713 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Nov 2022 13:54:16 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.36; Tue, 29 Nov 2022 05:54:16 -0800 From: "Rebecca Cran" To: , Ard Biesheuvel , "Thomas Abraham" , Sami Mujawar CC: Rebecca Cran Subject: [PATCH edk2-platforms 1/3] Platform/ARM/JunoPkg: Switch to MdeModulePkg/Universal/Metronome driver Date: Tue, 29 Nov 2022 06:53:56 -0700 Message-ID: <20221129135358.136555-2-rebecca@quicinc.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221129135358.136555-1-rebecca@quicinc.com> References: <20221129135358.136555-1-rebecca@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: TXQApPzgGn6F-0VLq-9QOxP4wvLxVSWL X-Proofpoint-ORIG-GUID: TXQApPzgGn6F-0VLq-9QOxP4wvLxVSWL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-29_08,2022-11-29_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 malwarescore=0 phishscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=944 impostorscore=0 spamscore=0 bulkscore=0 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211290080 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 @@ [PcdsFixedAtBuild.common] # ARM Architectural Timer Frequency # gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|50000000 - gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE @@ -248,10 +247,10 @@ [Components.common] 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 @@ [FV.FvMain] 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