3 * Copyright (C) 2003 Eric Kohl
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 * U32 PnpBiosSupported(VOID);
33 _pnp_bios_entry_point:
35 _pnp_bios_data_segment:
38 EXTERN(_PnpBiosSupported)
53 cmp $0x506E5024,%eax /* "$PnP" */
64 /* first calculate the checksum */
82 /* Calculate the bios entry point (far pointer) */
87 movl %eax,_pnp_bios_entry_point
89 /* Store bios data segment */
91 movw %ax,_pnp_bios_data_segment
105 * U32 PnpBiosGetDeviceNodeCount(U32 *NodeSize, U32 *NodeCount);
116 EXTERN(_PnpBiosGetDeviceNodeCount)
128 movw _pnp_bios_data_segment,%ax
132 movw $(_pnp_node_size),%ax
136 movw $(_pnp_node_count),%ax
141 lcall *_pnp_bios_entry_point
145 movl %ecx,_pnp_result
152 movw _pnp_node_size,%ax
157 movw _pnp_node_count,%ax
167 movl _pnp_result,%eax
173 * U32 PnpBiosGetDeviceNode(U8 *NodeId, U8 *NodeBuffer);
185 EXTERN(_PnpBiosGetDeviceNode)
194 /* get current node number */
197 movb %al,_pnp_node_number
199 /* convert pointer to node buffer to segment/offset */
203 movw %ax,_pnp_buffer_segment
206 movw %ax,_pnp_buffer_offset
211 /* push bios segment */
212 movw _pnp_bios_data_segment,%ax
215 /* push control flag */
218 /* push pointer to node buffer (segment/offset) */
219 movw _pnp_buffer_segment,%ax
221 movw _pnp_buffer_offset,%ax
224 /* push pointer to node number (segment/offset) */
226 movw $(_pnp_node_number),%ax
229 /* push function number */
232 /* call entry point */
233 lcall *_pnp_bios_entry_point
237 movl %ecx,_pnp_result
242 /* update node number */
244 movb _pnp_node_number,%al
253 movl _pnp_result,%eax