From patchwork Thu Sep 29 01:18:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 77100 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp79869qgf; Wed, 28 Sep 2016 18:22:11 -0700 (PDT) X-Received: by 10.107.149.85 with SMTP id x82mr141417iod.197.1475112131223; Wed, 28 Sep 2016 18:22:11 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id f84si23045266ita.39.2016.09.28.18.22.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Sep 2016 18:22:11 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpQ0u-0001Yg-2w; Thu, 29 Sep 2016 01:19:52 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpQ0s-0001Wi-FJ for xen-devel@lists.xen.org; Thu, 29 Sep 2016 01:19:50 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id 76/FB-03778-53C6CE75; Thu, 29 Sep 2016 01:19:49 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBIsWRWlGSWpSXmKPExsVyMfTARl3TnDf hBlPXslgs+biYxYHR4+ju30wBjFGsmXlJ+RUJrBmv9j9nKnjPWfFmxjrGBsZ/7F2MXBxCApMY JX7PW8kM4rAIzGOW+LTzIguIIyHQzyoxbcF1oAwnkBMjseP+GxYIu1Liz46FTCC2kICaxLLDC 5khRjUxSZy4/wYswSagI/Fi0k42EFtEQFri2ufLjCBFzAJHGCVuzT8JNlVYwE7i5sl9YA0sAq oSuyY2gG3gFbCROP3vONRmTYnps16D2ZxA8Q8tv5ghNltLLPu2mWUCo8ACRoZVjBrFqUVlqUW 6hoZ6SUWZ6RkluYmZObqGBqZ6uanFxYnpqTmJScV6yfm5mxiB4cUABDsYV7Y7H2KU5GBSEuXl 9HkTLsSXlJ9SmZFYnBFfVJqTWnyIUYaDQ0mC90oWUE6wKDU9tSItMwcY6DBpCQ4eJRHeVyBp3 uKCxNzizHSI1ClGY44tv6+tZeLYNvXeWiYhlrz8vFQpcd6rIKUCIKUZpXlwg2AReIlRVkqYlx HoNCGegtSi3MwSVPlXjOIcjErCvK9BpvBk5pXA7XsFdAoT0ClLT7wAOaUkESEl1cDILbT4xqc vfDsTk/aUPbjDU7z56VYm5yXzVmc+ymko014huv3uenHH29WCLyUep5/j1z7weI1Z17aSFA8p X96cDVaPdllduFHt/XjjmUsLCm+cuM+1Lye2aGfIgyDhz6Wck9QtbiVkJzr9avJ4LTz/6t2D3 x+X2Gy5IccpXWitvDwoWUo378FyJZbijERDLeai4kQAZxHSNbsCAAA= X-Env-Sender: shannon.zhao@linaro.org X-Msg-Ref: server-11.tower-206.messagelabs.com!1475111987!49953227!1 X-Originating-IP: [209.85.192.177] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 49641 invoked from network); 29 Sep 2016 01:19:48 -0000 Received: from mail-pf0-f177.google.com (HELO mail-pf0-f177.google.com) (209.85.192.177) by server-11.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 29 Sep 2016 01:19:48 -0000 Received: by mail-pf0-f177.google.com with SMTP id l25so22859058pfb.1 for ; Wed, 28 Sep 2016 18:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BWbgi4MrQWVWcPzMc2LNQwBDMLpTAeCkn2kVU9uXuMg=; b=Y1PN56pqmeNryY4WhRfp8S4pvX3qfgIDgaTAXMu0mFC+npvajTNdJtQKqfUkutbBEs E+aG7FqZFnGar3Wb+HVt0KTklWBPwiSDuPeOjqJj8Oo/LeMUmnd9d3Z/4eryTYlLy5Va 9smUI+Ir/BKTtZJMtykrmVw5soXOeA46TSM2E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BWbgi4MrQWVWcPzMc2LNQwBDMLpTAeCkn2kVU9uXuMg=; b=J3V4TOqnAAkrV3HmLMXhn0OSClYRt1Vd3OQ9sPOLBcGmhXPXMBa7o3y592FEFcbFob SnmqWMBHjv4KdFWXL1PnTdDXvV6RsBAN9gBTU6SIbVCpy0MPqRFXEWPEOK2SOkdtIurl jts0JODeRlbbX7lUqPM3rcGz25SJuOA81dqePftWmk9X6FKws3/B0UqGyJCffEAdhQ6F RwyTU1UTQT1GXnD19AVxs0ofDw30AGZoTTVbi58uxKxn/3dYe23iDZ3atFQjilLsZEs/ eNcur7r9AvnGUZYxPoKrM1Ga3avemVhoBX8lwJoV0g+lXBBbk6WZ7YKoIpxDwxeqphIf OD1Q== X-Gm-Message-State: AE9vXwOyoYl+0yLtLfKqHTCpLyeeB3StP4JeqGhKoWluDhRIVRZ+VVkKbSmPY6rhZ03QiwAw X-Received: by 10.98.31.10 with SMTP id f10mr62265699pff.137.1475111987020; Wed, 28 Sep 2016 18:19:47 -0700 (PDT) Received: from HZA160860128-A.china.huawei.com ([67.238.99.186]) by smtp.gmail.com with ESMTPSA id wd7sm15228744pab.2.2016.09.28.18.19.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 18:19:46 -0700 (PDT) From: Shannon Zhao To: xen-devel@lists.xen.org Date: Wed, 28 Sep 2016 18:18:57 -0700 Message-Id: <20160929011902.7784-12-shannon.zhao@linaro.org> X-Mailer: git-send-email 2.10.0.windows.1 In-Reply-To: <20160929011902.7784-1-shannon.zhao@linaro.org> References: <20160929011902.7784-1-shannon.zhao@linaro.org> Cc: sstabellini@kernel.org, wei.liu2@citrix.com, ian.jackson@eu.citrix.com, julien.grall@arm.com, Shannon Zhao , zhaoshenglong@huawei.com, boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH v8 11/16] libxl/arm: Construct ACPI DSDT table X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" Copy the static DSDT table into ACPI blob. Signed-off-by: Shannon Zhao Acked-by: Julien Grall Acked-by: Wei Liu --- tools/libxl/libxl_arm_acpi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c index 6530f45..6c713ac 100644 --- a/tools/libxl/libxl_arm_acpi.c +++ b/tools/libxl/libxl_arm_acpi.c @@ -329,6 +329,15 @@ static void make_acpi_fadt(libxl__gc *gc, struct xc_dom_image *dom, acpitables[FADT].size); } +static void make_acpi_dsdt(libxl__gc *gc, struct xc_dom_image *dom, + struct acpitable acpitables[]) +{ + uint64_t offset = acpitables[DSDT].addr - GUEST_ACPI_BASE; + void *dsdt = dom->acpi_modules[0].data + offset; + + memcpy(dsdt, dsdt_anycpu_arm, dsdt_anycpu_arm_len); +} + int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, struct xc_dom_image *dom) { @@ -361,6 +370,7 @@ int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, goto out; make_acpi_fadt(gc, dom, acpitables); + make_acpi_dsdt(gc, dom, acpitables); out: return rc;