From patchwork Tue Aug 13 21:05:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shameerali Kolothum Thodi X-Patchwork-Id: 171216 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1399560ily; Tue, 13 Aug 2019 14:11:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLEg69dLjO3BVzAqR8GJ3TzMSHlQEtlMs7Bl4xRAPXTOlPCfU9NQsgpGNx7AxlaiFdO6h5 X-Received: by 2002:ac8:2652:: with SMTP id v18mr3148234qtv.40.1565730699550; Tue, 13 Aug 2019 14:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565730699; cv=none; d=google.com; s=arc-20160816; b=Oi+RpU1sFtzjj8lL02zcVVd0e3pVzobgi+Zalg0vJOxE5mR6caIRWgqYm+y2UbbLGe ZvS5r1969lGB795BgzT2f4x5tCyt14LMiFgZjAxbjrxj+vR5HNIpAeQh6zhTIMF/MPls /ix0ArDAhhfKkQ5+/Y/IECzEeBvTFhMMDHFib9oD6qa06B+Av2MzSV3j8qfr4f4j+QVl EdgeyxagJ0Rhn4TwjrXUetZF5bq1vJaWIjKi6B9elWcE2SvC92P+OMgkexP1/nISqyYN r3jEPq10pdzcoD4kxGGUpsVSAYG27Shoo7oh3PBO3p0MKtP5crI8y+CkJ5JnVU+iLSKJ S+og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:mime-version:references :in-reply-to:message-id:date:to:from; bh=2A77xDkBGjIvIFXCxAe1nFVvDQrOJVTqECfZ2tujOXE=; b=0GR1IhcD2P1Iwuxjc2zlgLjadvxs1bPdGfHZL9gd/ASX/k/GbhVoGetHOFMPSPMwoL nYTVEb/4THRCeGCCeVR2fCoaYf2SjXm65EPin8HS+gUI3ltLW1f1CLk4nvu4t0jg4Npu VJElQFG1ZEejSjUGXHykdp3k4Nski4S17I2nkQHQtryQbeeHB7PBGt+GSWZkXCNj0rZq aqWO2Q4hCagjcPGwMZpsHjIt7p/yxFwizXdK3Dq9UZafQVkEMhP+XabB0y8doVjTQ/eT pe/kuSeGcIEOjLwF5kJW5u/awbo+gwkdiPGRS+Kv1kR0QHEDsX8/GM6l8yaR50BVERRL 6vNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m18si11393761qta.74.2019.08.13.14.11.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Aug 2019 14:11:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:55505 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxe4x-0001OS-5u for patch@linaro.org; Tue, 13 Aug 2019 17:11:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41903) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxe1J-00053t-Rq for qemu-devel@nongnu.org; Tue, 13 Aug 2019 17:07:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hxe1I-0001Yc-Ht for qemu-devel@nongnu.org; Tue, 13 Aug 2019 17:07:53 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:33900 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hxe1E-0001RA-Tp; Tue, 13 Aug 2019 17:07:49 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id E23D4E12C927C458684F; Wed, 14 Aug 2019 05:07:46 +0800 (CST) Received: from S00345302A-PC.china.huawei.com (10.47.94.0) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Wed, 14 Aug 2019 05:07:40 +0800 From: Shameer Kolothum To: , , , Date: Tue, 13 Aug 2019 22:05:37 +0100 Message-ID: <20190813210539.31164-11-shameerali.kolothum.thodi@huawei.com> X-Mailer: git-send-email 2.12.0.windows.1 In-Reply-To: <20190813210539.31164-1-shameerali.kolothum.thodi@huawei.com> References: <20190813210539.31164-1-shameerali.kolothum.thodi@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.47.94.0] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 45.249.212.32 Subject: [Qemu-devel] [PATCH-for-4.2 v9 10/12] docs/specs: Add ACPI GED documentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, sameo@linux.intel.com, ard.biesheuvel@linaro.org, linuxarm@huawei.com, xuwei5@hisilicon.com, shannon.zhaosl@gmail.com, sebastien.boeuf@intel.com, lersek@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Documents basic concepts of ACPI Generic Event device(GED) and interface between QEMU and the ACPI BIOS. Signed-off-by: Shameer Kolothum --- docs/specs/acpi_hw_reduced_hotplug.txt | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 docs/specs/acpi_hw_reduced_hotplug.txt -- 2.17.1 Reviewed-by: Eric Auger diff --git a/docs/specs/acpi_hw_reduced_hotplug.txt b/docs/specs/acpi_hw_reduced_hotplug.txt new file mode 100644 index 0000000000..46839be5ff --- /dev/null +++ b/docs/specs/acpi_hw_reduced_hotplug.txt @@ -0,0 +1,60 @@ +QEMU<->ACPI BIOS Generic Event Device interface + +The ACPI Generic Event Device (GED) is a HW reduced platform +specific device introduced in ACPI v6.1 that handles all platform +events, including the hotplug ones. GED is modelled as a device +in the namespace with a _HID defined to be ACPI0013. This document +describes the interface between QEMU and the ACPI BIOS. + +GED allows HW reduced platforms to handle interrupts in ACPI ASL +statements. It follows a very similar approach like the _EVT method +from GPIO events. All interrupts are listed in _CRS and the handler +is written in _EVT method. However, Qemu implementation uses a single +interrupt for the GED device, relying on IO memory region to communicate +the type of device affected by the interrupt. This way, we can support +up to 32 events with a unique interrupt. + +Here is an example. + +Device (\_SB.GED) +{ + Name (_HID, "ACPI0013") + Name (_UID, Zero) + Name (_CRS, ResourceTemplate () + { + Interrupt (ResourceConsumer, Edge, ActiveHigh, Exclusive, ,, ) + { + 0x00000029, + } + }) + OperationRegion (EREG, SystemMemory, 0x09080000, 0x04) + Field (EREG, DWordAcc, NoLock, WriteAsZeros) + { + ESEL, 32 + } + Method (_EVT, 1, Serialized) + { + Local0 = ESEL // ESEL = IO memory region which specifies the + // device type. + If (((Local0 & One) == One)) + { + MethodEvent1() + } + If ((Local0 & 0x2) == 0x2) + { + MethodEvent2() + } + ... + } +} + +GED IO interface (4 byte access): +read access: + [0x0-0x3] Event selector bit field(32 bit) set by Qemu. + bits: + 1: Memory hotplug event + 2: System power down event + 3-31: Reserved + +write_access: + Nothing is expected to be written into GED IO memory