Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__apm_bios_call_simple - Make an APM BIOS 32bit call (on CPU 0)*@_call: pointer to struct apm_bios_call

Proto:static long __apm_bios_call_simple(void *_call)

Type:long

Parameter:

TypeParameterName
void *_call
673  APM_DECL_SEGS
678  call = _call
680  cpu = get_cpu()
681  BUG_ON(cpu != 0)
682  gdt = Provide the original GDT
683  save_desc_40 = gdt[0x40 / 8]
684  gdt[0x40 / 8] = Set up a segment that references the real mode segment 0x40* that extends up to the end of page zero (that we have reserved).* This is for buggy BIOS's that refer to (real mode) segment 0x40* even though they are called in protected mode.
686  apm_irq_save(flags)
687  With retpoline, we must use IBRS to restrict branch prediction* before calling into firmware.* (Implemented as CPP macros due to header hell.)()
688  APM_DO_SAVE_SEGS
689  error = apm_bios_call_simple_asm(func, In and out , ecx, & Out only )
691  APM_DO_RESTORE_SEGS
692  firmware_restrict_branch_speculation_end()
693  apm_irq_restore(flags)
694  gdt[0x40 / 8] = save_desc_40
695  put_cpu()
696  Return error