Deleted Added
full compact
acpi.c (261088) acpi.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/acpi.c 261088 2014-01-23 20:21:39Z jhb $
26 * $FreeBSD: stable/10/usr.sbin/bhyve/acpi.c 261090 2014-01-23 20:35:32Z 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.

--- 10 unchanged lines hidden (view full) ---

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)
50 */
51
52#include <sys/cdefs.h>
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.

--- 10 unchanged lines hidden (view full) ---

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)
50 */
51
52#include <sys/cdefs.h>
53__FBSDID("$FreeBSD: stable/10/usr.sbin/bhyve/acpi.c 261088 2014-01-23 20:21:39Z jhb $");
53__FBSDID("$FreeBSD: stable/10/usr.sbin/bhyve/acpi.c 261090 2014-01-23 20:35:32Z jhb $");
54
55#include <sys/param.h>
56#include <sys/errno.h>
57#include <sys/stat.h>
58
59#include <paths.h>
60#include <stdio.h>
61#include <stdlib.h>

--- 18 unchanged lines hidden (view full) ---

80#define HPET_OFFSET 0x340
81#define FACS_OFFSET 0x380
82#define DSDT_OFFSET 0x400
83
84#define BHYVE_ASL_TEMPLATE "bhyve.XXXXXXX"
85#define BHYVE_ASL_SUFFIX ".aml"
86#define BHYVE_ASL_COMPILER "/usr/sbin/iasl"
87
54
55#include <sys/param.h>
56#include <sys/errno.h>
57#include <sys/stat.h>
58
59#include <paths.h>
60#include <stdio.h>
61#include <stdlib.h>

--- 18 unchanged lines hidden (view full) ---

80#define HPET_OFFSET 0x340
81#define FACS_OFFSET 0x380
82#define DSDT_OFFSET 0x400
83
84#define BHYVE_ASL_TEMPLATE "bhyve.XXXXXXX"
85#define BHYVE_ASL_SUFFIX ".aml"
86#define BHYVE_ASL_COMPILER "/usr/sbin/iasl"
87
88#define BHYVE_PM_TIMER_ADDR 0x408
89
90static int basl_keep_temps;
91static int basl_verbose_iasl;
92static int basl_ncpu;
93static uint32_t basl_acpi_base = BHYVE_ACPI_BASE;
94static uint32_t hpet_capabilities;
95
96/*
97 * Contains the full pathname of the template to be passed

--- 180 unchanged lines hidden (view full) ---

278 EFPRINTF(fp, "[0002]\t\tFlags (decoded below) : 0005\n");
279 EFPRINTF(fp, "\t\t\tPolarity : 1\n");
280 EFPRINTF(fp, "\t\t\tTrigger Mode : 1\n");
281 EFPRINTF(fp, "\n");
282
283 EFPRINTF(fp, "[0001]\t\tSubtable Type : 02\n");
284 EFPRINTF(fp, "[0001]\t\tLength : 0A\n");
285 EFPRINTF(fp, "[0001]\t\tBus : 00\n");
88static int basl_keep_temps;
89static int basl_verbose_iasl;
90static int basl_ncpu;
91static uint32_t basl_acpi_base = BHYVE_ACPI_BASE;
92static uint32_t hpet_capabilities;
93
94/*
95 * Contains the full pathname of the template to be passed

--- 180 unchanged lines hidden (view full) ---

276 EFPRINTF(fp, "[0002]\t\tFlags (decoded below) : 0005\n");
277 EFPRINTF(fp, "\t\t\tPolarity : 1\n");
278 EFPRINTF(fp, "\t\t\tTrigger Mode : 1\n");
279 EFPRINTF(fp, "\n");
280
281 EFPRINTF(fp, "[0001]\t\tSubtable Type : 02\n");
282 EFPRINTF(fp, "[0001]\t\tLength : 0A\n");
283 EFPRINTF(fp, "[0001]\t\tBus : 00\n");
286 EFPRINTF(fp, "[0001]\t\tSource : 09\n");
287 EFPRINTF(fp, "[0004]\t\tInterrupt : 00000009\n");
284 EFPRINTF(fp, "[0001]\t\tSource : %02X\n", SCI_INT);
285 EFPRINTF(fp, "[0004]\t\tInterrupt : %08X\n", SCI_INT);
288 EFPRINTF(fp, "[0002]\t\tFlags (decoded below) : 0000\n");
286 EFPRINTF(fp, "[0002]\t\tFlags (decoded below) : 0000\n");
289 EFPRINTF(fp, "\t\t\tPolarity : 0\n");
290 EFPRINTF(fp, "\t\t\tTrigger Mode : 0\n");
287 EFPRINTF(fp, "\t\t\tPolarity : 3\n");
288 EFPRINTF(fp, "\t\t\tTrigger Mode : 3\n");
291 EFPRINTF(fp, "\n");
292
293 EFFLUSH(fp);
294
295 return (0);
296
297err_exit:
298 return (errno);

--- 20 unchanged lines hidden (view full) ---

319 EFPRINTF(fp, "[0004]\t\tAsl Compiler ID : \"xxxx\"\n");
320 EFPRINTF(fp, "[0004]\t\tAsl Compiler Revision : 00000000\n");
321 EFPRINTF(fp, "\n");
322
323 EFPRINTF(fp, "[0004]\t\tFACS Address : %08X\n",
324 basl_acpi_base + FACS_OFFSET);
325 EFPRINTF(fp, "[0004]\t\tDSDT Address : %08X\n",
326 basl_acpi_base + DSDT_OFFSET);
289 EFPRINTF(fp, "\n");
290
291 EFFLUSH(fp);
292
293 return (0);
294
295err_exit:
296 return (errno);

--- 20 unchanged lines hidden (view full) ---

317 EFPRINTF(fp, "[0004]\t\tAsl Compiler ID : \"xxxx\"\n");
318 EFPRINTF(fp, "[0004]\t\tAsl Compiler Revision : 00000000\n");
319 EFPRINTF(fp, "\n");
320
321 EFPRINTF(fp, "[0004]\t\tFACS Address : %08X\n",
322 basl_acpi_base + FACS_OFFSET);
323 EFPRINTF(fp, "[0004]\t\tDSDT Address : %08X\n",
324 basl_acpi_base + DSDT_OFFSET);
327 EFPRINTF(fp, "[0001]\t\tModel : 00\n");
325 EFPRINTF(fp, "[0001]\t\tModel : 01\n");
328 EFPRINTF(fp, "[0001]\t\tPM Profile : 00 [Unspecified]\n");
326 EFPRINTF(fp, "[0001]\t\tPM Profile : 00 [Unspecified]\n");
329 EFPRINTF(fp, "[0002]\t\tSCI Interrupt : 0009\n");
330 EFPRINTF(fp, "[0004]\t\tSMI Command Port : 00000000\n");
331 EFPRINTF(fp, "[0001]\t\tACPI Enable Value : 00\n");
332 EFPRINTF(fp, "[0001]\t\tACPI Disable Value : 00\n");
327 EFPRINTF(fp, "[0002]\t\tSCI Interrupt : %04X\n",
328 SCI_INT);
329 EFPRINTF(fp, "[0004]\t\tSMI Command Port : %08X\n",
330 SMI_CMD);
331 EFPRINTF(fp, "[0001]\t\tACPI Enable Value : %02X\n",
332 BHYVE_ACPI_ENABLE);
333 EFPRINTF(fp, "[0001]\t\tACPI Disable Value : %02X\n",
334 BHYVE_ACPI_DISABLE);
333 EFPRINTF(fp, "[0001]\t\tS4BIOS Command : 00\n");
334 EFPRINTF(fp, "[0001]\t\tP-State Control : 00\n");
335 EFPRINTF(fp, "[0001]\t\tS4BIOS Command : 00\n");
336 EFPRINTF(fp, "[0001]\t\tP-State Control : 00\n");
335 EFPRINTF(fp, "[0004]\t\tPM1A Event Block Address : 00000000\n");
337 EFPRINTF(fp, "[0004]\t\tPM1A Event Block Address : %08X\n",
338 PM1A_EVT_ADDR);
336 EFPRINTF(fp, "[0004]\t\tPM1B Event Block Address : 00000000\n");
339 EFPRINTF(fp, "[0004]\t\tPM1B Event Block Address : 00000000\n");
337 EFPRINTF(fp, "[0004]\t\tPM1A Control Block Address : 00000000\n");
340 EFPRINTF(fp, "[0004]\t\tPM1A Control Block Address : %08X\n",
341 PM1A_CNT_ADDR);
338 EFPRINTF(fp, "[0004]\t\tPM1B Control Block Address : 00000000\n");
339 EFPRINTF(fp, "[0004]\t\tPM2 Control Block Address : 00000000\n");
340 EFPRINTF(fp, "[0004]\t\tPM Timer Block Address : %08X\n",
342 EFPRINTF(fp, "[0004]\t\tPM1B Control Block Address : 00000000\n");
343 EFPRINTF(fp, "[0004]\t\tPM2 Control Block Address : 00000000\n");
344 EFPRINTF(fp, "[0004]\t\tPM Timer Block Address : %08X\n",
341 BHYVE_PM_TIMER_ADDR);
345 IO_PMTMR);
342 EFPRINTF(fp, "[0004]\t\tGPE0 Block Address : 00000000\n");
343 EFPRINTF(fp, "[0004]\t\tGPE1 Block Address : 00000000\n");
344 EFPRINTF(fp, "[0001]\t\tPM1 Event Block Length : 04\n");
345 EFPRINTF(fp, "[0001]\t\tPM1 Control Block Length : 02\n");
346 EFPRINTF(fp, "[0001]\t\tPM2 Control Block Length : 00\n");
347 EFPRINTF(fp, "[0001]\t\tPM Timer Block Length : 04\n");
348 EFPRINTF(fp, "[0001]\t\tGPE0 Block Length : 00\n");
349 EFPRINTF(fp, "[0001]\t\tGPE1 Block Length : 00\n");

--- 14 unchanged lines hidden (view full) ---

364 EFPRINTF(fp, "\t\t\tVGA Not Present (V4) : 1\n");
365 EFPRINTF(fp, "\t\t\tMSI Not Supported (V4) : 0\n");
366 EFPRINTF(fp, "\t\t\tPCIe ASPM Not Supported (V4) : 1\n");
367 EFPRINTF(fp, "\t\t\tCMOS RTC Not Present (V5) : 0\n");
368 EFPRINTF(fp, "[0001]\t\tReserved : 00\n");
369 EFPRINTF(fp, "[0004]\t\tFlags (decoded below) : 00000000\n");
370 EFPRINTF(fp, "\t\t\tWBINVD instruction is operational (V1) : 1\n");
371 EFPRINTF(fp, "\t\t\tWBINVD flushes all caches (V1) : 0\n");
346 EFPRINTF(fp, "[0004]\t\tGPE0 Block Address : 00000000\n");
347 EFPRINTF(fp, "[0004]\t\tGPE1 Block Address : 00000000\n");
348 EFPRINTF(fp, "[0001]\t\tPM1 Event Block Length : 04\n");
349 EFPRINTF(fp, "[0001]\t\tPM1 Control Block Length : 02\n");
350 EFPRINTF(fp, "[0001]\t\tPM2 Control Block Length : 00\n");
351 EFPRINTF(fp, "[0001]\t\tPM Timer Block Length : 04\n");
352 EFPRINTF(fp, "[0001]\t\tGPE0 Block Length : 00\n");
353 EFPRINTF(fp, "[0001]\t\tGPE1 Block Length : 00\n");

--- 14 unchanged lines hidden (view full) ---

368 EFPRINTF(fp, "\t\t\tVGA Not Present (V4) : 1\n");
369 EFPRINTF(fp, "\t\t\tMSI Not Supported (V4) : 0\n");
370 EFPRINTF(fp, "\t\t\tPCIe ASPM Not Supported (V4) : 1\n");
371 EFPRINTF(fp, "\t\t\tCMOS RTC Not Present (V5) : 0\n");
372 EFPRINTF(fp, "[0001]\t\tReserved : 00\n");
373 EFPRINTF(fp, "[0004]\t\tFlags (decoded below) : 00000000\n");
374 EFPRINTF(fp, "\t\t\tWBINVD instruction is operational (V1) : 1\n");
375 EFPRINTF(fp, "\t\t\tWBINVD flushes all caches (V1) : 0\n");
372 EFPRINTF(fp, "\t\t\tAll CPUs support C1 (V1) : 0\n");
376 EFPRINTF(fp, "\t\t\tAll CPUs support C1 (V1) : 1\n");
373 EFPRINTF(fp, "\t\t\tC2 works on MP system (V1) : 0\n");
377 EFPRINTF(fp, "\t\t\tC2 works on MP system (V1) : 0\n");
374 EFPRINTF(fp, "\t\t\tControl Method Power Button (V1) : 1\n");
378 EFPRINTF(fp, "\t\t\tControl Method Power Button (V1) : 0\n");
375 EFPRINTF(fp, "\t\t\tControl Method Sleep Button (V1) : 1\n");
376 EFPRINTF(fp, "\t\t\tRTC wake not in fixed reg space (V1) : 0\n");
377 EFPRINTF(fp, "\t\t\tRTC can wake system from S4 (V1) : 0\n");
378 EFPRINTF(fp, "\t\t\t32-bit PM Timer (V1) : 1\n");
379 EFPRINTF(fp, "\t\t\tDocking Supported (V1) : 0\n");
379 EFPRINTF(fp, "\t\t\tControl Method Sleep Button (V1) : 1\n");
380 EFPRINTF(fp, "\t\t\tRTC wake not in fixed reg space (V1) : 0\n");
381 EFPRINTF(fp, "\t\t\tRTC can wake system from S4 (V1) : 0\n");
382 EFPRINTF(fp, "\t\t\t32-bit PM Timer (V1) : 1\n");
383 EFPRINTF(fp, "\t\t\tDocking Supported (V1) : 0\n");
380 EFPRINTF(fp, "\t\t\tReset Register Supported (V2) : 0\n");
384 EFPRINTF(fp, "\t\t\tReset Register Supported (V2) : 1\n");
381 EFPRINTF(fp, "\t\t\tSealed Case (V3) : 0\n");
382 EFPRINTF(fp, "\t\t\tHeadless - No Video (V3) : 1\n");
383 EFPRINTF(fp, "\t\t\tUse native instr after SLP_TYPx (V3) : 0\n");
384 EFPRINTF(fp, "\t\t\tPCIEXP_WAK Bits Supported (V4) : 0\n");
385 EFPRINTF(fp, "\t\t\tUse Platform Timer (V4) : 0\n");
386 EFPRINTF(fp, "\t\t\tRTC_STS valid on S4 wake (V4) : 0\n");
387 EFPRINTF(fp, "\t\t\tRemote Power-on capable (V4) : 0\n");
388 EFPRINTF(fp, "\t\t\tUse APIC Cluster Model (V4) : 0\n");
389 EFPRINTF(fp, "\t\t\tUse APIC Physical Destination Mode (V4) : 1\n");
390 EFPRINTF(fp, "\t\t\tHardware Reduced (V5) : 0\n");
391 EFPRINTF(fp, "\t\t\tLow Power S0 Idle (V5) : 0\n");
392 EFPRINTF(fp, "\n");
393
394 EFPRINTF(fp,
395 "[0012]\t\tReset Register : [Generic Address Structure]\n");
396 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
397 EFPRINTF(fp, "[0001]\t\tBit Width : 08\n");
398 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
399 EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 01 [Byte Access:8]\n");
385 EFPRINTF(fp, "\t\t\tSealed Case (V3) : 0\n");
386 EFPRINTF(fp, "\t\t\tHeadless - No Video (V3) : 1\n");
387 EFPRINTF(fp, "\t\t\tUse native instr after SLP_TYPx (V3) : 0\n");
388 EFPRINTF(fp, "\t\t\tPCIEXP_WAK Bits Supported (V4) : 0\n");
389 EFPRINTF(fp, "\t\t\tUse Platform Timer (V4) : 0\n");
390 EFPRINTF(fp, "\t\t\tRTC_STS valid on S4 wake (V4) : 0\n");
391 EFPRINTF(fp, "\t\t\tRemote Power-on capable (V4) : 0\n");
392 EFPRINTF(fp, "\t\t\tUse APIC Cluster Model (V4) : 0\n");
393 EFPRINTF(fp, "\t\t\tUse APIC Physical Destination Mode (V4) : 1\n");
394 EFPRINTF(fp, "\t\t\tHardware Reduced (V5) : 0\n");
395 EFPRINTF(fp, "\t\t\tLow Power S0 Idle (V5) : 0\n");
396 EFPRINTF(fp, "\n");
397
398 EFPRINTF(fp,
399 "[0012]\t\tReset Register : [Generic Address Structure]\n");
400 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
401 EFPRINTF(fp, "[0001]\t\tBit Width : 08\n");
402 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
403 EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 01 [Byte Access:8]\n");
400 EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000001\n");
404 EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000CF9\n");
401 EFPRINTF(fp, "\n");
402
405 EFPRINTF(fp, "\n");
406
403 EFPRINTF(fp, "[0001]\t\tValue to cause reset : 00\n");
407 EFPRINTF(fp, "[0001]\t\tValue to cause reset : 06\n");
404 EFPRINTF(fp, "[0003]\t\tReserved : 000000\n");
405 EFPRINTF(fp, "[0008]\t\tFACS Address : 00000000%08X\n",
406 basl_acpi_base + FACS_OFFSET);
407 EFPRINTF(fp, "[0008]\t\tDSDT Address : 00000000%08X\n",
408 basl_acpi_base + DSDT_OFFSET);
409 EFPRINTF(fp,
410 "[0012]\t\tPM1A Event Block : [Generic Address Structure]\n");
411 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
412 EFPRINTF(fp, "[0001]\t\tBit Width : 20\n");
413 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
414 EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 02 [Word Access:16]\n");
408 EFPRINTF(fp, "[0003]\t\tReserved : 000000\n");
409 EFPRINTF(fp, "[0008]\t\tFACS Address : 00000000%08X\n",
410 basl_acpi_base + FACS_OFFSET);
411 EFPRINTF(fp, "[0008]\t\tDSDT Address : 00000000%08X\n",
412 basl_acpi_base + DSDT_OFFSET);
413 EFPRINTF(fp,
414 "[0012]\t\tPM1A Event Block : [Generic Address Structure]\n");
415 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
416 EFPRINTF(fp, "[0001]\t\tBit Width : 20\n");
417 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
418 EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 02 [Word Access:16]\n");
415 EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000001\n");
419 EFPRINTF(fp, "[0008]\t\tAddress : 00000000%08X\n",
420 PM1A_EVT_ADDR);
416 EFPRINTF(fp, "\n");
417
418 EFPRINTF(fp,
419 "[0012]\t\tPM1B Event Block : [Generic Address Structure]\n");
420 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
421 EFPRINTF(fp, "[0001]\t\tBit Width : 00\n");
422 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
423 EFPRINTF(fp,
424 "[0001]\t\tEncoded Access Width : 00 [Undefined/Legacy]\n");
425 EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000000\n");
426 EFPRINTF(fp, "\n");
427
428 EFPRINTF(fp,
429 "[0012]\t\tPM1A Control Block : [Generic Address Structure]\n");
430 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
431 EFPRINTF(fp, "[0001]\t\tBit Width : 10\n");
432 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
433 EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 02 [Word Access:16]\n");
421 EFPRINTF(fp, "\n");
422
423 EFPRINTF(fp,
424 "[0012]\t\tPM1B Event Block : [Generic Address Structure]\n");
425 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
426 EFPRINTF(fp, "[0001]\t\tBit Width : 00\n");
427 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
428 EFPRINTF(fp,
429 "[0001]\t\tEncoded Access Width : 00 [Undefined/Legacy]\n");
430 EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000000\n");
431 EFPRINTF(fp, "\n");
432
433 EFPRINTF(fp,
434 "[0012]\t\tPM1A Control Block : [Generic Address Structure]\n");
435 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
436 EFPRINTF(fp, "[0001]\t\tBit Width : 10\n");
437 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
438 EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 02 [Word Access:16]\n");
434 EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000001\n");
439 EFPRINTF(fp, "[0008]\t\tAddress : 00000000%08X\n",
440 PM1A_CNT_ADDR);
435 EFPRINTF(fp, "\n");
436
437 EFPRINTF(fp,
438 "[0012]\t\tPM1B Control Block : [Generic Address Structure]\n");
439 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
440 EFPRINTF(fp, "[0001]\t\tBit Width : 00\n");
441 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
442 EFPRINTF(fp,

--- 15 unchanged lines hidden (view full) ---

458 EFPRINTF(fp,
459 "[0012]\t\tPM Timer Block : [Generic Address Structure]\n");
460 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
461 EFPRINTF(fp, "[0001]\t\tBit Width : 32\n");
462 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
463 EFPRINTF(fp,
464 "[0001]\t\tEncoded Access Width : 03 [DWord Access:32]\n");
465 EFPRINTF(fp, "[0008]\t\tAddress : 00000000%08X\n",
441 EFPRINTF(fp, "\n");
442
443 EFPRINTF(fp,
444 "[0012]\t\tPM1B Control Block : [Generic Address Structure]\n");
445 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
446 EFPRINTF(fp, "[0001]\t\tBit Width : 00\n");
447 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
448 EFPRINTF(fp,

--- 15 unchanged lines hidden (view full) ---

464 EFPRINTF(fp,
465 "[0012]\t\tPM Timer Block : [Generic Address Structure]\n");
466 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
467 EFPRINTF(fp, "[0001]\t\tBit Width : 32\n");
468 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
469 EFPRINTF(fp,
470 "[0001]\t\tEncoded Access Width : 03 [DWord Access:32]\n");
471 EFPRINTF(fp, "[0008]\t\tAddress : 00000000%08X\n",
466 BHYVE_PM_TIMER_ADDR);
472 IO_PMTMR);
467 EFPRINTF(fp, "\n");
468
469 EFPRINTF(fp, "[0012]\t\tGPE0 Block : [Generic Address Structure]\n");
470 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
471 EFPRINTF(fp, "[0001]\t\tBit Width : 80\n");
472 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
473 EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 01 [Byte Access:8]\n");
474 EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000000\n");

--- 123 unchanged lines hidden (view full) ---

598 err = 0;
599
600 EFPRINTF(fp, "/*\n");
601 EFPRINTF(fp, " * bhyve DSDT template\n");
602 EFPRINTF(fp, " */\n");
603 EFPRINTF(fp, "DefinitionBlock (\"bhyve_dsdt.aml\", \"DSDT\", 2,"
604 "\"BHYVE \", \"BVDSDT \", 0x00000001)\n");
605 EFPRINTF(fp, "{\n");
473 EFPRINTF(fp, "\n");
474
475 EFPRINTF(fp, "[0012]\t\tGPE0 Block : [Generic Address Structure]\n");
476 EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
477 EFPRINTF(fp, "[0001]\t\tBit Width : 80\n");
478 EFPRINTF(fp, "[0001]\t\tBit Offset : 00\n");
479 EFPRINTF(fp, "[0001]\t\tEncoded Access Width : 01 [Byte Access:8]\n");
480 EFPRINTF(fp, "[0008]\t\tAddress : 0000000000000000\n");

--- 123 unchanged lines hidden (view full) ---

604 err = 0;
605
606 EFPRINTF(fp, "/*\n");
607 EFPRINTF(fp, " * bhyve DSDT template\n");
608 EFPRINTF(fp, " */\n");
609 EFPRINTF(fp, "DefinitionBlock (\"bhyve_dsdt.aml\", \"DSDT\", 2,"
610 "\"BHYVE \", \"BVDSDT \", 0x00000001)\n");
611 EFPRINTF(fp, "{\n");
612 EFPRINTF(fp, " Name (_S5, Package (0x02)\n");
613 EFPRINTF(fp, " {\n");
614 EFPRINTF(fp, " 0x05,\n");
615 EFPRINTF(fp, " Zero,\n");
616 EFPRINTF(fp, " })\n");
606 EFPRINTF(fp, " Scope (_SB)\n");
607 EFPRINTF(fp, " {\n");
608 EFPRINTF(fp, " Device (PCI0)\n");
609 EFPRINTF(fp, " {\n");
610 EFPRINTF(fp, " Name (_HID, EisaId (\"PNP0A03\"))\n");
611 EFPRINTF(fp, " Name (_ADR, Zero)\n");
612 EFPRINTF(fp, " Name (_UID, One)\n");
613 EFPRINTF(fp, " Name (_CRS, ResourceTemplate ()\n");

--- 323 unchanged lines hidden ---
617 EFPRINTF(fp, " Scope (_SB)\n");
618 EFPRINTF(fp, " {\n");
619 EFPRINTF(fp, " Device (PCI0)\n");
620 EFPRINTF(fp, " {\n");
621 EFPRINTF(fp, " Name (_HID, EisaId (\"PNP0A03\"))\n");
622 EFPRINTF(fp, " Name (_ADR, Zero)\n");
623 EFPRINTF(fp, " Name (_UID, One)\n");
624 EFPRINTF(fp, " Name (_CRS, ResourceTemplate ()\n");

--- 323 unchanged lines hidden ---