qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] acpi: cpuhp: document how to use CPHP_GET_CPU_ID_CMD command


From: Igor Mammedov
Subject: [PATCH] acpi: cpuhp: document how to use CPHP_GET_CPU_ID_CMD command
Date: Fri, 24 Jan 2020 16:17:45 +0100

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]