summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/Osd
Commit message (Collapse)AuthorAgeFilesLines
* Fix a witness(4) warning introduced in r217238.jkim2011-01-111-13/+18
|
* Remove impossible error conditions.jkim2011-01-101-4/+2
|
* Add forgotten free(9) in the previous commit for an error case.jkim2011-01-101-0/+1
|
* Allow AcpiOsInstallInterruptHandler() and AcpiOsRemoveInterruptHandler() tojkim2011-01-101-80/+149
| | | | | | | | | install or remove non-SCI interrupt handlers per ACPI Component Architecture User Guide and Programmer Reference. ACPICA may install such interrupt handler when a GPE block device is found, for example. Add a wrapper for ACPI_OSD_HANDLER, convert its return values to ours, and make it a filter. Prefer KASSERT(9) over panic(9) as we have never seen those in reality. Clean up some style(9) nits and add my copyright.
* Prefer KASSERT(9) over panic(9) as it was never seen in reality.jkim2011-01-101-2/+1
|
* Clean up unused headers.jkim2010-10-131-4/+0
|
* Remove acpi_bus_number() completely. It had to be removed in r212761.jkim2010-10-131-55/+0
| | | | Pointed out by: jhb
* Mark acpi_bus_number() as __unused. This allows clang to this filerpaulo2010-10-131-1/+1
| | | | without any warnings.
* Merge ACPICA 20100915.jkim2010-09-161-36/+0
|
* Merge ACPICA 20100806.jkim2010-08-062-7/+1
|
* Simplify AcpiOsReadPort() and AcpiOsWritePort() with iodev_read_*() andjkim2010-07-161-22/+7
| | | | | iodev_write_*(). This removes unnecessary uses of temporary macros as well. There is no functional change after this (verified with md5(1) on amd64).
* Use pmap_mapdev()/pmap_unmapdev() to map device memory instead of usingjkim2010-07-161-4/+4
| | | | | | | AcpiOsMapMemory()/AcpiOsUnmapMemory() (-> pmap_mapbios()/pmap_unmapbios()) for AcpiOsReadMemory() and AcpiOsWriteMemory(). Although they do not sound too obvious, these functions are exclusively used to access memory mapped IO in ACPICA.
* - AcpiOsReadPciConfiguration() needs similar fixes as r209965 and r210129.jkim2010-07-151-26/+9
| | | | | | | | | According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 64-bit return value even if the bit width of the location is less than 64. - Return error when 64-bit access is requested as we do not support 64-bit PCI register access (yet). XXX We may have to split it up into two 32-bit accesses if it is really required.
* - AcpiOsReadMemory() needs similar fixes as r209965. [1]jkim2010-07-151-18/+6
| | | | | | | | | | | | According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 32-bit return value even if the bit width of the port is less than 32. - Remove 64-bit read/write from AcpiOsReadMemory() and AcpiOsWriteMemory(). These functions do not support 64-bit access (yet). Clean up style nits and unnecessary bit masking while I am here. Reported by: Liu, Jinsong (jinsong dot liu at intel dot com) via Lin Ming (ming dot m dot lin at intel dot com) [1]
* Fix white spaces.jkim2010-07-131-18/+18
|
* According to ACPICA User Guide and Programmer Reference, the read data mustjkim2010-07-131-6/+3
| | | | | be zero extended to fill the 32-bit return value even if the bit width of the port is less than 32.
* Merge ACPICA 20100428.jkim2010-04-281-15/+10
|
* Merge ACPICA 20100121.jkim2010-01-212-2/+2
|
* Add a missing return in NULL mutex case.jkim2009-06-221-1/+3
| | | | Submitted by: Pawel Worach (pawel dot worach at gmail dot com)
* - Remove unnecessary read memory barriers from atomic operations[1].jkim2009-06-111-2/+4
| | | | | | - Define a macro to make my intention more clearer. Submitted by: jhb [1]
* Catch up with r193750 (OsdSynch.c locking changes):jkim2009-06-101-16/+92
| | | | | | | | | | - Preallocate some memory for ACPI tasks early enough. We cannot use malloc(9) any more because spin mutex may be held here. The reserved memory can be tuned via debug.acpi.max_tasks tunable or ACPI_MAX_TASKS in kernel configuration. The default is 32 tasks. - Implement a custom taskqueue_fast to wrap the new memory allocation. This implementation is not the fastest in the world but we are being conservative here.
* Remove redundant checks for ACPI_WAIT_FOREVER cases.jkim2009-06-081-4/+0
|
* Rewrite OsdSynch.c to reflect the latest ACPICA more closely:jkim2009-06-081-267/+445
| | | | | | - Implement ACPI semaphore (ACPI_SEMAPHORE) with condvar(9) and mutex(9). - Implement ACPI mutex (ACPI_MUTEX) with mutex(9). - Implement ACPI lock (ACPI_SPINLOCK) with spin mutex(9).
* Import ACPICA 20090521.jkim2009-06-058-103/+36
|
* Remove " + 1".mav2008-11-031-1/+1
| | | | Thread ID can't be zero anyway while increment may give owerflow.
* As soon as we have several threads per process now, it is not correct tomav2008-11-021-5/+1
| | | | | | | | use process ID as ACPI thread ID. Concurrent requests with equal thread IDs broke ACPI mutexes operation causing unpredictable errors including AE_AML_MUTEX_NOT_ACQUIRED that I have seen. Use kernel thread ID instead of process ID for ACPI thread.
* GPE lock may recurse on resume path.takawata2008-04-051-1/+1
|
* Fix GPE livelock that occurs on HP/Compaq laptops, mostly in the thermalnjl2008-01-121-3/+7
| | | | | | | | | | | | | | | | | | zone code. The GPE handler method (i.e. _L00) generates various Notify events that need to be run to completion before the GPE is re-enabled. In ACPI-CA, we queue an asynch callback at the same priority as a Notify so that it will only run after all Notify handlers have completed. The callback re-enables the GPE afterwards. We also changed the priority of Notifies to be the same as GPEs, given the possibility that another GPE could arrive before the Notifies have completed and we don't want it to get queued ahead of the rest. The ACPI-CA change was submitted by Alexey Starikovskiy (SUSE) and will appear in a later release. Special thanks to him for helping track this bug down. MFC after: 1 week Tested by: jhb, Yousif Hassan <yousif / alumni.jmu.edu>
* Add a new 'why' argument to kdb_enter(), and a set of constants to userwatson2007-12-251-2/+2
| | | | | | | | | for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run. Assign approximate why values to all current consumers of the kdb_enter() interface.
* Remove "acpi_bus_number: can't get _ADR" message. It usually appears asnjl2007-05-311-10/+7
| | | | | | | we traverse \_SB and \ in the namespace, which won't have _ADR anyway. Use a proper extern instead of our own private copy. MFC after: 1 week
* - Use '*h' instead of 'struct acpi_spinlock' for sizeof[1].jkim2007-03-261-2/+2
| | | | | | | - Add a missing 'else' for 'if'[2]. Requested by: njl[1] Submitted by: njl[2]
* Correct ACPI semaphore function parameters.jkim2007-03-261-4/+4
|
* Free the handle, not the lock. Pointy hat to me.jkim2007-03-261-1/+1
|
* Correct ACPI spinlock function parameters and use known ACPI spinlock names.jkim2007-03-261-20/+25
|
* Use a unique name for each mutex now that acpi-ca is creating more thannjl2007-03-261-2/+11
| | | | | | | | one (hardware & global lock). This should address witness complaints that a duplicate mutex is being acquired. Be sure to free the mutex to fix a potential memory leak. MFC after: 3 days
* Catch up with ACPI-CA 20070320 import.jkim2007-03-225-73/+49
|
* Only enter the debugger on a Fatal op if this is a debug build of thenjl2007-03-141-1/+3
| | | | | | | acpi module. Also clean up print of args a little. This was accidentally committed as 1.9.2.3 in the stable branch. Since it is harmless, I will let the "insta-MFC" stand unless there is a problem.
* Use 'pause' in several places rather than trying to tsleep() on NULL (whichjhb2007-02-231-2/+1
| | | | | | triggers a KASSERT) or local variables. In the case of kern_ndis, the tsleep() actually used a common sleep address (curproc) making it susceptible to a premature wakeup.
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Disable an overly-verbose warning message by default.hrs2006-09-241-3/+6
| | | | | Suggested by: njl MFC after: 3 days
* First pass at allowing memory to be mapped using cache modes other thanjhb2006-08-111-2/+2
| | | | | | | | | | | | | | | | | | | | WB (write-back) on x86 via control bits in PTEs and PDEs (including making use of the PAT MSR). Changes include: - A new pmap_mapdev_attr() function for amd64 and i386 which takes an additional parameter (relative to pmap_mapdev()) specifying the cache mode for this mapping. Note that on amd64 only WB mappings are done with the direct map, all other modes result in a private mapping. - pmap_mapdev() on i386 and amd64 now defaults to using UC (uncached) mappings rather than WB. Previously we relied on the BIOS setting up MTRR's to enforce memio regions being treated as UC. This might make hw.cbb_start_memory unnecessary in some cases now for example. - A new pmap_mapbios()/pmap_unmapbios() API has been added to allow places that used pmap_mapdev() to map non-device memory (such as ACPI tables) to do so using WB as before. - A new pmap_change_attr() function for amd64 and i386 that changes the caching mode for a range of KVA. Reviewed by: alc
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* Fix an off-by-one error in the port range detection. Cleanup some oldnjl2006-04-041-5/+5
| | | | whitespace.
* Revert to using acpi_max_threads instead of the hardcoded value of '3'.scottl2006-03-301-1/+2
|
* Fix printf arg on 64-bit arch by casting to an int. The IO port is nevernjl2006-03-291-2/+2
| | | | | | more than a couple digits anyway. Pointy hat to: njl
* Add a blacklist for bad IO ports that AML should never touch. It seemsnjl2006-03-291-0/+76
| | | | | | | | | | | | | | some systems were designed so that AML writes to various resources shared with OS drivers, including the RTC, PIC, PCI, etc. These writes could collide with writes by the OS and should never be performed. For now, we print a message if such an access occurs, but do not block it. To block the access, the tunable "debug.acpi.block_bad_io" can be set to 1. In the future, we will flip the switch and this will become the default. Information about this problem was found in Microsoft KB 283649. They block IO accesses if the BIOS indicates via _OSI that it is Windows 2001 or higher. They always block accesses to the PIC, cascaded PIC, and ELCRs, no matter how old the BIOS.
* Add the following to the taskqueue api:scottl2006-01-141-24/+1
| | | | | | | | | | | | | | | | | taskqueue_start_threads(struct taskqueue **, int count, int pri, const char *name, ...); This allows the creation of 1 or more threads that will service a single taskqueue. Also rework the taskqueue_create() API to remove the API change that was introduced a while back. Creating a taskqueue doesn't rely on the presence of a process structure, and the proc mechanics are much better encapsulated in taskqueue_start_threads(). Also clean up the taskqueue_terminate() and taskqueue_free() functions to safely drain pending tasks and remove all associated threads. The TASKQUEUE_DEFINE and TASKQUEUE_DEFINE_THREAD macros have been changed to use the new API, but drivers compiled against the old definitions will still work. Thus, recompiling drivers is not a strict requirement.
* Make tv_sec a time_t on all platforms but alpha. Brings us more in line withtrhodes2005-12-241-2/+2
| | | | | | | | | POSIX. This also makes the struct correct we ever implement an i386-time64 architecture. Not that we need too. Reviewed by: imp, brooks Approved by: njl (acpica), des (no objects, touches procfs) Tested with: make universe
* Catch up with ACPI-CA 20051021 importjkim2005-11-012-5/+7
|
* Canonize the include of acpi.h.obrien2005-09-118-9/+9
|
OpenPOWER on IntegriCloud