From patchwork Mon May 9 11:32:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 67341 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1544062qge; Mon, 9 May 2016 04:32:38 -0700 (PDT) X-Received: by 10.66.153.174 with SMTP id vh14mr50140606pab.131.1462793556544; Mon, 09 May 2016 04:32:36 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id hy8si38412401pab.190.2016.05.09.04.32.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 May 2016 04:32:36 -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 EDAA91A1EE9; 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 8FF9F1A1EDE for ; Mon, 9 May 2016 04:32:34 -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 2962B90E55; Mon, 9 May 2016 11:32:34 +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 u49BWU5Z010672; Mon, 9 May 2016 07:32:32 -0400 From: Laszlo Ersek To: edk2-devel-01 Date: Mon, 9 May 2016 13:32:27 +0200 Message-Id: <1462793547-3589-2-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 Subject: [edk2] [PATCH 6/6] OvmfPkg/QemuBootOrderLib: 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 QemuBootOrderLib. (Note: QemuBootOrderLib is deprecated at this point (see USE_OLD_BDS in the DSC files), but until we remove it, it should be kept in sync with QemuNewBootOrderLib.) Cc: Jordan Justen Cc: Feng Tian Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/Library/QemuBootOrderLib/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/QemuBootOrderLib/QemuBootOrderLib.c b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c index 15065b7c3d50..582b0bc90ebc 100644 --- a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c +++ b/OvmfPkg/Library/QemuBootOrderLib/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],