mptbl.c (261088) | mptbl.c (261090) |
---|---|
1/*- 2 * Copyright (c) 2012 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2012 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: stable/10/usr.sbin/bhyve/mptbl.c 261088 2014-01-23 20:21:39Z jhb $ | 26 * $FreeBSD: stable/10/usr.sbin/bhyve/mptbl.c 261090 2014-01-23 20:35:32Z jhb $ |
27 */ 28 29#include <sys/cdefs.h> | 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: stable/10/usr.sbin/bhyve/mptbl.c 261088 2014-01-23 20:21:39Z jhb $"); | 30__FBSDID("$FreeBSD: stable/10/usr.sbin/bhyve/mptbl.c 261090 2014-01-23 20:35:32Z jhb $"); |
31 32#include <sys/types.h> 33#include <sys/errno.h> 34#include <x86/mptable.h> 35 36#include <stdio.h> 37#include <string.h> 38 | 31 32#include <sys/types.h> 33#include <sys/errno.h> 34#include <x86/mptable.h> 35 36#include <stdio.h> 37#include <string.h> 38 |
39#include "acpi.h" |
|
39#include "bhyverun.h" 40#include "mptbl.h" 41 42#define MPTABLE_BASE 0xF0000 43 44/* floating pointer length + maximum length of configuration table */ 45#define MPTABLE_MAX_LENGTH (65536 + 16) 46 --- 148 unchanged lines hidden (view full) --- 195 /* Pin 0 is an ExtINT pin. */ 196 mpie->int_type = INTENTRY_TYPE_EXTINT; 197 break; 198 case 2: 199 /* IRQ 0 is routed to pin 2. */ 200 mpie->int_type = INTENTRY_TYPE_INT; 201 mpie->src_bus_irq = 0; 202 break; | 40#include "bhyverun.h" 41#include "mptbl.h" 42 43#define MPTABLE_BASE 0xF0000 44 45/* floating pointer length + maximum length of configuration table */ 46#define MPTABLE_MAX_LENGTH (65536 + 16) 47 --- 148 unchanged lines hidden (view full) --- 196 /* Pin 0 is an ExtINT pin. */ 197 mpie->int_type = INTENTRY_TYPE_EXTINT; 198 break; 199 case 2: 200 /* IRQ 0 is routed to pin 2. */ 201 mpie->int_type = INTENTRY_TYPE_INT; 202 mpie->src_bus_irq = 0; 203 break; |
204 case SCI_INT: 205 /* ACPI SCI is level triggered and active-lo. */ 206 mpie->int_flags = INTENTRY_FLAGS_POLARITY_ACTIVELO | 207 INTENTRY_FLAGS_TRIGGER_LEVEL; 208 mpie->int_type = INTENTRY_TYPE_INT; 209 mpie->src_bus_irq = SCI_INT; 210 break; |
|
203 case 5: 204 case 10: 205 case 11: 206 /* | 211 case 5: 212 case 10: 213 case 11: 214 /* |
207 * PCI Irqs set to level triggered. | 215 * PCI Irqs set to level triggered and active-lo. |
208 */ | 216 */ |
209 mpie->int_flags = INTENTRY_FLAGS_TRIGGER_LEVEL; | 217 mpie->int_flags = INTENTRY_FLAGS_POLARITY_ACTIVELO | 218 INTENTRY_FLAGS_TRIGGER_LEVEL; |
210 mpie->src_bus_id = 0; 211 /* fall through.. */ 212 default: 213 /* All other pins are identity mapped. */ 214 mpie->int_type = INTENTRY_TYPE_INT; 215 mpie->src_bus_irq = pin; 216 break; 217 } --- 71 unchanged lines hidden --- | 219 mpie->src_bus_id = 0; 220 /* fall through.. */ 221 default: 222 /* All other pins are identity mapped. */ 223 mpie->int_type = INTENTRY_TYPE_INT; 224 mpie->src_bus_irq = pin; 225 break; 226 } --- 71 unchanged lines hidden --- |