From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4864:20::544; helo=mail-ed1-x544.google.com; envelope-from=pete@akeo.ie; receiver=edk2-devel@lists.01.org Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A7576211BFCD4 for ; Mon, 4 Feb 2019 04:47:49 -0800 (PST) Received: by mail-ed1-x544.google.com with SMTP id f9so11086542eds.10 for ; Mon, 04 Feb 2019 04:47:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=9acipRGttofJdsPbepYwbudPW722VL7tI4n9L5VHzbo=; b=M9boaG6hWsatBsdMrErMeHLFS8jl6dHzRu7yCkVkX8dxQ2dqwYrWeFPNXLlruQJeBJ GNw1h3e69s8U+A2Z5eMdttWTRBJTRfWGY7/CeW+H64DJfQf/TUWSc8eIMJLekRhaxY+o +TWVQDfaeUlZ6mvbSLe2C8UcDhFvuRzL7PXxOM+5PEYKbf/dDj00KTowBXUC47+zGNeP wpwBRJObiskDZFM0sNl1+ghc2zaC2eqVrDGlN8SauQqwK7lXYZUByk7IYKRWwlAVihL5 3oEJgFJ61sz8vUk+eptJZo1fZ2BeMZvlKi/hhsRgQDoes0mkigfVBbZ4LEkRnA+RgBtL S8tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9acipRGttofJdsPbepYwbudPW722VL7tI4n9L5VHzbo=; b=gIi4C/5b1yak579vNhqvqz+/1tZ8Rtay0sF6TlrZ4fDrROoAjEljXJ6XMQECvpOi+d KHulMzYql4P19m+VFPIU0RbbPgE0r7hPtO2Ue2Q2CLhyxwxeluHzUOObcCiBCQzjLDrP QyxnHnkzYofxg8hiHZ2pJXDef9dvhfBOMxcao1FPl8gcr9y7CWZRQuve94opW+W9VIfJ E/OfRS9RnDMXzaTHyzwx8hvF20/6esU02oZ7/b9/bS5ZxLo4T4HHvV+iRr3T0RsPu/fw knSxh2rdebZDQPc+h6b8D2NycQFX1hH8LX0SJhY3HzvmfiyFLS0tML2iVBRJBuqGYHr8 WywA== X-Gm-Message-State: AJcUukesYYN0ZMji4xWeUhJ/SWiAakY/xTnKM2CNo3btF14gIa9pdJml GY629J7LCp+j+yP5EdSfjjlNADl6my4= X-Google-Smtp-Source: ALg8bN50D7wzuYcu/Ojcb1b7tw9UkA2o+Y4PqPRc4U+S3w1w7I2Ut5Zd3RK5oMWsbJk5gorUTx4nUQ== X-Received: by 2002:a50:acc3:: with SMTP id x61mr49828217edc.76.1549284467331; Mon, 04 Feb 2019 04:47:47 -0800 (PST) Received: from localhost.localdomain ([84.203.58.139]) by smtp.gmail.com with ESMTPSA id v6sm2540447eja.51.2019.02.04.04.47.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Feb 2019 04:47:45 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Date: Mon, 4 Feb 2019 12:47:35 +0000 Message-Id: <20190204124736.124-1-pete@akeo.ie> X-Mailer: git-send-email 2.17.0.windows.1 Subject: [PATCH 0/1] EmbeddedPkg/Library: Add VirtualRealTimeClockLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 X-List-Received-Date: Mon, 04 Feb 2019 12:47:50 -0000 This is work, which was requested as part of the Raspberry Pi 3 platform integration, is designed to remove the need to provide various custom RTC implementations for platforms that don't have a real RTC. The library, which is arch-agnostic (through usage of the perf counter) is designed to emulate as much as it can as of a hardware backed RTC, including time zones, daylight savings and nanosecond precision. Note that, since it relies on automatically setting of the epoch value at compilation-time, it is currently only meant to support gcc based build environments and relies on UNIX-like shells that provide a 'date' command. For other environments, the compilation is designed to break in a manner that will direct the builder to contact the edk2 mailing list, so that we can look at adding support for their setup. Regards, /Pete Pete Batard (1): EmbeddedPkg/Library: Add VirtualRealTimeClockLib .../VirtualRealTimeClockLib.c | 400 ++++++++++++++++++ .../VirtualRealTimeClockLib.inf | 43 ++ 2 files changed, 443 insertions(+) create mode 100644 EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c create mode 100644 EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf -- 2.17.0.windows.1