From: Fenghua Yu
Define interfaces microcode_sanity_check() and get_matching_microcode(). They
are called both in early boot time and in microcode Intel driver.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/microcode_intel_lib.c | 174 +
1 files changed, 174
From: Fenghua Yu
This updates ucode in 32-bit kernel. At this point, there is no paging and no
virtual address yet.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_32.S |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel
From: Fenghua Yu
Define interfaces load_ucode_bsp() and load_ucode_ap() to load ucode on BSP and
AP in early boot time. These are generic interfaces. Internally they call
vendor specific implementations.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/microcode.h | 23
From: Fenghua Yu
Before initrd image is freed, copy valid ucode patches from initrd image
to kernel virtual memory. The saved ucode will be used to update AP in resume.
Signed-off-by: Fenghua Yu
---
arch/x86/mm/init.c | 10 ++
1 files changed, 10 insertions(+), 0 deletions(-)
diff
From: Fenghua Yu
MICROCODE_INTEL_LIB, MICROCODE_INTEL_EARLY, and MICROCODE_EARLY are three new
configurations to enable or disable the feature.
Signed-off-by: Fenghua Yu
---
arch/x86/Kconfig | 18 ++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/x86
From: Fenghua Yu
The problem in current microcode loading method is that we load a microcode way,
way too late; ideally we should load it before turning paging on. This may only
be practical on 32 bits since we can't get to 64-bit mode without paging on,
but we should still do it as early
From: Fenghua Yu
This updates ucode on AP. At this point, BSP should store some valid ucode
patches in memory if it finds the ucode patches in initrd. AP searches the
stored ucode and uploads the ucode.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/smpboot.c |7 +++
1 files changed, 7
From: Fenghua Yu
Implementation of early update ucode on Intel's CPU.
load_ucode_intel_bsp() scans ucode in initrd image file which is a cpio format
ucode followed by ordinary initrd image file. The binary ucode file is stored
in kernel/x86/microcode/GenuineIntel/microcode.hex in the cpio
From: Fenghua Yu
Define some functions and macros that will be used in early loading ucode. Some
of them are moved from microcode_intel.c driver in order to be called in early
boot phase before module can be called.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/microcode_intel.h | 106
From: Fenghua Yu
Documenation for early loading microcode methodology.
Signed-off-by: Fenghua Yu
---
Documentation/x86/early-microcode.txt | 43 +
1 files changed, 43 insertions(+), 0 deletions(-)
create mode 100644 Documentation/x86/early-microcode.txt
From: Fenghua Yu
In 32-bit, __pa_symbol() in CONFIG_DEBUG_VIRTUAL accesses kernel data (e.g.
max_low_pfn) that haven't been setup yet in such early boot phase. To fix the
issue, __pa_nodebug() replaces __pa_symbol() to get a global symbol's physical
address.
Signed-off-by: Fenghua Yu
From: Fenghua Yu
start_cpu0() is defined in head_32.S for 32-bit. The function sets up stack and
jumps to start_secondary() for CPU0 wake up.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_32.S | 13 +
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/x86
From: Fenghua Yu
CONFIG_DEBUG_HOTPLUG_CPU0 is for debugging the CPU0 hotplug feature. The switch
offlines CPU0 as soon as possible and boots userspace up with CPU0 offlined.
User can online CPU0 back after boot time. The default value of the switch is
off.
To debug CPU0 hotplug, you need to
From: Fenghua Yu
Because x86 BIOS requires CPU0 to resume from sleep, suspend or hibernate can't
be executed if CPU0 is detected offline. To make suspend or hibernate and
further resume succeed, CPU0 must be online.
Signed-off-by: Fenghua Yu
---
arch/x86/power/cpu.c |
From: Fenghua Yu
init_thread_xstate() is only called once to avoid overriding xstate_size during
boot time or during CPU hotplug.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/i387.c |6 +-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/i387.c b/arch
From: Fenghua Yu
The first cpu in irq cfg->domain is likely to be CPU 0 and may not be available
when CPU 0 is offline. Instead of using CPU 0 to handle retriggered irq, we use
first available CPU which is online and in this irq's domain.
Signed-off-by: Fenghua Yu
---
arch/x86/ker
From: Fenghua Yu
Previously these functions were not run on the BSP (CPU 0, the boot processor)
since the boot processor init would only be executed before this functionality
was initialized.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/common.c |5 ++---
1 files changed, 2
From: Fenghua Yu
Ask the first online CPU to save mtrr instead of asking BSP. BSP could be
offline when mtrr_save_state() is called.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/mtrr/main.c |9 +++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU0 is turned on, CPU0 is hotpluggable. Otherwise,
by default CPU0 is not hotpluggable and kernel parameter cpu0_hotplug enables
CPU0 online/offline feature.
The documentations point out two known CPU0 dependencies. First, resume from
hibernate or
From: Fenghua Yu
New config switch CONFIG_BOOTPARAM_HOTPLUG_CPU0 sets default state of whether
the CPU0 hotplug is on or off.
If the switch is off, CPU0 is not hotpluggable by default. But the CPU0 hotplug
feature can still be turned on by kernel parameter cpu0_hotplug at boot.
If the switch
From: Fenghua Yu
Instead of waiting for STARTUP after INITs, BSP will execute the BIOS boot-strap
code which is not a desired behavior for waking up BSP. To avoid the boot-strap
code, wake up CPU0 by NMI instead.
This works to wake up soft offlined CPU0 only. If CPU0 is hard offlined (i.e
From: Fenghua Yu
start_cpu0() is defined in head_64.S for 64-bit. The function sets up stack and
jumps to start_secondary() for CPU0 wake up.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_64.S | 16
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/arch
From: Fenghua Yu
cpu_hotplug_pm_callback should have higher priority than
bsp_pm_callback which depends on cpu_hotplug_pm_callback to disable cpu hotplug
to avoid race during bsp online checking.
This is to hightlight the priorities between the two callbacks in case people
may overlook the
From: Fenghua Yu
CPU0 or BSP (Bootstrap Processor) has been the last processor that can not be
hot removed on x86. This patchset implements CPU0 or BSP online and offline
and removes this obstacle to CPU hotplug.
RAS needs the feature. If socket0 needs to be hotplugged for any reason (any
From: Fenghua Yu
Add smp_store_boot_cpu_info() to store cpu info for BSP during boot time.
Now smp_store_cpu_info() stores cpu info for bringing up BSP or AP after
it's offline.
Continue to online CPU0 in native_cpu_up().
Continue to offline CPU0 in native_cpu_disable().
Signed-o
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU is turned on, CPU0 hotplug feature is enabled
by default.
If CONFIG_BOOTPARAM_HOTPLUG_CPU is not turned on, CPU0 hotplug feature is not
enabled by default. The kernel parameter cpu0_hotplug can enable CPU0 hotplug
feature at boot.
Currently the
From: Fenghua Yu
The problem in current microcode loading method is that we load a microcode way,
way too late; ideally we should load it before turning paging on. This may only
be practical on 32 bits since we can't get to 64-bit mode without paging on,
but we should still do it as early
From: Fenghua Yu
Documenation for early loading microcode methodology.
Signed-off-by: Fenghua Yu
---
Documentation/x86/early-microcode.txt | 43 +++
1 file changed, 43 insertions(+)
create mode 100644 Documentation/x86/early-microcode.txt
diff --git a
From: Fenghua Yu
This updates ucode in 32-bit kernel. At this point, there is no paging and no
virtual address yet.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_32.S | 12
1 file changed, 12 insertions(+)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
From: Fenghua Yu
Implementation of early update ucode on Intel's CPU.
load_ucode_intel_bsp() scans ucode in initrd image file which is a cpio format
ucode followed by ordinary initrd image file. The binary ucode file is stored
in kernel/x86/microcode/GenuineIntel.bin in the cpio data. All
From: Fenghua Yu
Before initrd image is freed, copy valid ucode patches from initrd image
to kernel memory. The saved ucode will be used to update AP in resume
or hotplug.
Signed-off-by: Fenghua Yu
---
arch/x86/mm/init.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86
From: Fenghua Yu
MICROCODE_INTEL_LIB, MICROCODE_INTEL_EARLY, and MICROCODE_EARLY are three new
configurations to enable or disable the feature.
Signed-off-by: Fenghua Yu
---
arch/x86/Kconfig | 18 ++
1 file changed, 18 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86
From: Fenghua Yu
This updates ucode on BSP in 64-bit mode. Paging and virtual address are
working now.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head64.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index e1cb611..1ccbaf1
From: Fenghua Yu
Define interfaces microcode_sanity_check() and get_matching_microcode(). They
are called both in early boot time and in microcode Intel driver.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/microcode_intel_lib.c | 174 ++
1 file changed, 174
From: Fenghua Yu
This function is called in __native_flush_tlb_global() and after
apply_microcode_early().
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/tlbflush.h | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/tlbflush.h b
From: Fenghua Yu
Define interfaces load_ucode_bsp() and load_ucode_ap() to load ucode on BSP and
AP in early boot time. These are generic interfaces. Internally they call
vendor specific implementations.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/microcode.h | 14 +++
arch
From: Fenghua Yu
Define some functions and macros that will be used in early loading ucode. Some
of them are moved from microcode_intel.c driver in order to be called in early
boot phase before module can be called.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/microcode_intel.h | 85
From: Fenghua Yu
Remove static declaration in have_cpuid_p() to make it a global function. The
function will be called in early loading microcode.
In 64 bit, load ucode on AP in cpu_init(). In 32 bit, show ucode loading info
on AP in cpu_init().
Signed-off-by: Fenghua Yu
---
arch/x86/include
From: Fenghua Yu
The problem in current microcode loading method is that we load a microcode way,
way too late; ideally we should load it before turning paging on. This may only
be practical on 32 bits since we can't get to 64-bit mode without paging on,
but we should still do it as early
From: Fenghua Yu
Documenation for early loading microcode methodology.
Signed-off-by: Fenghua Yu
---
Documentation/x86/early-microcode.txt | 43 +++
1 file changed, 43 insertions(+)
create mode 100644 Documentation/x86/early-microcode.txt
diff --git a
From: Fenghua Yu
In 64 bit, load ucode on AP in cpu_init().
In 32 bit, show ucode loading info on AP in cpu_init(). Microcode has been
loaded earlier before paging. Now it is safe to show the loading microcode
info on this AP.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/common.c | 8
From: Fenghua Yu
This function is called in __native_flush_tlb_global() and after
apply_microcode_early().
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/tlbflush.h | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/tlbflush.h b
From: Fenghua Yu
Remove static declaration in have_cpuid_p() to make it a global function. The
function will be called in early loading microcode.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/processor.h | 8
arch/x86/kernel/cpu/common.c | 9 +++--
2 files changed, 11
From: Fenghua Yu
Define interfaces load_ucode_bsp() and load_ucode_ap() to load ucode on BSP and
AP in early boot time. These are generic interfaces. Internally they call
vendor specific implementations.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/microcode.h | 14 +++
arch
From: Fenghua Yu
Define some functions and macros that will be used in early loading ucode. Some
of them are moved from microcode_intel.c driver in order to be called in early
boot phase before module can be called.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/microcode_intel.h | 85
From: Fenghua Yu
MICROCODE_INTEL_LIB, MICROCODE_INTEL_EARLY, and MICROCODE_EARLY are three new
configurations to enable or disable the feature.
Signed-off-by: Fenghua Yu
---
arch/x86/Kconfig | 18 ++
1 file changed, 18 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86
From: Fenghua Yu
Define interfaces microcode_sanity_check() and get_matching_microcode(). They
are called both in early boot time and in microcode Intel driver.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/microcode_intel_lib.c | 174 ++
1 file changed, 174
From: Fenghua Yu
Before initrd image is freed, copy valid ucode patches from initrd image
to kernel memory. The saved ucode will be used to update AP in resume
or hotplug.
Signed-off-by: Fenghua Yu
---
arch/x86/mm/init.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86
From: Fenghua Yu
This updates ucode on BSP in 64-bit mode. Paging and virtual address are
working now.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head64.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index e1cb611..5a97fcc
From: Fenghua Yu
This updates ucode in 32-bit kernel on BSP and AP. At this point, there is no
paging and no virtual address yet.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_32.S | 11 +++
1 file changed, 11 insertions(+)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86
From: Fenghua Yu
Implementation of early update ucode on Intel's CPU.
load_ucode_intel_bsp() scans ucode in initrd image file which is a cpio format
ucode followed by ordinary initrd image file. The binary ucode file is stored
in kernel/x86/microcode/GenuineIntel.bin in the cpio data. All
From: Fenghua Yu
Power Limit Notification (X86_FEATURE_PLN) was added in Sandy Bridge
to give the OS the option of knowing when the package has reached
a configured power threshold.
Linux-2.6.36 enabled this feature:
0199114c31798af5b83841b21759b64171060d9b
(x86, hwmon: Package Level Thermal
From: Fenghua Yu
CPU0 or BSP (Bootstrap Processor) has been the last processor that can not be
hot removed on x86. This patch set implements CPU0 or BSP online and offline
and removes this obstacle to CPU hotplug.
RAS needs the feature. If socket0 needs to be hotplugged for any reason (any
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU0 is turned on, CPU0 is hotpluggable. Otherwise,
by default CPU0 is not hotpluggable and kernel parameter cpu0_hotplug enables
CPU0 online/offline feature.
The documentations point out two known CPU0 dependencies. First, resume from
hibernate or
From: Fenghua Yu
Change smp_store_cpu_info() to store cpu info for a CPU when it's brought up.
This includes bringing up CPU0 or AP after it's offline. But don't store cpu
info when BSP first boots during boot time.
Continue to online CPU0 in native_cpu_up().
Signed-off
From: Fenghua Yu
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/mtrr/main.c |9 +++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index 6b96110..e4c1a41 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
From: Fenghua Yu
This works to wake up soft offlined CPU0 only. If CPU0 is hard offlined (i.e.
physically hot removed and then hot added), NMI won't wake it up. We'll change
this code in the future to wake up hard offlined CPU0 if real platform and
request are available.
AP is still w
From: Fenghua Yu
init_thread_xstate() is only called once to avoid overriding xstate_size during
boot time or during CPU hotplug.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/i387.c |6 +-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/i387.c b/arch
From: Fenghua Yu
CONFIG_DEBUG_HOTPLUG_CPU0 is for debuging the CPU0 hotplug feature. The switch
offlines CPU0 as soon as possible and boots userspace up with CPU0 offlined.
User can online CPU0 back after boot time. The default value of the switch is
off.
To debug CPU0 hotplug, you need to
From: Fenghua Yu
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/common.c |5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 2ea24da..ce8b772 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86
From: Fenghua Yu
New config switch CONFIG_BOOTPARAM_HOTPLUG_CPU0 sets default state of whether
the CPU0 hotplug is on or off.
If the switch is off, CPU0 is not hotpluggable by default. But the CPU0 hotplug
feature can still be turned on by kernel parameter cpu0_hotplug at boot.
If the switch
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU is turned on, CPU0 hotplug feature is enabled
by default.
If CONFIG_BOOTPARAM_HOTPLUG_CPU is not turned on, CPU0 hotplug feature is not
enabled by default. The kernel parameter cpu0_hotplug can enable CPU0 hotplug
feature at boot.
Signed-off-by
From: Fenghua Yu
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_32.S | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index d42ab17..964f87a 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86
From: Fenghua Yu
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_64.S | 15 +++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index 94bf9cc..3faac8a 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86
From: Fenghua Yu
Signed-off-by: Fenghua Yu
---
arch/x86/power/cpu.c | 44
1 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 218cdb1..3338609 100644
--- a/arch/x86/power/cpu.c
+++ b
From: Fenghua Yu
CPU0 or BSP (Bootstrap Processor) has been the last processor that can not be
hot removed on x86. This patchset implements CPU0 or BSP online and offline
and removes this obstacle to CPU hotplug.
RAS needs the feature. If socket0 needs to be hotplugged for any reason (any
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU0 is turned on, CPU0 is hotpluggable. Otherwise,
by default CPU0 is not hotpluggable and kernel parameter cpu0_hotplug enables
CPU0 online/offline feature.
The documentations point out two known CPU0 dependencies. First, resume from
hibernate or
From: Fenghua Yu
Because x86 BIOS requires CPU0 to resume from sleep, suspend or hibernate can't
be executed if CPU0 is detected offline. To make suspend or hibernate and
further resume succeed, CPU0 must be online.
Signed-off-by: Fenghua Yu
---
arch/x86/power/cpu.c |
From: Fenghua Yu
New config switch CONFIG_BOOTPARAM_HOTPLUG_CPU0 sets default state of whether
the CPU0 hotplug is on or off.
If the switch is off, CPU0 is not hotpluggable by default. But the CPU0 hotplug
feature can still be turned on by kernel parameter cpu0_hotplug at boot.
If the switch
From: Fenghua Yu
CONFIG_DEBUG_HOTPLUG_CPU0 is for debugging the CPU0 hotplug feature. The switch
offlines CPU0 as soon as possible and boots userspace up with CPU0 offlined.
User can online CPU0 back after boot time. The default value of the switch is
off.
To debug CPU0 hotplug, you need to
From: Fenghua Yu
init_thread_xstate() is only called once to avoid overriding xstate_size during
boot time or during CPU hotplug.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/i387.c |6 +-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/i387.c b/arch
From: Fenghua Yu
Ask the first online CPU to save mtrr instead of asking BSP. BSP could be
offline when mtrr_save_state() is called.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/mtrr/main.c |9 +++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel
From: Fenghua Yu
Instead of waiting for STARTUP after INITs, BSP will execute the BIOS boot-strap
code which is not a desired behavior for waking up BSP. To avoid the boot-strap
code, wake up CPU0 by NMI instead.
This works to wake up soft offlined CPU0 only. If CPU0 is hard offlined (i.e
From: Fenghua Yu
Previously these functions were not run on the BSP (CPU 0, the boot processor)
since the boot processor init would only be executed before this functionality
was initialized.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/common.c |5 ++---
1 files changed, 2
From: Fenghua Yu
start_cpu0() is defined in head_32.S for 32-bit. The function sets up stack and
jumps to start_secondary() for CPU0 wake up.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_32.S | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/arch/x86
From: Fenghua Yu
start_cpu0() is defined in head_64.S for 64-bit. The function sets up stack and
jumps to start_secondary() for CPU0 wake up.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_64.S | 15 +++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/arch
From: Fenghua Yu
Add smp_store_boot_cpu_info() to store cpu info for BSP during boot time.
Now smp_store_cpu_info() stores cpu info for bringing up BSP or AP after
it's offline.
Continue to online CPU0 in native_cpu_up().
Continue to offline CPU0 in native_cpu_disable().
Signed-o
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU is turned on, CPU0 hotplug feature is enabled
by default.
If CONFIG_BOOTPARAM_HOTPLUG_CPU is not turned on, CPU0 hotplug feature is not
enabled by default. The kernel parameter cpu0_hotplug can enable CPU0 hotplug
feature at boot.
Signed-off-by
From: Fenghua Yu
The problem in current microcode loading method is that we load a microcode way,
way too late; ideally we should load it before turning paging on. This may only
be practical on 32 bits since we can't get to 64-bit mode without paging on,
but we should still do it as early
From: Fenghua Yu
Define some functions and macros that will be used in early load ucode. Some of
them are moved from microcode_intel.c driver in order to be called in early
boot phase before module can be called.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/microcode_intel.h | 103
From: Fenghua Yu
This updates ucode on AP. At this point, BSP should store some valid ucode
patches in memory if it finds the ucode patches in initrd. AP searches the
stored ucode and uploads the ucode.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/smpboot.c |7 +++
1 files changed, 7
From: Fenghua Yu
Before initrd image is freed, copy valid ucode patches from initrd image
to kernel virtual memory. The saved ucode will be used to update AP in resume.
Signed-off-by: Fenghua Yu
---
arch/x86/mm/init.c | 10 ++
1 files changed, 10 insertions(+), 0 deletions(-)
diff
From: Fenghua Yu
MICROCODE_INTEL_LIB, MICROCODE_INTEL_EARLY, and MICROCODE_EARLY are three new
configurations to enable or disable the feature.
Signed-off-by: Fenghua Yu
---
arch/x86/Kconfig | 22 ++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/arch
From: Fenghua Yu
Documenation for early load microcode methodology.
Signed-off-by: Fenghua Yu
---
Documentation/x86/earlyucode.txt | 43 ++
1 files changed, 43 insertions(+), 0 deletions(-)
create mode 100644 Documentation/x86/earlyucode.txt
diff --git
From: Fenghua Yu
Given a file's name, find its starting point in a cpio formated area. This will
be used to find microcode in combined initrd image. But this function is
generic and could be used in other places.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/cpio.h | 10 +++
arc
From: Fenghua Yu
Implementation of early update ucode on Intel's CPU.
load_ucode_intel_bsp() scans ucode in initrd image file which is a cpio format
ucode followed by ordinary initrd image file. The binary ucode file is stored
in kernel/x86/microcode/GenuineIntel/microcode.hex in the cpio
From: Fenghua Yu
This updates ucode in 64-bit mode. Paging and virtual address are working now.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head64.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index
From: Fenghua Yu
Define interfaces microcode_sanity_check() and get_matching_microcode(). They
are called both in early boot time and in microcode Intel driver.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/microcode_intel_lib.c | 163 +
1 files changed, 163
From: Fenghua Yu
Define interfaces load_ucode_bsp() and load_ucode_ap() to load ucode on BSP and
AP in early boot time. These are generic interfaces. Internally they call
vendor specific implementations.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/microcode.h | 23
From: Fenghua Yu
This updates ucode in 32-bit kernel. At this point, there is no paging and no
virtual address yet.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_32.S |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU is turned on, CPU0 hotplug feature is enabled
by default.
If CONFIG_BOOTPARAM_HOTPLUG_CPU is not turned on, CPU0 hotplug feature is not
enabled by default. The kernel parameter cpu0_hotplug can enable CPU0 hotplug
feature at boot.
Currently the
From: Fenghua Yu
start_cpu0() is defined in head_64.S for 64-bit. The function sets up stack and
jumps to start_secondary() for CPU0 wake up.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_64.S | 15 +++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/arch
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU0 is turned on, CPU0 is hotpluggable. Otherwise,
by default CPU0 is not hotpluggable and kernel parameter cpu0_hotplug enables
CPU0 online/offline feature.
The documentations point out two known CPU0 dependencies. First, resume from
hibernate or
From: Fenghua Yu
init_thread_xstate() is only called once to avoid overriding xstate_size during
boot time or during CPU hotplug.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/i387.c |6 +-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/i387.c b/arch
From: Fenghua Yu
Ask the first online CPU to save mtrr instead of asking BSP. BSP could be
offline when mtrr_save_state() is called.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/mtrr/main.c |9 +++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel
From: Fenghua Yu
Instead of waiting for STARTUP after INITs, BSP will execute the BIOS boot-strap
code which is not a desired behavior for waking up BSP. To avoid the boot-strap
code, wake up CPU0 by NMI instead.
This works to wake up soft offlined CPU0 only. If CPU0 is hard offlined (i.e
From: Fenghua Yu
Previously these functions were not run on the BSP (CPU 0, the boot processor)
since the boot processor init would only be executed before this functionality
was initialized.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/common.c |5 ++---
1 files changed, 2
From: Fenghua Yu
start_cpu0() is defined in head_32.S for 32-bit. The function sets up stack and
jumps to start_secondary() for CPU0 wake up.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_32.S | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/arch/x86
From: Fenghua Yu
CONFIG_DEBUG_HOTPLUG_CPU0 is for debugging the CPU0 hotplug feature. The switch
offlines CPU0 as soon as possible and boots userspace up with CPU0 offlined.
User can online CPU0 back after boot time. The default value of the switch is
off.
To debug CPU0 hotplug, you need to
From: Fenghua Yu
Because x86 BIOS requires CPU0 to resume from sleep, suspend or hibernate can't
be executed if CPU0 is detected offline. To make suspend or hibernate and
further resume succeed, CPU0 must be online.
Signed-off-by: Fenghua Yu
---
arch/x86/power/cpu.c |
1 - 100 of 1198 matches
Mail list logo