From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: lersek@redhat.com, philmd@redhat.com, mst@redhat.com
Subject: [PATCH] acpi: cpuhp: document how to use CPHP_GET_CPU_ID_CMD command
Date: Fri, 24 Jan 2020 16:17:45 +0100 [thread overview]
Message-ID: <1579879065-3873-1-git-send-email-imammedo@redhat.com> (raw)
Commit 3a61c8db9d25 introduced CPHP_GET_CPU_ID_CMD command but
did not sufficiently described how to use it. Fix it by adding
missing command documentation and suggested work-flow to enumerate
possible architecture specific CPU IDs.
Fixes: 3a61c8db9d25 ("acpi: cpuhp: add CPHP_GET_CPU_ID_CMD command")
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
docs/specs/acpi_cpu_hotplug.txt | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/docs/specs/acpi_cpu_hotplug.txt b/docs/specs/acpi_cpu_hotplug.txt
index a8ce5e7..81b4534 100644
--- a/docs/specs/acpi_cpu_hotplug.txt
+++ b/docs/specs/acpi_cpu_hotplug.txt
@@ -94,6 +94,8 @@ write access:
register in QEMU
2: following writes to 'Command data' register set OST status
register in QEMU
+ 3: following reads from 'Command data' and 'Command data 2' return
+ architecture specific CPU ID value for currently selected CPU.
other values: reserved
[0x6-0x7] reserved
[0x8] Command data: (DWORD access)
@@ -147,3 +149,16 @@ Typical usecases:
11. Otherwise store 0x0 to the 'CPU selector' register, to put it
into a valid state and exit.
The iterator at this point equals "max_cpus".
+
+ - Enumerate present/non present CPUs architecture specific IDs
+ (in case of x86: ACPIC IDs)
+ 01: Use "Enumerate CPUs present/non present CPUs" to get max_cpus
+ 02: Store 0x3 in the 'Command field' register
+ 03: Set 'current cpu selector' iterator to 0x0
+ 04: Store the iterator to the 'CPU selector' register
+ 05: Read from registers 'Command data' and 'Command data 2' parts of ID,
+ combine them into ID like following:
+ 'Command data 2' << 32 | 'Command data'
+ and store pair 'current cpu selector' : ID for further processing
+ 06: Increment the iterator and if the iterator < max_cpus go to step 4
+ 07: Otherwise store 0x0 to the 'CPU selector' register and exit.
--
2.7.4
next reply other threads:[~2020-01-24 15:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 15:17 Igor Mammedov [this message]
2020-01-24 16:04 ` [PATCH] acpi: cpuhp: document how to use CPHP_GET_CPU_ID_CMD command Laszlo Ersek
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=1579879065-3873-1-git-send-email-imammedo@redhat.com \
--to=imammedo@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=philmd@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).