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:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__apm_bios_call - Make an APM BIOS 32bit call*@_call: pointer to struct apm_bios_call.* Make an APM call using the 32bit protected mode interface. The* caller is responsible for knowing if APM BIOS is configured and* enabled

Proto:static long __apm_bios_call(void *_call)

Type:long

Parameter:

TypeParameterName
void *_call
595  APM_DECL_SEGS
600  call = _call
602  cpu = get_cpu()
603  BUG_ON(cpu != 0)
604  gdt = Provide the original GDT
605  save_desc_40 = gdt[0x40 / 8]
606  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.
608  apm_irq_save(flags)
609  With retpoline, we must use IBRS to restrict branch prediction* before calling into firmware.* (Implemented as CPP macros due to header hell.)()
610  APM_DO_SAVE_SEGS
611  apm_bios_call_asm(func, In and out , ecx, & Out only , & In and out , & ecx, & edx, & esi)
614  APM_DO_RESTORE_SEGS
615  firmware_restrict_branch_speculation_end()
616  apm_irq_restore(flags)
617  gdt[0x40 / 8] = save_desc_40
618  put_cpu()
620  Return Out only & 0xff