From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 99589C4332F for ; Sun, 12 Nov 2023 07:03:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7C95186EC9; Sun, 12 Nov 2023 08:03:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.b="co0UvJMg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 296B486F8D; Sun, 12 Nov 2023 08:03:26 +0100 (CET) Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 377A686DB8 for ; Sun, 12 Nov 2023 08:03:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from LT2ubnt.fritz.box (ip-178-202-040-247.um47.pools.vodafone-ip.de [178.202.40.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 3BDE83FB6C; Sun, 12 Nov 2023 07:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1699772603; bh=7abcsKePtkiUiPS02zm/pp67fNYwRjcFrfLsFFceo9c=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=co0UvJMgXYTv9n7bWOxIQbruXlShgMlJeyxBXZ9X6FcFnoYyGfQqdYftDnhsE4Zxj OV8A9xygm/wUhrHHV1fjEoaU9Jyv3QhONeOalL1lpwMqf5QNyXZNFyCA5QwNixdSax pmdTUbK406lmiEd/EFUH5NfH1VN7eMDTgorHjJvlg7h2+PACJZ1u7WkROLEctNHpfQ 6hFOIpbHU+OeelwsGttyVCCKhDa6j0nMyDz8FKmc0wlmY5hjx2duopv/xYeDPKMrcq 5RYBrSdVrRvJTe78LSNzsQ+nFE4lWnWYinmqiYIiCpkQkECb2hFShDF3HwM7itNhPQ DUcoEbinS8LKA== From: Heinrich Schuchardt To: Simon Glass Cc: Bin Meng , Andy Shevchenko , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH v2 0/2] cmd: acpi: fix acpi list command Date: Sun, 12 Nov 2023 08:03:14 +0100 Message-Id: <20231112070316.17982-1-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The size of the ACPI table header is not a multiple of 8. We have to mark struct acpi_xsdt as packed to correctly access field Entry. Add a unit test for the offsets of field Entry in the RSDT and XSDT tables. ACPI tables may comprise either RSDT, XSDT, or both. The current code fails to check the presence of the RSDT table before accessing it. This leads to an exception if the RSDT table is not provided. The XSDT table takes precedence over the RSDT table. Addresses in the XSDT table are 64-bit. Adjust the output accordingly. As the RSDT table has to be ignored if the XSDT command is present there is no need to compare the tables in a display command. Anyway the specification does not require that the sequence of addresses in the RSDT and XSDT table are the same. The FACS table header does not provide revision information. Correct the description of dump_hdr(). Adjust the ACPI test to match the changed output format of the 'acpi list' command. v2: merge patch 2 and 3 remove leading zeros from address output Heinrich Schuchardt (2): acpi: fix struct acpi_xsdt cmd: acpi: fix acpi list command cmd/acpi.c | 48 +++++++++++++++++++++++---------------- include/acpi/acpi_table.h | 2 +- test/dm/acpi.c | 28 +++++++++++++++-------- 3 files changed, 49 insertions(+), 29 deletions(-) -- 2.40.1