Date: Mon, 29 Sep 2014 19:53:39 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272286 - in vendor-sys/acpica/dist: . generate/unix/acpiexamples generate/unix/acpiexec generate/unix/iasl source/common source/compiler source/components/disassembler source/component... Message-ID: <201409291953.s8TJrdBR006192@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Mon Sep 29 19:53:38 2014 New Revision: 272286 URL: http://svnweb.freebsd.org/changeset/base/272286 Log: Import ACPICA 20140926. Added: vendor-sys/acpica/dist/source/compiler/aslmapenter.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslmapoutput.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslmaputils.c (contents, props changed) vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/ahids.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslparser.y vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslrestype1.c vendor-sys/acpica/dist/source/compiler/aslrestype1i.c vendor-sys/acpica/dist/source/compiler/aslrestype2.c vendor-sys/acpica/dist/source/compiler/aslrestype2d.c vendor-sys/acpica/dist/source/compiler/aslrestype2e.c vendor-sys/acpica/dist/source/compiler/aslrestype2q.c vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrestype2w.c vendor-sys/acpica/dist/source/compiler/aslsupport.y vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/executer/exfield.c vendor-sys/acpica/dist/source/components/executer/exprep.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/amlresrc.h vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/tools/acpidump/apdump.c vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/changes.txt Mon Sep 29 19:53:38 2014 (r272286) @@ -1,4 +1,71 @@ ---------------------------------------- +26 September 2014. Summary of changes for version 20140926: + +1) ACPICA kernel-resident subsystem: + +Updated the GPIO operation region handler interface (GeneralPurposeIo). +In order to support GPIO Connection objects with multiple pins, along +with the related Field objects, the following changes to the interface +have been made: The Address is now defined to be the offset in bits of +the field unit from the previous invocation of a Connection. It can be +viewed as a "Pin Number Index" into the connection resource descriptor. +The BitWidth is the exact bit width of the field. It is usually one bit, +but not always. See the ACPICA reference guide (section 8.8.6.2.1) for +additional information and examples. + +GPE support: During ACPICA/GPE initialization, ensure that all GPEs with +corresponding _Lxx/_Exx methods are disabled (they may have been enabled +by the firmware), so that they cannot fire until they are enabled via +AcpiUpdateAllGpes. Rafael J. Wysocki. + +Added a new return flag for the Event/GPE status interfaces -- +AcpiGetEventStatus and AcpiGetGpeStatus. The new +ACPI_EVENT_FLAGS_HAS_HANDLER flag is used to indicate that the event or +GPE currently has a handler associated with it, and can thus actually +affect the system. Lv Zheng. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 99.1K Code, 27.3K Data, 126.4K Total + Debug Version: 192.8K Code, 79.9K Data, 272.7K Total + Previous Release: + Non-Debug Version: 98.8K Code, 27.3K Data, 126.1K Total + Debug Version: 192.1K Code, 79.8K Data, 271.9K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a memory allocation/free regression introduced in 20140828 +that could cause the compiler to crash. This was introduced inadvertently +during the effort to eliminate compiler memory leaks. ACPICA BZ 1111, +1113. + +iASL: Removed two error messages that have been found to create false +positives, until they can be fixed and fully validated (ACPICA BZ 1112): +1) Illegal forward reference within a method +2) Illegal reference across two methods + +iASL: Implemented a new option (-lm) to create a hardware mapping file +that summarizes all GPIO, I2C, SPI, and UART connections. This option +works for both the compiler and disassembler. See the iASL compiler user +guide for additional information and examples (section 6.4.6). + +AcpiDump: Added support for the version 1 (ACPI 1.0) RSDP in addition to +version 2. This corrects the AE_BAD_HEADER exception seen on systems with +a version 1 RSDP. Lv Zheng ACPICA BZ 1097. + +AcpiExec: For Unix versions, don't attempt to put STDIN into raw mode +unless STDIN is actually a terminal. Assists with batch-mode processing. +ACPICA BZ 1114. + +Disassembler/AcpiHelp: Added another large group of recognized _HID +values. + + +---------------------------------------- 28 August 2014. Summary of changes for version 20140828: 1) ACPICA kernel-resident subsystem: @@ -37,8 +104,10 @@ Memory24 resource descriptor. There was range was equal to the (length -1) caused by the fact that these values are defined in 256-byte blocks, not bytes. ACPICA BZ 1098 -Disassembler: Fixed a problem with the GpioInt descriptor interrupt polarity -flags. The flags are actually 2 bits, not 1, and the "ActiveBoth" keyword is +Disassembler: Fixed a problem with the GpioInt descriptor interrupt +polarity +flags. The flags are actually 2 bits, not 1, and the "ActiveBoth" keyword +is now supported properly. ACPI 5.1: Added the GICC affinity subtable to the SRAT table. Supported Modified: vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Mon Sep 29 19:53:38 2014 (r272286) @@ -162,7 +162,7 @@ OBJECTS = \ # CFLAGS += \ -DACPI_EXAMPLE_APP\ - -I$(EXAMPLES) + -I$(ACPIEXAMPLES) # # Common Rules Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Mon Sep 29 19:53:38 2014 (r272286) @@ -43,6 +43,7 @@ OBJECTS = \ $(OBJDIR)/aeexec.o\ $(OBJDIR)/aehandlers.o\ $(OBJDIR)/aemain.o\ + $(OBJDIR)/aeregion.o\ $(OBJDIR)/aetables.o\ $(OBJDIR)/ahids.o\ $(OBJDIR)/ahuuids.o\ Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Mon Sep 29 19:53:38 2014 (r272286) @@ -66,6 +66,9 @@ OBJECTS = \ $(OBJDIR)/asllookup.o\ $(OBJDIR)/aslmain.o\ $(OBJDIR)/aslmap.o\ + $(OBJDIR)/aslmapenter.o\ + $(OBJDIR)/aslmapoutput.o\ + $(OBJDIR)/aslmaputils.o\ $(OBJDIR)/aslmessages.o\ $(OBJDIR)/aslmethod.o\ $(OBJDIR)/aslnamesp.o\ @@ -228,6 +231,7 @@ MISC = \ ASL_PARSER = \ $(ASL_COMPILER)/aslparser.y\ + $(ASL_COMPILER)/aslsupport.y\ $(ASL_COMPILER)/asltokens.y\ $(ASL_COMPILER)/asltypes.y\ $(ASL_COMPILER)/aslrules.y @@ -254,7 +258,7 @@ include ../Makefile.rules # # Macro processing for iASL .y files # -$(OBJDIR)/aslcompiler.y : $(ASL_PARSER) +$(OBJDIR)/aslcompiler.y : $(ASL_PARSER) $(MACROPROC) $(MFLAGS) $(ASL_COMPILER)/aslparser.y > $(OBJDIR)/aslcompiler.y # Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/common/adisasm.c Mon Sep 29 19:53:38 2014 (r272286) @@ -128,7 +128,7 @@ AcpiDsMethodDataInitArgs ( static ACPI_TABLE_DESC LocalTables[1]; -static ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot; +ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot; /******************************************************************************* @@ -489,6 +489,14 @@ AdAmlDisassemble ( fprintf (stderr, "Disassembly completed\n"); fprintf (stderr, "ASL Output: %s - %u bytes\n", DisasmFilename, CmGetFileSize (File)); + + if (Gbl_MapfileFlag) + { + fprintf (stderr, "%14s %s - %u bytes\n", + Gbl_Files[ASL_FILE_MAP_OUTPUT].ShortDescription, + Gbl_Files[ASL_FILE_MAP_OUTPUT].Filename, + FlGetFileSize (ASL_FILE_MAP_OUTPUT)); + } } } @@ -688,6 +696,7 @@ AdDisplayTables ( } AcpiDmDisassemble (NULL, AcpiGbl_ParseOpRoot, ACPI_UINT32_MAX); + MpEmitMappingInfo (); if (AcpiGbl_DbOpt_verbose) { Modified: vendor-sys/acpica/dist/source/common/ahids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahids.c Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/common/ahids.c Mon Sep 29 19:53:38 2014 (r272286) @@ -54,7 +54,9 @@ const AH_DEVICE_ID AslDeviceIds[] = { {"10EC5640", "Realtek I2S Audio Codec"}, + {"80860F09", "Intel PWM Controller"}, {"80860F0A", "Intel Atom UART Controller"}, + {"80860F0E", "Intel SPI Controller"}, {"80860F14", "Intel Baytrail SDIO/MMC Host Controller"}, {"80860F28", "Intel SST Audio DSP"}, {"80860F41", "Intel Baytrail I2C Host Controller"}, @@ -73,12 +75,20 @@ const AH_DEVICE_ID AslDeviceIds[] = {"ACPI000D", "Power Meter Device"}, {"ACPI000E", "Time and Alarm Device"}, {"ACPI000F", "User Presence Detection Device"}, + {"ADMA0F28", "Intel Audio DMA"}, + {"AMCR0F28", "Intel Audio Machine Driver"}, {"ATK4001", "Asus Radio Control Button"}, {"ATML1000", "Atmel Touchscreen Controller"}, + {"AUTH2750", "AuthenTec AES2750"}, {"BCM2E39", "Broadcom BT Serial Bus Driver over UART Bus Enumerator"}, + {"BCM4752E", "Broadcom GPS Controller"}, + {"BMG0160", "Bosch Gyro Sensor"}, {"CPLM3218", "Capella Micro CM3218x Ambient Light Sensor"}, {"DELLABCE", "Dell Airplane Mode Switch Driver"}, {"DLAC3002", "Qualcomm Atheros Bluetooth UART Transport"}, + {"FTTH5506", "FocalTech 5506 Touch Controller"}, + {"HAD0F28", "Intel HDMI Audio Driver"}, + {"INBC0000", "GPIO Expander"}, {"INT0002", "Virtual GPIO Controller"}, {"INT0800", "Intel 82802 Firmware Hub Device"}, {"INT3394", "ACPI System Fan"}, @@ -87,6 +97,7 @@ const AH_DEVICE_ID AslDeviceIds[] = {"INT33A1", "Intel Power Engine"}, {"INT33BB", "Intel Baytrail SD Host Controller"}, {"INT33BD", "Intel Baytrail Mailbox Device"}, + {"INT33BE", "Camera Sensor OV5693"}, {"INT33C0", "Intel Serial I/O SPI Host Controller"}, {"INT33C1", "Intel Serial I/O SPI Host Controller"}, {"INT33C2", "Intel Serial I/O I2C Host Controller"}, @@ -105,9 +116,12 @@ const AH_DEVICE_ID AslDeviceIds[] = {"INT33D4", "Intel GPIO Buttons"}, {"INT33D6", "Intel Virtual Buttons Device"}, {"INT33F0", "Camera Sensor MT9M114"}, + {"INT33F4", "XPOWER PMIC Controller"}, + {"INT33F5", "TI PMIC Controller"}, {"INT33FB", "MIPI-CSI Camera Sensor OV2722"}, {"INT33FC", "Intel Baytrail GPIO Controller"}, {"INT33FD", "Intel Baytrail Power Management IC"}, + {"INT33FE", "XPOWER Battery Device"}, {"INT3400", "Intel Dynamic Power Performance Management"}, {"INT3401", "Intel Extended Thermal Model CPU"}, {"INT3403", "DPTF Temperature Sensor"}, @@ -127,8 +141,10 @@ const AH_DEVICE_ID AslDeviceIds[] = {"LNXSYSTM", "ACPI Root Node"}, {"LNXTHERM", "ACPI Thermal Zone"}, {"LNXVIDEO", "ACPI Video Controller"}, + {"MAX17047", "Fuel Gauge Controller"}, {"MSFT0101", "TPM 2.0 Security Device"}, {"NXP5442", "NXP 5442 Near Field Communications Controller"}, + {"NXP5472", "NXP NFC"}, {"PNP0000", "8259-compatible Programmable Interrupt Controller"}, {"PNP0001", "EISA Interrupt Controller"}, {"PNP0002", "MCA Interrupt Controller"}, @@ -181,7 +197,13 @@ const AH_DEVICE_ID AslDeviceIds[] = {"PNP0D40", "SDA Standard Compliant SD Host Controller"}, {"PNP0D80", "Windows-compatible System Power Management Controller"}, {"PNP0F03", "Microsoft PS/2-style Mouse"}, + {"PNP0F13", "PS/2 Mouse"}, + {"RTL8723", "Realtek Wireless Controller"}, + {"SMB0349", "Charger"}, {"SMO91D0", "Sensor Hub"}, + {"SMSC3750", "SMSC 3750 USB MUX"}, + {"SSPX0000", "Intel SSP Device"}, + {"TBQ24296", "Charger"}, {NULL, NULL} }; Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Mon Sep 29 19:53:38 2014 (r272286) @@ -540,6 +540,10 @@ CmDoOutputFiles ( /* Dump the namespace to the .nsp file if requested */ (void) NsDisplayNamespace (); + + /* Dump the device mapping file */ + + MpEmitMappingInfo (); } Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Mon Sep 29 19:53:38 2014 (r272286) @@ -808,6 +808,13 @@ ACPI_STATUS FlOpenMiscOutputFiles ( char *InputFilename); +/* + * aslhwmap - hardware map summary + */ +void +MpEmitMappingInfo ( + void); + /* * asload - load namespace in prep for cross reference @@ -1045,8 +1052,7 @@ RsCheckListForDuplicates ( ASL_RESOURCE_NODE * RsDoOneResourceDescriptor ( - ACPI_PARSE_OBJECT *DescriptorTypeOp, - UINT32 CurrentByteOffset, + ASL_RESOURCE_INFO *Info, UINT8 *State); /* Values for State above */ @@ -1070,43 +1076,35 @@ RsDoResourceTemplate ( */ ASL_RESOURCE_NODE * RsDoEndTagDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoEndDependentDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoMemory24Descriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoMemory32Descriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoMemory32FixedDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoStartDependentDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoStartDependentNoPriDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoVendorSmallDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* @@ -1114,33 +1112,27 @@ RsDoVendorSmallDescriptor ( */ ASL_RESOURCE_NODE * RsDoDmaDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoFixedDmaDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoFixedIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoIrqDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoIrqNoFlagsDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* @@ -1148,61 +1140,50 @@ RsDoIrqNoFlagsDescriptor ( */ ASL_RESOURCE_NODE * RsDoInterruptDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoVendorLargeDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoGeneralRegisterDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoGpioIntDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoGpioIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoI2cSerialBusDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoSpiSerialBusDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoUartSerialBusDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* * aslrestype2d - DWord address descriptors */ ASL_RESOURCE_NODE * RsDoDwordIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoDwordMemoryDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoDwordSpaceDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* @@ -1210,18 +1191,15 @@ RsDoDwordSpaceDescriptor ( */ ASL_RESOURCE_NODE * RsDoExtendedIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoExtendedMemoryDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoExtendedSpaceDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* @@ -1229,18 +1207,15 @@ RsDoExtendedSpaceDescriptor ( */ ASL_RESOURCE_NODE * RsDoQwordIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoQwordMemoryDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoQwordSpaceDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); /* @@ -1248,18 +1223,16 @@ RsDoQwordSpaceDescriptor ( */ ASL_RESOURCE_NODE * RsDoWordIoDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoWordSpaceDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); ASL_RESOURCE_NODE * RsDoWordBusNumberDescriptor ( - ACPI_PARSE_OBJECT *Op, - UINT32 CurrentByteOffset); + ASL_RESOURCE_INFO *Info); + /* * Entry to data table compiler subsystem Modified: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Mon Sep 29 19:53:38 2014 (r272286) @@ -108,6 +108,7 @@ #define FILE_SUFFIX_PREPROCESSOR "i" #define FILE_SUFFIX_AML_CODE "aml" +#define FILE_SUFFIX_MAP "map" #define FILE_SUFFIX_LISTING "lst" #define FILE_SUFFIX_HEX_DUMP "hex" #define FILE_SUFFIX_DEBUG "txt" Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Mon Sep 29 19:53:38 2014 (r272286) @@ -81,7 +81,8 @@ ASL_FILE_INFO Gbl_ {NULL, NULL, "C Source: ", "C Code Output"}, {NULL, NULL, "ASM Include: ", "Assembly Header Output"}, {NULL, NULL, "C Include: ", "C Header Output"}, - {NULL, NULL, "Offset Table: ", "C Offset Table Output"} + {NULL, NULL, "Offset Table: ", "C Offset Table Output"}, + {NULL, NULL, "Device Map: ", "Device Map Output"} }; #else @@ -141,6 +142,7 @@ ASL_EXTERN BOOLEAN ASL_ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisassembleAll, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_UseDefaultAmlFilename, TRUE); +ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_MapfileFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_NsOutputFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_PreprocessorOutputFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DebugFlag, FALSE); @@ -221,6 +223,11 @@ ASL_EXTERN ASL_CACHE_INFO ASL_ ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_StringCacheNext, NULL); ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_StringCacheLast, NULL); +/* Map file */ + +ASL_EXTERN ACPI_GPIO_INFO ASL_INIT_GLOBAL (*Gbl_GpioList, NULL); +ASL_EXTERN ACPI_SERIAL_INFO ASL_INIT_GLOBAL (*Gbl_SerialList, NULL); + /* Misc */ Modified: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Mon Sep 29 19:53:38 2014 (r272286) @@ -360,7 +360,6 @@ LdNamespace1Begin ( ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op %p [%s]\n", Op, Op->Asl.ParseOpName)); - /* * We are only interested in opcodes that have an associated name * (or multiple names) @@ -374,6 +373,34 @@ LdNamespace1Begin ( Status = LdLoadFieldElements (Op, WalkState); return (Status); + case AML_INT_CONNECTION_OP: + + + if (Op->Asl.Child->Asl.AmlOpcode != AML_INT_NAMEPATH_OP) + { + break; + } + Arg = Op->Asl.Child; + + Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Asl.ExternalName, + ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, + WalkState, &Node); + if (ACPI_FAILURE (Status)) + { + break; + } + + if (Node->Type == ACPI_TYPE_BUFFER) + { + Arg->Asl.Node = Node; + + Arg = Node->Op->Asl.Child; /* Get namepath */ + Arg = Arg->Asl.Next; /* Get actual buffer */ + Arg = Arg->Asl.Child; /* Buffer length */ + Arg = Arg->Asl.Next; /* RAW_DATA buffer */ + } + break; + default: /* All other opcodes go below */ @@ -467,7 +494,6 @@ LdNamespace1Begin ( ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); break; - case PARSEOP_SCOPE: /* * The name referenced by Scope(Name) must already exist at this point. Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Mon Sep 29 17:51:39 2014 (r272285) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Mon Sep 29 19:53:38 2014 (r272286) @@ -172,6 +172,7 @@ Usage ( printf ("\nOptional Listing Files:\n"); ACPI_OPTION ("-l", "Create mixed listing file (ASL source and AML) (*.lst)"); + ACPI_OPTION ("-lm", "Create hardware summary map file (*.map)"); ACPI_OPTION ("-ln", "Create namespace file (*.nsp)"); ACPI_OPTION ("-ls", "Create combined source file (expanded includes) (*.src)"); @@ -404,7 +405,6 @@ main ( CleanupAndExit: UtFreeLineBuffers (); - AslParserCleanup (); if (AcpiGbl_ExternalFileList) Added: vendor-sys/acpica/dist/source/compiler/aslmapenter.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/compiler/aslmapenter.c Mon Sep 29 19:53:38 2014 (r272286) @@ -0,0 +1,346 @@ +/****************************************************************************** + * + * Module Name: aslmapenter - Build resource descriptor/device maps + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2014, Intel Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + +#include "acpi.h" +#include "accommon.h" +#include "acapps.h" +#include "aslcompiler.h" + +/* This module used for application-level code only */ + +#define _COMPONENT ACPI_COMPILER + ACPI_MODULE_NAME ("aslmapenter") + +/* Local prototypes */ + +static ACPI_GPIO_INFO * +MpCreateGpioInfo ( + UINT16 PinNumber, + char *DeviceName); + +static ACPI_SERIAL_INFO * +MpCreateSerialInfo ( + char *DeviceName, + UINT16 Address); + + +/******************************************************************************* + * + * FUNCTION: MpSaveGpioInfo + * + * PARAMETERS: Resource - GPIO resource descriptor + * PinCount - From GPIO descriptor + * PinList - From GPIO descriptor + * DeviceName - The "ResourceSource" name + * + * RETURN: None + * + * DESCRIPTION: External Interface. + * Save GPIO resource descriptor information. + * Creates new GPIO info blocks, one for each pin defined by the + * GPIO descriptor. + * + ******************************************************************************/ + +void +MpSaveGpioInfo ( + ACPI_PARSE_OBJECT *Op, + AML_RESOURCE *Resource, + UINT32 PinCount, + UINT16 *PinList, + char *DeviceName) +{ + ACPI_GPIO_INFO *Info; + UINT32 i; + + + /* Mapfile option enabled? */ + + if (!Gbl_MapfileFlag) + { + return; + } + + /* Create an info block for each pin defined in the descriptor */ + + for (i = 0; i < PinCount; i++) + { + Info = MpCreateGpioInfo (PinList[i], DeviceName); + + Info->Op = Op; + Info->DeviceName = DeviceName; + Info->PinCount = PinCount; + Info->PinIndex = i; + Info->PinNumber = PinList[i]; + Info->Type = Resource->Gpio.ConnectionType; + Info->Direction = (UINT8) (Resource->Gpio.IntFlags & 0x0003); /* _IOR, for IO descriptor */ + Info->Polarity = (UINT8) ((Resource->Gpio.IntFlags >> 1) & 0x0003); /* _POL, for INT descriptor */ + } +} + + +/******************************************************************************* + * + * FUNCTION: MpSaveSerialInfo + * + * PARAMETERS: Resource - A Serial resource descriptor + * DeviceName - The "ResourceSource" name. + * + * RETURN: None + * + * DESCRIPTION: External Interface. + * Save serial resource descriptor information. + * Creates a new serial info block. + * + ******************************************************************************/ + +void +MpSaveSerialInfo ( + ACPI_PARSE_OBJECT *Op, + AML_RESOURCE *Resource, + char *DeviceName) +{ + ACPI_SERIAL_INFO *Info; + UINT16 Address; + UINT32 Speed; + + + /* Mapfile option enabled? */ + + if (!Gbl_MapfileFlag) + { + return; + } + + if (Resource->DescriptorType != ACPI_RESOURCE_NAME_SERIAL_BUS) + { + return; + } + + /* Extract address and speed from the resource descriptor */ + + switch (Resource->CommonSerialBus.Type) + { + case AML_RESOURCE_I2C_SERIALBUSTYPE: + + Address = Resource->I2cSerialBus.SlaveAddress; + Speed = Resource->I2cSerialBus.ConnectionSpeed; + break; + + case AML_RESOURCE_SPI_SERIALBUSTYPE: + + Address = Resource->SpiSerialBus.DeviceSelection; + Speed = Resource->SpiSerialBus.ConnectionSpeed; + break; + + case AML_RESOURCE_UART_SERIALBUSTYPE: + + Address = 0; + Speed = Resource->UartSerialBus.DefaultBaudRate; + break; + + default: /* Invalid bus subtype */ + return; + } + + Info = MpCreateSerialInfo (DeviceName, Address); + + Info->Op = Op; + Info->DeviceName = DeviceName; + Info->Resource = Resource; + Info->Address = Address; + Info->Speed = Speed; +} + + +/******************************************************************************* + * + * FUNCTION: MpCreateGpioInfo + * + * PARAMETERS: PinNumber - GPIO pin number + * DeviceName - The "ResourceSource" name + * + * RETURN: New GPIO info block. + * + * DESCRIPTION: Create a new GPIO info block and place it on the global list. + * The list is sorted by GPIO device names first, and pin numbers + * secondarily. + * + ******************************************************************************/ + +static ACPI_GPIO_INFO * +MpCreateGpioInfo ( + UINT16 PinNumber, + char *DeviceName) +{ + ACPI_GPIO_INFO *Info; + ACPI_GPIO_INFO *NextGpio; + ACPI_GPIO_INFO *PrevGpio; + + + /* + * Allocate a new info block and insert it into the global GPIO list + * sorted by both source device name and then the pin number. There is + * one block per pin. + */ + Info = ACPI_CAST_PTR (ACPI_GPIO_INFO, + UtStringCacheCalloc (sizeof (ACPI_GPIO_INFO))); + + NextGpio = Gbl_GpioList; + PrevGpio = NULL; + if (!Gbl_GpioList) + { + Gbl_GpioList = Info; + Info->Next = NULL; + return (Info); + } + + /* Sort on source DeviceName first */ + + while (NextGpio && + (ACPI_STRCMP (DeviceName, NextGpio->DeviceName) > 0)) + { + PrevGpio = NextGpio; + NextGpio = NextGpio->Next; + } + + /* Now sort on the PinNumber */ + + while (NextGpio && + (NextGpio->PinNumber < PinNumber) && + !ACPI_STRCMP (DeviceName, NextGpio->DeviceName)) + { + PrevGpio = NextGpio; + NextGpio = NextGpio->Next; + } + + /* Finish the list insertion */ + + if (PrevGpio) + { + PrevGpio->Next = Info; + } + else + { + Gbl_GpioList = Info; + } + + Info->Next = NextGpio; + return (Info); +} + + +/******************************************************************************* + * + * FUNCTION: MpCreateSerialInfo + * + * PARAMETERS: DeviceName - The "ResourceSource" name. + * Address - Physical address for the device + * + * RETURN: New Serial info block. + * + * DESCRIPTION: Create a new Serial info block and place it on the global list. + * The list is sorted by Serial device names first, and addresses + * secondarily. + * + ******************************************************************************/ + +static ACPI_SERIAL_INFO * +MpCreateSerialInfo ( + char *DeviceName, + UINT16 Address) +{ + ACPI_SERIAL_INFO *Info; + ACPI_SERIAL_INFO *NextSerial; + ACPI_SERIAL_INFO *PrevSerial; + + + /* + * Allocate a new info block and insert it into the global Serial list + * sorted by both source device name and then the address. + */ + Info = ACPI_CAST_PTR (ACPI_SERIAL_INFO, + UtStringCacheCalloc (sizeof (ACPI_SERIAL_INFO))); + + NextSerial = Gbl_SerialList; + PrevSerial = NULL; + if (!Gbl_SerialList) + { + Gbl_SerialList = Info; + Info->Next = NULL; + return (Info); + } + + /* Sort on source DeviceName */ + + while (NextSerial && + (ACPI_STRCMP (DeviceName, NextSerial->DeviceName) > 0)) + { + PrevSerial = NextSerial; + NextSerial = NextSerial->Next; + } + + /* Now sort on the Address */ + + while (NextSerial && + (NextSerial->Address < Address) && + !ACPI_STRCMP (DeviceName, NextSerial->DeviceName)) + { + PrevSerial = NextSerial; + NextSerial = NextSerial->Next; + } + + /* Finish the list insertion */ + + if (PrevSerial) + { + PrevSerial->Next = Info; + } + else + { + Gbl_SerialList = Info; + } + + Info->Next = NextSerial; + return (Info); +} Added: vendor-sys/acpica/dist/source/compiler/aslmapoutput.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/compiler/aslmapoutput.c Mon Sep 29 19:53:38 2014 (r272286) @@ -0,0 +1,661 @@ +/****************************************************************************** + * + * Module Name: aslmapoutput - Output/emit the resource descriptor/device maps + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2014, Intel Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409291953.s8TJrdBR006192>