From: Gal Hammer <ghammer@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gal Hammer <ghammer@redhat.com>, imammedo@redhat.com, mst@redhat.com
Subject: [Qemu-devel] [PATCH V15 3/5] aml: implement a 32-bit fixed memory range descriptor
Date: Mon, 27 Apr 2015 14:19:49 +0300 [thread overview]
Message-ID: <1430133591-6197-4-git-send-email-ghammer@redhat.com> (raw)
In-Reply-To: <1430133591-6197-1-git-send-email-ghammer@redhat.com>
Signed-off-by: Gal Hammer <ghammer@redhat.com>
---
hw/acpi/aml-build.c | 18 ++++++++++++++++++
include/hw/acpi/aml-build.h | 3 +++
2 files changed, 21 insertions(+)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index d7945f6..038384f 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -891,3 +891,21 @@ Aml *aml_qword_memory(AmlDecode dec, AmlMinFixed min_fixed,
dec, addr_gran, addr_min, addr_max,
addr_trans, len, flags);
}
+
+Aml *aml_memory32_fixed(AmlReadAndWrite read_and_write,
+ uint32_t addr_base, uint32_t addr_len)
+{
+ Aml *var = aml_alloc();
+
+ /* 32-bit Fixed Memory Range Descriptor */
+ build_append_byte(var->buf, 0x86);
+ /* minimum length since we do not encode optional fields */
+ build_append_byte(var->buf, 0x9);
+ build_append_byte(var->buf, 0x0);
+
+ build_append_byte(var->buf, !!read_and_write & 1);
+ build_append_int_noprefix(var->buf, addr_base, sizeof(addr_base));
+ build_append_int_noprefix(var->buf, addr_len, sizeof(addr_len));
+
+ return var;
+}
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 17d3beb..e3cdd70 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -177,6 +177,9 @@ Aml *aml_qword_memory(AmlDecode dec, AmlMinFixed min_fixed,
uint64_t addr_max, uint64_t addr_trans,
uint64_t len);
+Aml *aml_memory32_fixed(AmlReadAndWrite read_and_write,
+ uint32_t addr_base, uint32_t addr_len);
+
/* Block AML object primitives */
Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
Aml *aml_device(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
--
2.1.0
next prev parent reply other threads:[~2015-04-27 11:20 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 11:19 [Qemu-devel] [PATCH V15 0/5] Virtual Machine Generation ID Gal Hammer
2015-04-27 11:19 ` [Qemu-devel] [PATCH V15 1/5] docs: vm generation id device's description Gal Hammer
2015-04-27 13:42 ` Michael S. Tsirkin
2015-04-27 13:55 ` Michael S. Tsirkin
2015-04-28 14:20 ` Gal Hammer
2015-04-27 14:56 ` Eric Blake
2015-04-28 14:38 ` Gal Hammer
2015-04-27 11:19 ` [Qemu-devel] [PATCH V15 2/5] acpi: add a vm_generation_id_changed method Gal Hammer
2015-04-27 14:57 ` Eric Blake
2015-04-27 11:19 ` Gal Hammer [this message]
2015-04-27 11:19 ` [Qemu-devel] [PATCH V15 4/5] i386: add a Virtual Machine Generation ID device Gal Hammer
2015-04-27 13:38 ` Michael S. Tsirkin
2015-04-29 12:46 ` Gal Hammer
2015-04-27 14:59 ` Eric Blake
2015-05-28 10:25 ` Paolo Bonzini
2015-05-28 11:49 ` Michael S. Tsirkin
2015-05-28 11:59 ` Gal Hammer
2015-05-28 12:21 ` Michael S. Tsirkin
2015-05-28 13:00 ` Paolo Bonzini
2015-05-28 13:24 ` Michael S. Tsirkin
2015-05-28 13:35 ` Paolo Bonzini
2015-05-29 11:46 ` Igor Mammedov
2015-06-03 16:32 ` Michael S. Tsirkin
2015-06-03 16:37 ` Paolo Bonzini
2015-06-08 13:42 ` Gal Hammer
2015-06-08 13:43 ` Paolo Bonzini
2015-06-08 13:52 ` Gal Hammer
2015-06-08 13:55 ` Paolo Bonzini
2015-06-08 13:58 ` Daniel P. Berrange
2015-06-08 14:05 ` Gal Hammer
2015-06-08 15:01 ` Michael S. Tsirkin
2015-06-08 15:17 ` Paolo Bonzini
2015-06-08 15:22 ` Michael S. Tsirkin
2015-06-08 15:28 ` Gal Hammer
2015-06-08 15:32 ` Michael S. Tsirkin
2015-06-08 15:33 ` Paolo Bonzini
2015-06-08 15:41 ` Michael S. Tsirkin
2015-06-08 15:43 ` Paolo Bonzini
2015-06-08 14:00 ` Gal Hammer
2015-06-08 13:59 ` Paolo Bonzini
2015-04-27 11:19 ` [Qemu-devel] [PATCH V15 5/5] tests: add a unit test for the vmgenid device Gal Hammer
2015-04-27 15:01 ` Eric Blake
2015-04-27 16:17 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430133591-6197-4-git-send-email-ghammer@redhat.com \
--to=ghammer@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).