From nobody Mon Dec 23 05:20:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1519400471895543.3232897160489; Fri, 23 Feb 2018 07:41:11 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 97E1B21FD73D3; Fri, 23 Feb 2018 07:35:08 -0800 (PST) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (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 6563C22436956 for ; Fri, 23 Feb 2018 07:35:06 -0800 (PST) Received: by mail-wr0-x243.google.com with SMTP id z12so14544783wrg.4 for ; Fri, 23 Feb 2018 07:41:08 -0800 (PST) Received: from localhost.localdomain ([196.90.4.100]) by smtp.gmail.com with ESMTPSA id 188sm2273215wmg.29.2018.02.23.07.41.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 07:41:05 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WP8isaFUCyJo3H6KltEq48RI1meTjpK28QPXUtYoI9Y=; b=agAEewbjfxnMkP255bW3CK7hrRXFPXZV7vtC5D8rI7YZzUg8V1ArVMq/p8y0Behrm9 1RlDVXyz0WwiIlnU+eLWmh5DDvUyM9lJs/ufm72XMuvqTl/CFGHkHfpBUAq2YOPy5nxb pfx9+glswlWq9cG0rzpe1JB0A/t2LeAYkHp4k= 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:in-reply-to :references; bh=WP8isaFUCyJo3H6KltEq48RI1meTjpK28QPXUtYoI9Y=; b=btV+UuCYwr8aSqc7WHlQ302/oGs6XYOkOCFFSgmfh8IuH++U+xTEI+zoaTZWlDlnnS UaxLcghByN8mZslqj1QYJEt7lkyOGzPf6j2eLtC9/FcEqMGsJNnSPN4OxqIP9LH85Hbd hpwhzlcVYDthK8idtPDZsVSup3gIMRSkUQmrIJ4DpDx5uPpH8awjgOkR6opKmbeE3DnS sTt1glZWROJCOYAeOGQwr4adiB84AKA149ZtnpkRofHN5GWZG797cIeEbqWAiKKhzZNB ZfLghvqiXAtG+vU2oQ01IhVBiUnfu6aieBNF9Ah9HgPHiupbMT2EDJ6RBypGLGUNQw1Y D/0A== X-Gm-Message-State: APf1xPC1OviAKRY+Wby49/f9hcQEOLua13R/RyEp7gDNW93YViQkFF2Z 15Lr65VO3bfxR7M5ulbydRQ8vzErXiI= X-Google-Smtp-Source: AH8x224EBwvTvoNdjw11Gt33+lzg2bPj9BL+X/BgefBJXlaqXozy5cY1jDIDPip7daiI/Qq/BEzvlA== X-Received: by 10.223.160.42 with SMTP id k39mr2236574wrk.138.1519400466562; Fri, 23 Feb 2018 07:41:06 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 23 Feb 2018 15:40:47 +0000 Message-Id: <20180223154052.9828-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180223154052.9828-1-ard.biesheuvel@linaro.org> References: <20180223154052.9828-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms v3 1/6] Platform/96Boards: introduce package and mezzanine protocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Introduce the mezzanine protocol and the 96Boards package defining the PCDs and GUIDs that may be used by implementations of the protocol. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/96Boards/96Boards.dec | 67 ++++++++++++++++++ Platform/96Boards/Include/Protocol/Mezzanine.h | 71 ++++++++++++++++++++ 2 files changed, 138 insertions(+) diff --git a/Platform/96Boards/96Boards.dec b/Platform/96Boards/96Boards.dec new file mode 100644 index 000000000000..2a063ced9e4a --- /dev/null +++ b/Platform/96Boards/96Boards.dec @@ -0,0 +1,67 @@ +## @file +# +# Copyright (c) 2018, Linaro Ltd. All rights reserved. +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the B= SD License +# which accompanies this distribution. The full text of the license may = be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +# +## + +[Defines] + DEC_SPECIFICATION =3D 0x0001001A + PACKAGE_NAME =3D 96Boards + PACKAGE_GUID =3D ce4a4683-6e2d-4ec3-bc11-974289a09ab0 + PACKAGE_VERSION =3D 0.1 + +[Includes] + Include + +[Protocols] + ## Include/Protocol/Mezzanine.h + g96BoardsMezzanineProtocolGuid =3D { 0xf0467a37, 0x3436, 0x40ef, { 0x94,= 0x09, 0x4d, 0x1d, 0x7f, 0x51, 0x06, 0xd3 } } + +[Guids] + # PCD scope GUID + g96BoardsTokenSpaceGuid =3D { 0xe0d2f33a, 0xb7dd, 0x4a69, { 0xb6, 0x76, = 0xda, 0xe8, 0xa4, 0x17, 0xa7, 0xb5 } } + + # GUIDs to be installed as protocols to identify which controller connec= ts to which bus + g96BoardsI2c0MasterGuid =3D { 0xba10e402, 0xcfdd, 0x4b87, { 0xbd, 0x02, = 0x6e, 0x26, 0x9f, 0x01, 0x94, 0x11 } } + g96BoardsI2c1MasterGuid =3D { 0xcf64ac46, 0xd0be, 0x4a69, { 0x90, 0xa2, = 0xf2, 0x82, 0x5b, 0x92, 0x25, 0x61 } } + g96BoardsSpiMasterGuid =3D { 0x9703fd99, 0xe638, 0x42b8, { 0xab, 0x81, 0= x52, 0x61, 0x1b, 0xf7, 0xf7, 0x5d } } + +[PcdsFixedAtBuild] + # ASCII DT paths to the I2C parent nodes of the 96boards LS connector + g96BoardsTokenSpaceGuid.PcdI2c0Parent|""|VOID*|0x00000001 + g96BoardsTokenSpaceGuid.PcdI2c1Parent|""|VOID*|0x00000002 + + # I2C bus frequency in Hertz + g96BoardsTokenSpaceGuid.PcdI2c0BusFrequencyHz|0|UINT32|0x00000003 + g96BoardsTokenSpaceGuid.PcdI2c1BusFrequencyHz|0|UINT32|0x00000004 + + # ASCII DT path to the SPI parent node of the 96boards LS connector + g96BoardsTokenSpaceGuid.PcdSpiParent|""|VOID*|0x00000005 + + # ASCII DT path to the GPIO parent node of the 96boards LS connector + g96BoardsTokenSpaceGuid.PcdGpioParent|""|VOID*|0x00000006 + + # Polarity of the 96boards LS connector GPIOs (0 =3D=3D GPIO_ACTIVE_HIGH= , 1 =3D=3D GPIO_ACTIVE_LOW) + g96BoardsTokenSpaceGuid.PcdGpioPolarity|0|UINT32|0x00000007 + + # Pin numbers of the 96boards LS connector GPIOs + g96BoardsTokenSpaceGuid.PcdGpioPinA|0|UINT32|0x00000010 + g96BoardsTokenSpaceGuid.PcdGpioPinB|0|UINT32|0x00000011 + g96BoardsTokenSpaceGuid.PcdGpioPinC|0|UINT32|0x00000012 + g96BoardsTokenSpaceGuid.PcdGpioPinD|0|UINT32|0x00000013 + g96BoardsTokenSpaceGuid.PcdGpioPinE|0|UINT32|0x00000014 + g96BoardsTokenSpaceGuid.PcdGpioPinF|0|UINT32|0x00000015 + g96BoardsTokenSpaceGuid.PcdGpioPinG|0|UINT32|0x00000016 + g96BoardsTokenSpaceGuid.PcdGpioPinH|0|UINT32|0x00000017 + g96BoardsTokenSpaceGuid.PcdGpioPinI|0|UINT32|0x00000018 + g96BoardsTokenSpaceGuid.PcdGpioPinJ|0|UINT32|0x00000019 + g96BoardsTokenSpaceGuid.PcdGpioPinK|0|UINT32|0x0000001A + g96BoardsTokenSpaceGuid.PcdGpioPinL|0|UINT32|0x0000001B diff --git a/Platform/96Boards/Include/Protocol/Mezzanine.h b/Platform/96Bo= ards/Include/Protocol/Mezzanine.h new file mode 100644 index 000000000000..9847649d2ac3 --- /dev/null +++ b/Platform/96Boards/Include/Protocol/Mezzanine.h @@ -0,0 +1,71 @@ +/** @file + + Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+ + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#ifndef _96BOARDS_MEZZANINE_H_ +#define _96BOARDS_MEZZANINE_H_ + +#include +#include + +#define MEZZANINE_PROTOCOL_GUID \ + { 0xf0467a37, 0x3436, 0x40ef, { 0x94, 0x09, 0x4d, 0x1d, 0x7f, 0x51, 0x06= , 0xd3 } } + +typedef struct _MEZZANINE_PROTOCOL MEZZANINE_PROTOCOL; + +/** + Apply the mezzanine's DT overlay + + @param[in] This Pointer to the MEZZANINE_PROTOCOL instance. + @param[in,out] Dtb Pointer to the device tree blob + + @return EFI_SUCCESS Operation succeeded. + @return other An error has occurred. +**/ +typedef +EFI_STATUS +(EFIAPI *APPLY_DEVICE_TREE_OVERLAY) ( + IN MEZZANINE_PROTOCOL *This, + IN OUT VOID *Dtb + ); + +struct _MEZZANINE_PROTOCOL { + // + // Get the device tree overlay for this mezzanine board + // + APPLY_DEVICE_TREE_OVERLAY ApplyDeviceTreeOverlay; + // + // The number of devices on LS connector I2C bus #0 + // + UINT32 I2c0NumDevices; + // + // The number of devices on LS connector I2C bus #1 + // + UINT32 I2c1NumDevices; + // + // Linear array of I2C devices on LS connector bus #0 + // + CONST EFI_I2C_DEVICE *I2c0DeviceArray; + // + // Linear array of I2C devices on LS connector bus #0 + // + CONST EFI_I2C_DEVICE *I2c1DeviceArray; + // + // NULL terminated linked list of SPI devices attached to the LS connect= or + // + CONST EFI_SPI_PERIPHERAL *SpiDeviceLinkedList; +}; + +extern EFI_GUID g96BoardsMezzanineProtocolGuid; + +#endif // _96BOARDS_MEZZANINE_H_ --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Dec 23 05:20:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1519400474291960.7584583326359; Fri, 23 Feb 2018 07:41:14 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0811721CB2E20; Fri, 23 Feb 2018 07:35:11 -0800 (PST) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 E1EEA21FD73D5 for ; Fri, 23 Feb 2018 07:35:08 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id t3so5430089wmc.2 for ; Fri, 23 Feb 2018 07:41:10 -0800 (PST) Received: from localhost.localdomain ([196.90.4.100]) by smtp.gmail.com with ESMTPSA id 188sm2273215wmg.29.2018.02.23.07.41.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 07:41:07 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::244; helo=mail-wm0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ezIbCjg3eKOeXdPeiOG39Q3U8uY4SEqaumdSAPCAp5Y=; b=Rr2x1aN6DagSrIcJSeWj/LT2PJ6OwuM2eksB4ACwDdAT3aH4OKGBgFwC182VHlgA94 Xb/qXObOG4zEIToR6z+hl5HugS2SltnBU+CMQ5MhK9YwhmVUdR3Ki12g2y/Pvhe3X5mr vxRdaCRkI6b11iGlKQynxkgIVzPc0IeEimnHU= 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:in-reply-to :references; bh=ezIbCjg3eKOeXdPeiOG39Q3U8uY4SEqaumdSAPCAp5Y=; b=LMUIq/p+d4I1psn9nxZyams+uzlbYsAUWSNpsZPArOfaigbLfm9FE6ADLI9mNatICu 3Mqo0hx2iFkFVSUh1GWhxlugncYVmBhITLE6DE0iBG+fpVod8QtEYq91Ll4hHxcCpsXo 1Fk19JvEaKZWI2AvCg33exaJkwCEK+EJrjHUxyhvkwCaEO9PANrZ4oJaEgckplBgggof e3wOYZX+w24iyii6m7HnkLSexi0EyIghveWccWPMng4IFm12R1hkTjmHXSn479SMKq0m 7xRsZl5PxJ7XPf1HGx1I8lDz0b188gDgM3YUJkWFMsYyBOQMvG2V/YaQV8ujMwrJrBAH Xl0A== X-Gm-Message-State: APf1xPBw9qSExXMjICnHeHCcHn72MkLUASPvbdQRY1tDYiAdKKJoDQgu YpjDmXE2SPk/LXVlXCS7QBpdEvGeoII= X-Google-Smtp-Source: AG47ELsXzBnOuQy/LvuvsbpwD9pxK72dFR6HCrLWPIymQIII2/ZlM8bhCLFvuNPtVKqsJTVYdl/m7A== X-Received: by 10.28.30.130 with SMTP id e124mr2204734wme.153.1519400468616; Fri, 23 Feb 2018 07:41:08 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 23 Feb 2018 15:40:48 +0000 Message-Id: <20180223154052.9828-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180223154052.9828-1-ard.biesheuvel@linaro.org> References: <20180223154052.9828-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms v3 2/6] Platform/96Boards: introduce I2C driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Implement a I2C DXE driver that wires up the I2C devices exposed by a 96boards mezzanine into the EDK2 I2C stack. Note that this requires the platform to identify its I2C master implementations using special GUIDs-as-protocols. It also assumes [for now] that I2C buses are not shared between the 96boards connector and other platform peripherals. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.c | 206 ++++++++++++++++= ++++ Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.inf | 51 +++++ 2 files changed, 257 insertions(+) diff --git a/Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.c b/Platform/9= 6Boards/96BoardsI2cDxe/96BoardsI2cDxe.c new file mode 100644 index 000000000000..79bb9ed5ffee --- /dev/null +++ b/Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.c @@ -0,0 +1,206 @@ +/** @file + + Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+ + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may be= found at + http://opensource.org/licenses/bsd-license.php + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +STATIC MEZZANINE_PROTOCOL *mMezzanine; + +typedef struct { + EFI_I2C_ENUMERATE_PROTOCOL I2cEnumerate; + EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL I2cConfigManagement; + EFI_HANDLE I2cMasterHandle; + UINT32 BusFrequency; + UINTN NumDevices; + CONST EFI_I2C_DEVICE *Devices; +} I2C_BUS; + +STATIC +EFI_STATUS +EFIAPI +I2cEnumerate ( + IN CONST EFI_I2C_ENUMERATE_PROTOCOL *This, + IN OUT CONST EFI_I2C_DEVICE **Device + ) +{ + I2C_BUS *Bus; + + if (Device =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + Bus =3D BASE_CR (This, I2C_BUS, I2cEnumerate); + + if (Bus->NumDevices =3D=3D 0 || + (Bus->NumDevices > 0 && *Device =3D=3D &Bus->Devices[Bus->NumDevices= - 1])) { + *Device =3D NULL; + } else if (*Device =3D=3D NULL) { + *Device =3D &Bus->Devices[0]; + } else if (Bus->NumDevices > 1 && + *Device >=3D &Bus->Devices[0] && + *Device < &Bus->Devices[Bus->NumDevices - 1]) { + ++*Device; + } else { + return EFI_NO_MAPPING; + } + return EFI_SUCCESS; +} + +STATIC +EFI_STATUS +EFIAPI +I2cGetBusFrequency ( + IN CONST EFI_I2C_ENUMERATE_PROTOCOL *This, + IN UINTN I2cBusConfiguration, + OUT UINTN *BusClockHertz + ) +{ + I2C_BUS *Bus; + + if (BusClockHertz =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + if (I2cBusConfiguration > 0) { + return EFI_NO_MAPPING; + } + + Bus =3D BASE_CR (This, I2C_BUS, I2cEnumerate); + + *BusClockHertz =3D Bus->BusFrequency; + + return EFI_SUCCESS; +} + +STATIC +EFI_STATUS +EFIAPI +EnableI2cBusConfiguration ( + IN CONST EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL *This, + IN UINTN I2cBusConfigurat= ion, + IN EFI_EVENT Event OPTI= ONAL, + IN EFI_STATUS *I2cStatus OPTI= ONAL + ) +{ + EFI_I2C_MASTER_PROTOCOL *I2cMaster; + EFI_STATUS Status; + UINTN BusClockHertz; + I2C_BUS *Bus; + + if (I2cBusConfiguration > 0) { + return EFI_NO_MAPPING; + } + + Bus =3D BASE_CR (This, I2C_BUS, I2cConfigManagement); + + Status =3D gBS->HandleProtocol (Bus->I2cMasterHandle, + &gEfiI2cMasterProtocolGuid, (VOID **)&I2cMaster); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: gBS->HandleProtocol() failed - %r\n", + __FUNCTION__, Status)); + return Status; + } + + BusClockHertz =3D Bus->BusFrequency; + Status =3D I2cMaster->SetBusFrequency (I2cMaster, &BusClockHertz); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: I2cMaster->SetBusFrequency() failed - %r\n", + __FUNCTION__, Status)); + return Status; + } + + if (Event !=3D NULL) { + *I2cStatus =3D EFI_SUCCESS; + gBS->SignalEvent (Event); + } + return EFI_SUCCESS; +} + +STATIC I2C_BUS mI2cBus0 =3D { + { I2cEnumerate, I2cGetBusFrequency }, + { EnableI2cBusConfiguration }, + NULL, + FixedPcdGet32 (PcdI2c0BusFrequencyHz), + 0, + NULL, +}; + +STATIC I2C_BUS mI2cBus1 =3D { + { I2cEnumerate, I2cGetBusFrequency }, + { EnableI2cBusConfiguration }, + NULL, + FixedPcdGet32 (PcdI2c1BusFrequencyHz), + 0, + NULL, +}; + +STATIC +VOID +RegisterI2cBus ( + IN EFI_GUID *Guid, + IN I2C_BUS *I2cBus, + IN UINTN NumDevices, + IN CONST EFI_I2C_DEVICE *Devices + ) +{ + EFI_STATUS Status; + UINTN BufferSize; + + BufferSize =3D sizeof (EFI_HANDLE); + Status =3D gBS->LocateHandle (ByProtocol, Guid, NULL, &BufferSize, + &I2cBus->I2cMasterHandle); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "%a: gBS->LocateHandle() failed - %r\n", __FUNCTIO= N__, + Status)); + return; + } + + I2cBus->NumDevices =3D NumDevices; + I2cBus->Devices =3D Devices; + + Status =3D gBS->InstallMultipleProtocolInterfaces (&I2cBus->I2cMasterHan= dle, + &gEfiI2cEnumerateProtocolGuid, + &I2cBus->I2cEnumerate, + &gEfiI2cBusConfigurationManagementProtocolGuid, + &I2cBus->I2cConfigManagement, + NULL); + ASSERT_EFI_ERROR (Status); +} + +EFI_STATUS +EFIAPI +EntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + + Status =3D gBS->LocateProtocol (&g96BoardsMezzanineProtocolGuid, NULL, + (VOID **)&mMezzanine); + ASSERT_EFI_ERROR (Status); + + RegisterI2cBus (&g96BoardsI2c0MasterGuid, &mI2cBus0, + mMezzanine->I2c0NumDevices, mMezzanine->I2c0DeviceArray); + RegisterI2cBus (&g96BoardsI2c1MasterGuid, &mI2cBus1, + mMezzanine->I2c1NumDevices, mMezzanine->I2c1DeviceArray); + + return EFI_SUCCESS; +} diff --git a/Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.inf b/Platform= /96Boards/96BoardsI2cDxe/96BoardsI2cDxe.inf new file mode 100644 index 000000000000..7eb1fc503062 --- /dev/null +++ b/Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.inf @@ -0,0 +1,51 @@ +## @file +# +# Copyright (c) 2018, Linaro Ltd. All rights reserved.
+# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the B= SD +# License which accompanies this distribution. The full text of the licen= se may +# be found at http://opensource.org/licenses/bsd-license.php. +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +# +## + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D 96BoardsI2cDxe + FILE_GUID =3D a59176bc-a151-49c8-b54a-b4ac96f436c3 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 0.1 + ENTRY_POINT =3D EntryPoint + +[Sources] + 96BoardsI2cDxe.c + +[Packages] + MdePkg/MdePkg.dec + Platform/96Boards/96Boards.dec + +[LibraryClasses] + DebugLib + UefiBootServicesTableLib + UefiDriverEntryPoint + UefiLib + +[Protocols] + g96BoardsMezzanineProtocolGuid ## CONSUMES + gEfiI2cBusConfigurationManagementProtocolGuid ## PRODUCES + gEfiI2cEnumerateProtocolGuid ## PRODUCES + gEfiI2cMasterProtocolGuid ## CONSUMES + +[Guids] + g96BoardsI2c0MasterGuid + g96BoardsI2c1MasterGuid + +[FixedPcd] + g96BoardsTokenSpaceGuid.PcdI2c0BusFrequencyHz + g96BoardsTokenSpaceGuid.PcdI2c1BusFrequencyHz + +[Depex] + g96BoardsMezzanineProtocolGuid AND g96BoardsI2c0MasterGuid OR g96BoardsI= 2c1MasterGuid --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Dec 23 05:20:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1519400476952128.94729647777228; Fri, 23 Feb 2018 07:41:16 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 74C162034D8C0; Fri, 23 Feb 2018 07:35:13 -0800 (PST) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 0B5C222436933 for ; Fri, 23 Feb 2018 07:35:10 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id h21so5436516wmd.1 for ; Fri, 23 Feb 2018 07:41:11 -0800 (PST) Received: from localhost.localdomain ([196.90.4.100]) by smtp.gmail.com with ESMTPSA id 188sm2273215wmg.29.2018.02.23.07.41.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 07:41:09 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::244; helo=mail-wm0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4Rg4HMMBdKtQJNcQPemOPJpIwYs84FKabT7dWWptgZI=; b=EkswKVmhUiZcFmxqEQs356ElpDbSrTPAOA9KksWLv59ePiyzHplaCL0G49RMxPJTWJ q8fLnkpuYrbkwPDSTdPlx/SZFBVAOycLe0KOXMj/cJ98242ydojVY3XBcruNjymZ8d+e dPljmC6Zaxb1m8Dm1YePXi3d+VHLxYzawWERE= 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:in-reply-to :references; bh=4Rg4HMMBdKtQJNcQPemOPJpIwYs84FKabT7dWWptgZI=; b=GbPa89RDpWjZeoF4XP7D1WEXKVeOeS9Hnj2E7rIc3b1QW9z3vQbI3y0UVjAt+r53bv IgRi0qNpL5x7lsA7ZZutSZk9AhcXKaB3bFil2Nao6EjtzHqInBTSqUvGnT7R4J0tLn06 LFoAALQZFFobd93i2JGf9imPdfuvug3RFb3BAk9AgVGozfkCAO5YkAAHvUPjWy070I8P +74kzqHESNahu84FY1BjDxptw5hg5i0zRxAjx3xlCu3DbhKcoxvirZQyfz85AD+B33vc Xqa1/akBdGGtI2xTGhZksPgJq9prnruQM9k/otzI98j8eMRbZ8dcBreKYsf/R0TpnXbE 6+cg== X-Gm-Message-State: APf1xPAWOv9MLCZYMVEWgjNaT3qtRLoM8nNmdITg6jXWaX/qTn9RXIx4 gQXiZsJELV5b8bw6iDvpkBH3Ef9DFmU= X-Google-Smtp-Source: AG47ELtOfLFbtNA4EjYA5E1kJUUBSsFF3+/a0a9SL1qx8xDKSL5jeh2Xhq0JEUzI6K8IkwXFxMcJ2A== X-Received: by 10.28.232.16 with SMTP id f16mr2259139wmh.92.1519400470315; Fri, 23 Feb 2018 07:41:10 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 23 Feb 2018 15:40:49 +0000 Message-Id: <20180223154052.9828-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180223154052.9828-1-ard.biesheuvel@linaro.org> References: <20180223154052.9828-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms v3 3/6] Platform/96Boards: introduce LsConnector protocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Introduce a protocol describing the presence of a 96boards low speed (LS) connector, and identifying the type of mezzanine that has been installed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/96Boards/96Boards.dec | 3 ++ Platform/96Boards/Include/Protocol/LsConnector.h | 35 ++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/Platform/96Boards/96Boards.dec b/Platform/96Boards/96Boards.dec index 2a063ced9e4a..fa8e639b1a11 100644 --- a/Platform/96Boards/96Boards.dec +++ b/Platform/96Boards/96Boards.dec @@ -25,6 +25,9 @@ [Protocols] ## Include/Protocol/Mezzanine.h g96BoardsMezzanineProtocolGuid =3D { 0xf0467a37, 0x3436, 0x40ef, { 0x94,= 0x09, 0x4d, 0x1d, 0x7f, 0x51, 0x06, 0xd3 } } =20 + ## Include/Protocol/LsConnector.h + g96BoardsLsConnectorProtocolGuid =3D { 0xae548d4c, 0x9062, 0x4eed, { 0x8= 3, 0x5f, 0xf5, 0x10, 0xf8, 0xfc, 0x48, 0xaf } } + [Guids] # PCD scope GUID g96BoardsTokenSpaceGuid =3D { 0xe0d2f33a, 0xb7dd, 0x4a69, { 0xb6, 0x76, = 0xda, 0xe8, 0xa4, 0x17, 0xa7, 0xb5 } } diff --git a/Platform/96Boards/Include/Protocol/LsConnector.h b/Platform/96= Boards/Include/Protocol/LsConnector.h new file mode 100644 index 000000000000..f337cfe0f709 --- /dev/null +++ b/Platform/96Boards/Include/Protocol/LsConnector.h @@ -0,0 +1,35 @@ +/** @file + + Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+ + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#ifndef _LS_CONNECTOR_H_ +#define _LS_CONNECTOR_H_ + +#define LS_CONNECTOR_PROTOCOL_GUID \ + { 0xae548d4c, 0x9062, 0x4eed, { 0x83, 0x5f, 0xf5, 0x10, 0xf8, 0xfc, 0x48= , 0xaf } } + +typedef struct _LS_CONNECTOR_PROTOCOL LS_CONNECTOR_PROTOCOL; + +typedef enum { + MezzanineUnknown, + MezzanineSecure96, + MezzanineMax +} MEZZANINE_TYPE; + +struct _LS_CONNECTOR_PROTOCOL { + MEZZANINE_TYPE MezzanineType; +}; + +extern EFI_GUID g96BoardsLsConnectorProtocolGuid; + +#endif // _LS_CONNECTOR_H_ --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Dec 23 05:20:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1519400479705613.8893724129049; Fri, 23 Feb 2018 07:41:19 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E5EC0222630AB; Fri, 23 Feb 2018 07:35:15 -0800 (PST) Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (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 423732034D8C0 for ; Fri, 23 Feb 2018 07:35:12 -0800 (PST) Received: by mail-wr0-x244.google.com with SMTP id s5so14552238wra.0 for ; Fri, 23 Feb 2018 07:41:14 -0800 (PST) Received: from localhost.localdomain ([196.90.4.100]) by smtp.gmail.com with ESMTPSA id 188sm2273215wmg.29.2018.02.23.07.41.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 07:41:11 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::244; helo=mail-wr0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EoQnLrZ5sqd+Sey47zoEvRscWnmivYpIDjm382xG7Ow=; b=TORVeix9/yDO2qxRO2GpMHsfcrO0i54QEyA2e0KmnXujlEGL5UMCuOCWnM/cA5rJ+7 MJKtYDjCdwizGbFfR6Lbgy+7oiGEjgZToiYSmnVBcsZ7fOahnTuSvEZJOprF32qw5YAI 4a3vPSxK8pwjO963PBc4ysGAxtBmk+VJjCXCI= 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:in-reply-to :references; bh=EoQnLrZ5sqd+Sey47zoEvRscWnmivYpIDjm382xG7Ow=; b=NFo9Il+RaXn2ZTFY6lIvipWqG/ctfqa0K10znvE1K21O54eQMJju7Qx98lXDw4txI6 V6tVHlH9v7h5sIAvd7hQ0RT/rPBNB9PBWFDfSLiajJM0SlQJ1XGuWPZQniZCxV2rEb1Z Kt+Db03zSdSI7Kpesx86jpa7kjZen5ebJzwc/zTvgTUrhnOkDUMIM5VDWcNcR38o9hNd l83Ze+gFZmZczTAFMhzyJJe3NtSV9X5WPyh8H74jQRwvp36oStkuEa6QTZEnC03yft7p jgG5B9Ib5G/XpzNnRRuq/5VV0/sGpIRXoN9w2ERWkIcFcNv4LZsFnNVCEH4GIBT5066v Ox7Q== X-Gm-Message-State: APf1xPDeBEMtwhmrHrAwyPVBOZQ/AwVFFulR0sHBeVCPXrFkereOwWfL BTbM5f6v8NtqZeI3A1VInU+0Q8pKTzU= X-Google-Smtp-Source: AH8x226xP7FlpWcyTGUCdwTjCqIwGPvZtsK1eggrR5CpT++ausXRUD3g7FZ2btrmUWGhSys421V4tA== X-Received: by 10.223.176.86 with SMTP id g22mr1962166wra.11.1519400472353; Fri, 23 Feb 2018 07:41:12 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 23 Feb 2018 15:40:50 +0000 Message-Id: <20180223154052.9828-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180223154052.9828-1-ard.biesheuvel@linaro.org> References: <20180223154052.9828-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms v3 4/6] Platform/96Boards: add a driver for the Secure96 mezzanine board X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a driver that describes the Secure96 mezzanine board, and exposes both the information required to describe it to the OS using a DT overlay, and to describe it to UEFI itself. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/96Boards/Secure96Dxe/Secure96.dts | 85 ++++++++ Platform/96Boards/Secure96Dxe/Secure96.h | 26 +++ Platform/96Boards/Secure96Dxe/Secure96Dxe.c | 211 ++++++++++++++++++++ Platform/96Boards/Secure96Dxe/Secure96Dxe.inf | 67 +++++++ 4 files changed, 389 insertions(+) diff --git a/Platform/96Boards/Secure96Dxe/Secure96.dts b/Platform/96Boards= /Secure96Dxe/Secure96.dts new file mode 100644 index 000000000000..b56ce59985cc --- /dev/null +++ b/Platform/96Boards/Secure96Dxe/Secure96.dts @@ -0,0 +1,85 @@ +/** @file + * Copyright (c) 2018, Linaro Limited. All rights reserved. + * + * This program and the accompanying materials are licensed and made + * available under the terms and conditions of the BSD License which + * accompanies this distribution. The full text of the license may be + * found at http://opensource.org/licenses/bsd-license.php + * + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR + * IMPLIED. + */ + +#include "Secure96.h" + +// +// Define a placeholder value for the GPIO phandle property cells appearing +// in this file. It is up to the driver code to discover the actual phandle +// value from the platform device tree and patch the overlay DTB before it +// can be applied. +// +#define GPIO_PARENT_PLACEHOLDER_PHANDLE 0x0 + +/dts-v1/; +/plugin/; + +/ { + fragment@0 { + target-path =3D "I2C_PARENT_PLACEHOLDER_STRING"; + __overlay__ { + clock-frequency =3D <100000>; + + ATSHA204A_DT_NODENAME { + compatible =3D "atmel,atsha204a"; + reg =3D ; + }; + + ATECC508A_DT_NODENAME { + compatible =3D "atmel,atecc508a"; + reg =3D ; + }; + }; + }; + + fragment@1 { + target-path =3D "SPI_PARENT_PLACEHOLDER_STRING"; + __overlay__ { + INFINEON_SLB9670_DT_NODENAME { + compatible =3D "infineon,slb9670"; + reg =3D ; + spi-max-frequency =3D <22500000>; + }; + }; + }; + + fragment@2 { + target-path =3D "/"; + __overlay__ { + gpio-leds { + compatible =3D "gpio-leds"; + + secure96-u1 { + gpios =3D ; + }; + secure96-u2 { + gpios =3D ; + }; + secure96-u3 { + gpios =3D ; + }; + secure96-u4 { + gpios =3D ; + }; + }; + }; + }; +}; diff --git a/Platform/96Boards/Secure96Dxe/Secure96.h b/Platform/96Boards/S= ecure96Dxe/Secure96.h new file mode 100644 index 000000000000..84b8aed13d1e --- /dev/null +++ b/Platform/96Boards/Secure96Dxe/Secure96.h @@ -0,0 +1,26 @@ +/** @file + + Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+ + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. +**/ + +#ifndef _SECURE96_H_ +#define _SECURE96_H_ + +#define ATSHA204A_SLAVE_ADDRESS 0x60 +#define ATSHA204A_DT_NODENAME atsha204a@60 + +#define ATECC508A_SLAVE_ADDRESS 0x51 +#define ATECC508A_DT_NODENAME atecc508a@51 + +#define INFINEON_SLB9670_SPI_CS 0x0 +#define INFINEON_SLB9670_DT_NODENAME tpm@0 + +#endif // _SECURE96_H_ diff --git a/Platform/96Boards/Secure96Dxe/Secure96Dxe.c b/Platform/96Board= s/Secure96Dxe/Secure96Dxe.c new file mode 100644 index 000000000000..6c48d7c0b024 --- /dev/null +++ b/Platform/96Boards/Secure96Dxe/Secure96Dxe.c @@ -0,0 +1,211 @@ +/** @file + 96boards Secure96 mezzanine board DXE driver. + + Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+ + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. +**/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Secure96.h" + +STATIC CONST UINT32 mI2cAtmelSha204aSlaveAddress[] =3D { + ATSHA204A_SLAVE_ADDRESS, + + // + // The Atmel AtSha204a has an annoying 'wake' mode where it will only wa= ke + // up if SDA is held low for a certain amount of time. Attempting to acc= ess + // a device at address 0x0 at 100 kHz should be sufficient to create this + // wake condition, so add address 0x0 to the slave addresses. + // + 0 +}; + +STATIC CONST EFI_I2C_DEVICE mI2c0Devices[] =3D { + { + &gAtSha204aI2cDeviceGuid, // DeviceGuid + 0, // DeviceIndex + 0, // HardwareRevision + 0, // I2C bus configuration + ARRAY_SIZE (mI2cAtmelSha204aSlaveAddress), // SlaveAddressCount + mI2cAtmelSha204aSlaveAddress // SlaveAddressArray + } +}; + +STATIC CONST CHAR8 mLedNodes[][46] =3D { + "/fragment@2/__overlay__/gpio-leds/secure96-u1", + "/fragment@2/__overlay__/gpio-leds/secure96-u2", + "/fragment@2/__overlay__/gpio-leds/secure96-u3", + "/fragment@2/__overlay__/gpio-leds/secure96-u4", +}; + +STATIC +VOID +SetOverlayFragmentTarget ( + VOID *Overlay, + CONST CHAR8 *NodeName, + CONST CHAR8 *Target + ) +{ + INT32 Node; + INT32 Err; + + Node =3D fdt_path_offset (Overlay, NodeName); + ASSERT (Node > 0); + + Err =3D fdt_setprop (Overlay, Node, "target-path", Target, + AsciiStrLen (Target) + 1); + if (Err) { + DEBUG ((DEBUG_ERROR, "%a: fdt_setprop() failed - %a\n", + __FUNCTION__, fdt_strerror (Err))); + } +} + +STATIC +VOID +FixupOverlay ( + VOID *Dtb, + VOID *Overlay + ) +{ + INT32 Node; + UINT32 GpioPhandle; + UINTN Idx; + UINT32 *GpioProp; + INT32 Err; + + // + // Set the correct GPIO phandle in the LED nodes + // + Node =3D fdt_path_offset (Dtb, FixedPcdGetPtr (PcdGpioParent)); + ASSERT (Node > 0); + + GpioPhandle =3D fdt_get_phandle (Dtb, Node); + if (!GpioPhandle) { + // + // Node has no phandle yet -> create one + // + GpioPhandle =3D 1 + fdt_get_max_phandle (Dtb); + ASSERT (GpioPhandle >=3D 1); + + Err =3D fdt_setprop_u32 (Dtb, Node, "phandle", GpioPhandle); + if (Err) { + DEBUG ((DEBUG_ERROR, + "%a: fdt_setprop_u32(.., .., \"phandle\", 0x%x) failed - %a\n", + __FUNCTION__, GpioPhandle, fdt_strerror (Err))); + } + } + + for (Idx =3D 0; Idx < ARRAY_SIZE (mLedNodes); Idx++) { + Node =3D fdt_path_offset (Overlay, mLedNodes[Idx]); + ASSERT (Node > 0); + + GpioProp =3D fdt_getprop_w (Overlay, Node, "gpios", NULL); + ASSERT (GpioProp !=3D NULL); + + *GpioProp =3D cpu_to_fdt32 (GpioPhandle); + } + + SetOverlayFragmentTarget (Overlay, "/fragment@0", + FixedPcdGetPtr (PcdI2c0Parent)); + + SetOverlayFragmentTarget (Overlay, "/fragment@1", + FixedPcdGetPtr (PcdSpiParent)); +} + +/** + Apply the mezzanine's DT overlay + + @param[in] This Pointer to the MEZZANINE_PROTOCOL instance. + @param[in,out] Dtb Pointer to the device tree blob + + @return EFI_SUCCESS Operation succeeded. + @return other An error has occurred. +**/ +STATIC +EFI_STATUS +ApplyDeviceTreeOverlay ( + IN MEZZANINE_PROTOCOL *This, + IN OUT VOID *Dtb + ) +{ + VOID *Overlay; + UINTN OverlaySize; + EFI_STATUS Status; + INT32 Err; + + // + // Load the raw overlay DTB image from the raw section of this FFS file. + // + Status =3D GetSectionFromFv (&gEfiCallerIdGuid, + EFI_SECTION_RAW, 0, &Overlay, &OverlaySize); + ASSERT_EFI_ERROR (Status); + if (EFI_ERROR (Status)) { + return EFI_NOT_FOUND; + } + + // + // Fix up unresolved references in the overlay. + // + FixupOverlay (Dtb, Overlay); + + // + // Merge the overlay with the DTB + // + Err =3D fdt_overlay_apply (Dtb, Overlay); + if (Err) { + DEBUG ((DEBUG_ERROR, "%a: fdt_overlay_apply() failed - %a\n", + __FUNCTION__, fdt_strerror (Err))); + return EFI_NOT_FOUND; + } + + return EFI_SUCCESS; +} + +STATIC MEZZANINE_PROTOCOL mMezzanine =3D { + ApplyDeviceTreeOverlay, + ARRAY_SIZE (mI2c0Devices), + 0, + mI2c0Devices, + NULL, + NULL, +}; + +EFI_STATUS +EFIAPI +Secure96DxeEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + LS_CONNECTOR_PROTOCOL *LsConnector; + + Status =3D gBS->LocateProtocol (&g96BoardsLsConnectorProtocolGuid, NULL, + (VOID **)&LsConnector); + ASSERT_EFI_ERROR (Status); + + if (LsConnector->MezzanineType !=3D MezzanineSecure96) { + return EFI_NOT_FOUND; + } + + return gBS->InstallProtocolInterface (&ImageHandle, + &g96BoardsMezzanineProtocolGuid, + EFI_NATIVE_INTERFACE, + &mMezzanine); +} diff --git a/Platform/96Boards/Secure96Dxe/Secure96Dxe.inf b/Platform/96Boa= rds/Secure96Dxe/Secure96Dxe.inf new file mode 100644 index 000000000000..72dbf1314c15 --- /dev/null +++ b/Platform/96Boards/Secure96Dxe/Secure96Dxe.inf @@ -0,0 +1,67 @@ +## @file +# +# Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the B= SD License +# which accompanies this distribution. The full text of the license may = be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +# +## + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D Secure96Dxe + FILE_GUID =3D 31519ec4-65f1-4790-b223-aa9330dd75fd + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D Secure96DxeEntryPoint + +[Sources] + Secure96.dts + Secure96.h + Secure96Dxe.c + +[Packages] + EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Platform/96Boards/96Boards.dec + Silicon/Atmel/AtSha204a/AtSha204a.dec + +[LibraryClasses] + BaseLib + DebugLib + DxeServicesLib + FdtLib + UefiBootServicesTableLib + UefiDriverEntryPoint + UefiLib + +[Protocols] + g96BoardsLsConnectorProtocolGuid ## CONSUMES + g96BoardsMezzanineProtocolGuid ## PRODUCES + +[Guids] + gAtSha204aI2cDeviceGuid + gFdtTableGuid + +[FixedPcd] + g96BoardsTokenSpaceGuid.PcdGpioParent + g96BoardsTokenSpaceGuid.PcdGpioPinF + g96BoardsTokenSpaceGuid.PcdGpioPinG + g96BoardsTokenSpaceGuid.PcdGpioPinH + g96BoardsTokenSpaceGuid.PcdGpioPinI + g96BoardsTokenSpaceGuid.PcdGpioPolarity + g96BoardsTokenSpaceGuid.PcdI2c0Parent + g96BoardsTokenSpaceGuid.PcdSpiParent + +[Depex] + g96BoardsLsConnectorProtocolGuid + +[BuildOptions] + # dtc emits lots of spurious warnings for overlays + *_*_*_DTC_FLAGS =3D -q --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Dec 23 05:20:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1519400482927108.7841100774931; Fri, 23 Feb 2018 07:41:22 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6D43E222630AE; Fri, 23 Feb 2018 07:35:18 -0800 (PST) Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (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 A8AD321FD73F7 for ; Fri, 23 Feb 2018 07:35:14 -0800 (PST) Received: by mail-wr0-x241.google.com with SMTP id f14so14515202wre.8 for ; Fri, 23 Feb 2018 07:41:16 -0800 (PST) Received: from localhost.localdomain ([196.90.4.100]) by smtp.gmail.com with ESMTPSA id 188sm2273215wmg.29.2018.02.23.07.41.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 07:41:13 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::241; helo=mail-wr0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gx2TwPY0zoLBprBpvispsMP1S0T3TDTaNNHwcFI4nEs=; b=I6tUtHQIov330G6k6otXmDlo3XBpNJGNDyPPjkrVb0lDWEH7uBytfxxvrVBGGLL7Xx QwiGcpo6gmIOpSADcQQ/OwpM2jB030suP8JIj2oNT2JVaA7XpXPNHd01WwW1KARzYL4p 1sBJmKiqS6T7/r8UqzsmzNVmmeccVHPoJVImk= 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:in-reply-to :references; bh=gx2TwPY0zoLBprBpvispsMP1S0T3TDTaNNHwcFI4nEs=; b=AQEXiHGo1X/W7XgXtzy0aEdqMHkL7x+rYbiXibb3bOV+b4EHILglkXTzdSB4snUx6J N1p/t5v6Jhw1LHmwNobSzGVaP6XnibQyU6NX1Sn2mQIg+fIyTrzXWc6UJP6h8eqgvh1l mqcf3qXxdQljqiBhXPgy5horPiUSoVuYPLWzR23zVnB/sDAc4UN6c5s30G55ICSxZ2Fr 1oTc3Fb+jOOX/Su1v4rXu+cZu1UhGKjxCzKGlS3Y+yQqNt/yDqg8QNdFnvdvz/ejXks2 K6+Spght2L5sw0nIG6rXzbaNasnFHNj3LOwE3ZPH8qIaSS1Gp3ZFQhlNl8Ykuxa66vWR zxRA== X-Gm-Message-State: APf1xPDKDp8Vv7Yh+xVEON7tBhyUaDe1npzQbDeAkksNGgcRbvDsPWKh iYhrnLP88fQFbbZ9IoDTo2rWhqLp3Ko= X-Google-Smtp-Source: AH8x224FuBKq/h9sZ+D6rbBsdYPCIUzkodTV+9s/Wph7CsZp7nxe3iPSAq0uVj9BrvRHc0y1Cd1SQg== X-Received: by 10.223.179.211 with SMTP id x19mr2014899wrd.175.1519400474514; Fri, 23 Feb 2018 07:41:14 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 23 Feb 2018 15:40:51 +0000 Message-Id: <20180223154052.9828-6-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180223154052.9828-1-ard.biesheuvel@linaro.org> References: <20180223154052.9828-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms v3 5/6] Platform/96Boards: add driver for low speed (LS) connector X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This adds a driver that manages the 96Boards LS connector, i.e, it installs a HII page to configure the type of mezzanine that is installed in the slot, and it exposes this information via the LS connector protocol. It is also in charge of applying the overlay to the platform device tree at end of DXE. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/96Boards/96Boards.dec | 3 + Platform/96Boards/Include/Guid/FormSet.h | 23 ++ Platform/96Boards/LsConnectorDxe/LsConnectorDxe.c | 221 ++++++++++++++++= ++++ Platform/96Boards/LsConnectorDxe/LsConnectorDxe.h | 32 +++ Platform/96Boards/LsConnectorDxe/LsConnectorDxe.inf | 57 +++++ Platform/96Boards/LsConnectorDxe/LsConnectorHii.uni | 27 +++ Platform/96Boards/LsConnectorDxe/LsConnectorHii.vfr | 45 ++++ 7 files changed, 408 insertions(+) diff --git a/Platform/96Boards/96Boards.dec b/Platform/96Boards/96Boards.dec index fa8e639b1a11..49641828aa60 100644 --- a/Platform/96Boards/96Boards.dec +++ b/Platform/96Boards/96Boards.dec @@ -37,6 +37,9 @@ [Guids] g96BoardsI2c1MasterGuid =3D { 0xcf64ac46, 0xd0be, 0x4a69, { 0x90, 0xa2, = 0xf2, 0x82, 0x5b, 0x92, 0x25, 0x61 } } g96BoardsSpiMasterGuid =3D { 0x9703fd99, 0xe638, 0x42b8, { 0xab, 0x81, 0= x52, 0x61, 0x1b, 0xf7, 0xf7, 0x5d } } =20 + # GUID for the HII configuration form + g96BoardsFormsetGuid =3D { 0x7500c9d2, 0x9203, 0x4a37, { 0x84, 0xbb, 0x9= 2, 0xa9, 0xce, 0x34, 0x38, 0xbd } } + [PcdsFixedAtBuild] # ASCII DT paths to the I2C parent nodes of the 96boards LS connector g96BoardsTokenSpaceGuid.PcdI2c0Parent|""|VOID*|0x00000001 diff --git a/Platform/96Boards/Include/Guid/FormSet.h b/Platform/96Boards/I= nclude/Guid/FormSet.h new file mode 100644 index 000000000000..a0475e641d69 --- /dev/null +++ b/Platform/96Boards/Include/Guid/FormSet.h @@ -0,0 +1,23 @@ +/** @file + + Copyright (c) 2018, Linaro Limited. All rights reserved. + + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#ifndef __96BOARDS_FORMSET_H__ +#define __96BOARDS_FORMSET_H__ + +#define NINETY_SIX_BOARDS_FORMSET_GUID \ + { 0x7500c9d2, 0x9203, 0x4a37, { 0x84, 0xbb, 0x92, 0xa9, 0xce, 0x34, 0x38= , 0xbd } } + +extern EFI_GUID g96BoardsFormsetGuid; + +#endif // __96BOARDS_FORMSET_H__ diff --git a/Platform/96Boards/LsConnectorDxe/LsConnectorDxe.c b/Platform/9= 6Boards/LsConnectorDxe/LsConnectorDxe.c new file mode 100644 index 000000000000..f19d95635056 --- /dev/null +++ b/Platform/96Boards/LsConnectorDxe/LsConnectorDxe.c @@ -0,0 +1,221 @@ +/** @file + + Copyright (c) 2018, Linaro, Ltd. All rights reserved. + + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "LsConnectorDxe.h" + +extern UINT8 LsConnectorHiiBin[]; +extern UINT8 LsConnectorDxeStrings[]; + +typedef struct { + VENDOR_DEVICE_PATH VendorDevicePath; + EFI_DEVICE_PATH_PROTOCOL End; +} HII_VENDOR_DEVICE_PATH; + +STATIC HII_VENDOR_DEVICE_PATH m96BoardsDxeVendorDevicePath =3D { + { + { + HARDWARE_DEVICE_PATH, + HW_VENDOR_DP, + { + (UINT8) (sizeof (VENDOR_DEVICE_PATH)), + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) + } + }, + NINETY_SIX_BOARDS_FORMSET_GUID + }, + { + END_DEVICE_PATH_TYPE, + END_ENTIRE_DEVICE_PATH_SUBTYPE, + { + (UINT8) (END_DEVICE_PATH_LENGTH), + (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) + } + } +}; + +STATIC LS_CONNECTOR_PROTOCOL mLsConnector; +STATIC EFI_EVENT EndOfDxeEvent; + +STATIC +EFI_STATUS +InstallHiiPages ( + VOID + ) +{ + EFI_STATUS Status; + EFI_HII_HANDLE HiiHandle; + EFI_HANDLE DriverHandle; + + DriverHandle =3D NULL; + Status =3D gBS->InstallMultipleProtocolInterfaces (&DriverHandle, + &gEfiDevicePathProtocolGuid, + &m96BoardsDxeVendorDevicePath, + NULL); + if (EFI_ERROR (Status)) { + return Status; + } + + HiiHandle =3D HiiAddPackages (&g96BoardsFormsetGuid, + DriverHandle, + LsConnectorDxeStrings, + LsConnectorHiiBin, + NULL); + + if (HiiHandle =3D=3D NULL) { + gBS->UninstallMultipleProtocolInterfaces (DriverHandle, + &gEfiDevicePathProtocolGuid, + &m96BoardsDxeVendorDevicePath, + NULL); + return EFI_OUT_OF_RESOURCES; + } + return EFI_SUCCESS; +} + +STATIC +VOID +EFIAPI +ApplyDeviceTreeOverlay ( + EFI_EVENT Event, + VOID *Context + ) +{ + VOID *Dtb; + MEZZANINE_PROTOCOL *Mezzanine; + EFI_STATUS Status; + + // + // Find the DTB in the configuration table array. If it isn't there, just + // bail without an error: we may be running on an ACPI platform even if + // this driver does not support it [yet]. + // + Status =3D EfiGetSystemConfigurationTable (&gFdtTableGuid, &Dtb); + if (Status =3D=3D EFI_NOT_FOUND) { + return; + } + ASSERT_EFI_ERROR (Status); + + Status =3D gBS->LocateProtocol (&g96BoardsMezzanineProtocolGuid, NULL, + (VOID **)&Mezzanine); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "%a: no mezzanine driver active\n", __FUNCTION__)); + return; + } + + Status =3D Mezzanine->ApplyDeviceTreeOverlay (Mezzanine, Dtb); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_WARN, "%a: failed to apply DT overlay - %r\n", __FUNCTIO= N__, + Status)); + } +} + +/** + The entry point for 96BoardsDxe driver. + + @param[in] ImageHandle The image handle of the driver. + @param[in] SystemTable The system table. + + @retval EFI_ALREADY_STARTED The driver already exists in system. + @retval EFI_OUT_OF_RESOURCES Fail to execute entry point due to lack = of + resources. + @retval EFI_SUCCES All the related protocols are installed = on + the driver. + +**/ +EFI_STATUS +EFIAPI +EntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + NINETY_SIX_BOARDS_CONFIG_DATA ConfigData; + UINTN BufferSize; + + // + // Get the current config settings from the EFI variable. + // + BufferSize =3D sizeof (ConfigData); + Status =3D gRT->GetVariable (NINETY_SIX_BOARDS_CONFIG_VARIABLE_NAME, + &g96BoardsFormsetGuid, NULL, &BufferSize, &ConfigData); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "%a: no config data found\n", __FUNCTION__)); + ConfigData.MezzanineType =3D MEZZANINE_NONE; + } + + if (!EFI_ERROR (Status) && + ConfigData.MezzanineType >=3D MEZZANINE_MAX) { + DEBUG ((DEBUG_WARN, + "%a: invalid value for %s, defaulting to MEZZANINE_NONE\n", + __FUNCTION__, NINETY_SIX_BOARDS_CONFIG_VARIABLE_NAME)); + ConfigData.MezzanineType =3D MEZZANINE_NONE; + Status =3D EFI_INVALID_PARAMETER; // trigger setvar below + } + + // + // Write the newly selected value back to the variable store. + // + if (EFI_ERROR (Status)) { + ZeroMem (&ConfigData.Reserved, sizeof (ConfigData.Reserved)); + Status =3D gRT->SetVariable (NINETY_SIX_BOARDS_CONFIG_VARIABLE_NAME, + &g96BoardsFormsetGuid, + EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_A= CCESS, + sizeof (ConfigData), &ConfigData); + + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: gRT->SetVariable () failed - %r\n", + __FUNCTION__, Status)); + return Status; + } + } + + switch (ConfigData.MezzanineType) { + case MEZZANINE_SECURE96: + mLsConnector.MezzanineType =3D MezzanineSecure96; + break; + default: + mLsConnector.MezzanineType =3D MezzanineUnknown; + } + + Status =3D gBS->InstallProtocolInterface (&ImageHandle, + &g96BoardsLsConnectorProtocolGuid, + EFI_NATIVE_INTERFACE, + &mLsConnector); + if (EFI_ERROR (Status)) { + return Status; + } + + Status =3D gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_NOTIFY, + ApplyDeviceTreeOverlay, + NULL, + &gEfiEndOfDxeEventGroupGuid, + &EndOfDxeEvent); + ASSERT_EFI_ERROR (Status); + + return InstallHiiPages (); +} diff --git a/Platform/96Boards/LsConnectorDxe/LsConnectorDxe.h b/Platform/9= 6Boards/LsConnectorDxe/LsConnectorDxe.h new file mode 100644 index 000000000000..c2a21c52b7a2 --- /dev/null +++ b/Platform/96Boards/LsConnectorDxe/LsConnectorDxe.h @@ -0,0 +1,32 @@ +/** @file + + Copyright (c) 2018, Linaro Limited. All rights reserved. + + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#ifndef __LSCONNECTOR_DXE_H__ +#define __LSCONNECTOR_DXE_H__ + +#include +#include + +#define MEZZANINE_NONE 0x0 +#define MEZZANINE_SECURE96 0x1 +#define MEZZANINE_MAX 0x2 + +#define NINETY_SIX_BOARDS_CONFIG_VARIABLE_NAME L"NinetySixBoardsConfig" + +typedef struct { + UINT8 MezzanineType; + UINT8 Reserved[7]; +} NINETY_SIX_BOARDS_CONFIG_DATA; + +#endif // __LSCONNECTOR_DXE_H__ diff --git a/Platform/96Boards/LsConnectorDxe/LsConnectorDxe.inf b/Platform= /96Boards/LsConnectorDxe/LsConnectorDxe.inf new file mode 100644 index 000000000000..1bf528ceaa84 --- /dev/null +++ b/Platform/96Boards/LsConnectorDxe/LsConnectorDxe.inf @@ -0,0 +1,57 @@ +## @file +# +# Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+# +# This program and the accompanying materials are licensed and made +# available under the terms and conditions of the BSD License which +# accompanies this distribution. The full text of the license may be +# found at http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR +# IMPLIED. +# +## + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D LsConnectorDxe + FILE_GUID =3D 3f68e889-cb77-4efc-bc84-afa0a64ad26e + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D EntryPoint + +[Sources] + LsConnectorDxe.c + LsConnectorDxe.h + LsConnectorHii.vfr + LsConnectorHii.uni + +[Packages] + EmbeddedPkg/EmbeddedPkg.dec + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + Platform/96Boards/96Boards.dec + +[LibraryClasses] + BaseLib + BaseMemoryLib + DebugLib + HiiLib + UefiBootServicesTableLib + UefiDriverEntryPoint + UefiLib + UefiRuntimeServicesTableLib + +[Protocols] + g96BoardsLsConnectorProtocolGuid ## PRODUCES + g96BoardsMezzanineProtocolGuid ## CONSUMES + +[Guids] + gEfiEndOfDxeEventGroupGuid + gFdtTableGuid + g96BoardsFormsetGuid + +[Depex] + gEfiVariableArchProtocolGuid AND + gEfiVariableWriteArchProtocolGuid diff --git a/Platform/96Boards/LsConnectorDxe/LsConnectorHii.uni b/Platform= /96Boards/LsConnectorDxe/LsConnectorHii.uni new file mode 100644 index 000000000000..23f4c5859207 --- /dev/null +++ b/Platform/96Boards/LsConnectorDxe/LsConnectorHii.uni @@ -0,0 +1,27 @@ +/** @file + + Copyright (c) 2018, Linaro, Ltd. All rights reserved. + + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#langdef en-US "English" + +#string STR_FORM_SET_TITLE #language en-US "96boards Mezzanine= options" +#string STR_FORM_SET_TITLE_HELP #language en-US "Configure the inst= alled 96boards mezzanine" + +#string STR_MAIN_FORM_TITLE #language en-US "96boards Mezzanine= options" +#string STR_NULL_STRING #language en-US "" + +#string STR_MEZZANINE_SELECT_PROMPT #language en-US "96boards mezzanine" +#string STR_MEZZANINE_SELECT_HELP #language en-US "The type of mezzan= ine board plugged into the 96boards LS connector" + +#string STR_MEZZANINE_NONE #language en-US "None/Unknown" +#string STR_MEZZANINE_SECURE96 #language en-US "Secure96" diff --git a/Platform/96Boards/LsConnectorDxe/LsConnectorHii.vfr b/Platform= /96Boards/LsConnectorDxe/LsConnectorHii.vfr new file mode 100644 index 000000000000..c4dd69db8e2f --- /dev/null +++ b/Platform/96Boards/LsConnectorDxe/LsConnectorHii.vfr @@ -0,0 +1,45 @@ +/** @file + + Copyright (c) 2018, Linaro, Ltd. All rights reserved. + + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#include "LsConnectorDxe.h" + +#include + +formset + guid =3D NINETY_SIX_BOARDS_FORMSET_GUID, + title =3D STRING_TOKEN(STR_FORM_SET_TITLE), + help =3D STRING_TOKEN(STR_FORM_SET_TITLE_HELP), + classguid =3D EFI_HII_PLATFORM_SETUP_FORMSET_GUID, + + efivarstore NINETY_SIX_BOARDS_CONFIG_DATA, + attribute =3D EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLAT= ILE, // EFI variable attributes + name =3D NinetySixBoardsConfig, + guid =3D NINETY_SIX_BOARDS_FORMSET_GUID; + + form formid =3D 0x1000, + title =3D STRING_TOKEN(STR_MAIN_FORM_TITLE); + + oneof varid =3D NinetySixBoardsConfig.MezzanineType, + prompt =3D STRING_TOKEN(STR_MEZZANINE_SELECT_PROMPT), + help =3D STRING_TOKEN(STR_MEZZANINE_SELECT_HELP), + flags =3D NUMERIC_SIZE_1 | INTERACTIVE | RESET_REQUIRED, + option text =3D STRING_TOKEN(STR_MEZZANINE_NONE), value =3D MEZZAN= INE_NONE, flags =3D DEFAULT; + option text =3D STRING_TOKEN(STR_MEZZANINE_SECURE96), value =3D ME= ZZANINE_SECURE96, flags =3D 0; + endoneof; + + subtitle text =3D STRING_TOKEN(STR_NULL_STRING); + + endform; + +endformset; --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Dec 23 05:20:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1519400485870392.1245155039153; Fri, 23 Feb 2018 07:41:25 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DDF51222630B5; Fri, 23 Feb 2018 07:35:18 -0800 (PST) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (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 3F9D8222630A6 for ; Fri, 23 Feb 2018 07:35:16 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id z9so5336949wmb.3 for ; Fri, 23 Feb 2018 07:41:17 -0800 (PST) Received: from localhost.localdomain ([196.90.4.100]) by smtp.gmail.com with ESMTPSA id 188sm2273215wmg.29.2018.02.23.07.41.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 07:41:15 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=C9h/P1XCDiIkf3xZ0a2iQMrlBqEUmu5dkNvInLrGHM0=; b=Og3rysB8RmKgZ56P/tDHOjpP4dKf3ytXfSeBaSgxJ0kt/akFV0+q5ct2BcPAiqT2F5 M1r8Gj30lBVWjpR+/q+N+HtgLiw3TIasZqNCL9UUnKuiodDfVrRQzjw1f+Xjms61GDAl /mlihm6DvJYSNMjfh91ueHnaDA6FHPni4w9p0= 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:in-reply-to :references; bh=C9h/P1XCDiIkf3xZ0a2iQMrlBqEUmu5dkNvInLrGHM0=; b=S/PGDErFokJwpvurJY4d/2i3FnlloKwbnjm0R99FXaLOAA3Pl7Nj6mJ3ypLD1JHGlf BtNg2f741Axl/t49KJmChg7S8PzLzK5IvhJPxbUpNW/0VPIBinSkFrgzJ9K/quyHCBR5 XaWvWmsKq5fdffNHg2Y51fXqst4+84epv5Pn06aQJnMWO0i6bvp0uryNNDp/GlI28q43 707FN94fQB1NkX12vbKZ7pr+0D302HBjwbk+tjwjxZAu902rFG1j8qDdFnLaCrm3hjQf RK6ScakIP8ERrDpCo0hiISHcq84t3VFJLsx4WSWY/OFJUx5dhQYEo3eM8iCUMGaDktBa 6SBw== X-Gm-Message-State: APf1xPCm7xMtg8rZ/u61CnyClo0H4RkgGxoyq/Q3wdgbgD+2WtcpsNvN 65TR9bs5Vwl2BgCSZB856iUgW2swxvk= X-Google-Smtp-Source: AG47ELsqS+q4NModtEGaXUQCeQ7LCu10BdKz+Jc1ZoBGFnyPkUfn6Jbx1G2t2AdtSWLoeiTENNtn9g== X-Received: by 10.28.116.14 with SMTP id p14mr2243500wmc.117.1519400476243; Fri, 23 Feb 2018 07:41:16 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 23 Feb 2018 15:40:52 +0000 Message-Id: <20180223154052.9828-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180223154052.9828-1-ard.biesheuvel@linaro.org> References: <20180223154052.9828-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms v3 6/6] Platform/Socionext/DeveloperBox: add 96Boards mezzanine support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Wire up the various drivers for the 96Boards LS connector and the optional Secure96 mezzanine board. Note that this includes a [Rule] update that allows .dtb binaries to be bundled with DXE drivers. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 34 +++++= +++++++++++++++ Platform/Socionext/DeveloperBox/DeveloperBox.fdf | 10 ++++++ Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c | 9 ++++++ Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf | 2 ++ 4 files changed, 55 insertions(+) diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/So= cionext/DeveloperBox/DeveloperBox.dsc index 3c109b495fbc..afd0a4f59f00 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc @@ -31,6 +31,9 @@ [Defines] [BuildOptions] RELEASE_*_*_CC_FLAGS =3D -DMDEPKG_NDEBUG -U_FORTIFY_SOURCE -D_FORTIFY_S= OURCE=3D0 =20 + # add ample padding to the DTC so we can apply 96boards mezzanine overla= ys + *_*_*_DTC_FLAGS =3D -p 1024 + [BuildOptions.common.EDKII.DXE_CORE,BuildOptions.common.EDKII.DXE_DRIVER,B= uildOptions.common.EDKII.UEFI_DRIVER,BuildOptions.common.EDKII.UEFI_APPLICA= TION] GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 =20 @@ -396,6 +399,28 @@ [PcdsFixedAtBuild.common] !endif gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|$(BUILD_NUMBER) =20 + # + # 96boards mezzanine support + # + g96BoardsTokenSpaceGuid.PcdI2c0Parent|"/i2c@51210000" + g96BoardsTokenSpaceGuid.PcdI2c0BusFrequencyHz|100000 + g96BoardsTokenSpaceGuid.PcdSpiParent|"/spi@54810000" + g96BoardsTokenSpaceGuid.PcdGpioParent|"/gpio@51000000" + g96BoardsTokenSpaceGuid.PcdGpioPolarity|0 + + g96BoardsTokenSpaceGuid.PcdGpioPinA|10 + g96BoardsTokenSpaceGuid.PcdGpioPinB|11 + g96BoardsTokenSpaceGuid.PcdGpioPinC|12 + g96BoardsTokenSpaceGuid.PcdGpioPinD|13 + g96BoardsTokenSpaceGuid.PcdGpioPinE|18 + g96BoardsTokenSpaceGuid.PcdGpioPinF|19 + g96BoardsTokenSpaceGuid.PcdGpioPinG|20 + g96BoardsTokenSpaceGuid.PcdGpioPinH|21 + g96BoardsTokenSpaceGuid.PcdGpioPinI|22 + g96BoardsTokenSpaceGuid.PcdGpioPinJ|23 + g96BoardsTokenSpaceGuid.PcdGpioPinK|24 + g96BoardsTokenSpaceGuid.PcdGpioPinL|25 + [PcdsPatchableInModule] gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0 @@ -642,6 +667,15 @@ [Components.common] SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.= inf =20 # + # 96board mezzanine support + # + Platform/96Boards/Secure96Dxe/Secure96Dxe.inf + Silicon/Atmel/AtSha204a/AtSha204aDxe.inf + Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.inf + Platform/96Boards/LsConnectorDxe/LsConnectorDxe.inf + + # # I2C # Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.inf + MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.inf diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf b/Platform/So= cionext/DeveloperBox/DeveloperBox.fdf index b668f42c7962..130572009fd0 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf @@ -237,9 +237,18 @@ [FV.FvMain] } =20 # + # 96board mezzanine support + # + INF Platform/96Boards/Secure96Dxe/Secure96Dxe.inf + INF Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.inf + INF Silicon/Atmel/AtSha204a/AtSha204aDxe.inf + INF Platform/96Boards/LsConnectorDxe/LsConnectorDxe.inf + + # # I2C # INF Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.= inf + INF MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.inf =20 [FV.FVMAIN_COMPACT] FvAlignment =3D 16 @@ -421,6 +430,7 @@ [Rule.Common.DXE_DRIVER] DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NA= ME).depex PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING=3D"$(MODULE_NAME)" Optional + RAW BIN Optional |.dtb } =20 [Rule.Common.DXE_RUNTIME_DRIVER] diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c = b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c index aab830dc3a5a..8787aa6288a7 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c +++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c @@ -313,6 +313,15 @@ PlatformDxeEntryPoint ( &Handle); ASSERT_EFI_ERROR (Status); =20 + // + // Install the g96BoardsI2c0MasterGuid GUID onto the same handle, + // identifying I2C #1 on our SoC as I2C #0 on the 96boards low speed con= nector + // + Status =3D gBS->InstallProtocolInterface (&Handle, + &g96BoardsI2c0MasterGuid, + EFI_NATIVE_INTERFACE, NULL); + ASSERT_EFI_ERROR (Status); + SmmuEnableCoherentDma (); SetMmioTimerFrequency (); =20 diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.in= f b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf index 49d9deee57ea..fca66799ebcb 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf +++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf @@ -34,6 +34,7 @@ [Packages] EmbeddedPkg/EmbeddedPkg.dec MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec + Platform/96Boards/96Boards.dec Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.dec Silicon/Socionext/SynQuacer/SynQuacer.dec @@ -56,6 +57,7 @@ [LibraryClasses] UefiRuntimeServicesTableLib =20 [Guids] + g96BoardsI2c0MasterGuid gEfiHiiPlatformSetupFormsetGuid gFdtTableGuid gNetsecNonDiscoverableDeviceGuid --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel