18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci=================================================== 48c2ecf20Sopenharmony_ciFirmware support for CPU hotplug under Linux/x86-64 58c2ecf20Sopenharmony_ci=================================================== 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciLinux/x86-64 supports CPU hotplug now. For various reasons Linux wants to 88c2ecf20Sopenharmony_ciknow in advance of boot time the maximum number of CPUs that could be plugged 98c2ecf20Sopenharmony_ciinto the system. ACPI 3.0 currently has no official way to supply 108c2ecf20Sopenharmony_cithis information from the firmware to the operating system. 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciIn ACPI each CPU needs an LAPIC object in the MADT table (5.2.11.5 in the 138c2ecf20Sopenharmony_ciACPI 3.0 specification). ACPI already has the concept of disabled LAPIC 148c2ecf20Sopenharmony_ciobjects by setting the Enabled bit in the LAPIC object to zero. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciFor CPU hotplug Linux/x86-64 expects now that any possible future hotpluggable 178c2ecf20Sopenharmony_ciCPU is already available in the MADT. If the CPU is not available yet 188c2ecf20Sopenharmony_ciit should have its LAPIC Enabled bit set to 0. Linux will use the number 198c2ecf20Sopenharmony_ciof disabled LAPICs to compute the maximum number of future CPUs. 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciIn the worst case the user can overwrite this choice using a command line 228c2ecf20Sopenharmony_cioption (additional_cpus=...), but it is recommended to supply the correct 238c2ecf20Sopenharmony_cinumber (or a reasonable approximation of it, with erring towards more not less) 248c2ecf20Sopenharmony_ciin the MADT to avoid manual configuration. 25