From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=xDW7ZjpS; spf=pass (domain: linaro.org, ip: 209.85.221.67, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by groups.io with SMTP; Thu, 02 May 2019 02:59:01 -0700 Received: by mail-wr1-f67.google.com with SMTP id h4so2449617wre.7 for ; Thu, 02 May 2019 02:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UGkrFWiqvIuXfmkCFMJbXsLapNJtLc6HvFO4b29hVNU=; b=xDW7ZjpSvI3HkNzzzItThYnWizfaJdmouIYHeIkoJ0Z8F0S+HsinQhfLLnXL/+OfS0 rwBHFjbxlSg7VczpfWuXMRRJhMCHU8rImvT8OVLdG9HMCR2nPi/r633c6XXgxBm2qkvR dxfl8X6RoDHAYgL+Cz8rMIXIgOCg0g2peZWOvf1IVCdtA5LyNeYoZfPCK+bJHahXQTkN Bb/eT++OdhUq+OrRxxL/5v2JX/K20fJAYz+LP3/fRIFSRbsRkRs6hB6YTzzvFFULOW1o XVRTMLM7buoLnWiPjq1MwZYEU+hXl2KgsIybM9KWawvmGDANrlIE2zD4Bo6/MHxbeawE gyJg== 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:mime-version :content-transfer-encoding; bh=UGkrFWiqvIuXfmkCFMJbXsLapNJtLc6HvFO4b29hVNU=; b=F9YJD6kO9h+d2ryyIVLPoSJYufEIkm1u9fB4DSFdG33jAE6g0gAfCcQa41gwOSqMvf nWaNCdZg8mBBvpqwMDEoHk6mXaaJfBjPob75qHcJ/IK/n+dNXGV0jPt2C96a6NXuuwOC FmolhTXVRamudIabA0tgpnsCeOW5/3houv3qxHbyGG86FBgbdM3Xywuh7QHAAL1oPrSo 80j1o7gAI1J8lodjKuE7UtIGSf7H4PDBIKGY0P2xaMEWhfaDlv5DukRbXVezwaW+sfmv GXm3dnnbEHnl9zf9VeHF1JplAgn2UGU0o1F5/brerTReaWQg0Bl0RlIxje4YIlXv8m6a bCXA== X-Gm-Message-State: APjAAAU2d5gU/daILjtF7Jwn2jTxKIdH0scqEqaE8JJbPpUg6nbaxBCw AzCJ1OEXY/c0sQsDZL6FL8lasHlXRzI6dQ== X-Google-Smtp-Source: APXvYqwifK93d1X/T838OIwFSYAsY6Owe7BqaucEHXYgn/u+rR6C77tSAlnab38U4PwsFCXVxOPvOw== X-Received: by 2002:a5d:528d:: with SMTP id c13mr2159705wrv.264.1556791139248; Thu, 02 May 2019 02:58:59 -0700 (PDT) Return-Path: Received: from sudo.home ([2a01:cb1d:112:6f00:2dc9:bac0:dc74:9979]) by smtp.gmail.com with ESMTPSA id j3sm10681740wrg.72.2019.05.02.02.58.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2019 02:58:58 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: leif.lindholm@linaro.org, graeme.gregory@linaro.org, Ard Biesheuvel Subject: [PATCH edk2-platforms v2 0/2] enable Secure96 mezzanine on ACPI systems Date: Thu, 2 May 2019 11:58:52 +0200 Message-Id: <20190502095854.6989-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series plumbs in the support for describing 96boards mezzanines via ACPI, and uses it to add a description of the Secure96. Note that the TPM is still missing at the moment, but the I2C crypto accelerators and the GPIO LEDs are covered. Changes since v1: - Don't rely on a ACPI device in the host platform's namespace to describe the GPIO lines - this prevents the mezzanine from using GPIOs as interrupts, and is generally far too restrictive. Since we need a hack (see below) for I2C anyway, just use the same method for the GPIO controller. - I2C resources are described with a reference to the I2C controller via a string argument, which cannot be parameterized using PCDs like we do with GPIO interrupt numbers. (This is due to the fact that string PCDs are not expanded to true string literals by EDK2's AutoGen.h CPP magic). So add the default names (e.g., \_SB.I2C0) to Secure96.h, and permit a platform to override them if necessary by setting a scoped build option with a -D argument. Ard Biesheuvel (2): Platform/96Boards: add ACPI support to mezzanine/LS connector driver Platform/Secure96Dxe: add ACPI description of the LEDs and I2C peripherals Platform/96Boards/Include/Protocol/Mezzanine.h | 21 ++++ Platform/96Boards/LsConnectorDxe/LsConnectorDxe.c | 35 ++++-- Platform/96Boards/LsConnectorDxe/LsConnectorDxe.inf | 1 + Platform/96Boards/Secure96Dxe/Secure96.asl | 116 ++++++++++++++++++++ Platform/96Boards/Secure96Dxe/Secure96.h | 8 ++ Platform/96Boards/Secure96Dxe/Secure96Dxe.c | 59 +++++++++- Platform/96Boards/Secure96Dxe/Secure96Dxe.inf | 1 + 7 files changed, 225 insertions(+), 16 deletions(-) create mode 100644 Platform/96Boards/Secure96Dxe/Secure96.asl -- 2.20.1