From patchwork Wed Jun 28 19:13:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 106568 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp269824qge; Wed, 28 Jun 2017 12:14:07 -0700 (PDT) X-Received: by 10.237.45.167 with SMTP id i36mr15460261qtd.205.1498677247015; Wed, 28 Jun 2017 12:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498677247; cv=none; d=google.com; s=arc-20160816; b=J934wqUURMHGHm4vvQ7eN8WONiWDEJ3HMpbAtrwW4S6ylJgd48cCEwkqM+x5KcUqUA QGRtOA5lmTgV1WUXOvi66qfcmPs5UFD8n2adDpXN0ZDzx0MMYA16a2wCxOOUTIKWOp/a o88J8dLw/2+WBxC4LlTUnFEyMplPaToOQDk1sV+ACPCuyriOua8h92LaLxCYFj6Q0Bji bLoN9P1T3HFz7RWhN48F3UqUFzqUrpDHALLHJj2+wJFT81ACvMSfzkEpfHki4bXgdz4/ Kr3TDMObGSFHqBc82ugUAU37LnqRPfvTdwVgoazEsQp1vLOYWJoRXhi9IDy29+8Gr/je vvVw== 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:message-id:date:to:from:delivered-to :arc-authentication-results; bh=kZyd8K2TunMn6VQcpIJmt7nhea1HmhSdEncasWhboT4=; b=DXZn7+WqoZVs8VQMGsD6qyAuSE5qcZWXyjXb18tqPGl13QtvwolCdd3ic4jrhtY0I6 8ncqlOg52FKilYqdjH4IMbSXNuYgl5oGONApatEwIMXEd2znpzn0liqxsOsHXBUJ7KHm 7HFvrF36xEjaIDwKMLj3RcqRTTWXhjP0NdOXBZ9y+tW4c9OGv+Q2alBZtzBDUVqgC4HM IP7jEu+ZULFYSDz4HS/COtcvfyKr7Vzgab9LYzW0gdc0/QiOq6n75yZu9nclqOK/74qw DoUB/Atni8uf0FilZJEcnETLKBOeEQg5yzfV87h7GGwNDZDBPK1Kc5SRvRtu9n/2BUq1 6pFA== 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 x16si2757026qta.307.2017.06.28.12.14.05; Wed, 28 Jun 2017 12:14:06 -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 7C5C060D7D; Wed, 28 Jun 2017 19:14:05 +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=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, URIBL_BLOCKED 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 BB8CB60C1E; Wed, 28 Jun 2017 19:14:01 +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 4354D60C26; Wed, 28 Jun 2017 19:14:00 +0000 (UTC) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by lists.linaro.org (Postfix) with ESMTPS id 84769608C0 for ; Wed, 28 Jun 2017 19:13:59 +0000 (UTC) Received: by mail-wm0-f45.google.com with SMTP id i127so69095164wma.0 for ; Wed, 28 Jun 2017 12:13:59 -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; bh=faB1ospeuXvqz80iiGyzBgGvN2PThgPFZ5Xmz+a5VKg=; b=GEQXrY22ZRLHfUINWbdMZ+uu8d9kOMyYMLlEQVNOIzaLJxfoXk2Nip1jjapMX54Opg vJD/F6a628pDIejy4eSTlUn/gTWY/WWe3WjS4fXnwG3OB8/mm9LMfTWK9yHc1V30vgAl ktmoyMZ3c1z2rFTwtttGreKlALZqql9cOXQLdHu1m7X68Y9NOOG7Ieuyp2JejVZSIy5P Lo/msm2HaMjWJNajiulliP4w/c8emCg8kir4e4g9dD9wQ96tViLwKtQn28mCX5jPqASy 8OkB20vWGbSzn8teKvV90fwrIUgcNCyVe50j43H9zWmPp6W/ShN2djxuGgPONtqGui85 fmTg== X-Gm-Message-State: AKS2vOxCyhZiI77U11yWJBmGtf3lnOD2L2zzB/7DHJlJo97cr84QpsBO unZRmKwoxSgmsB9RVNPtqTL3 X-Received: by 10.28.175.71 with SMTP id y68mr8163665wme.75.1498677238304; Wed, 28 Jun 2017 12:13:58 -0700 (PDT) Received: from localhost.localdomain ([105.133.250.69]) by smtp.gmail.com with ESMTPSA id s30sm4375824wrc.13.2017.06.28.12.13.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jun 2017 12:13:57 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org Date: Wed, 28 Jun 2017 19:13:47 +0000 Message-Id: <20170628191349.5233-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 Cc: rfranz@cavium.com Subject: [Linaro-uefi] [PATCH v2 0/2] Platforms/AMD/Cello: implement MAC override 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" Given that we're unlikely to ever see Cellos with the MAC programmed correctly, implement a driver that programs a MAC in a volatile manner instead. This still does not allow us to boot from the network, but at least we no longer have to care about this at the OS level. v2: - fix build when override is not enabled - add support for taking the MAC from a UEFI var Ard Biesheuvel (2): Drivers/Net: add MAC override driver for Realtek 8169 Platforms/AMD/Cello: add Realtek MAC override driver Drivers/Net/Realtek8169MacOverride/Realtek8169MacOverride.c | 263 ++++++++++++++++++++ Drivers/Net/Realtek8169MacOverride/Realtek8169MacOverride.inf | 44 ++++ OpenPlatformPkg.dec | 3 + Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc | 15 +- Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf | 4 + 5 files changed, 326 insertions(+), 3 deletions(-) create mode 100644 Drivers/Net/Realtek8169MacOverride/Realtek8169MacOverride.c create mode 100644 Drivers/Net/Realtek8169MacOverride/Realtek8169MacOverride.inf