mpbiosreg.h revision 1.2
11.2Sfvdl/* $NetBSD: mpbiosreg.h,v 1.2 2002/10/01 12:57:07 fvdl Exp $ */ 21.2Sfvdl 31.2Sfvdl/*- 41.2Sfvdl * Copyright (c) 2000 The NetBSD Foundation, Inc. 51.2Sfvdl * All rights reserved. 61.2Sfvdl * 71.2Sfvdl * This code is derived from software contributed to The NetBSD Foundation 81.2Sfvdl * by RedBack Networks Inc. 91.2Sfvdl * 101.2Sfvdl * Author: Bill Sommerfeld 111.2Sfvdl * 121.2Sfvdl * Redistribution and use in source and binary forms, with or without 131.2Sfvdl * modification, are permitted provided that the following conditions 141.2Sfvdl * are met: 151.2Sfvdl * 1. Redistributions of source code must retain the above copyright 161.2Sfvdl * notice, this list of conditions and the following disclaimer. 171.2Sfvdl * 2. Redistributions in binary form must reproduce the above copyright 181.2Sfvdl * notice, this list of conditions and the following disclaimer in the 191.2Sfvdl * documentation and/or other materials provided with the distribution. 201.2Sfvdl * 3. All advertising materials mentioning features or use of this software 211.2Sfvdl * must display the following acknowledgement: 221.2Sfvdl * This product includes software developed by the NetBSD 231.2Sfvdl * Foundation, Inc. and its contributors. 241.2Sfvdl * 4. Neither the name of The NetBSD Foundation nor the names of its 251.2Sfvdl * contributors may be used to endorse or promote products derived 261.2Sfvdl * from this software without specific prior written permission. 271.2Sfvdl * 281.2Sfvdl * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 291.2Sfvdl * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 301.2Sfvdl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 311.2Sfvdl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 321.2Sfvdl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 331.2Sfvdl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 341.2Sfvdl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 351.2Sfvdl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 361.2Sfvdl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 371.2Sfvdl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 381.2Sfvdl * POSSIBILITY OF SUCH DAMAGE. 391.2Sfvdl */ 401.2Sfvdl 411.2Sfvdl#ifndef _I386_MPBIOSREG_H_ 421.2Sfvdl#define _I386_MPBIOSREG_H_ 431.2Sfvdl 441.2Sfvdl#define BIOS_BASE (0xf0000) 451.2Sfvdl#define BIOS_SIZE (0x10000) 461.2Sfvdl#define BIOS_COUNT (BIOS_SIZE) 471.2Sfvdl 481.2Sfvdl/* 491.2Sfvdl * Multiprocessor config table entry types. 501.2Sfvdl */ 511.2Sfvdl 521.2Sfvdl#define MPS_MCT_CPU 0 531.2Sfvdl#define MPS_MCT_BUS 1 541.2Sfvdl#define MPS_MCT_IOAPIC 2 551.2Sfvdl#define MPS_MCT_IOINT 3 561.2Sfvdl#define MPS_MCT_LINT 4 571.2Sfvdl 581.2Sfvdl#define MPS_MCT_NTYPES 5 591.2Sfvdl 601.2Sfvdl/* 611.2Sfvdl * Interrupt typess 621.2Sfvdl */ 631.2Sfvdl 641.2Sfvdl#define MPS_INTTYPE_INT 0 651.2Sfvdl#define MPS_INTTYPE_NMI 1 661.2Sfvdl#define MPS_INTTYPE_SMI 2 671.2Sfvdl#define MPS_INTTYPE_ExtINT 3 681.2Sfvdl 691.2Sfvdl#define MPS_INTPO_DEF 0 701.2Sfvdl#define MPS_INTPO_ACTHI 1 711.2Sfvdl#define MPS_INTPO_ACTLO 3 721.2Sfvdl 731.2Sfvdl#define MPS_INTTR_DEF 0 741.2Sfvdl#define MPS_INTTR_EDGE 1 751.2Sfvdl#define MPS_INTTR_LEVEL 3 761.2Sfvdl 771.2Sfvdl 781.2Sfvdl/* MP Floating Pointer Structure */ 791.2Sfvdlstruct mpbios_fps { 801.2Sfvdl u_int32_t signature; 811.2Sfvdl/* string defined by the Intel MP Spec as identifying the MP table */ 821.2Sfvdl#define MP_FP_SIG 0x5f504d5f /* _MP_ */ 831.2Sfvdl 841.2Sfvdl u_int32_t pap; 851.2Sfvdl u_int8_t length; 861.2Sfvdl u_int8_t spec_rev; 871.2Sfvdl u_int8_t checksum; 881.2Sfvdl u_int8_t mpfb1; /* system configuration */ 891.2Sfvdl u_int8_t mpfb2; /* flags */ 901.2Sfvdl#define MPFPS_FLAG_IMCR 0x80 /* IMCR present */ 911.2Sfvdl u_int8_t mpfb3; /* unused */ 921.2Sfvdl u_int8_t mpfb4; /* unused */ 931.2Sfvdl u_int8_t mpfb5; /* unused */ 941.2Sfvdl}; 951.2Sfvdl 961.2Sfvdl/* MP Configuration Table Header */ 971.2Sfvdlstruct mpbios_cth { 981.2Sfvdl u_int32_t signature; 991.2Sfvdl#define MP_CT_SIG 0x504d4350 /* PCMP */ 1001.2Sfvdl 1011.2Sfvdl u_int16_t base_len; 1021.2Sfvdl u_int8_t spec_rev; 1031.2Sfvdl u_int8_t checksum; 1041.2Sfvdl u_int8_t oem_id[8]; 1051.2Sfvdl u_int8_t product_id[12]; 1061.2Sfvdl u_int32_t oem_table_pointer; 1071.2Sfvdl u_int16_t oem_table_size; 1081.2Sfvdl u_int16_t entry_count; 1091.2Sfvdl u_int32_t apic_address; 1101.2Sfvdl u_int16_t ext_len; 1111.2Sfvdl u_int8_t ext_cksum; 1121.2Sfvdl u_int8_t reserved; 1131.2Sfvdl}; 1141.2Sfvdl 1151.2Sfvdlstruct mpbios_proc { 1161.2Sfvdl u_int8_t type; 1171.2Sfvdl u_int8_t apic_id; 1181.2Sfvdl u_int8_t apic_version; 1191.2Sfvdl u_int8_t cpu_flags; 1201.2Sfvdl#define PROCENTRY_FLAG_EN 0x01 1211.2Sfvdl#define PROCENTRY_FLAG_BP 0x02 1221.2Sfvdl u_long cpu_signature; 1231.2Sfvdl u_long feature_flags; 1241.2Sfvdl u_long reserved1; 1251.2Sfvdl u_long reserved2; 1261.2Sfvdl}; 1271.2Sfvdl 1281.2Sfvdlstruct mpbios_bus { 1291.2Sfvdl u_int8_t type; 1301.2Sfvdl u_int8_t bus_id; 1311.2Sfvdl char bus_type[6]; 1321.2Sfvdl}; 1331.2Sfvdl 1341.2Sfvdlstruct mpbios_ioapic { 1351.2Sfvdl u_int8_t type; 1361.2Sfvdl u_int8_t apic_id; 1371.2Sfvdl u_int8_t apic_version; 1381.2Sfvdl u_int8_t apic_flags; 1391.2Sfvdl#define IOAPICENTRY_FLAG_EN 0x01 1401.2Sfvdl void *apic_address; 1411.2Sfvdl}; 1421.2Sfvdl 1431.2Sfvdlstruct mpbios_int { 1441.2Sfvdl u_int8_t type; 1451.2Sfvdl u_int8_t int_type; 1461.2Sfvdl u_int16_t int_flags; 1471.2Sfvdl u_int8_t src_bus_id; 1481.2Sfvdl u_int8_t src_bus_irq; 1491.2Sfvdl u_int8_t dst_apic_id; 1501.2Sfvdl#define MPS_ALL_APICS 0xff 1511.2Sfvdl u_int8_t dst_apic_int; 1521.2Sfvdl}; 1531.2Sfvdl 1541.2Sfvdl 1551.2Sfvdl#endif /* !_I386_MPBIOSREG_H_ */ 156