1*4a5d661aSToomas Soome /*- 2*4a5d661aSToomas Soome * Copyright (c) 1997 Michael Smith 3*4a5d661aSToomas Soome * Copyright (c) 1998 Jonathan Lemon 4*4a5d661aSToomas Soome * All rights reserved. 5*4a5d661aSToomas Soome * 6*4a5d661aSToomas Soome * Redistribution and use in source and binary forms, with or without 7*4a5d661aSToomas Soome * modification, are permitted provided that the following conditions 8*4a5d661aSToomas Soome * are met: 9*4a5d661aSToomas Soome * 1. Redistributions of source code must retain the above copyright 10*4a5d661aSToomas Soome * notice, this list of conditions and the following disclaimer. 11*4a5d661aSToomas Soome * 2. Redistributions in binary form must reproduce the above copyright 12*4a5d661aSToomas Soome * notice, this list of conditions and the following disclaimer in the 13*4a5d661aSToomas Soome * documentation and/or other materials provided with the distribution. 14*4a5d661aSToomas Soome * 15*4a5d661aSToomas Soome * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16*4a5d661aSToomas Soome * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17*4a5d661aSToomas Soome * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18*4a5d661aSToomas Soome * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19*4a5d661aSToomas Soome * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20*4a5d661aSToomas Soome * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21*4a5d661aSToomas Soome * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22*4a5d661aSToomas Soome * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23*4a5d661aSToomas Soome * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24*4a5d661aSToomas Soome * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25*4a5d661aSToomas Soome * SUCH DAMAGE. 26*4a5d661aSToomas Soome * 27*4a5d661aSToomas Soome * $FreeBSD$ 28*4a5d661aSToomas Soome */ 29*4a5d661aSToomas Soome 30*4a5d661aSToomas Soome #ifndef _MACHINE_PC_BIOS_H_ 31*4a5d661aSToomas Soome #define _MACHINE_PC_BIOS_H_ 32*4a5d661aSToomas Soome 33*4a5d661aSToomas Soome /* 34*4a5d661aSToomas Soome * Signature structure for the BIOS32 Service Directory header 35*4a5d661aSToomas Soome */ 36*4a5d661aSToomas Soome struct bios32_SDheader 37*4a5d661aSToomas Soome { 38*4a5d661aSToomas Soome u_int8_t sig[4]; 39*4a5d661aSToomas Soome u_int32_t entry; 40*4a5d661aSToomas Soome u_int8_t revision; 41*4a5d661aSToomas Soome u_int8_t len; 42*4a5d661aSToomas Soome u_int8_t cksum; 43*4a5d661aSToomas Soome u_int8_t pad[5]; 44*4a5d661aSToomas Soome }; 45*4a5d661aSToomas Soome 46*4a5d661aSToomas Soome /* 47*4a5d661aSToomas Soome * PnP BIOS presence structure 48*4a5d661aSToomas Soome */ 49*4a5d661aSToomas Soome struct PnPBIOS_table 50*4a5d661aSToomas Soome { 51*4a5d661aSToomas Soome u_int8_t sig[4]; /* "$PnP */ 52*4a5d661aSToomas Soome u_int8_t version; /* should be 0x10 */ 53*4a5d661aSToomas Soome u_int8_t len; /* total structure length */ 54*4a5d661aSToomas Soome u_int16_t control; /* BIOS feature flags */ 55*4a5d661aSToomas Soome u_int8_t cksum; /* checksum */ 56*4a5d661aSToomas Soome u_int32_t evflagaddr; /* address of event notificaton flag */ 57*4a5d661aSToomas Soome u_int16_t rmentryoffset; /* real-mode entry offset */ 58*4a5d661aSToomas Soome u_int16_t rmentryseg; /* segment */ 59*4a5d661aSToomas Soome u_int16_t pmentryoffset; /* protected-mode entry offset */ 60*4a5d661aSToomas Soome u_int32_t pmentrybase; /* segment base */ 61*4a5d661aSToomas Soome u_int32_t oemdevid; /* motherboard EISA ID */ 62*4a5d661aSToomas Soome u_int16_t rmbiosseg; /* real-mode BIOS segment */ 63*4a5d661aSToomas Soome u_int32_t pmdataseg; /* protected-mode data segment */ 64*4a5d661aSToomas Soome } __packed; 65*4a5d661aSToomas Soome 66*4a5d661aSToomas Soome /* 67*4a5d661aSToomas Soome * PnP BIOS return codes 68*4a5d661aSToomas Soome */ 69*4a5d661aSToomas Soome #define PNP_SUCCESS 0x00 70*4a5d661aSToomas Soome #define PNP_NOT_SET_STATICALLY 0x7f 71*4a5d661aSToomas Soome #define PNP_UNKNOWN_FUNCTION 0x81 72*4a5d661aSToomas Soome #define PNP_FUNCTION_NOT_SUPPORTED 0x82 73*4a5d661aSToomas Soome #define PNP_INVALID_HANDLE 0x83 74*4a5d661aSToomas Soome #define PNP_BAD_PARAMETER 0x84 75*4a5d661aSToomas Soome #define PNP_SET_FAILED 0x85 76*4a5d661aSToomas Soome #define PNP_EVENTS_NOT_PENDING 0x86 77*4a5d661aSToomas Soome #define PNP_SYSTEM_NOT_DOCKED 0x87 78*4a5d661aSToomas Soome #define PNP_NO_ISA_PNP_CARDS 0x88 79*4a5d661aSToomas Soome #define PNP_UNABLE_TO_DETERMINE_DOCK_CAPABILITIES 0x89 80*4a5d661aSToomas Soome #define PNP_CONFIG_CHANGE_FAILED_NO_BATTERY 0x8a 81*4a5d661aSToomas Soome #define PNP_CONFIG_CHANGE_FAILED_RESOURCE_CONFLICT 0x8b 82*4a5d661aSToomas Soome #define PNP_BUFFER_TOO_SMALL 0x8c 83*4a5d661aSToomas Soome #define PNP_USE_ESCD_SUPPORT 0x8d 84*4a5d661aSToomas Soome #define PNP_MESSAGE_NOT_SUPPORTED 0x8e 85*4a5d661aSToomas Soome #define PNP_HARDWARE_ERROR 0x8f 86*4a5d661aSToomas Soome 87*4a5d661aSToomas Soome /* 88*4a5d661aSToomas Soome * DMI return codes 89*4a5d661aSToomas Soome */ 90*4a5d661aSToomas Soome #define DMI_SUCCESS 0x00 91*4a5d661aSToomas Soome #define DMI_UNKNOWN_FUNCTION 0x81 92*4a5d661aSToomas Soome #define DMI_FUNCTION_NOT_SUPPORTED 0x82 93*4a5d661aSToomas Soome #define DMI_INVALID_HANDLE 0x83 94*4a5d661aSToomas Soome #define DMI_BAD_PARAMETER 0x84 95*4a5d661aSToomas Soome #define DMI_INVALID_SUBFUNCTION 0x85 96*4a5d661aSToomas Soome #define DMI_NO_CHANGE 0x86 97*4a5d661aSToomas Soome #define DMI_ADD_STRUCTURE_FAILED 0x87 98*4a5d661aSToomas Soome #define DMI_READ_ONLY 0x8d 99*4a5d661aSToomas Soome #define DMI_LOCK_NOT_SUPPORTED 0x90 100*4a5d661aSToomas Soome #define DMI_CURRENTLY_LOCKED 0x91 101*4a5d661aSToomas Soome #define DMI_INVALID_LOCK 0x92 102*4a5d661aSToomas Soome 103*4a5d661aSToomas Soome /* 104*4a5d661aSToomas Soome * format specifiers and defines for bios16() 105*4a5d661aSToomas Soome * s = short (16 bits) 106*4a5d661aSToomas Soome * i = int (32 bits) 107*4a5d661aSToomas Soome * p = pointer (converted to seg:offset) 108*4a5d661aSToomas Soome * C,D,U = selector (corresponding to code/data/utility segment) 109*4a5d661aSToomas Soome */ 110*4a5d661aSToomas Soome #define PNP_COUNT_DEVNODES "sppD", 0x00 111*4a5d661aSToomas Soome #define PNP_GET_DEVNODE "sppsD", 0x01 112*4a5d661aSToomas Soome #define PNP_SET_DEVNODE "sspsD", 0x02 113*4a5d661aSToomas Soome #define PNP_GET_EVENT "spD", 0x03 114*4a5d661aSToomas Soome #define PNP_SEND_MSG "ssD", 0x04 115*4a5d661aSToomas Soome #define PNP_GET_DOCK_INFO "spD", 0x05 116*4a5d661aSToomas Soome 117*4a5d661aSToomas Soome #define PNP_SEL_PRIBOOT "ssiiisspD", 0x07 118*4a5d661aSToomas Soome #define PNP_GET_PRIBOOT "sspppppD", 0x08 119*4a5d661aSToomas Soome #define PNP_SET_RESINFO "spD", 0x09 120*4a5d661aSToomas Soome #define PNP_GET_RESINFO "spD", 0x0A 121*4a5d661aSToomas Soome #define PNP_GET_APM_ID "sppD", 0x0B 122*4a5d661aSToomas Soome 123*4a5d661aSToomas Soome #define PNP_GET_ISA_INFO "spD", 0x40 124*4a5d661aSToomas Soome #define PNP_GET_ECSD_INFO "spppD", 0x41 125*4a5d661aSToomas Soome #define PNP_READ_ESCD "spUD", 0x42 126*4a5d661aSToomas Soome #define PNP_WRITE_ESCD "spUD", 0x43 127*4a5d661aSToomas Soome 128*4a5d661aSToomas Soome #define PNP_GET_DMI_INFO "spppppD", 0x50 129*4a5d661aSToomas Soome #define PNP_GET_DMI_STRUCTURE "sppUD", 0x51 130*4a5d661aSToomas Soome #define PNP_SET_DMI_STRUCTURE "sppsUD" 0x52 131*4a5d661aSToomas Soome #define PNP_GET_DMI_CHANGE "spUD" 0x53 132*4a5d661aSToomas Soome #define PNP_DMI_CONTROL "sspsUD" 0x54 133*4a5d661aSToomas Soome #define PNP_GET_GPNV_INFO "sppppD" 0x55 134*4a5d661aSToomas Soome #define PNP_READ_GPNV_DATA "ssppUD" 0x56 135*4a5d661aSToomas Soome #define PNP_WRITE_GPNV_DATA "sspsUD" 0x57 136*4a5d661aSToomas Soome 137*4a5d661aSToomas Soome #define PNP_BOOT_CHECK "sp", 0x60 138*4a5d661aSToomas Soome #define PNP_COUNT_IPL "sppp", 0x61 139*4a5d661aSToomas Soome #define PNP_GET_BOOTPRI "spp", 0x62 140*4a5d661aSToomas Soome #define PNP_SET_BOOTPRI "sp", 0x63 141*4a5d661aSToomas Soome #define PNP_GET_LASTBOOT "sp", 0x64 142*4a5d661aSToomas Soome #define PNP_GET_BOOTFIRST "sp", 0x65 143*4a5d661aSToomas Soome #define PNP_SET_BOOTFIRST "sp", 0x66 144*4a5d661aSToomas Soome 145*4a5d661aSToomas Soome /* 146*4a5d661aSToomas Soome * PCI BIOS functions 147*4a5d661aSToomas Soome */ 148*4a5d661aSToomas Soome #define PCIBIOS_BIOS_PRESENT 0xb101 149*4a5d661aSToomas Soome #define PCIBIOS_READ_CONFIG_BYTE 0xb108 150*4a5d661aSToomas Soome #define PCIBIOS_READ_CONFIG_WORD 0xb109 151*4a5d661aSToomas Soome #define PCIBIOS_READ_CONFIG_DWORD 0xb10a 152*4a5d661aSToomas Soome #define PCIBIOS_WRITE_CONFIG_BYTE 0xb10b 153*4a5d661aSToomas Soome #define PCIBIOS_WRITE_CONFIG_WORD 0xb10c 154*4a5d661aSToomas Soome #define PCIBIOS_WRITE_CONFIG_DWORD 0xb10d 155*4a5d661aSToomas Soome #define PCIBIOS_GET_IRQ_ROUTING 0xb10e 156*4a5d661aSToomas Soome #define PCIBIOS_ROUTE_INTERRUPT 0xb10f 157*4a5d661aSToomas Soome 158*4a5d661aSToomas Soome /* 159*4a5d661aSToomas Soome * PCI interrupt routing table. 160*4a5d661aSToomas Soome * 161*4a5d661aSToomas Soome * $PIR in the BIOS segment contains a PIR_table 162*4a5d661aSToomas Soome * int 1a:b106 returns PIR_table in buffer at es:(e)di 163*4a5d661aSToomas Soome * int 1a:b18e returns PIR_table in buffer at es:(e)di 164*4a5d661aSToomas Soome * int 1a:b406 returns es:di pointing to the BIOS PIR_table 165*4a5d661aSToomas Soome */ 166*4a5d661aSToomas Soome struct PIR_header 167*4a5d661aSToomas Soome { 168*4a5d661aSToomas Soome int8_t ph_signature[4]; 169*4a5d661aSToomas Soome u_int16_t ph_version; 170*4a5d661aSToomas Soome u_int16_t ph_length; 171*4a5d661aSToomas Soome u_int8_t ph_router_bus; 172*4a5d661aSToomas Soome u_int8_t ph_router_dev_fn; 173*4a5d661aSToomas Soome u_int16_t ph_pci_irqs; 174*4a5d661aSToomas Soome u_int16_t ph_router_vendor; 175*4a5d661aSToomas Soome u_int16_t ph_router_device; 176*4a5d661aSToomas Soome u_int32_t ph_miniport; 177*4a5d661aSToomas Soome u_int8_t ph_res[11]; 178*4a5d661aSToomas Soome u_int8_t ph_checksum; 179*4a5d661aSToomas Soome } __packed; 180*4a5d661aSToomas Soome 181*4a5d661aSToomas Soome struct PIR_intpin 182*4a5d661aSToomas Soome { 183*4a5d661aSToomas Soome u_int8_t link; 184*4a5d661aSToomas Soome u_int16_t irqs; 185*4a5d661aSToomas Soome } __packed; 186*4a5d661aSToomas Soome 187*4a5d661aSToomas Soome struct PIR_entry 188*4a5d661aSToomas Soome { 189*4a5d661aSToomas Soome u_int8_t pe_bus; 190*4a5d661aSToomas Soome u_int8_t pe_res1:3; 191*4a5d661aSToomas Soome u_int8_t pe_device:5; 192*4a5d661aSToomas Soome struct PIR_intpin pe_intpin[4]; 193*4a5d661aSToomas Soome u_int8_t pe_slot; 194*4a5d661aSToomas Soome u_int8_t pe_res3; 195*4a5d661aSToomas Soome } __packed; 196*4a5d661aSToomas Soome 197*4a5d661aSToomas Soome struct PIR_table 198*4a5d661aSToomas Soome { 199*4a5d661aSToomas Soome struct PIR_header pt_header; 200*4a5d661aSToomas Soome struct PIR_entry pt_entry[0]; 201*4a5d661aSToomas Soome } __packed; 202*4a5d661aSToomas Soome 203*4a5d661aSToomas Soome /* 204*4a5d661aSToomas Soome * Int 15:E820 'SMAP' structure 205*4a5d661aSToomas Soome */ 206*4a5d661aSToomas Soome #define SMAP_SIG 0x534D4150 /* 'SMAP' */ 207*4a5d661aSToomas Soome 208*4a5d661aSToomas Soome #define SMAP_TYPE_MEMORY 1 209*4a5d661aSToomas Soome #define SMAP_TYPE_RESERVED 2 210*4a5d661aSToomas Soome #define SMAP_TYPE_ACPI_RECLAIM 3 211*4a5d661aSToomas Soome #define SMAP_TYPE_ACPI_NVS 4 212*4a5d661aSToomas Soome #define SMAP_TYPE_ACPI_ERROR 5 213*4a5d661aSToomas Soome 214*4a5d661aSToomas Soome #define SMAP_XATTR_ENABLED 0x00000001 215*4a5d661aSToomas Soome #define SMAP_XATTR_NON_VOLATILE 0x00000002 216*4a5d661aSToomas Soome #define SMAP_XATTR_MASK (SMAP_XATTR_ENABLED | SMAP_XATTR_NON_VOLATILE) 217*4a5d661aSToomas Soome 218*4a5d661aSToomas Soome struct bios_smap { 219*4a5d661aSToomas Soome u_int64_t base; 220*4a5d661aSToomas Soome u_int64_t length; 221*4a5d661aSToomas Soome u_int32_t type; 222*4a5d661aSToomas Soome } __packed; 223*4a5d661aSToomas Soome 224*4a5d661aSToomas Soome /* Structure extended to include extended attribute field in ACPI 3.0. */ 225*4a5d661aSToomas Soome struct bios_smap_xattr { 226*4a5d661aSToomas Soome u_int64_t base; 227*4a5d661aSToomas Soome u_int64_t length; 228*4a5d661aSToomas Soome u_int32_t type; 229*4a5d661aSToomas Soome u_int32_t xattr; 230*4a5d661aSToomas Soome } __packed; 231*4a5d661aSToomas Soome 232*4a5d661aSToomas Soome /* 233*4a5d661aSToomas Soome * System Management BIOS 234*4a5d661aSToomas Soome */ 235*4a5d661aSToomas Soome #define SMBIOS_START 0xf0000 236*4a5d661aSToomas Soome #define SMBIOS_STEP 0x10 237*4a5d661aSToomas Soome #define SMBIOS_OFF 0 238*4a5d661aSToomas Soome #define SMBIOS_LEN 4 239*4a5d661aSToomas Soome #define SMBIOS_SIG "_SM_" 240*4a5d661aSToomas Soome 241*4a5d661aSToomas Soome struct smbios_eps { 242*4a5d661aSToomas Soome uint8_t anchor_string[4]; /* '_SM_' */ 243*4a5d661aSToomas Soome uint8_t checksum; 244*4a5d661aSToomas Soome uint8_t length; 245*4a5d661aSToomas Soome uint8_t major_version; 246*4a5d661aSToomas Soome uint8_t minor_version; 247*4a5d661aSToomas Soome uint16_t maximum_structure_size; 248*4a5d661aSToomas Soome uint8_t entry_point_revision; 249*4a5d661aSToomas Soome uint8_t formatted_area[5]; 250*4a5d661aSToomas Soome uint8_t intermediate_anchor_string[5]; /* '_DMI_' */ 251*4a5d661aSToomas Soome uint8_t intermediate_checksum; 252*4a5d661aSToomas Soome uint16_t structure_table_length; 253*4a5d661aSToomas Soome uint32_t structure_table_address; 254*4a5d661aSToomas Soome uint16_t number_structures; 255*4a5d661aSToomas Soome uint8_t BCD_revision; 256*4a5d661aSToomas Soome }; 257*4a5d661aSToomas Soome 258*4a5d661aSToomas Soome struct smbios_structure_header { 259*4a5d661aSToomas Soome uint8_t type; 260*4a5d661aSToomas Soome uint8_t length; 261*4a5d661aSToomas Soome uint16_t handle; 262*4a5d661aSToomas Soome }; 263*4a5d661aSToomas Soome 264*4a5d661aSToomas Soome #ifdef _KERNEL 265*4a5d661aSToomas Soome #define BIOS_PADDRTOVADDR(x) ((x) + KERNBASE) 266*4a5d661aSToomas Soome #define BIOS_VADDRTOPADDR(x) ((x) - KERNBASE) 267*4a5d661aSToomas Soome 268*4a5d661aSToomas Soome struct bios_oem_signature { 269*4a5d661aSToomas Soome char * anchor; /* search anchor string in BIOS memory */ 270*4a5d661aSToomas Soome size_t offset; /* offset from anchor (may be negative) */ 271*4a5d661aSToomas Soome size_t totlen; /* total length of BIOS string to copy */ 272*4a5d661aSToomas Soome } __packed; 273*4a5d661aSToomas Soome 274*4a5d661aSToomas Soome struct bios_oem_range { 275*4a5d661aSToomas Soome u_int from; /* shouldn't be below 0xe0000 */ 276*4a5d661aSToomas Soome u_int to; /* shouldn't be above 0xfffff */ 277*4a5d661aSToomas Soome } __packed; 278*4a5d661aSToomas Soome 279*4a5d661aSToomas Soome struct bios_oem { 280*4a5d661aSToomas Soome struct bios_oem_range range; 281*4a5d661aSToomas Soome struct bios_oem_signature signature[]; 282*4a5d661aSToomas Soome } __packed; 283*4a5d661aSToomas Soome 284*4a5d661aSToomas Soome struct segment_info { 285*4a5d661aSToomas Soome u_int base; 286*4a5d661aSToomas Soome u_int limit; 287*4a5d661aSToomas Soome }; 288*4a5d661aSToomas Soome 289*4a5d661aSToomas Soome #define BIOSCODE_FLAG 0x01 290*4a5d661aSToomas Soome #define BIOSDATA_FLAG 0x02 291*4a5d661aSToomas Soome #define BIOSUTIL_FLAG 0x04 292*4a5d661aSToomas Soome #define BIOSARGS_FLAG 0x08 293*4a5d661aSToomas Soome 294*4a5d661aSToomas Soome struct bios_segments { 295*4a5d661aSToomas Soome struct segment_info code32; /* 32-bit code (mandatory) */ 296*4a5d661aSToomas Soome struct segment_info code16; /* 16-bit code */ 297*4a5d661aSToomas Soome struct segment_info data; /* 16-bit data */ 298*4a5d661aSToomas Soome struct segment_info util; /* 16-bit utility */ 299*4a5d661aSToomas Soome struct segment_info args; /* 16-bit args */ 300*4a5d661aSToomas Soome }; 301*4a5d661aSToomas Soome 302*4a5d661aSToomas Soome struct bios_regs { 303*4a5d661aSToomas Soome u_int eax; 304*4a5d661aSToomas Soome u_int ebx; 305*4a5d661aSToomas Soome u_int ecx; 306*4a5d661aSToomas Soome u_int edx; 307*4a5d661aSToomas Soome u_int esi; 308*4a5d661aSToomas Soome u_int edi; 309*4a5d661aSToomas Soome }; 310*4a5d661aSToomas Soome 311*4a5d661aSToomas Soome struct bios_args { 312*4a5d661aSToomas Soome u_int entry; /* entry point of routine */ 313*4a5d661aSToomas Soome struct bios_regs r; 314*4a5d661aSToomas Soome struct bios_segments seg; 315*4a5d661aSToomas Soome }; 316*4a5d661aSToomas Soome 317*4a5d661aSToomas Soome /* 318*4a5d661aSToomas Soome * BIOS32 Service Directory entry. Caller supplies name, bios32_SDlookup 319*4a5d661aSToomas Soome * fills in the rest of the details. 320*4a5d661aSToomas Soome */ 321*4a5d661aSToomas Soome struct bios32_SDentry 322*4a5d661aSToomas Soome { 323*4a5d661aSToomas Soome union 324*4a5d661aSToomas Soome { 325*4a5d661aSToomas Soome u_int8_t name[4]; /* service identifier */ 326*4a5d661aSToomas Soome u_int32_t id; /* as a 32-bit value */ 327*4a5d661aSToomas Soome } ident; 328*4a5d661aSToomas Soome u_int32_t base; /* base of service */ 329*4a5d661aSToomas Soome u_int32_t len; /* service length */ 330*4a5d661aSToomas Soome u_int32_t entry; /* entrypoint offset from base */ 331*4a5d661aSToomas Soome vm_offset_t ventry; /* entrypoint in kernel virtual segment */ 332*4a5d661aSToomas Soome }; 333*4a5d661aSToomas Soome 334*4a5d661aSToomas Soome /* 335*4a5d661aSToomas Soome * Exported lookup results 336*4a5d661aSToomas Soome */ 337*4a5d661aSToomas Soome extern struct bios32_SDentry PCIbios; 338*4a5d661aSToomas Soome 339*4a5d661aSToomas Soome int bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen); 340*4a5d661aSToomas Soome uint32_t bios_sigsearch(uint32_t start, u_char *sig, int siglen, int paralen, 341*4a5d661aSToomas Soome int sigofs); 342*4a5d661aSToomas Soome int bios16(struct bios_args *, char *, ...); 343*4a5d661aSToomas Soome int bios16_call(struct bios_regs *, char *); 344*4a5d661aSToomas Soome int bios32(struct bios_regs *, u_int, u_short); 345*4a5d661aSToomas Soome int bios32_SDlookup(struct bios32_SDentry *ent); 346*4a5d661aSToomas Soome void set_bios_selectors(struct bios_segments *, int); 347*4a5d661aSToomas Soome 348*4a5d661aSToomas Soome #endif 349*4a5d661aSToomas Soome 350*4a5d661aSToomas Soome #endif /* _MACHINE_PC_BIOS_H_ */ 351