From patchwork Tue Jun 27 18:56:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 106476 Delivered-To: patch@linaro.org Received: by 10.182.135.102 with SMTP id pr6csp2712890obb; Tue, 27 Jun 2017 11:58:13 -0700 (PDT) X-Received: by 10.55.99.76 with SMTP id x73mr7840029qkb.219.1498589893324; Tue, 27 Jun 2017 11:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498589893; cv=none; d=google.com; s=arc-20160816; b=bxX/37SeISoo+EhVFCf4RjRrxCC7olW8glMNSFl7+I1JuSkgKybQEASAyRxEMIiBZ5 VoIqSqa0KJbYUiWzhj5tO/0LAGx9ypxMTqexmbgd3InD4sK9hiAFCErNvaWl3rY8Mr2r xvKt+XH72OaEO69ZRIol8Vv7trAsmacmq2PITSmDu+vDQbJ8El5Z4o1R5MVScPJyDYuB AbKQ75W4nZLePAWgffdG4D9FVcdDfuaW4bIN56xL1SKOiRyTspvhpWqARauGpMR1X+7V WFQ3wvz+L8HKeZaRTer9PVTIkBg9LMr6myYovfdpB260unXtWm2FS8Js6PWRc4L1JEt+ XqpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:delivered-to:arc-authentication-results; bh=EKQlpKBLwVkyi4RCIbaevtysSSXFcIZnQijOLQFVmoQ=; b=WO3J1W6LgksXeE+MmAaBfS61+Qt6LUToYPeIGfHkYPjN4EdI71/ElGbZj3ZM7goHCu 3pe+vMA1gtSKEXvdRRxA37qYAulGWnkD9Bolqy07Pk9Mh5qVsVt4uUde9iNUSKhHvAxb Hk55Ezmbm8XL8XuDbBXN6SGUIHq71aZtNMAmgXqHUatZsznrRawBQO+YlNT1azslB4Rn poIiWIks5hZAg3AQfY9AFIZcQU8gVGGu8hNx+ZYCZFwXsGDQH1ds1hmk01o5lt+j2Y9E O94mXFXfwVfA5JA4NKFxgZ3zkeQGSWUAc6+G05ezyg/JY0iQDZ27zSTz4jcyOUGGGVS/ J01A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q1si16140qkl.153.2017.06.27.11.58.13; Tue, 27 Jun 2017 11:58:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id DDCCB60BF4; Tue, 27 Jun 2017 18:58:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7508D60C1C; Tue, 27 Jun 2017 18:57:23 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 5979460C21; Tue, 27 Jun 2017 18:57:20 +0000 (UTC) Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by lists.linaro.org (Postfix) with ESMTPS id 95FF260C21 for ; Tue, 27 Jun 2017 18:57:06 +0000 (UTC) Received: by mail-wr0-f169.google.com with SMTP id c11so163812313wrc.3 for ; Tue, 27 Jun 2017 11:57:06 -0700 (PDT) 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=5osWsXiky7KYCTE14wF6ZlXuJXsIB+hNtA8Af5gRBCM=; b=bXYdbX4gu/5Gr4M4FQDQLTTUrA3Q5QkN0K03/oYx1998IcNNXwGgJ0rSi41VLiaDzv fSohJU5eagYG/ndK4ISOYf7v1j8KO5LE2qdT43AOyl/cZKiZQ3jaszjdrf2VCYMG36vI Z1aLOq4DWa7jfQYqHEsEUkHmcb6QZK2QTiTIUwZTVD4o2vi3iW1NoybKAC4pVj7IuhvH aFmTfYIkzUs3+galCXAR+EBQ4NZi3zlXYekSgoeZcX/TWJBqa7Z3DPDow6dMg2a/LKjG qZltPnHefbbWb5xn6a9UNxgd04APmnspzoWka3wEO+vZAnVbxRoZV9sj7OpjGKKskCug GUfQ== X-Gm-Message-State: AKS2vOxcASXrR+vIwE336X2N3EcYZ5e3I2m2BxeDCvmJERX26en43UrY Tlyr5dvnLPuCltqvGmGm/lVy X-Received: by 10.223.165.86 with SMTP id j22mr15463602wrb.147.1498589825363; Tue, 27 Jun 2017 11:57:05 -0700 (PDT) Received: from localhost.localdomain ([105.133.250.69]) by smtp.gmail.com with ESMTPSA id h16sm5399744wma.14.2017.06.27.11.57.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jun 2017 11:57:04 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org Date: Tue, 27 Jun 2017 18:56:19 +0000 Message-Id: <20170627185619.21847-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170627185619.21847-1-ard.biesheuvel@linaro.org> References: <20170627185619.21847-1-ard.biesheuvel@linaro.org> Cc: rfranz@cavium.com Subject: [Linaro-uefi] [PATCH 2/2] Platforms/AMD/Cello: add Realtek MAC override driver X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "For discussions about Linaro-related UEFI development. Not a substitute for edk2-devel." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" Deal with the missing MAC address on the Cello Realtek NIC by incorporating an alternative driver that programs a hardcoded MAC address. The intention was to combine this driver with a PcdsDynamicHii PCD which gets set automatically from a UEFI var, but I could not get this to work, so for now, the MAC is hardcoded in the image. E.g., build -p OpenPlatformPkg/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc \ -D RENESAS_XHCI_FW_DIR=~/Downloads \ -D RTK8169_MAC_OVERRIDE=0x0,0xE0,0x4C,0x97,0x3C,0xDC Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc | 7 +++++++ Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc index 90cda24ae49d..7e50ac179dc6 100644 --- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc +++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc @@ -698,3 +698,10 @@ DEFINE DO_FLASHER = FALSE ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf } !endif + +!ifdef $(RTK8169_MAC_OVERRIDE) + OpenPlatformPkg/Drivers/Net/Realtek8169MacOverride/Realtek8169MacOverride.inf + +[PcdsFixedAtBuild] + gOpenPlatformTokenSpaceGuid.PcdMacOverride|{$(RTK8169_MAC_OVERRIDE)} +!endif diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf b/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf index 6f7428f0c4ca..99becb445301 100644 --- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf +++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf @@ -240,6 +240,10 @@ READ_LOCK_STATUS = TRUE } !endif +!ifdef $(RTK8169_MAC_OVERRIDE) + INF OpenPlatformPkg/Drivers/Net/Realtek8169MacOverride/Realtek8169MacOverride.inf +!endif + [FV.STYX_EFI] FvAlignment = 16 ERASE_POLARITY = 1