From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.101]) by mx.groups.io with SMTP id smtpd.web12.10398.1609949368020331405 for ; Wed, 06 Jan 2021 08:09:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=fbleEWbD; spf=pass (domain: os.amperecomputing.com, ip: 40.107.94.101, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GVegNPYid3b9z8qoFxJ8VXSoCJsc0cOHWDJr7g1qPrPIUDscZo1Ixeq2gCYNLNmjzG0x3J8qhP2C9sWurkweazz0HRPHo8cTUuoe5Wwh7h9Vwh8sQyBINqp9TNZ2Fd94Ay4RJ2RD6D4MkukBpUVKnhI44cXT3cx+1794vA3tBBjgWFIbz2I8h7lAF0mXF2hE9adcxDaunCkBsyzX4Ol5U1L6wDMVld78ESj+/mBP4b3TZEEeGFbGfGIJVNAEXHMJf+Ne0Ja19q0lrjuj1exott1K/By328Z9KwQVmbknGXwIoQzGHtha5GUBk6iumjJh3HrLqlrD6oSNKn0161y+iw== 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-SenderADCheck; bh=P+nJOnIkUyj7Y+vofyvqXULDi02W2J8M6CXX/R6nuv8=; b=Z5SOXtbQPCqonB3NixCyPtuxV+F7Wa/ueMsU8DHtgmi+1d+jW7yJIHCc7VFAIL13SDqHx816bm3UxnIGd4Lwyn/mZmhSq2uqFyZg55VGxEa8eRtb2zDDbKqp0IdUKLRgPcYLPsrYU71RzQd/vjUFml39qqXk3xbgb9zurwINb0TB+unB4oZQCASEb1eH8HsIMJ/ej12AcyNUfJw45EppllE5XiStiqufULa4WU1wLhKpJF6mxMZAs8jPl9AKb0PWtm3Uz63TbDVbeh7H1vmeyR9HiacIWQ92vhsbQKt1OS6uJCjSgill3zZRMVBrR0FzG7jrt8yqUca/mQgLMD4oTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P+nJOnIkUyj7Y+vofyvqXULDi02W2J8M6CXX/R6nuv8=; b=fbleEWbD/+1nsepoVMMPAL7ZxKsDkQ7RmqJ1TaQX8ubsXcmAvMqZQsUuRtzBHrtUQdxWr47y5g9Z7JLNnSRBnHExGLXK0Wx+whIzvsds/aYJ1EBUVzLwYtwQtfoDcFRDp2hnTbw0kDY/btgaa2X+VoVw28pwuqtOkFurtz46pVI= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) by DM5PR01MB2538.prod.exchangelabs.com (2603:10b6:3:3e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Wed, 6 Jan 2021 16:09:26 +0000 Received: from DM6PR01MB5849.prod.exchangelabs.com ([fe80::c814:9a08:5c2e:4076]) by DM6PR01MB5849.prod.exchangelabs.com ([fe80::c814:9a08:5c2e:4076%5]) with mapi id 15.20.3721.024; Wed, 6 Jan 2021 16:09:25 +0000 From: "Nhi Pham" To: devel@edk2.groups.io Cc: Nhi Pham , Leif Lindholm , Ard Biesheuvel Subject: [PATCH v2 0/4] EmbeddedPkg/TimeBaseLib: Reduce duplicate code in RTC modules Date: Wed, 6 Jan 2021 23:08:59 +0700 Message-Id: <20210106160903.27679-1-nhi@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 X-Originating-IP: [118.69.219.201] X-ClientProxiedBy: HK2PR02CA0220.apcprd02.prod.outlook.com (2603:1096:201:20::32) To DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) Return-Path: nhi@os.amperecomputing.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (118.69.219.201) by HK2PR02CA0220.apcprd02.prod.outlook.com (2603:1096:201:20::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Wed, 6 Jan 2021 16:09:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 82227a65-b1ed-4402-39bd-08d8b25d703f X-MS-TrafficTypeDiagnostic: DM5PR01MB2538: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3826; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QuYKhl8Lfkw/62PN+3vF1u4qC/q9jy+mtW72UlgUTQZdFGFg7bcpQbJSssaqu4s8W8F+Fnm86Dtcapy6UcO86DshfQ++///1wVYhxXAOpcK5J0HXV+0AfZmPyLef2IgJAHyYzT4sgCCAs9ad3WybEcDGqPO3us5DAgFJdt7dxrnmqDlmo+Lms4AazxLuISf/L7ThGdycOfHJ866FUvb06SVgIabxhccMcIVRoNyeNquhXbtGAhvAF99xBrVttIuyEBCeUxfaL1Y+eBPgsT8LCZEIwvLjy+m3ojxwExbQyHRXrykeNsMHwTzQivpizMLXyfAeS2BG94ys66tDD9BykHTXqJKS3WSVUvEwUYbTM7F1oCy3MITY/+rDHUy+oUWrdV9L/2eRTahMnF2k6U9ecGqnxhsDgQOHYDf9XbJ0TxX9kYS3Ep2KiSayCo+9KO3k X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR01MB5849.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(136003)(376002)(346002)(396003)(39850400004)(2616005)(6506007)(956004)(316002)(1076003)(6666004)(69590400011)(2906002)(8676002)(478600001)(6486002)(8936002)(54906003)(4744005)(186003)(26005)(83380400001)(16526019)(6916009)(66556008)(6512007)(86362001)(4326008)(66476007)(52116002)(5660300002)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?KhUe56Nq582Trmt5WOUz5SKomOSDlVtB7XK+6XRZ+pazy9H1Kp+fOiQSZ9tl?= =?us-ascii?Q?j9gjOwCXvFKtjpi8CI/CiM87ygdhelz4606NFnejDodsF6n0vZITtt4tjpI7?= =?us-ascii?Q?pdQNmJMKfLNdOB3+57ynlJfg5cwNc6U93MTqAKb3qz4sCjszeuPbTQWLm8fF?= =?us-ascii?Q?dupqqGW8tMbCkmIPHvh0l/fqbSaPsriwuh2hamc/AW6iR1DfZz3muDZxYUE2?= =?us-ascii?Q?xwnhL3BWdmHPIGfilbrwc8WVeYXucUFQCekirrRC7/3zG0xw6JFfutYRTVYv?= =?us-ascii?Q?KBkbmLStxx1MJ87ABMuvcDLiOmiCouC9alc2AZAn3bblqKvyLpuebBI1Q29K?= =?us-ascii?Q?l2m4fH1xZ8GIoPP5zzDhb2hXF9nUQGDCrmEBocmTFxkOT+j56rSSB1ufrjfh?= =?us-ascii?Q?HXVCm36TwHMSwDxydOKEu5E2y+fjqaopNfhQFpJVP0cGMVm/cRxUS09sWQNT?= =?us-ascii?Q?zQRwOHsAqu/HIR90bcy6wm1Q6YonnXg4oQV5JQiWZI5mB9vPR3SaToauXe2m?= =?us-ascii?Q?I17S8AqGxng980zl8dEU8efgOu/8VIocOF9gDh5kKdbm9nnkr4bjrrANQIEi?= =?us-ascii?Q?aq6157PXd01C1t9FujvEMl6ipVn3DS6n6cIW2EhNwxuOUODwuK/fB96FpyBm?= =?us-ascii?Q?DvBBVSH+IUaqQPvja6KtjVKpDdtdnlVLyYzJ/19suUqTCmCLnewQxYDzRQA1?= =?us-ascii?Q?7JGWyNZ0GVZoONYV1uEMiwKgvrmmCMAnO2r3IoxgGf+r7WGdkxd+J3hrTJMs?= =?us-ascii?Q?2BmyTtCdr94ZIO/kXfB0vlr1pIHV1J4VezyX3pc5vjHzPPPieWWl0uHschli?= =?us-ascii?Q?2qC5rpmHUAjIN9xJSjADuTgtxRhSP8Z4PaDWj5VXYpukbuqilfGus6GHfEYR?= =?us-ascii?Q?1DBhRyBBYvwH+1R2NsjUFITdTVW7J2LPRU5/RpZpqNgdFga+lE5sLPwjFEk+?= =?us-ascii?Q?EuFIKWuroGAp78FCCX6G12eR//Dpd0e8IGc7JpWCxR/y285TjabMbBHt5O6r?= =?us-ascii?Q?eZT+?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB5849.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2021 16:09:25.6550 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-Network-Message-Id: 82227a65-b1ed-4402-39bd-08d8b25d703f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0hInkoD8/7pZG9bieuzpS6GBUfQ1QI88PksEflylffpdA0pgHW4GVgEuRZECXPcLNeLNI/uJe3hh0Xfz4IAOFb3UYPrrRtMA4u7LlsVr97Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR01MB2538 Content-Type: text/plain This patch series replaces all time checking functions and leverage the helper function in TimeBaseLib library. Cc: Leif Lindholm Cc: Ard Biesheuvel Signed-off-by: Nhi Pham Nhi Pham (4): EmbeddedPkg/TimeBaseLib: Update comment blocks for API functions EmbeddedPkg/TimeBaseLib: Fix for minor code formatting EmbeddedPkg/TimeBaseLib: Add function to check Timezone and Daylight EmbeddedPkg/RealTimeClockRuntimeDxe: Use helper functions from TimeBaseLib .../RealTimeClockRuntimeDxe.inf | 2 + EmbeddedPkg/Include/Library/TimeBaseLib.h | 90 +++++++++++- EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c | 134 +++++++++++++++--- .../RealTimeClockRuntimeDxe/RealTimeClock.c | 88 +----------- 4 files changed, 201 insertions(+), 113 deletions(-) -- 2.17.1