acpi.c (262350) | acpi.c (267450) |
---|---|
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/acpi.c 262350 2014-02-23 00:46:05Z jhb $ | 26 * $FreeBSD: stable/10/usr.sbin/bhyve/acpi.c 267450 2014-06-13 21:30:40Z jhb $ |
27 */ 28 29/* 30 * bhyve ACPI table generator. 31 * 32 * Create the minimal set of ACPI tables required to boot FreeBSD (and 33 * hopefully other o/s's) by writing out ASL template files for each of 34 * the tables and the compiling them to AML with the Intel iasl compiler. 35 * The AML files are then read into guest memory. 36 * 37 * The tables are placed in the guest's ROM area just below 1MB physical, 38 * above the MPTable. 39 * 40 * Layout 41 * ------ | 27 */ 28 29/* 30 * bhyve ACPI table generator. 31 * 32 * Create the minimal set of ACPI tables required to boot FreeBSD (and 33 * hopefully other o/s's) by writing out ASL template files for each of 34 * the tables and the compiling them to AML with the Intel iasl compiler. 35 * The AML files are then read into guest memory. 36 * 37 * The tables are placed in the guest's ROM area just below 1MB physical, 38 * above the MPTable. 39 * 40 * Layout 41 * ------ |
42 * RSDP -> 0xf0400 (36 bytes fixed) 43 * RSDT -> 0xf0440 (36 bytes + 4*N table addrs, 2 used) 44 * XSDT -> 0xf0480 (36 bytes + 8*N table addrs, 2 used) 45 * MADT -> 0xf0500 (depends on #CPUs) 46 * FADT -> 0xf0600 (268 bytes) 47 * HPET -> 0xf0740 (56 bytes) 48 * FACS -> 0xf0780 (64 bytes) 49 * DSDT -> 0xf0800 (variable - can go up to 0x100000) | 42 * RSDP -> 0xf2400 (36 bytes fixed) 43 * RSDT -> 0xf2440 (36 bytes + 4*N table addrs, 2 used) 44 * XSDT -> 0xf2480 (36 bytes + 8*N table addrs, 2 used) 45 * MADT -> 0xf2500 (depends on #CPUs) 46 * FADT -> 0xf2600 (268 bytes) 47 * HPET -> 0xf2740 (56 bytes) 48 * FACS -> 0xf2780 (64 bytes) 49 * DSDT -> 0xf2800 (variable - can go up to 0x100000) |
50 */ 51 52#include <sys/cdefs.h> | 50 */ 51 52#include <sys/cdefs.h> |
53__FBSDID("$FreeBSD: stable/10/usr.sbin/bhyve/acpi.c 262350 2014-02-23 00:46:05Z jhb $"); | 53__FBSDID("$FreeBSD: stable/10/usr.sbin/bhyve/acpi.c 267450 2014-06-13 21:30:40Z jhb $"); |
54 55#include <sys/param.h> 56#include <sys/errno.h> 57#include <sys/stat.h> 58 59#include <paths.h> 60#include <stdarg.h> 61#include <stdio.h> --- 7 unchanged lines hidden (view full) --- 69#include "bhyverun.h" 70#include "acpi.h" 71#include "pci_emul.h" 72 73/* 74 * Define the base address of the ACPI tables, and the offsets to 75 * the individual tables 76 */ | 54 55#include <sys/param.h> 56#include <sys/errno.h> 57#include <sys/stat.h> 58 59#include <paths.h> 60#include <stdarg.h> 61#include <stdio.h> --- 7 unchanged lines hidden (view full) --- 69#include "bhyverun.h" 70#include "acpi.h" 71#include "pci_emul.h" 72 73/* 74 * Define the base address of the ACPI tables, and the offsets to 75 * the individual tables 76 */ |
77#define BHYVE_ACPI_BASE 0xf0400 | 77#define BHYVE_ACPI_BASE 0xf2400 |
78#define RSDT_OFFSET 0x040 79#define XSDT_OFFSET 0x080 80#define MADT_OFFSET 0x100 81#define FADT_OFFSET 0x200 82#define HPET_OFFSET 0x340 83#define FACS_OFFSET 0x380 84#define DSDT_OFFSET 0x400 85 --- 884 unchanged lines hidden --- | 78#define RSDT_OFFSET 0x040 79#define XSDT_OFFSET 0x080 80#define MADT_OFFSET 0x100 81#define FADT_OFFSET 0x200 82#define HPET_OFFSET 0x340 83#define FACS_OFFSET 0x380 84#define DSDT_OFFSET 0x400 85 --- 884 unchanged lines hidden --- |