Commit Graph

25 Commits

Author SHA1 Message Date
Takanori Watanabe
c031c93b5d Add TCG ACPI spec table (TCPA) support.
Submitted by:	Hans-Joerg_Hoexer@genua.de
2010-08-11 23:21:25 +00:00
John Baldwin
986dffaf53 - Use the headers from ACPI-CA to define various constants and structures
for table layouts, etc. rather than homerolling our own structures and
  constants in acpidump.h.
- Verify the extended checksum on the RSDP.
- Handle new ACPI 3.0 fields in MADT including X2APIC entries and
  UIDs for local SAPICs.
- Add handling for new ACPI 3.0 flags in the FADT.

Reviewed by:	jkim
MFC after:	1 month
2009-08-25 20:35:57 +00:00
John Baldwin
a0333ad155 Parse the System Resource Affinity Table ('SRAT') used to describe affinity
relationships between CPUs and memory.

Reviewed by:	jkim
Approved by:	re (kib)
MFC after:	1 week
2009-07-29 19:07:24 +00:00
Takanori Watanabe
87f9f09a13 Correct HPET header handling.
MFC after: 7 days
2007-03-27 17:03:52 +00:00
Scott Long
348c9a5668 Fix a small style problem and add a __packed pragma for safety. 2005-02-17 21:09:26 +00:00
Scott Long
a47e681b24 Add support for parsing MCFG tables. 2005-02-14 11:21:48 +00:00
Nate Lawson
f7675a5634 Back out the -s flag and go back to dumping the SSDTs by default. 2004-10-05 20:45:05 +00:00
Nate Lawson
62c7bde198 Add the -s flag to make dumping SSDTs optional (disabled by default).
Since we can only override the DSDT, a custom ASL dumped previously that
contained SSDTs would result in lots of multiple definition errors.

A longer-term fix involves adding the ability to override SSDTs to ACPI-CA.

MFC after:	3 days
2004-10-05 02:18:53 +00:00
Marcel Moolenaar
bfa3f012cd Add support for SSDT tables. Dumping or disassembling the DSDT will
now include the contents if any SSDT table as well. This makes use
of the property that one can concatenate the body of SSDT tables to
the DSDT, updating the DSDT header (length and checksum) and end up
with a larger and valid DSDT table. Hence, this also works with -f.

Reviewed by: njl@
2004-08-13 22:59:09 +00:00
Nate Lawson
a773b841f2 Unify the start/size parameters for the RSDP search area. Don't bother
trying to exclude the top end of the range since it should hurt to overlap
by 4 bytes in the off-chance the RSDP signature appears incorrectly at the
very top of our search space.
2004-05-28 07:25:23 +00:00
Nate Lawson
2c0d74e8e8 Use the correct location of the EBDA for searching for the RSDP.
The EBDA is the 1 KB area addressed by the 16 bit pointer at 0x40E.

Pointed out by:	robert.moore AT intel.com
2004-05-25 05:52:48 +00:00
Nate Lawson
8fc0f4c675 Instead of scanning the entire lower 1 MB of RAM, only scan locations
where the RSD PTR can actually occur.  According to section 5.2.2
of the ACPI spec, we only consider two regions for the base address:

    1. EBDA (0x0 - 0x3FF)
    2. High memory (0xE0000 - 0xFFFFF)

I don't know whether this fixes any actual problems but is more correct.
2004-05-14 16:52:39 +00:00
Dag-Erling Smørgrav
476daaec24 Minor style issues. 2004-05-10 21:18:03 +00:00
Nate Lawson
55d7ff9ea2 Add dumping of the ECDT table.
Courtesy of:	USENIX hall track
2003-09-10 23:52:12 +00:00
Nate Lawson
773b6454af o Workaround a bug where my T23 reports that it is ACPI 2.0x compatible
but has invalid 64 bit pointers for FACS and DSDT.
o Finish work to print all of the FADT and FACS.
o Resort the comment generating functions.  Submitted by: marcel

Courtesy of:	BSDcon back wall
2003-09-10 22:00:45 +00:00
Nate Lawson
8e6a8737d7 Rename FACP to FADT throughout.
Update FADT for new fields including pm_profile, pstate_cnt, and cst_cnt.
Add acpi_print_gas() for printing various address formats.
Print FACS contents.
Remove unused code.
2003-09-09 08:31:58 +00:00
Nate Lawson
945137d9b4 Modify acpidump to use iasl(8) as the backend for disassembling AML.
Also clean up the output of dumped tables.  Update the man page for the
new usage.  Make WARNS=6 clean.
2003-08-28 03:33:07 +00:00
Peter Wemm
79d7565c5a Dump the HPET information block.
What is the HPET I hear you ask?  It is the High Precision Event Timer
that is supposed to supplement and eventually replace the 8254 timer and
the RTC periodic interrupts.  Among other things, it is 64 bit (can be
run in 32 bit mode for 32 bit cpus), and is suitable as a replacement for
the ACPI timer on SMP systems (the specs are much better) and as a
replacement for the ITC based synthetic clock for on ia64 systems.

It seems IA64 and AMD64 systems tend to have this.  It is likely to start
showing up in i386 systems if it isn't already on some of them.
2003-08-02 01:55:03 +00:00
John Baldwin
7f3d3d9b26 Add structure definitions for the various items in a ACPI Multiple
APIC Descriptor Table (MADT) which has the signature 'ACPI'.

Approved by:	marcel
2003-01-08 20:45:23 +00:00
Marcel Moolenaar
00d3053746 o Use sysctl machdep.acpi_root to get the physical address of the
RSDP. Scan the first 1MB on i386 if the sysctl fails,
o  Extend struct ACPIrsdp with the ACPI 2.0 fields which involves
   changing a prior reserved field into the ACPI revision,
o  Only calculate the RSDP checksum on the first 20 bytes to remain
   compatible with ACPI 1.0 tables; we don't check the extended
   checksum covering the whole table,
o  Use the length field in the RSDP to map the RSDP into the address
   space so that we don't have to know about future extensions here.
2002-12-19 08:06:53 +00:00
John Baldwin
add448e4e7 Use __packed. 2002-10-09 19:46:09 +00:00
Mike Smith
add420aa72 Add support for decoding Buffer objects that contain PnP/ACPI resource
streams.  Since the output is bulky, it's controlled by the '-r'
option.

Document this in the manpage, and clean up some awkward English a
little.
2002-01-02 07:01:34 +00:00
Mitsuru IWASAKI
c62f1ccc6f Fix UserTerms disassembling. Now that dumped ASL can be compiled with
ports/devel/acpitools (iasl).
 - Merge AML parser to build ACPI namespace
 - Comment header info. out so that ASL compiler ignore them
 - Fix DSDT header size to be discarded when DSDT file is specified
   for input (acpidump and amldb)
 - Write DSDT header as well into DSDT file for output
 - Fix some trivial typo (Concatenate and SizeOf)
 - Remove DEBUG_FLAGS from Makefile (acpidump and amldb)
2001-10-22 17:25:32 +00:00
Mitsuru IWASAKI
d3f4a2ca8e Remove dependence on old acpi driver from acpi userland tools.
- acpiconf	Replace include files from old acpi driver to acpica driver.
		New sleep type `4b' had been added (S4BIOS) for `-s' option.
		Of course this has no effect because driver doesn't
		support it for now :-)

 - acpidump	All needed structs in sys/dev/acpi/*.h had been merged
		into local header file.  No changes on its usage.
2000-11-08 02:37:00 +00:00
Mitsuru IWASAKI
e1e9a4bf77 import acpidump(8) from ACPI For FreeBSD project.
Obtained from:  ACPI For FreeBSD project
2000-08-31 14:42:32 +00:00