From patchwork Mon May 9 11:32:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 67340 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1544045qge; Mon, 9 May 2016 04:32:35 -0700 (PDT) X-Received: by 10.66.173.141 with SMTP id bk13mr49284194pac.64.1462793555356; Mon, 09 May 2016 04:32:35 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id j3si38454417pad.104.2016.05.09.04.32.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 May 2016 04:32:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A13511A1EE6; Mon, 9 May 2016 04:32:34 -0700 (PDT) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 43BB11A1EDE for ; Mon, 9 May 2016 04:32:33 -0700 (PDT) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9381280E4A; Mon, 9 May 2016 11:32:32 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-38.phx2.redhat.com [10.3.113.38]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u49BWU5Y010672; Mon, 9 May 2016 07:32:31 -0400 From: Laszlo Ersek To: edk2-devel-01 Date: Mon, 9 May 2016 13:32:26 +0200 Message-Id: <1462793547-3589-1-git-send-email-lersek@redhat.com> In-Reply-To: <1462763872-29024-1-git-send-email-hao.a.wu@intel.com> References: <1462763872-29024-1-git-send-email-hao.a.wu@intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 09 May 2016 11:32:32 +0000 (UTC) Subject: [edk2] [PATCH 5/6] OvmfPkg/QemuNewBootOrderLib: adapt Q35 SATA PMPN to UEFI spec Mantis 1353 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Hao Wu , Jordan Justen , Feng Tian MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" On the Q35 machine type of QEMU, there is no port multiplier connected to the on-board SATA controller. Therefore the AtaAtapiPassThru driver update for Mantis ticket 1353 changes the middle number (the Port Multiplier Port Number) in the Sata() device path nodes from 0x0 to 0xFFFF. Adapt the translation from OpenFirmware in QemuNewBootOrderLib. Cc: Jordan Justen Cc: Feng Tian Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/Library/QemuNewBootOrderLib/QemuBootOrderLib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/OvmfPkg/Library/QemuNewBootOrderLib/QemuBootOrderLib.c b/OvmfPkg/Library/QemuNewBootOrderLib/QemuBootOrderLib.c index 6c576121c2d0..c5f165ae4e23 100644 --- a/OvmfPkg/Library/QemuNewBootOrderLib/QemuBootOrderLib.c +++ b/OvmfPkg/Library/QemuNewBootOrderLib/QemuBootOrderLib.c @@ -786,11 +786,11 @@ TranslatePciOfwNodes ( // // UEFI device path: // - // PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0) - // ^ ^ ^ - // | | LUN (always 0 on Q35) + // PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0) + // ^ ^ ^ + // | | LUN (always 0 on Q35) // | port multiplier port number, - // | always 0 on Q35 + // | always 0xFFFF on Q35 // channel (port) number // UINT64 Channel; @@ -805,7 +805,7 @@ TranslatePciOfwNodes ( Written = UnicodeSPrintAsciiFormat ( Translated, *TranslatedSize * sizeof (*Translated), // BufferSize in bytes - "PciRoot(0x%x)%s/Pci(0x%Lx,0x%Lx)/Sata(0x%Lx,0x0,0x0)", + "PciRoot(0x%x)%s/Pci(0x%Lx,0x%Lx)/Sata(0x%Lx,0xFFFF,0x0)", PciRoot, Bridges, PciDevFun[0],