]>
Commit | Line | Data |
---|---|---|
b8622725 IM |
1 | QEMU<->ACPI BIOS CPU hotplug interface |
2 | -------------------------------------- | |
3 | ||
4 | QEMU supports CPU hotplug via ACPI. This document | |
5 | describes the interface between QEMU and the ACPI BIOS. | |
6 | ||
abd49bc2 IM |
7 | ACPI BIOS GPE.2 handler is dedicated for notifying OS about CPU hot-add |
8 | and hot-remove events. | |
b8622725 | 9 | |
abd49bc2 IM |
10 | ============================================ |
11 | Legacy ACPI CPU hotplug interface registers: | |
12 | -------------------------------------------- | |
d6610bc2 IM |
13 | CPU present bitmap for: |
14 | ICH9-LPC (IO port 0x0cd8-0xcf7, 1-byte access) | |
15 | PIIX-PM (IO port 0xaf00-0xaf1f, 1-byte access) | |
abd49bc2 IM |
16 | One bit per CPU. Bit position reflects corresponding CPU APIC ID. Read-only. |
17 | The first DWORD in bitmap is used in write mode to switch from legacy | |
18 | to new CPU hotplug interface, write 0 into it to do switch. | |
b8622725 | 19 | --------------------------------------------------------------- |
abd49bc2 IM |
20 | QEMU sets corresponding CPU bit on hot-add event and issues SCI |
21 | with GPE.2 event set. CPU present map is read by ACPI BIOS GPE.2 handler | |
22 | to notify OS about CPU hot-add events. CPU hot-remove isn't supported. | |
23 | ||
24 | ===================================== | |
25 | ACPI CPU hotplug interface registers: | |
26 | ------------------------------------- | |
27 | Register block base address: | |
28 | ICH9-LPC IO port 0x0cd8 | |
29 | PIIX-PM IO port 0xaf00 | |
30 | Register block size: | |
31 | ACPI_CPU_HOTPLUG_REG_LEN = 12 | |
32 | ||
33 | read access: | |
34 | offset: | |
35 | [0x0-0x3] reserved | |
36 | [0x4] CPU device status fields: (1 byte access) | |
37 | bits: | |
38 | 0: Device is enabled and may be used by guest | |
39 | 1: Device insert event, used to distinguish device for which | |
40 | no device check event to OSPM was issued. | |
41 | It's valid only when bit 0 is set. | |
42 | 2: Device remove event, used to distinguish device for which | |
43 | no device eject request to OSPM was issued. | |
44 | 3-7: reserved and should be ignored by OSPM | |
45 | [0x5-0x7] reserved | |
46 | [0x8] Command data: (DWORD access) | |
47 | in case of error or unsupported command reads is 0xFFFFFFFF | |
48 | current 'Command field' value: | |
49 | 0: returns PXM value corresponding to device | |
50 | ||
51 | write access: | |
52 | offset: | |
53 | [0x0-0x3] CPU selector: (DWORD access) | |
54 | selects active CPU device. All following accesses to other | |
55 | registers will read/store data from/to selected CPU. | |
56 | [0x4] CPU device control fields: (1 byte access) | |
57 | bits: | |
58 | 0: reserved, OSPM must clear it before writing to register. | |
59 | 1: if set to 1 clears device insert event, set by OSPM | |
60 | after it has emitted device check event for the | |
61 | selected CPU device | |
62 | 2: if set to 1 clears device remove event, set by OSPM | |
63 | after it has emitted device eject request for the | |
64 | selected CPU device | |
65 | 3: if set to 1 initiates device eject, set by OSPM when it | |
66 | triggers CPU device removal and calls _EJ0 method | |
67 | 4-7: reserved, OSPM must clear them before writing to register | |
68 | [0x5] Command field: (1 byte access) | |
69 | value: | |
70 | 0: selects a CPU device with inserting/removing events and | |
71 | following reads from 'Command data' register return | |
72 | selected CPU (CPU selector value). If no CPU with events | |
73 | found, the current CPU selector doesn't change and | |
74 | corresponding insert/remove event flags are not set. | |
75 | 1: following writes to 'Command data' register set OST event | |
76 | register in QEMU | |
77 | 2: following writes to 'Command data' register set OST status | |
78 | register in QEMU | |
79 | other values: reserved | |
80 | [0x6-0x7] reserved | |
81 | [0x8] Command data: (DWORD access) | |
82 | current 'Command field' value: | |
83 | 0: OSPM reads value of CPU selector | |
84 | 1: stores value into OST event register | |
85 | 2: stores value into OST status register, triggers | |
86 | ACPI_DEVICE_OST QMP event from QEMU to external applications | |
87 | with current values of OST event and status registers. | |
88 | other values: reserved | |
b8622725 | 89 | |
abd49bc2 IM |
90 | Selecting CPU device beyond possible range has no effect on platform: |
91 | - write accesses to CPU hot-plug registers not documented above are | |
92 | ignored | |
93 | - read accesses to CPU hot-plug registers not documented above return | |
94 | all bits set to 0. |