Home | History | Annotate | Line # | Download | only in include
mpbiosreg.h revision 1.4.4.1
      1  1.4.4.1    yamt /* 	$NetBSD: mpbiosreg.h,v 1.4.4.1 2008/05/16 02:23:28 yamt Exp $ */
      2      1.1    fvdl 
      3      1.1    fvdl /*-
      4      1.1    fvdl  * Copyright (c) 2000 The NetBSD Foundation, Inc.
      5      1.1    fvdl  * All rights reserved.
      6      1.1    fvdl  *
      7      1.1    fvdl  * This code is derived from software contributed to The NetBSD Foundation
      8      1.1    fvdl  * by RedBack Networks Inc.
      9      1.1    fvdl  *
     10      1.1    fvdl  * Author: Bill Sommerfeld
     11      1.1    fvdl  *
     12      1.1    fvdl  * Redistribution and use in source and binary forms, with or without
     13      1.1    fvdl  * modification, are permitted provided that the following conditions
     14      1.1    fvdl  * are met:
     15      1.1    fvdl  * 1. Redistributions of source code must retain the above copyright
     16      1.1    fvdl  *    notice, this list of conditions and the following disclaimer.
     17      1.1    fvdl  * 2. Redistributions in binary form must reproduce the above copyright
     18      1.1    fvdl  *    notice, this list of conditions and the following disclaimer in the
     19      1.1    fvdl  *    documentation and/or other materials provided with the distribution.
     20      1.1    fvdl  *
     21      1.1    fvdl  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     22      1.1    fvdl  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     23      1.1    fvdl  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     24      1.1    fvdl  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     25      1.1    fvdl  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     26      1.1    fvdl  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     27      1.1    fvdl  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     28      1.1    fvdl  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     29      1.1    fvdl  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     30      1.1    fvdl  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     31      1.1    fvdl  * POSSIBILITY OF SUCH DAMAGE.
     32      1.1    fvdl  */
     33      1.1    fvdl 
     34      1.1    fvdl #ifndef _X86_MPBIOSREG_H_
     35      1.1    fvdl #define _X86_MPBIOSREG_H_
     36      1.1    fvdl 
     37      1.1    fvdl #define BIOS_BASE		(0xf0000)
     38      1.1    fvdl #define BIOS_SIZE		(0x10000)
     39      1.1    fvdl #define BIOS_COUNT		(BIOS_SIZE)
     40      1.1    fvdl 
     41      1.1    fvdl /*
     42      1.1    fvdl  * Multiprocessor config table entry types.
     43      1.1    fvdl  */
     44      1.1    fvdl 
     45      1.1    fvdl #define MPS_MCT_CPU	0
     46      1.1    fvdl #define MPS_MCT_BUS	1
     47      1.1    fvdl #define MPS_MCT_IOAPIC	2
     48      1.1    fvdl #define MPS_MCT_IOINT	3
     49      1.1    fvdl #define MPS_MCT_LINT	4
     50      1.1    fvdl 
     51      1.1    fvdl #define MPS_MCT_NTYPES	5
     52      1.1    fvdl 
     53      1.1    fvdl /* MP Floating Pointer Structure */
     54      1.1    fvdl struct mpbios_fps {
     55      1.4  cegger 	uint32_t	signature;
     56      1.1    fvdl /* string defined by the Intel MP Spec as identifying the MP table */
     57      1.1    fvdl #define MP_FP_SIG		0x5f504d5f	/* _MP_ */
     58      1.1    fvdl 
     59      1.4  cegger 	uint32_t 	pap;
     60      1.4  cegger 	uint8_t  	length;
     61      1.4  cegger 	uint8_t  	spec_rev;
     62      1.4  cegger 	uint8_t  	checksum;
     63      1.4  cegger 	uint8_t  	mpfb1;	/* system configuration */
     64      1.4  cegger 	uint8_t  	mpfb2;	/* flags */
     65      1.1    fvdl #define MPFPS_FLAG_IMCR		0x80	/* IMCR present */
     66      1.4  cegger 	uint8_t  	mpfb3;	/* unused */
     67      1.4  cegger 	uint8_t  	mpfb4;	/* unused */
     68      1.4  cegger 	uint8_t  	mpfb5;	/* unused */
     69      1.1    fvdl };
     70      1.1    fvdl 
     71      1.1    fvdl /* MP Configuration Table Header */
     72      1.1    fvdl struct mpbios_cth {
     73      1.4  cegger 	uint32_t	signature;
     74      1.1    fvdl #define MP_CT_SIG		0x504d4350 	/* PCMP */
     75      1.1    fvdl 
     76      1.4  cegger 	uint16_t 	base_len;
     77      1.4  cegger 	uint8_t  	spec_rev;
     78      1.4  cegger 	uint8_t  	checksum;
     79      1.4  cegger 	uint8_t  	oem_id[8];
     80      1.4  cegger 	uint8_t  	product_id[12];
     81      1.4  cegger 	uint32_t	oem_table_pointer;
     82      1.4  cegger 	uint16_t 	oem_table_size;
     83      1.4  cegger 	uint16_t 	entry_count;
     84      1.4  cegger 	uint32_t	apic_address;
     85      1.4  cegger 	uint16_t	ext_len;
     86      1.4  cegger 	uint8_t  	ext_cksum;
     87      1.4  cegger 	uint8_t  	reserved;
     88      1.1    fvdl };
     89      1.1    fvdl 
     90      1.1    fvdl struct mpbios_proc {
     91      1.4  cegger 	uint8_t  type;
     92      1.4  cegger 	uint8_t  apic_id;
     93      1.4  cegger 	uint8_t  apic_version;
     94      1.4  cegger 	uint8_t  cpu_flags;
     95      1.1    fvdl #define PROCENTRY_FLAG_EN	0x01
     96      1.1    fvdl #define PROCENTRY_FLAG_BP	0x02
     97      1.4  cegger 	uint32_t  cpu_signature;
     98      1.4  cegger 	uint32_t  feature_flags;
     99      1.4  cegger 	uint32_t  reserved1;
    100      1.4  cegger 	uint32_t  reserved2;
    101      1.1    fvdl };
    102      1.1    fvdl 
    103      1.1    fvdl struct mpbios_bus {
    104      1.4  cegger 	uint8_t  type;
    105      1.4  cegger 	uint8_t  bus_id;
    106      1.1    fvdl 	char    bus_type[6];
    107      1.1    fvdl };
    108      1.1    fvdl 
    109      1.1    fvdl struct mpbios_ioapic {
    110      1.4  cegger 	uint8_t  type;
    111      1.4  cegger 	uint8_t  apic_id;
    112      1.4  cegger 	uint8_t  apic_version;
    113      1.4  cegger 	uint8_t  apic_flags;
    114      1.1    fvdl #define IOAPICENTRY_FLAG_EN	0x01
    115      1.4  cegger 	uint32_t   apic_address;
    116      1.1    fvdl };
    117      1.1    fvdl 
    118      1.1    fvdl struct mpbios_int {
    119      1.4  cegger 	uint8_t  type;
    120      1.4  cegger 	uint8_t  int_type;
    121      1.4  cegger 	uint16_t int_flags;
    122      1.4  cegger 	uint8_t  src_bus_id;
    123      1.4  cegger 	uint8_t  src_bus_irq;
    124      1.4  cegger 	uint8_t  dst_apic_id;
    125      1.1    fvdl #define MPS_ALL_APICS	0xff
    126      1.4  cegger 	uint8_t  dst_apic_int;
    127      1.1    fvdl };
    128      1.1    fvdl 
    129      1.1    fvdl 
    130      1.1    fvdl #endif /* !_X86_MPBIOSREG_H_ */
    131