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.web10.101815.1673352594140905624 for ; Tue, 10 Jan 2023 04:09:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BsrOebIp; 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_tpilar@quicinc.com) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30A79hI2012745; Tue, 10 Jan 2023 12:09:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : from : to : cc : reply-to : references : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=Su2SUaV1uN5FJ84T/gXjYB81iIiXmkfKPF1/sI2DyJA=; b=BsrOebIprG5bFvh33pfl0jcMqPh54FUS/77DIhzDPDwyqE7q+dE/lCyGd3nhUipdEnmX CzDDGHPFK/lXJTnrfrxPxiS1sxf8Yw7rwlPdd7hpc9DB/tUig544QAHg6laCEi0au6NT Yj1ObCxk6Aplh6g9s2QHlbcQHslvQeYh1aS22cRG7Gpk1PRiFdqACh92caUHKXZK7e5y 19Cl5jsMhFsZCdP/htmNugaERjkM9SS1VqfIq+uPTG0u6rd/1BY4nBSwSGj7iRqWENKj JfXAbITqL5975CX9sfJKkLX/q+rpqvGbOmsu23Y57OroJJ42dC1azwUzrnnP4VGQ56NS 9w== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n13cngm2e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Jan 2023 12:09:53 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30AC9qIK012938 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Jan 2023 12:09:52 GMT Received: from [10.251.40.134] (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, 10 Jan 2023 04:09:51 -0800 Message-ID: Date: Tue, 10 Jan 2023 12:09:08 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [edk2-devel] [PATCH v3 1/1] ShellPkg: Export default shell delay as PCD From: "Tomas Pilar (tpilar)" To: CC: Ray Ni , Zhichao Gao Reply-To: , References: <20230103170229.328712-1-tomas@quicinc.com> In-Reply-To: <20230103170229.328712-1-tomas@quicinc.com> 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-ORIG-GUID: vmomBGo2sYzBdEUHuDQLTes8bDtRMboV X-Proofpoint-GUID: vmomBGo2sYzBdEUHuDQLTes8bDtRMboV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-10_03,2023-01-10_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 spamscore=0 suspectscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301100074 Content-Language: en-US Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Hi, Any chance you could review this change? It's fairly simple. Cheers, Tom On 03/01/2023 17:02, Tomas Pilar (tpilar) wrote: > From: Tomas Pilar > > Create PcdShellDefaultDelay to configure the default > delay the shell provides for the user at the start time > if the user wishes to cancel the execution of a potential > startup script. > > The shell application already allows the user to override > the delay default value by specifying the -delay cmdline > argument. This however cannot be used when loading the > shell application using direct boot or when integrating > the shell into the platform firmware build. > > Thus, a PCD can be easily configurerd by the developer > either at build time, or even at runtime. > > Cc: Ray Ni > Cc: Zhichao Gao > Signed-off-by: Tomas Pilar > --- > ShellPkg/ShellPkg.dec | 4 ++++ > ShellPkg/Application/Shell/Shell.inf | 1 + > ShellPkg/Application/Shell/Shell.c | 2 +- > 3 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/ShellPkg/ShellPkg.dec b/ShellPkg/ShellPkg.dec > index 7b2d1230bd2c..2ebea0a2615f 100644 > --- a/ShellPkg/ShellPkg.dec > +++ b/ShellPkg/ShellPkg.dec > @@ -136,3 +136,7 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] > # Up to this many bytes of vendor specific data will be used. Default is 0 > # (disabled). > gEfiShellPkgTokenSpaceGuid.PcdShellVendorExtendedDecode|0|UINT32|0x00000013 > + > + ## Controls the default delay the shell will offer to the user at the > + # start to check if the user wishes to cancel the script autostart > + gEfiShellPkgTokenSpaceGuid.PcdShellDefaultDelay|5|UINT32|0x00000015 > diff --git a/ShellPkg/Application/Shell/Shell.inf b/ShellPkg/Application/Shell/Shell.inf > index 4c32960a9687..f1e41de133d1 100644 > --- a/ShellPkg/Application/Shell/Shell.inf > +++ b/ShellPkg/Application/Shell/Shell.inf > @@ -103,3 +103,4 @@ [Pcd] > gEfiShellPkgTokenSpaceGuid.PcdShellForceConsole ## CONSUMES > gEfiShellPkgTokenSpaceGuid.PcdShellSupplier ## CONSUMES > gEfiShellPkgTokenSpaceGuid.PcdShellMaxHistoryCommandCount ## CONSUMES > + gEfiShellPkgTokenSpaceGuid.PcdShellDefaultDelay ## CONSUMES > diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c > index df00adfdfa5b..0ae6e14a34bf 100644 > --- a/ShellPkg/Application/Shell/Shell.c > +++ b/ShellPkg/Application/Shell/Shell.c > @@ -990,7 +990,7 @@ ProcessCommandLine ( > ShellInfoObject.ShellInitSettings.BitUnion.Bits.Delay = FALSE; > ShellInfoObject.ShellInitSettings.BitUnion.Bits.Exit = FALSE; > ShellInfoObject.ShellInitSettings.BitUnion.Bits.NoNest = FALSE; > - ShellInfoObject.ShellInitSettings.Delay = 5; > + ShellInfoObject.ShellInitSettings.Delay = PcdGet32 (PcdShellDefaultDelay); > > // > // Start LoopVar at 0 to parse only optional arguments at Argv[0]