Remove unneeded empty line to silence mdoc(7) warnings.
[dragonfly.git] / share / man / man9 / bios.9
1 .\" $FreeBSD: src/share/man/man9/bios.9,v 1.4.2.6 2001/12/17 11:30:18 ru Exp $
2 .\" $DragonFly: src/share/man/man9/bios.9,v 1.2 2003/06/17 04:37:01 dillon Exp $
3 .\"
4 .\" Copyright (c) 1997 Michael Smith
5 .\" All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .Dd August 1, 1997
29 .Dt BIOS 9
30 .Os
31 .Sh NAME
32 .Nm bios_sigsearch ,
33 .Nm bios32_SDlookup ,
34 .Nm bios32
35 .Nd interact with PC BIOS
36 .Sh SYNOPSIS
37 .In sys/types.h
38 .In machine/pc/bios.h
39 .Ft u_int32_t
40 .Fn bios_sigsearch "u_int32_t start" "u_char *sig" "int siglen" "int paralen" "int sigofs"
41 .Ft int
42 .Fn bios32_SDlookup "struct bios32_SDentry *ent"
43 .Ft void
44 .Fn bios32 "caddr_t entry" "struct bios32_args *args"
45 .Fn BIOS_PADDRTOVADDR "addr"
46 .Fn BIOS_VADDRTOPADDR "addr"
47 .Vt extern struct bios32_SDentry PCIbios ;
48 .Vt extern struct SMBIOS_table SMBIOStable ;
49 .Vt extern struct DMI_table DMItable ;
50 .Sh DESCRIPTION
51 These functions provide a general-purpose interface for dealing with
52 the BIOS functions and data encountered on x86 PC-architecture systems.
53 .Bl -tag -width 20n
54 .It Fn bios_sigsearch
55 Searches the BIOS address space for a service signature, usually an
56 uppercase ASCII sequence surrounded by underscores.  The search begins
57 at
58 .Fa start ,
59 or at the beginning of the BIOS if
60 .Fa start
61 is zero.
62 .Fa siglen
63 bytes of the BIOS image and
64 .Fa sig
65 are compared at
66 .Fa sigofs
67 bytes offset from the current location.  If no match is found, the
68 current location is incremented by
69 .Fa paralen
70 bytes and the search repeated.  If the signature is found, its effective
71 physical address is returned.  If no signature is found, zero is returned.
72 .It Fn BIOS_VADDRTOPADDR
73 Returns the effective physical address which corresponds to the kernel
74 virtual address
75 .Fa addr .
76 .It Fn BIOS_VADDRTOPADDR
77 Returns the kernel virtual address which corresponds to the effective
78 physical address
79 .Fa addr .
80 .It SMBIOStable
81 If not NULL, points to a
82 .Ft struct SMBIOS_table
83 structure containing information read from the System Management BIOS table
84 during system startup.
85 .It DMItable
86 If not NULL, points to a
87 .Ft struct DMI_table
88 structure containing information read from the Desktop Management Interface
89 parameter table during system startup.
90 .El
91 .Sh BIOS32
92 At system startup, the BIOS is scanned for the BIOS32 Service Directory
93 (part of the PCI specification), and the existence of the directory is
94 recorded.  This can then be used to locate other services.
95 .Bl -tag -width 20n
96 .It Fn bios32_SDlookup
97 Attempts to locate the BIOS32 service matching the 4-byte identifier
98 passed in the
99 .Fa ident
100 field of the
101 .Fa ent
102 argument.
103 .It Fn bios32
104 Calls a bios32 function.  This presumes that the function is capable of
105 working within the kernel segment (normally the case).  The virtual address
106 of the entrypoint is supplied in
107 .Fa entry
108 and the register arguments to the function are supplied in
109 .Fa args .
110 .It PCIbios
111 If not NULL, points to a
112 .Ft struct bios32_SDentry
113 structure describing the PCI BIOS entrypoint which was found during system
114 startup.
115 .El