From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.6510.1679822985380922419 for ; Sun, 26 Mar 2023 02:29:45 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ShXobbo2; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679822985; x=1711358985; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=Ke98qksR/WCpl4XAM44xHcD9U3CVxX3QSChUS9T2Am8=; b=ShXobbo2pulKbIZq3sAntsuuvJtxerM8kC/8xcr6hGOu+4LpbUQajDud B4TKVeCeEmA/ciagvLFTp9ApnqRfMhxPc//n9DtoLfBh8E2K8t5ShcZaY ebCuXAAhZYJ/Bo0cnWxIM0DdCQyz1lgJ4pP4k9omExeLEi8ZrMiqjKkWY ArtTwBQfcRKUZxSMdX7GynQj4twIf4Po21SQlB5GFQMaIKCa25BBIFQWH S8Zl8EGPuo9+Vf0KZQPUA/xbbcmQo1OEoEfJK3AGi3PlqvPf3AbaCeQ/y KvDGONVU0ZNaKZ5a4KY2+SfBbLCOBHuczzxtPL/Nw/7wUh5eO+XtTuXyj w==; X-IronPort-AV: E=McAfee;i="6600,9927,10660"; a="323950815" X-IronPort-AV: E=Sophos;i="5.98,292,1673942400"; d="scan'208";a="323950815" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2023 02:29:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10660"; a="807167726" X-IronPort-AV: E=Sophos;i="5.98,292,1673942400"; d="scan'208";a="807167726" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga004.jf.intel.com with ESMTP; 26 Mar 2023 02:29:44 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Sun, 26 Mar 2023 02:29:44 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Sun, 26 Mar 2023 02:29:44 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.46) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Sun, 26 Mar 2023 02:29:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ypp0eTA5C5pY1mcwVma9wixzdgCliQgOGH6f/6HdY+IQVfewQBO6MpcXr+9EKe4Lzzh5Tpxjoka6wif8Z/gQCFSWr7WVByK1jj8mFD6ZwfU74LUHx8YNQbrFzTcgl1ADk4A87Xk0Erp6ceCg3HOf0Q6kHlxt1FoDiQcDsBQdTlZA6vwvnGGRLMmeCxBkbQKeRk2nQebxiizaw+sbCxIR4naJweE4sQaStsIvk+kXpG2BA3LeaXJOlvcdJhp839X8LQATehrToLpkMOwpBhsasKNOd6RdHP4ovGpwaLkGchDPWshU1WOvnSIl4JRzU+vhtcTPMkiU59WxrJfYDOXbWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BABya8SbeCKtNapjsMfcnECPSy33o8loSHUeZkvdClY=; b=UxYRvoyY7ghq3FtrRbHwqum4MvY0khT2vfTOSDnfLNEUFQbKNoWpmVpma0ni5l8Q9VBSRa0Djo+i6IGDizH4WvMQ3RwHYCqRwMLh6jGLwkJbN9qRsa1FOZ7PCMj6mKPf0Zo8siWd6HUd6h+KqWIhrYNnpoXQ5tvAkdskFVFI6evyzTuhdqyaG+2RXnSp384UjwSoRYg1osPuK4qMhNIiE3BLePOgN3g8KHEJ5yJC9P4Ntvr8dANVUcES9v8Ap5jH4JABwGE0n4xaJ20q8cxw/YItUiSllXRtEYrbRWJMteHFQc7OMAvOidAXnUInLoMi6kT/zLickImkZlPEAvCFPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by IA1PR11MB6370.namprd11.prod.outlook.com (2603:10b6:208:3ae::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Sun, 26 Mar 2023 09:29:42 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69%7]) with mapi id 15.20.6178.041; Sun, 26 Mar 2023 09:29:41 +0000 From: "Ni, Ray" To: "Kinney, Michael D" , "devel@edk2.groups.io" Subject: Re: [Patch 1/1] PcAtChipsetPkg: Add PCD for RTC default year Thread-Topic: [Patch 1/1] PcAtChipsetPkg: Add PCD for RTC default year Thread-Index: AQHZX5JT23/tjs7R30CG3egnPNNXx68MywTQ Date: Sun, 26 Mar 2023 09:29:40 +0000 Message-ID: References: <20230326032312.189-1-michael.d.kinney@intel.com> In-Reply-To: <20230326032312.189-1-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|IA1PR11MB6370:EE_ x-ms-office365-filtering-correlation-id: 59947131-a9bd-4c5b-43c6-08db2ddca006 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: L7F651zpx2z/4V9M64M39OQ7nAVuNud/UV7ddpvWf6AlTnAU3yJRPyMAixECv3aIkfDnzOsopzO4paILb93xwAN+2/kxpglneF+5eKId0ktC0mwOQI6WwkSbzPprxbkCc8vlq1F7GqFFTgurLcIg89aU3cufAQShsk2Yjk6Dgdmx87kwOFam9tgGHAfvAxRQgRn7C41PCStui0lws1IESRd/DWWKFtygUwzvljVR1lVTbWsolwly2El5FfLzljgzCB7/Cb+Q9aBD/K3zzmgC+bcLZT6WgnfDaoe0aBn0ZxPMhZbIoMiqAWs0MBweGKBs3waGgvYO6uhN/Hj0B/JnZ8rAaSMYn5pYHkD4KptBVr+zguQmAzGE578yfmVeVRNGuZUHI8KvZfmzgXPhPPxsVuj26T3rMb8EfX/wEpkUHjqvjh4jqnadfhvh1us6VuEHnTge/YZ6gfxP26gv/CawMviyWTZ5NOk53fnTGfrpPh/+mY6qSZbcQvTsMvIzc6/m/DdylfEaxkCfDmaoF3rFFxdc3vQJYtojkxN3bHnsqmCw+4KOw02jmtaTAIN8PQgoR9A33sh3bsgSmuqiQRCv3C6ET6kLJoBuQrZc8adM4N/N2JXAQZaHT7Z+g+eK6gvq x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(6029001)(136003)(366004)(39860400002)(396003)(346002)(376002)(451199021)(110136005)(9686003)(53546011)(8676002)(52536014)(64756008)(66476007)(8936002)(66446008)(33656002)(66946007)(66556008)(122000001)(86362001)(55016003)(38100700002)(83380400001)(76116006)(2906002)(6506007)(26005)(82960400001)(7696005)(71200400001)(316002)(38070700005)(478600001)(41300700001)(186003)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?jQvEGAI28oFdWhAguMAeUQgtFmiDuNqw+TqdJl9SU28Ca9Sn4cURXvhJD9t9?= =?us-ascii?Q?BYTlL8SEYgGxmcysFRnxBksDykWeVKe/wLA2htrnuf9I5lyxnIQMMKy48j5I?= =?us-ascii?Q?iNzhz2m0Nah7XganbfxWy2noLoysJhQVRpXTc+NI7rjnj3qzKHTE1D3HE+sy?= =?us-ascii?Q?V+6KoYngy3sBILw6Fy122BSnDCS+iUuJ3cI5EmumXkA6fDyAWs5RZjNeXrFr?= =?us-ascii?Q?NkQ9+49DptAy0amb1O18lgtzKP8Q5O16q+Tzw4NuKNTYVDW3Po8YOzBcFhOE?= =?us-ascii?Q?SpWy+QBxA6/mYx/2Jx9cr1sLv36AOKIGVdnch9En7ecoIFchiZiVri/O2XJi?= =?us-ascii?Q?Z0AuQCr6WGpuyhk/x0RF132NM3rIzpPTg/Uk7a0lJlKTfXqQ0W/jgSJEaBHz?= =?us-ascii?Q?C/6JjsSiwosI9n3mlSffWZ/6XqK8oDbz2uc/QUuZzlK5G1D8VIYsV1YqL0qh?= =?us-ascii?Q?a1AtrYobfOMKthTOsRkxpNN1TuDvEzzFkUAasinQWQJPh5z/akk8RkIUAH8r?= =?us-ascii?Q?JlcRYTzFeqiY7yFF6DpuGbO0hWPyW++Tuad18ASAt37Ub5kq+M+a1Br5Xey+?= =?us-ascii?Q?05zGPX9YKhho6+2fa4bRK2Xfy7wh2denVezRFarLnbyds/z+DebnteouOmHW?= =?us-ascii?Q?r9ng0f4RUPwQPh0uryi2Y8ER9n2lvlDHRIrvS4jbXhMG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MnH3pf44=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59947131-a9bd-4c5b-43c6-08db2ddca006 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2023 09:29:40.3564 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fo8vYM2uSPXS9mFw/n6UzhAf8j1a8We0ZiGRLxTZk3ROsryJ5HkNd70nVjFsd+cjbLyP9YP1L9+5R7cL+9qDMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6370 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Mike, When adding the Min/Max year PCD, the idea was Min year is the default year= value. The idea assumed that when a PC is shipped to customers the Min year is set= to the current year. Can we explain why need the default year PCD? Thanks, Ray > -----Original Message----- > From: Kinney, Michael D > Sent: Sunday, March 26, 2023 11:23 AM > To: devel@edk2.groups.io > Cc: Ni, Ray > Subject: [Patch 1/1] PcAtChipsetPkg: Add PCD for RTC default year >=20 > Add PcdRtcDefaultYear to specify the default year to use when > the RTC is in an invalid state. Make sure PcdRtcDefaultYear is > >=3D PcdMinimalValidYear and <=3D PcdMaximalValidYear. Set the > default value for this PCD to PcdMinimalValidYear to preserve > the existing behavior. A platform DSC file can override this > default value setting. >=20 > Cc: Ray Ni > Signed-off-by: Michael D Kinney > --- > PcAtChipsetPkg/PcAtChipsetPkg.dec | 6 ++++++ > PcAtChipsetPkg/PcAtChipsetPkg.uni | 4 ++++ > PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c | 4 ++-- > .../PcatRealTimeClockRuntimeDxe.inf | 1 + > 4 files changed, 13 insertions(+), 2 deletions(-) >=20 > diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.dec > b/PcAtChipsetPkg/PcAtChipsetPkg.dec > index a53ca777e85a..0db385fb901f 100644 > --- a/PcAtChipsetPkg/PcAtChipsetPkg.dec > +++ b/PcAtChipsetPkg/PcAtChipsetPkg.dec > @@ -76,6 +76,12 @@ [PcdsFixedAtBuild, PcdsDynamic, PcdsDynamicEx, > PcdsPatchableInModule] > # @Expression 0x80000001 | > gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear < > gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear + 100 >=20 > gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear|2097|UINT16|0x000 > 0000E >=20 > + ## This PCD specifies the RTC default year when the RTC is in an inval= id > state. > + # @Prompt Default year in RTC. > + # @Expression 0x80000001 | > gPcAtChipsetPkgTokenSpaceGuid.PcdRtcDefaultYear >=3D > gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear > + # @Expression 0x80000001 | > gPcAtChipsetPkgTokenSpaceGuid.PcdRtcDefaultYear <=3D > gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear > + > gPcAtChipsetPkgTokenSpaceGuid.PcdRtcDefaultYear|gPcAtChipsetPkgToke > nSpaceGuid.PcdMinimalValidYear|UINT16|0x0000000F > + > ## Specifies RTC Index Register address in MMIO space. > # @Prompt RTC Index Register address >=20 > gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64|0x0|UINT64|0x00 > 000022 > diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.uni > b/PcAtChipsetPkg/PcAtChipsetPkg.uni > index d290dcf1650f..8eb7970c58aa 100644 > --- a/PcAtChipsetPkg/PcAtChipsetPkg.uni > +++ b/PcAtChipsetPkg/PcAtChipsetPkg.uni > @@ -79,6 +79,10 @@ >=20 > #string STR_gPcAtChipsetPkgTokenSpaceGuid_PcdMaximalValidYear_HELP > #language en-US "This PCD specifies the maximal valid year in RTC." >=20 > +#string > STR_gPcAtChipsetPkgTokenSpaceGuid_PcdRtcDefaultYear_PROMPT > #language en-US "Default year in RTC" > + > +#string STR_gPcAtChipsetPkgTokenSpaceGuid_PcdRtcDefaultYear_HELP > #language en-US "This PCD specifies the RTC default year when the RTC is = in > an invalid state." > + > #string > STR_gPcAtChipsetPkgTokenSpaceGuid_PcdAcpiIoPortBaseAddressMask_PR > OMPT #language en-US "ACPI IO Port Base Address Mask" >=20 > #string > STR_gPcAtChipsetPkgTokenSpaceGuid_PcdAcpiIoPortBaseAddressMask_HE > LP #language en-US "Defines the bit mask to retrieve ACPI IO Port Ba= se > Address." > diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c > b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c > index 9242a2e82600..b059e92f02dc 100644 > --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c > +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c > @@ -317,7 +317,7 @@ PcRtcInit ( > Time.Hour =3D RTC_INIT_HOUR; > Time.Day =3D RTC_INIT_DAY; > Time.Month =3D RTC_INIT_MONTH; > - Time.Year =3D PcdGet16 (PcdMinimalValidYear); > + Time.Year =3D PcdGet16 (PcdRtcDefaultYear); > Time.Nanosecond =3D 0; > Time.TimeZone =3D EFI_UNSPECIFIED_TIMEZONE; > Time.Daylight =3D 0; > @@ -357,7 +357,7 @@ PcRtcInit ( > Time.Hour =3D RTC_INIT_HOUR; > Time.Day =3D RTC_INIT_DAY; > Time.Month =3D RTC_INIT_MONTH; > - Time.Year =3D PcdGet16 (PcdMinimalValidYear); > + Time.Year =3D PcdGet16 (PcdRtcDefaultYear); > Time.Nanosecond =3D 0; > Time.TimeZone =3D Global->SavedTimeZone; > Time.Daylight =3D Global->Daylight; > diff --git > a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntim > eDxe.inf > b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntim > eDxe.inf > index 0d8eca28b659..c344b059878c 100644 > --- > a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntim > eDxe.inf > +++ > b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntim > eDxe.inf > @@ -76,6 +76,7 @@ [Pcd] > gPcAtChipsetPkgTokenSpaceGuid.PcdRealTimeClockUpdateTimeout ## > CONSUMES > gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear ## > CONSUMES > gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear ## > CONSUMES > + gPcAtChipsetPkgTokenSpaceGuid.PcdRtcDefaultYear ## > CONSUMES > gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister ## > CONSUMES > gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister ## > CONSUMES > gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64 ## > CONSUMES > -- > 2.39.1.windows.1