summaryrefslogtreecommitdiffstats
path: root/sys/i386/acpica
Commit message (Collapse)AuthorAgeFilesLines
* - Call acpi_Startup() before parsing interrupt-related APIC resources so wejhb2004-01-261-7/+43
| | | | | | | | | | | | | | | | | can look at the ACPI tables. If the startup fails, we panic and tell the user to try rebooting with ACPI disabled. Previously in this case we would try to use $PIR interrupt routing which only works for the atpic while using the apic to handle interrupts which would result in misrouted interrupts and a hang at boot time with no error message. - Read the SCI out of the FADT instead of hardcoding 9 when checking to see if an interrupt override entry is for the SCI. - Try to work around some BIOS brain damage for the SCI's programming by forcing the SCI to be level triggered and active low if it is routed to a non-ISA interrupt (greater than 15) or if it is identity mapped with edge trigger and active high polarity. This should fix some of the hangs with device apic and ACPI that some people see. Reviewed by: njl
* Only remove the handler if we installed it.njl2004-01-121-2/+4
|
* Clean up the probe message and sort the function table according tonjl2004-01-121-3/+3
| | | | the function order in the file.
* Add the ACPI Toshiba extras driver (hotkeys, LCD backlight, video output,njl2004-01-111-0/+485
| | | | | | | | | | | forced fan control, and CPU throttling). PR: Submitted by: Hiroyuki Aizu <aizu@navi.org> Reviewed by: Approved by: Obtained from: MFC after:
* Use <machine/asmacros.h> since <machine/asm.h> is a userland-only headernjl2004-01-011-3/+3
| | | | | | | | | | | and gives very wrong macros for ENTRY(), etc. for kernel programs. PR: Suggested by: bde Reviewed by: Approved by: Obtained from: MFC after:
* Use the ACPI-CA definitions for the various APIC tables instead of ournjl2003-12-091-59/+55
| | | | own.
* - Reorder the APIC enumerator SYSINIT's to register enumeators atjhb2003-12-031-3/+2
| | | | | | | | | | | | | | SI_SUB_CPU - 1 and probe enumerators, probe CPUs, and setup the local APIC programming all at SI_SUB_CPU / SI_ORDER_FIRST. This is needed to help get the ACPI module working again as it moves the APIC enumeration code after SI_SUB_KLD. - In the MADT parser, use mp_maxid rather than MAXCPU to terminate a loop when assigning per-cpu ACPI IDs to avoid a dependency on 'options SMP'. - Allow the apic device to be disabled via 'hint.apic.0.disabled' from the loader. Note that since this is done in the local APIC code, it works for both the ACPI and non-ACPI cases. Approved by: re (scott / blanket)
* Minor source sync with amd64. For %.*s printf formats, pass in anpeter2003-11-141-3/+5
| | | | | int rather than a size_t. cast the ioapicaddress variable via uintptr_t before going to void *.
* Some motherboards like to remap the SCI (normally IRQ 9) up to a PCIjhb2003-11-111-1/+6
| | | | | | | | | | | | | | | | | interrupt such as IRQ 22 or 19. However, the ACPI BIOS still routes interrupts from some PCI devices to the same intpin calling the pin IRQ 22. Thus, ACPI expects to address a single interrupt source via two different names. To work around this, if the SCI is remapped to a non-ISA interrupt (i.e., greater than 15), then we use acpi_OverrideInterruptLevel() function to tell ACPI to use IRQ 22 or 19 rather than IRQ 9 for the SCI. Previously we would change IRQ 22 or 19's name to IRQ 9 when we encountered such an Interrupt Source Override entry in the MADT which routed the SCI properly but left PCI devices mapped to IRQ 22 or 19 w/o a routable interrupt. Tested by: sos
* Bump APIC ID limits up to 32 since a machine with 16 CPUs will have APICjhb2003-11-101-2/+2
| | | | | | IDs for the I/O APICs that are greater than 16. Reported by: John Cagle <john.cagle@hp.com>
* Only disable the old pin when doing a remap if it's current vector is stilljhb2003-11-061-1/+2
| | | | | | the old vector. Reported by: sam
* When remapping an ISA interrupt from one intpin to another, disable thejhb2003-11-051-8/+16
| | | | | | | | | pin that is used by the default identity mapping if it still maps to the old vector. The ACPI case might need some tweaking for the SCI interrupt case since ACPI likes to address the intpin using both the IRQ remapped to it as well as the previous existing PCI IRQ mapped to it. Reported by: kan
* Make this compile with PAE.peter2003-11-041-5/+6
|
* - Update includes.jhb2003-11-031-3/+4
| | | | | | - Use intr_suspend/resume() callouts to the interrupt code layer which suspends and resumes all the known interrupt sources instead of calling icu_reinit() directly.
* Add the ACPI MADT table APIC enumerator. This code uses the ACPI Multiplejhb2003-11-031-0/+650
| | | | | | | | | | APIC Descriptor Table to enumerate both I/O APICs and local APICs. ACPI does not embed PCI interrupt routing information in the MADT like the MP Table does. Instead, ACPI stores the PCI interrupt routing information in the _PRT object under each PCI bus device. The MADT table simply provides hints about which interrupt vectors map to which I/O APICs. Thus when using ACPI, the existing ACPI PCI bridge drivers are sufficient to route PCI interrupts.
* Fix the logic to match the new name of the tunable.njl2003-11-011-1/+1
| | | | Pointed out by: iwasaki
* Change the reset video option to be positive (hw.acpi.reset_video).njl2003-11-014-26/+27
| | | | | | | | | | | | | Requested by: jhb Initialize the real mode stack. This is needed at least for the return address from the lcall. Requested by: takawata Fix style bugs in acpi_wakecode.S Requested by: bde Remove the kernel option now that we have the tunable.
* Add sysctl MIB and loader tunable `hw.acpi.no_reset_video' asiwasaki2003-10-303-0/+17
| | | | the same effect as ACPI_NO_RESET_VIDEO kernel option.
* Add kernel option ACPI_NO_RESET_VIDEO as workaround for problemsiwasaki2003-10-292-0/+6
| | | | | (e.g. LCD white-out after resume) on some machine cased by re-initialize video BIOS code in acpi_wakecode.
* Call the VESA reset BIOS vector on the resume path. This may help displaysnjl2003-10-271-0/+9
| | | | after resume. I have not found it to break anything.
* - Eliminate the pte object.alc2003-09-251-9/+0
| | | | | - Use kmem_alloc_nofault() rather than kmem_alloc_pageable() to allocate KVA space for the page directory page(s). Submitted by: tegge
* Add final adjustment code of battery status based on the battery capacityiwasaki2003-09-171-0/+9
| | | | rather than returning unknown status.
* Finish an earlier commit:jhb2003-09-101-3/+11
| | | | | Add a acpi_SetDefaultIntrModel() method to allow drivers to set the interrupt model prior to the acpi0 device being probed and attached.
* Don't disable interrupts a second time. Remove an extraneous interruptnjl2003-09-081-4/+1
| | | | | | | enable (that happens elsewhere). Clarify the interrupt disabling point by using ACPI_DISABLE_IRQS(). Tested by: Kevin Oberman
* Use the ACPICA AcpiEnterSleepStateS4bios instead of rolling our own. Thisnjl2003-08-291-3/+4
| | | | | | change also disables interrupts around non-S4 suspends whereas before we did not do this. Our version of AcpiEnterSleepStateS4bios was almost identical to the ACPICA version.
* Style cleanups.njl2003-08-284-72/+35
|
* Use ACPI_FLUSH_CPU_CACHE() instead of wbinvd(). Verified .o with md5.njl2003-07-301-1/+1
| | | | Pointed out by: Mark Santcroos <marks@ripe.net>
* Commit Ian Dowse's workaround for acpi resume resetting after thepeter2003-07-211-0/+8
| | | | | | | | | | LAZY_SWITCH changes. He pointed out the acpi code sets up an identity mapping in the current vmspace and that got messed up by the %cr3 being out of sync with the current page directory. As a workaround, restore %cr3 across the sleep/resume. A more complete fix would be to undo the lazy state and clear the pm_active bit from the borrowed pmap, but this works and people are currently hurting. I'll clean this up. This is mostly Ian's patch, plus a PAE tweak from me.
* Mega busdma API commit.scottl2003-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs
* Use __FBSDID().obrien2003-06-024-8/+12
|
* Add some extra #ifdef stubs so that this compiles on 4.8.jhb2003-05-132-0/+9
| | | | Approved by: re (rwatson/bmah)
* - Add vm_paddr_t, a physical address type. This is required for systemsjake2003-03-251-1/+1
| | | | | | | | | | | | | | | where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
* Use repo-copied files in sys/i386/bios.mdodd2003-03-241-1/+1
|
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+7
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Export the physical address of the RSDP to userland by meansmarcel2002-12-181-11/+29
| | | | | | | | | | of the `machdep.acpi_root' sysctl. This is required on ia64 because the root pointer hardly ever, if at all, lives in the first MB of memory and also because scanning the first MB of memory can cause machine checks. This provides a save and reliable way for ACPI tools to work with the tables if ACPI support is present in the kernel. On ia64 ACPI is non-optional.
* Hold the page queues lock around calls to pmap_remove().alc2002-12-041-0/+2
| | | | Approved by: re
* Add `if (!cold)' checkings for functions which is called via SYSINIT.iwasaki2002-11-241-0/+3
| | | | | | | Loading acpi.ko with kldload is disallowed, however some functions were executed unexpectedly. Approved by: re
* *sigh*. It seems that in the ACPICA code, Intel defines its own APIC_IOjhb2002-11-211-1/+1
| | | | | | | | | | macro for use when parsing MADT tables, thus we always tried to set the interrupt model to APIC. This proved to be harmful on UP machines with IO APIC's (or for UP kernels on SMP machines) since the wrong interrupt routing information would be returned. Pointy hat to: jhb Approved by: re (rwatson)
* - curproc may be NULL in 4-stable. In that case use the vmspace fromjhb2002-10-161-2/+4
| | | | | | | proc0. - Remove unused include. Sponsored by: The Weather Channel
* Include <sys/select.h> on -stable instead of <sys/selinfo.h> to get thejhb2002-10-161-0/+4
| | | | | | definition of struct selinfo. Sponsored by: The Weather Channel
* Use d_thread_t for cdevsw functions instead of struct thread * so that itjhb2002-10-091-4/+4
| | | | is easier to share this code with 4-stable.
* Trash the PnPBIOStable pointer later on when we know that the acpi probejhb2002-09-302-6/+6
| | | | | | and attach routines have succeeded so that if they fail we can still use the PnP BIOS to find ISA on-board devices. The fact that we do this here is gross but fixing it properly involves a lot more work.
* Wrap GCC-specific asm() code in #ifdef __GNUC__markm2002-09-211-0/+2
|
* If we are using APIC_IO tell ACPI so it can route interrupts properly.jhb2002-09-061-0/+3
| | | | | This still doesn't work quite right because of other APIC_IO hacks in the i386 PCI code.
* Replace (ab)uses of "NULL" where "0" is really meant.archie2002-08-222-3/+3
|
* Improve stack manipulation code of ACPI wakeup routine.iwasaki2002-08-071-2/+2
| | | | | | | The new code just override stack top value with saved return address rather than pop/push operation. Submitted by: jhb
* Fix a bug about stack manipulation at ACPI wakeup.iwasaki2002-08-011-0/+1
| | | | | | | This should avoid kernel panic on kernel compiled w/o NO_CPU_COPTFLAGS. Suggested by: optimized code by -mcpu=pentiumpro
* Resolve conflicts arising from the ACPI CA 20020404 import.iwasaki2002-06-301-1/+1
|
* Make this compile with gcc-3.1, which objects to the multi-line string.peter2002-05-191-64/+64
|
* Makefile uses genwakecode.sh now.peter2002-05-021-22/+0
|
OpenPOWER on IntegriCloud