#include <machine/asm.h>1/*2* This is cribbed from the Linux thinkpad-4.1 driver by3* Thomas Hood.4*/56smapi32_entry: /* far pointer to SMAPI entry */7.globl smapi32_offset8smapi32_offset: .long 0x00000000 /* set by caller */9smapi32_segment: .word 0x0000 /* %cs stored here */1011.text12/*13* smapi32(input_param, output_param)14* struct smapi_bios_parameter *input_parm;15* struct smapi_bios_parameter *output_parm;16*17* stack frame:18* 0x00 : saved ebp19* 0x04 : return EIP20* 0x08 : input_parm21* 0x0c : output_parm22*/23ENTRY(smapi32)24pushl %ebp /* Save frame */25movl %esp,%ebp2627pushl %ds28pushl 0x0c(%ebp) /* Output Param */29pushl %ds30pushl 0x08(%ebp) /* Input Param */3132movl $0,%eax /* Clear EAX (return 0) */33movw %cs,smapi32_segment /* Save CS */34lcall *(smapi32_offset)3536leave37ret38END(smapi32)394041