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