]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man9/bios.9
This commit was generated by cvs2svn to compensate for changes in r147001,
[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 August 1, 1997
28 .Dt BIOS 9
29 .Os
30 .Sh NAME
31 .Nm bios_sigsearch ,
32 .Nm bios32_SDlookup ,
33 .Nm bios32
34 .Nd interact with PC BIOS
35 .Sh SYNOPSIS
36 .In sys/param.h
37 .In vm/vm.h
38 .In vm/pmap.h
39 .In machine/param.h
40 .In machine/pmap.h
41 .In machine/pc/bios.h
42 .Ft u_int32_t
43 .Fn bios_sigsearch "u_int32_t start" "u_char *sig" "int siglen" "int paralen" "int sigofs"
44 .Ft int
45 .Fn bios32_SDlookup "struct bios32_SDentry *ent"
46 .Ft int
47 .Fn bios32 "struct bios_regs *br" "u_int offset" "u_short segment"
48 .Fn BIOS_PADDRTOVADDR "addr"
49 .Fn BIOS_VADDRTOPADDR "addr"
50 .Vt extern struct bios32_SDentry PCIbios ;
51 .Vt extern struct SMBIOS_table SMBIOStable ;
52 .Vt extern struct DMI_table DMItable ;
53 .Sh DESCRIPTION
54 These functions provide a general-purpose interface for dealing with
55 the BIOS functions and data encountered on x86 PC-architecture systems.
56 .Bl -tag -width 20n
57 .It Fn bios_sigsearch
58 Searches the BIOS address space for a service signature, usually an
59 uppercase ASCII sequence surrounded by underscores.
60 The search begins at
61 .Fa start ,
62 or at the beginning of the BIOS if
63 .Fa start
64 is zero.
65 .Fa siglen
66 bytes of the BIOS image and
67 .Fa sig
68 are compared at
69 .Fa sigofs
70 bytes offset from the current location.
71 If no match is found, the
72 current location is incremented by
73 .Fa paralen
74 bytes and the search repeated.
75 If the signature is found, its effective
76 physical address is returned.
77 If no signature is found, zero is returned.
78 .It Fn BIOS_VADDRTOPADDR
79 Returns the effective physical address which corresponds to the kernel
80 virtual address
81 .Fa addr .
82 .It Fn BIOS_VADDRTOPADDR
83 Returns the kernel virtual address which corresponds to the effective
84 physical address
85 .Fa addr .
86 .It SMBIOStable
87 If not NULL, points to a
88 .Ft struct SMBIOS_table
89 structure containing information read from the System Management BIOS table
90 during system startup.
91 .It DMItable
92 If not NULL, points to a
93 .Ft struct DMI_table
94 structure containing information read from the Desktop Management Interface
95 parameter table during system startup.
96 .El
97 .Sh BIOS32
98 At system startup, the BIOS is scanned for the BIOS32 Service Directory
99 (part of the PCI specification), and the existence of the directory is
100 recorded.
101 This can then be used to locate other services.
102 .Bl -tag -width 20n
103 .It Fn bios32_SDlookup
104 Attempts to locate the BIOS32 service matching the 4-byte identifier
105 passed in the
106 .Fa ident
107 field of the
108 .Fa ent
109 argument.
110 .It Fn bios32
111 Calls a bios32 function.
112 This presumes that the function is capable of
113 working within the kernel segment (normally the case).
114 The virtual address
115 of the entrypoint is supplied in
116 .Fa entry
117 and the register arguments to the function are supplied in
118 .Fa args .
119 .It PCIbios
120 If not NULL, points to a
121 .Ft struct bios32_SDentry
122 structure describing the PCI BIOS entrypoint which was found during system
123 startup.
124 .El