Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\acpi\sleep.c Create Date:2022-07-28 08:16:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:x86_acpi_suspend_lowlevel - save kernel state* Create an identity mapped page table and copy the wakeup routine to* low memory.

Proto:int x86_acpi_suspend_lowlevel(void)

Type:int

Parameter:Nothing

48  header = __va(wakeup_header)
51  If To check we have correct structure != WAKEUP_HEADER_SIGNATURE Then
52  printk(r conditions "wakeup header does not match\n")
53  Return -EINVAL
56  Video mode number = SPDX-License-Identifier: GPL-2.0
58  Wakeup routine behavior flags = 0
61  native_store_gdt((structdesc_ptr * ) & pmode_gdt)
71  If Not dmsr with exception handling (xtended feature register , & Protected mode EFER , & pmode_efer_high) && Not wrmsr with exception handling Then Wakeup routine behavior flags |= 1 << WAKEUP_BEHAVIOR_RESTORE_EFER
80  Protected mode cr0 = read_cr0()
81  If Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(Maximum supported CPUID level, -1=no CPUID: ) >= 0 Then
82  Protected mode cr4 = __read_cr4()
83  Wakeup routine behavior flags |= 1 << WAKEUP_BEHAVIOR_RESTORE_CR4
85  If Not dmsr with exception handling (MSR_IA32_MISC_ENABLE, & Protected mode MISC_ENABLE , & pmode_misc_en_high) && Not wrmsr with exception handling Then Wakeup routine behavior flags |= 1 << Wakeup behavior bits
93  realmode_flags = acpi_realmode_flags
94  real_magic = 0x12345678
97  Protected mode resume point, 32-bit only = (u32) & wakeup_pmode_return
98  Protected mode cr3 = We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(initial_page_table)
99  saved_magic = 0x12345678
115  pause_graph_tracing()
116  do_suspend_lowlevel()
117  unpause_graph_tracing()
118  Return 0