From nobody Sun Feb 27 16:47:48 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 28CFD19EA18F; Sun, 27 Feb 2022 16:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K68ZX59r4z4m5X; Sun, 27 Feb 2022 16:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645980468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y6g7MqytRYysljWjKJZwBY3Kw4LCbsQjMbtQAjcqAqM=; b=IeuLdvOB2H/LyTqftV1lf4mBJcpzId02DAGn+Z4ffRUmsNXn2Ppa+C9Gdt4ebIn7ul/4uf u5jIpIE8EzhU8gGaDv8fDZnGqP8rqGtNWP7J4VLhdwdRPjwR13rhanwt+PlV58d9aAhQq7 oEm35dosS1EVS1aj9i7WYEy3RQIWT+OEk8oS3YO64y/O7ZOio1gmQJpqIDyez7GbJW2usM Fg5LeeClg8hvoQ5oQvYlipGY88V5DZs/8skKmFC+cB6B86Yqn5PaagmUe5wbNbrHh/nWU+ VqesgmUM01KPn7fRkx4wXB7fFWPopyLhR19VTjyNhFMTykobVFkPLs6uRMBExg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83FBF2D2C; Sun, 27 Feb 2022 16:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21RGlmYx036925; Sun, 27 Feb 2022 16:47:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21RGlm11036924; Sun, 27 Feb 2022 16:47:48 GMT (envelope-from git) Date: Sun, 27 Feb 2022 16:47:48 GMT Message-Id: <202202271647.21RGlm11036924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a51ae7212d30 - main - libefivar: Add PciRoot/PcieRoot text for ACPI Expanded Device Path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a51ae7212d30f3e2c1ae71419207d569fab97e88 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645980468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y6g7MqytRYysljWjKJZwBY3Kw4LCbsQjMbtQAjcqAqM=; b=LlFbZPF1c0MQCZ9U+dZqiTHgyFyY+VusWc/5d78o1gBVZOS5UcYv8ODyiFsbHVYzkOsHUn 3XnO0snO93xFcWQeOcM49mjxZ7pE8IQH1y873KP5YI00ZCNI4XLtmtqPbOFbuJnKWc07VR UaDf7Cd0iMNX7Lcy89YyKFbKeE8xIj1HhFwmIrEnkhf1hsVGF2QRG2L3RTKAG3ROjBeUN8 RyM88cSqj8D/w+xLmESihmN70rm4kRNkJZWuPiUDXAX8x+sQOzqzLLBX80ikZS6IFQmHI7 u+n+4T+jbjaH9D9WJvpOd7vvQmJLGSRfhA6La17sKws7KmRP9GYENuV3mIgakA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645980468; a=rsa-sha256; cv=none; b=LZuwhB38NxVBx9c7pTA9KJG0fgIMXAEgYRdcasCo+JLH0sOooOSxKXpiyO+9T+16KEUzjL E7Ci+n/9Gyq9Gq2BQ9NzlvvjqUXodW+z/SDT9nI570jE0BmxBgcG+mJ9eC5ba9rGtojc/q 5wP8pBVaNQ16311Bo+3XG0OVk2NuTiQevu7LxX2ZKYDZTyf3tgmjFJJWmIHaZXeyFw02P4 QQfdq4tHcUrSgjEgIJyn7FIahcksLBbDIoF6InXPTgO/Zn379VJ415f3HxKJ6X476YKoYu MsZNkmWF5sTJquVYsn3E3PB7Bfwhs8VmCflJdt0G/MFlBPeEBTu2V+3vL+n5JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a51ae7212d30f3e2c1ae71419207d569fab97e88 commit a51ae7212d30f3e2c1ae71419207d569fab97e88 Author: Jose Luis Duran AuthorDate: 2022-02-23 16:50:19 +0000 Commit: Warner Losh CommitDate: 2022-02-27 16:13:08 +0000 libefivar: Add PciRoot/PcieRoot text for ACPI Expanded Device Path According to UEFI spec,for ACPI Expanded Device Path when HID=PNP0A03 or CID=PNP0A03 and HID != PNP0A08, the device path node can be displayed as: PciRoot(UID|UIDSTR) When HID=PNP0A08 or CID=PNP0A08, the device path node can be displayed as: PcieRoot(UID|UIDSTR). But current code miss the code logic. This commit is to do the enhancement. Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=1228 Obtained from: https://github.com/tianocore/edk2/commit/78af0984b45a780e45d57c22c85a1f594b969212 Pull Request: https://github.com/freebsd/freebsd-src/pull/581 --- lib/libefivar/efivar-dp-format.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/libefivar/efivar-dp-format.c b/lib/libefivar/efivar-dp-format.c index 24f4cdc94d98..e2a5e666ce7b 100644 --- a/lib/libefivar/efivar-dp-format.c +++ b/lib/libefivar/efivar-dp-format.c @@ -492,6 +492,27 @@ DevPathToTextAcpiEx ( UIDStr = HIDStr + AsciiStrLen (HIDStr) + 1; CIDStr = UIDStr + AsciiStrLen (UIDStr) + 1; + if (DisplayOnly) { + if ((EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A03) || + (EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A03 && EISA_ID_TO_NUM (AcpiEx->HID) != 0x0A08)) { + if (AcpiEx->UID == 0) { + UefiDevicePathLibCatPrint (Str, "PciRoot(%s)", UIDStr); + } else { + UefiDevicePathLibCatPrint (Str, "PciRoot(0x%x)", AcpiEx->UID); + } + return; + } + + if (EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A08 || EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A08) { + if (AcpiEx->UID == 0) { + UefiDevicePathLibCatPrint (Str, "PcieRoot(%s)", UIDStr); + } else { + UefiDevicePathLibCatPrint (Str, "PcieRoot(0x%x)", AcpiEx->UID); + } + return; + } + } + // // Converts EISA identification to string. //