Lenovo ThinkPad 600E Technical Reference Manual for the ThinkPad 600 - Page 82

Calling Convention, Parameter Structure, Input Field

Page 82 highlights

Calling Convention The client can invoke the SMAPI BIOS with a far-call to the entry point that is specified in the header file. All parameters for the BIOS and other results are stored in the client data area; the client needs to prepare an input parameter and output parameter area in its data area, and informs this area by pushing those pointers onto its stack before the far-calls. The SMAPI BIOS uses the stack/data area directly with the selector when the BIOS is invoked. Therefore, the caller needs to define the same privilege level as the BIOS. Parameter Structure The memory allocation for the input/output field should be prepared by the caller. The input field specifies the function request to the SMAPI BIOS, and the BIOS fills in the return value to the output field. Input Field Field Major Function Number Minor Function Number Parameter 1 Parameter 2 Parameter 3 Parameter 4 Parameter 5 Offset (in Hex) 00 01 02 04 06 08 0C Length Byte Byte Word Word Word Double word Double word B-6 SMAPI BIOS

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147

Calling Convention
The client can invoke the SMAPI BIOS with a far-call to the entry
point that is specified in the header file.
All parameters for the BIOS
and other results are stored in the client data area; the client needs
to prepare an input parameter and output parameter area in its data
area, and informs this area by pushing those pointers onto its stack
before the far-calls.
The SMAPI BIOS uses the stack/data area directly with the selector
when the BIOS is invoked.
Therefore, the caller needs to define the
same privilege level as the BIOS.
Parameter Structure
The memory allocation for the input/output field should be prepared
by the caller.
The input field specifies the function request to the
SMAPI BIOS, and the BIOS fills in the return value to the output
field.
Input Field
Field
Offset
(in Hex)
Length
Major Function Number
00
Byte
Minor Function Number
01
Byte
Parameter 1
02
Word
Parameter 2
04
Word
Parameter 3
06
Word
Parameter 4
08
Double word
Parameter 5
0C
Double word
B-6
SMAPI BIOS