From patchwork Mon May 2 12:33:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 8991951 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4E3ECBF29F for ; Mon, 2 May 2016 12:37:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3036201FE for ; Mon, 2 May 2016 12:37:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0141B201FA for ; Mon, 2 May 2016 12:37:16 +0000 (UTC) Received: from localhost ([::1]:36365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axD67-0001Vn-56 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 May 2016 08:37:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axD3L-0005hU-8j for qemu-devel@nongnu.org; Mon, 02 May 2016 08:34:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axD39-0008IQ-Mp for qemu-devel@nongnu.org; Mon, 02 May 2016 08:34:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axD39-0008FO-IC for qemu-devel@nongnu.org; Mon, 02 May 2016 08:34:07 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 775DBC04B32E for ; Mon, 2 May 2016 12:33:56 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u42CXqbm000450; Mon, 2 May 2016 08:33:54 -0400 From: Igor Mammedov To: qemu-devel@nongnu.org Date: Mon, 2 May 2016 14:33:10 +0200 Message-Id: <1462192431-146342-2-git-send-email-imammedo@redhat.com> In-Reply-To: <1462192431-146342-1-git-send-email-imammedo@redhat.com> References: <1462192431-146342-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 01/42] acpi: add aml_debug() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drjones@redhat.com, ehabkost@redhat.com, mst@redhat.com, armbru@redhat.com, marcel@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Igor Mammedov --- hw/acpi/aml-build.c | 9 +++++++++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 10 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index ab89ca6..0ecd386 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -406,6 +406,15 @@ Aml *aml_return(Aml *val) return var; } +/* ACPI 1.0b: 16.2.6.3 Debug Objects Encoding: DebugObj */ +Aml *aml_debug(void) +{ + Aml *var = aml_alloc(); + build_append_byte(var->buf, 0x5B); /* ExtOpPrefix */ + build_append_byte(var->buf, 0x31); /* DebugOp */ + return var; +} + /* * ACPI 1.0b: 16.2.3 Data Objects Encoding: * encodes: ByteConst, WordConst, DWordConst, QWordConst, ZeroOp, OneOp diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 2c994b3..c2cb3bc 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -245,6 +245,7 @@ void aml_append(Aml *parent_ctx, Aml *child); /* non block AML object primitives */ Aml *aml_name(const char *name_format, ...) GCC_FMT_ATTR(1, 2); Aml *aml_name_decl(const char *name, Aml *val); +Aml *aml_debug(void); Aml *aml_return(Aml *val); Aml *aml_int(const uint64_t val); Aml *aml_arg(int pos);