------------------------------------------------------------------------ r197134 | rwatson | 2009-09-12 23:03:45 +0300 (Sat, 12 Sep 2009) | 6 lines Use C99 initialization for struct filterops. Obtained from: Mac OS X Sponsored by: Apple Inc. MFC after: 3 weeks ------------------------------------------------------------------------ r197536 | jkim | 2009-09-27 17:00:16 +0300 (Sun, 27 Sep 2009) | 3 lines Copy apm(4) emulation from sys/i386/acpica/acpi_machdep.c and install apm(8) and apm_bios.h on amd64. ------------------------------------------------------------------------ r197863 | jkim | 2009-10-08 20:41:53 +0300 (Thu, 08 Oct 2009) | 8 lines Clean up amd64 suspend/resume code. - Allocate memory for wakeup code after ACPI bus is attached. The early memory allocation hack was inherited from i386 but amd64 does not need it. - Exclude real mode IVT and BDA explicitly. Improve comments about memory allocation and reason for the exclusions. It is a no-op in reality, though. - Remove an unnecessary CLD from wakeup code and re-align. ------------------------------------------------------------------------ r198422 | jkim | 2009-10-23 21:57:52 +0300 (Fri, 23 Oct 2009) | 2 lines Try hiding annoying text cursor after the video controller is reset. ------------------------------------------------------------------------ r198931 | jkim | 2009-11-05 00:39:18 +0200 (Thu, 05 Nov 2009) | 2 lines Tweak memory allocation for amd64 suspend/resume CPU context. ------------------------------------------------------------------------ r200280 | jkim | 2009-12-09 00:38:42 +0200 (Wed, 09 Dec 2009) | 2 lines Simplify a macro not to generate unncessary symbols. ------------------------------------------------------------------------ r200341 | jkim | 2009-12-10 03:01:53 +0200 (Thu, 10 Dec 2009) | 4 lines Implement a rudimentary suspend/resume methods for PCI P2P bridge. Reviewed by: jhb, imp ------------------------------------------------------------------------ r201390 | ed | 2010-01-02 13:07:44 +0200 (Sat, 02 Jan 2010) | 2 lines The last big commit: let usr.sbin/ use WARNS=6 by default. ------------------------------------------------------------------------ r207344 | jkim | 2010-04-29 01:25:27 +0300 (Thu, 29 Apr 2010) | 2 lines Merge ACPICA 20100428. ------------------------------------------------------------------------ r208436 | mav | 2010-05-23 10:53:22 +0300 (Sun, 23 May 2010) | 6 lines Make table-based HPET identification more clever. Before creating fake device, make sure we have no real HPET device entry with same ID. As side effect, it potentially allows several HPETs to be attached. Use first of them for timecounting, rest (if ever present) could later be used as event sources. ------------------------------------------------------------------------ r208438 | mav | 2010-05-23 11:31:15 +0300 (Sun, 23 May 2010) | 2 lines Oops, HPET ID optionally stored in _UID, not in _ADR. ------------------------------------------------------------------------ r208833 | kib | 2010-06-05 18:59:59 +0300 (Sat, 05 Jun 2010) | 15 lines Introduce the x86 kernel interfaces to allow kernel code to use FPU/SSE hardware. Caller should provide a save area that is chained into the stack of the areas; pcb save_area for usermode FPU state is on top. The pcb now contains a pointer to the current FPU saved area, used during FPUDNA handling and context switches. There is also a facility to allow the kernel thread to use pcb save_area. Change the dreaded warnings "npxdna in kernel mode!" into the panics when FPU usage is not registered. KPI discussed with: fabient Tested by: pho, fabient Hardware provided by: Sentex Communications MFC after: 1 month ------------------------------------------------------------------------ r209059 | jhb | 2010-06-11 21:46:34 +0300 (Fri, 11 Jun 2010) | 2 lines Update several places that iterate over CPUs to use CPU_FOREACH(). ------------------------------------------------------------------------ r209065 | jkim | 2010-06-11 22:58:41 +0300 (Fri, 11 Jun 2010) | 2 lines Simplify a function for getting brightness levels. ------------------------------------------------------------------------ r209174 | jkim | 2010-06-14 23:08:26 +0300 (Mon, 14 Jun 2010) | 3 lines Fix ACPI suspend/resume on amd64, which was broken since r208833. We need actual storage for FPU state to save and restore. ------------------------------------------------------------------------ r209371 | mav | 2010-06-21 00:33:29 +0300 (Mon, 21 Jun 2010) | 36 lines Implement new event timers infrastructure. It provides unified APIs for writing event timer drivers, for choosing best possible drivers by machine independent code and for operating them to supply kernel with hardclock(), statclock() and profclock() events in unified fashion on various hardware. Infrastructure provides support for both per-CPU (independent for every CPU core) and global timers in periodic and one-shot modes. MI management code at this moment uses only periodic mode, but one-shot mode use planned for later, as part of tickless kernel project. For this moment infrastructure used on i386 and amd64 architectures. Other archs are welcome to follow, while their current operation should not be affected. This patch updates existing drivers (i8254, RTC and LAPIC) for the new order, and adds event timers support into the HPET driver. These drivers have different capabilities: LAPIC - per-CPU timer, supports periodic and one-shot operation, may freeze in C3 state, calibrated on first use, so may be not exactly precise. HPET - depending on hardware can work as per-CPU or global, supports periodic and one-shot operation, usually provides several event timers. i8254 - global, limited to periodic mode, because same hardware used also as time counter. RTC - global, supports only periodic mode, set of frequencies in Hz limited by powers of 2. Depending on hardware capabilities, drivers preferred in following orders, either LAPIC, HPETs, i8254, RTC or HPETs, LAPIC, i8254, RTC. User may explicitly specify wanted timers via loader tunables or sysctls: kern.eventtimer.timer1 and kern.eventtimer.timer2. If requested driver is unavailable or unoperational, system will try to replace it. If no more timers available or "NONE" specified for second, system will operate using only one timer, multiplying it's frequency by few times and uing respective dividers to honor hz, stathz and profhz values, set during initial setup. ------------------------------------------------------------------------ r209402 | mav | 2010-06-21 23:27:32 +0300 (Mon, 21 Jun 2010) | 5 lines Fix ia64 build broken by r209371. ia64, same as amd64 has ACPI and always has APIC. Submitted by: jhb@ ------------------------------------------------------------------------ r209431 | mav | 2010-06-22 19:10:48 +0300 (Tue, 22 Jun 2010) | 5 lines Do not set level-triggered interrupt mode if we are not going to use it. This fixes QEMU crash due to unsupported level-triggered HPET interrupts. Reported by: kib@ ------------------------------------------------------------------------ r209440 | mav | 2010-06-22 22:42:27 +0300 (Tue, 22 Jun 2010) | 11 lines Add "legacy route" support to HPET driver. When enabled, this mode makes HPET to steal IRQ0 from i8254 and IRQ8 from RTC timers. It can be suitable for HPETs without FSB interrupts support, as it gives them two unshared IRQs. It allows them to provide one per-CPU event timer on dual-CPU system, that should be suitable for further tickless kernels. To enable it, such lines may be added to /boot/loader.conf: hint.atrtc.0.clock=0 hint.attimer.0.clock=0 hint.hpet.0.legacy_route=1 ------------------------------------------------------------------------ r209746 | jkim | 2010-07-06 23:57:28 +0300 (Tue, 06 Jul 2010) | 2 lines Merge ACPICA 20100702. ------------------------------------------------------------------------ r209747 | jkim | 2010-07-07 00:41:08 +0300 (Wed, 07 Jul 2010) | 2 lines Fix mis-merges in the previous commit. ------------------------------------------------------------------------ r209990 | mav | 2010-07-13 15:46:06 +0300 (Tue, 13 Jul 2010) | 4 lines Rise knowledge about curthread->td_intr_frame by one step. Make timer callback argument really opaque. Not repeat interrupt handler's problem in case somebody will ever need to have both argument and frame. ------------------------------------------------------------------------ r210150 | jkim | 2010-07-16 02:24:06 +0300 (Fri, 16 Jul 2010) | 3 lines If there is any pending sleep request, disallow entering S5 state. Otherwise, bad things may happen. ;-) ------------------------------------------------------------------------ r210290 | mav | 2010-07-20 13:58:56 +0300 (Tue, 20 Jul 2010) | 5 lines Extend timer driver API to report also minimal and maximal supported period lengths. Make MI wrapper code to validate periods in request. Make kernel clock management code to honor these hardware limitations while choosing hz, stathz and profhz values. ------------------------------------------------------------------------ r210298 | mav | 2010-07-20 18:48:29 +0300 (Tue, 20 Jul 2010) | 2 lines Fix several un-/signedness bugs of r210290 and r210293. Add one more check. ------------------------------------------------------------------------ r210514 | jkim | 2010-07-26 22:53:09 +0300 (Mon, 26 Jul 2010) | 6 lines Re-implement FPU suspend/resume for amd64. This removes superfluous uses of critical_enter(9) and critical_exit(9) by fpugetregs() and fpusetregs(). Also, we do not touch PCB flags any more. MFC after: 1 month ------------------------------------------------------------------------ r210614 | jkim | 2010-07-29 19:41:21 +0300 (Thu, 29 Jul 2010) | 2 lines Rename PCB_USER_FPU to PCB_USERFPU not to clash with a macro from fpu.h. ------------------------------------------------------------------------ r210632 | yongari | 2010-07-29 23:42:38 +0300 (Thu, 29 Jul 2010) | 6 lines Consistently check header type after reading PCIR_HDRTYPE register. While I'm here use defined macro instead of using magic numbers for header type. Reviewed by: jhb ------------------------------------------------------------------------ r210777 | jkim | 2010-08-02 20:35:00 +0300 (Mon, 02 Aug 2010) | 13 lines - Merge savectx2() with savectx() and struct xpcb with struct pcb. [1] savectx() is only used for panic dump (dumppcb) and kdb (stoppcbs). Thus, saving additional information does not hurt and it may be even beneficial. Unfortunately, struct pcb has grown larger to accommodate more data. Move 512-byte long pcb_user_save to the end of struct pcb while I am here. - savectx() now saves FPU state unconditionally and copy it to the PCB of FPU thread if necessary. This gives panic dump and kdb a chance to take a look at the current FPU state even if the FPU is "supposedly" not used. - Resuming CPU now unconditionally reinitializes FPU. If the saved FPU state was irrelevant, it could be in an unknown state. Suggested by: bde [1] ------------------------------------------------------------------------ r210804 | jkim | 2010-08-03 18:32:08 +0300 (Tue, 03 Aug 2010) | 6 lines savectx() has not been used for fork(2) for about 15 years. [1] Do not clobber FPU thread's PCB as it is more harmful. When we resume CPU, unconditionally reload FPU state. Pointed out by: bde [1] ------------------------------------------------------------------------ r210810 | jkim | 2010-08-03 19:08:58 +0300 (Tue, 03 Aug 2010) | 2 lines Remove an unnecessary register load. ------------------------------------------------------------------------ r210864 | jhb | 2010-08-05 19:10:12 +0300 (Thu, 05 Aug 2010) | 8 lines - Retire acpi_pcib_resume(). It is has just been an alias for bus_generic_resume() since the pci_link(4) driver was added. - Change the ACPI PCI-PCI bridge driver to inherit most of its methods from the generic PCI-PCI bridge driver. In particular, this will now restore PCI config registers for ACPI PCI-PCI bridges. Tested by: Oleg Sharoyko osharoiko of gmail ------------------------------------------------------------------------ r210940 | jkim | 2010-08-06 18:59:00 +0300 (Fri, 06 Aug 2010) | 2 lines Correct argument order of acpi_restorecpu(), which was forgotten in r210804. ------------------------------------------------------------------------ r210942 | jkim | 2010-08-06 20:21:32 +0300 (Fri, 06 Aug 2010) | 2 lines Remove unnecessary casting and simplify code. We are not there yet. ;-) ------------------------------------------------------------------------ r210976 | jkim | 2010-08-07 02:11:19 +0300 (Sat, 07 Aug 2010) | 2 lines Merge ACPICA 20100806. ------------------------------------------------------------------------ r211196 | takawata | 2010-08-12 02:21:25 +0300 (Thu, 12 Aug 2010) | 4 lines Add TCG ACPI spec table (TCPA) support. Submitted by: Hans-Joerg_Hoexer@genua.de ------------------------------------------------------------------------ r211202 | jkim | 2010-08-12 03:20:46 +0300 (Thu, 12 Aug 2010) | 4 lines Reset switchtime and switchticks after resynchronizing the system clock. This should fix weird runtime problem after resume on amd64. It also fixes "calcru: runtime went backwards" warnings with bootverbose. ------------------------------------------------------------------------ r211219 | takawata | 2010-08-12 14:01:38 +0300 (Thu, 12 Aug 2010) | 2 lines Fix tindebox breakage about format warning. ------------------------------------------------------------------------ r211221 | takawata | 2010-08-12 16:58:46 +0300 (Thu, 12 Aug 2010) | 2 lines Fix breakage on 64bit architecture by using inttypes.h macro. ------------------------------------------------------------------------ r211252 | takawata | 2010-08-13 03:45:30 +0300 (Fri, 13 Aug 2010) | 2 lines Fix build on amd64 and ia64. ------------------------------------------------------------------------ r211278 | takawata | 2010-08-13 12:58:17 +0300 (Fri, 13 Aug 2010) | 4 lines use uintmax_t instead of uint64_t. Pointed out by: des. ------------------------------------------------------------------------ r211292 | jkim | 2010-08-14 01:08:42 +0300 (Sat, 14 Aug 2010) | 5 lines Reset switchtime to zero rather than the current CPU ticker (TSC) value. It is more appropriate in this context because TSC MSR is reset to zero when the CPU is restarted from S3 and above. Move acpi_resync_clock() back to where it was before r211202. It does not make a difference any more. ------------------------------------------------------------------------ r211430 | jhb | 2010-08-17 18:44:52 +0300 (Tue, 17 Aug 2010) | 9 lines Add a new method to the PCI bridge interface, PCIB_POWER_FOR_SLEEP(). This method is used by the PCI bus driver to query the power management system to determine the proper device state to be used for a device during suspend and resume. For the ACPI PCI bridge drivers this calls acpi_device_pwr_for_sleep(). This removes ACPI-specific knowledge from the PCI and PCI-PCI bridge drivers. Reviewed by: jkim ------------------------------------------------------------------------ r211437 | rpaulo | 2010-08-17 23:39:28 +0300 (Tue, 17 Aug 2010) | 12 lines For every instance of '.if ${CC} == "foo"' or '.if ${CC} != "foo"' in Makefiles or *.mk files, use ${CC:T:Mfoo} instead, so only the basename of the compiler command (excluding any arguments) is considered. This allows you to use, for example, CC="/nondefault/path/clang -xxx", and still have the various tests in bsd.*.mk identify your compiler as clang correctly. ICC if cases were also changed. Submitted by: Dimitry Andric ------------------------------------------------------------------------ r211763 | mav | 2010-08-24 21:07:59 +0300 (Tue, 24 Aug 2010) | 4 lines When ACPI reports current battery consumption rate in mAmps, print it also in mWatts. Values in mAmps are not always suitable, because they depend on battery voltage, which depends on battery type and charge level. ------------------------------------------------------------------------ r212238 | mav | 2010-09-05 22:24:32 +0300 (Sun, 05 Sep 2010) | 16 lines Several improvements to HPET driver: - Add special check for case when time expires before being programmed. This fixes interrupt loss and respectively timer death on attempt to program very short interval. Increase minimal supported period to more realistic value. - Add support for hint.hpet.X.allowed_irqs tunable, allowing manually specify which interrupts driver allowed to use. Unluckily, many BIOSes program wrong allowed interrupts mask, so driver tries to stay on safe side by not using unshareable ISA IRQs. This option gives control over this limitation, allowing more per-CPU timers to be provided, when FSB interrupts are not supported. Value of this tunable is bitmask. - Do not use regular interrupts on virtual machines. QEMU and VirtualBox do not support them properly, that may cause problems. Stay safe by default. Same time both QEMU and VirtualBox work fine in legacy_route mode. VirtualBox also works fine if manually specify allowed ISA IRQs with above. ------------------------------------------------------------------------ r212323 | mav | 2010-09-08 19:59:22 +0300 (Wed, 08 Sep 2010) | 6 lines During SMP startup there is time window, when SMP started, but interrupts are still bound to BSP. It confuses timer management logic in per-CPU mode and may cause timer not being reloaded. Check such cases on interrupt arival and reload timer to give system some more time to manage proper binding. ------------------------------------------------------------------------ r212491 | mav | 2010-09-12 14:11:53 +0300 (Sun, 12 Sep 2010) | 3 lines Instead of storing last event timestamp, store the next event timestamp. It corrects handling of the first event offset in emulated periodic mode. ------------------------------------------------------------------------ r212533 | mav | 2010-09-13 09:32:56 +0300 (Mon, 13 Sep 2010) | 3 lines Add tunable 'hint.hpet.X.per_cpu' to specify how much per-CPU timers driver should provide if there is sufficient hardware. Default is 1. ------------------------------------------------------------------------ r212541 | mav | 2010-09-13 10:25:35 +0300 (Mon, 13 Sep 2010) | 43 lines Refactor timer management code with priority to one-shot operation mode. The main goal of this is to generate timer interrupts only when there is some work to do. When CPU is busy interrupts are generating at full rate of hz + stathz to fullfill scheduler and timekeeping requirements. But when CPU is idle, only minimum set of interrupts (down to 8 interrupts per second per CPU now), needed to handle scheduled callouts is executed. This allows significantly increase idle CPU sleep time, increasing effect of static power-saving technologies. Also it should reduce host CPU load on virtualized systems, when guest system is idle. There is set of tunables, also available as writable sysctls, allowing to control wanted event timer subsystem behavior: kern.eventtimer.timer - allows to choose event timer hardware to use. On x86 there is up to 4 different kinds of timers. Depending on whether chosen timer is per-CPU, behavior of other options slightly differs. kern.eventtimer.periodic - allows to choose periodic and one-shot operation mode. In periodic mode, current timer hardware taken as the only source of time for time events. This mode is quite alike to previous kernel behavior. One-shot mode instead uses currently selected time counter hardware to schedule all needed events one by one and program timer to generate interrupt exactly in specified time. Default value depends of chosen timer capabilities, but one-shot mode is preferred, until other is forced by user or hardware. kern.eventtimer.singlemul - in periodic mode specifies how much times higher timer frequency should be, to not strictly alias hardclock() and statclock() events. Default values are 2 and 4, but could be reduced to 1 if extra interrupts are unwanted. kern.eventtimer.idletick - makes each CPU to receive every timer interrupt independently of whether they busy or not. By default this options is disabled. If chosen timer is per-CPU and runs in periodic mode, this option has no effect - all interrupts are generating. As soon as this patch modifies cpu_idle() on some platforms, I have also refactored one on x86. Now it makes use of MONITOR/MWAIT instrunctions (if supported) under high sleep/wakeup rate, as fast alternative to other methods. It allows SMP scheduler to wake up sleeping CPUs much faster without using IPI, significantly increasing performance on some highly task-switching loads. Tested by: many (on i386, amd64, sparc64 and powerc) H/W donated by: Gheorghe Ardelean Sponsored by: iXsystems, Inc. ------------------------------------------------------------------------ r212761 | jkim | 2010-09-16 23:08:00 +0300 (Thu, 16 Sep 2010) | 2 lines Merge ACPICA 20100915. ------------------------------------------------------------------------ r212997 | mav | 2010-09-22 14:32:22 +0300 (Wed, 22 Sep 2010) | 3 lines Quick fix for unmotivated C2 state usage during boot, introduced at r212541. That caused LAPIC timer failure and huge delays during boot on some systems. ------------------------------------------------------------------------ r213302 | mav | 2010-09-30 19:23:01 +0300 (Thu, 30 Sep 2010) | 5 lines Do not use regular interrupts on NVidia HPETs. NVidia MCP5x chipsets have number of unexplained interrupt problems. For some reason, using HPET interrupts there breaks HDA sound. Legacy route mode interrupts reported to work fine there. ------------------------------------------------------------------------ r213755 | jkim | 2010-10-13 03:21:53 +0300 (Wed, 13 Oct 2010) | 4 lines Use AcpiReset() from ACPICA instead of rolling our own, which is actually incomplete. If FADT says the register is available, enable the capability by default. Remove the previous default value from acpi(4). ------------------------------------------------------------------------ r213772 | rpaulo | 2010-10-13 14:38:24 +0300 (Wed, 13 Oct 2010) | 3 lines Mark acpi_bus_number() as __unused. This allows clang to this file without any warnings. ------------------------------------------------------------------------ r213783 | jkim | 2010-10-13 19:30:41 +0300 (Wed, 13 Oct 2010) | 4 lines Remove acpi_bus_number() completely. It had to be removed in r212761. Pointed out by: jhb ------------------------------------------------------------------------ r213787 | jkim | 2010-10-13 20:06:25 +0300 (Wed, 13 Oct 2010) | 2 lines Clean up unused headers. ------------------------------------------------------------------------ r214068 | jkim | 2010-10-19 21:43:11 +0300 (Tue, 19 Oct 2010) | 2 lines Make any PCI devices enumerated in ACPI tree honor do_power_resume as well. ------------------------------------------------------------------------ r214072 | jkim | 2010-10-19 22:53:06 +0300 (Tue, 19 Oct 2010) | 13 lines Remove PCI_SET_POWERSTATE method from acpi.c and eradicate all PCI-specific knowledges from the file. All PCI devices enumerated in ACPI tree must use correct one from acpi_pci.c any way. Reduce duplicate codes as we did for pci.c in r213905. Do not return ESRCH from PCIB_POWER_FOR_SLEEP method. When the method is not found, just return zero without modifying the given default value as it is completely optional. As a side effect, the return state must not be NULL. Note there is actually no functional change by removing ESRCH because acpi_pcib_power_for_sleep() always returns zero. Adjust debugging messages and add new ones under bootverbose to help debugging device power state related issues. Reviewed by: jhb, imp (earlier versions) ------------------------------------------------------------------------ r214076 | jkim | 2010-10-19 23:38:21 +0300 (Tue, 19 Oct 2010) | 6 lines Remove undocumented and stale debug.acpi.do_powerstate tunable. It was added with hw.pci.do_powerstate but the PCI version was splitted into two separate tunables later and now this is completely stale. To make it worse, PCI devices enumerated in ACPI tree ignore this tunable as it is handled by a function in acpi_pci.c instead. ------------------------------------------------------------------------ r214109 | jkim | 2010-10-20 19:40:14 +0300 (Wed, 20 Oct 2010) | 2 lines Do not apply do_power_resume for suspending P2P bridge as we did in r214064. ------------------------------------------------------------------------ r214110 | jkim | 2010-10-20 19:47:09 +0300 (Wed, 20 Oct 2010) | 4 lines Introduce a new tunable 'hw.pci.do_power_suspend'. This tunable lets you avoid PCI power state transition from D0 to D3 for suspending case. Default is 1 or enabled. ------------------------------------------------------------------------ r214390 | jkim | 2010-10-26 21:59:50 +0300 (Tue, 26 Oct 2010) | 18 lines Add two new loader tunables 'hw.acpi.install_interface' and 'hw.acpi.remove_interface'. hw.acpi.install_interface lets you install new interfaces. Conversely, hw.acpi.remove_interface lets you remove OS interfaces from the pre-defined list in ACPICA. For example, hw.acpi.install_interface="FreeBSD" lets _OSI("FreeBSD") method to return 0xffffffff (or success) and hw.acpi.remove_interface="Windows 2009" lets _OSI("Windows 2009") method to return zero (or failure). Both are comma-separated lists and leading white spaces are ignored. For example, the following examples are valid: hw.acpi.install_interface="Linux, FreeBSD" hw.acpi.remove_interface="Windows 2006, Windows 2006.1" ------------------------------------------------------------------------ r214630 | jhb | 2010-11-01 19:40:35 +0200 (Mon, 01 Nov 2010) | 2 lines Move the header to . ------------------------------------------------------------------------ r214631 | jhb | 2010-11-01 20:18:46 +0200 (Mon, 01 Nov 2010) | 2 lines Move to . ------------------------------------------------------------------------ r214765 | jkim | 2010-11-04 01:16:35 +0200 (Thu, 04 Nov 2010) | 4 lines Adjust a comment to clarify why \_SB_ and \_TZ_ are defined as device type in ACPICA. Reshuffle the code a bit to make sure this kludge only applies to these two specical cases and to make it cleaner. ------------------------------------------------------------------------ r214848 | jkim | 2010-11-05 21:50:09 +0200 (Fri, 05 Nov 2010) | 13 lines Fix a use-after-free bug for extended IRQ resource[1]. When _PRS buffer is copied as a template for _SRS, a string pointer for descriptor name is also copied and it becomes stale as soon as it gets de-allocated[2]. Now _CRS is used as a template for _SRS as ACPI specification suggests if it is usable. The template from _PRS is still utilized but only when _CRS is not available or broken. To avoid use-after-free the problem in this case, however, only mandatory fields are copied, optional data is removed, and structure length is adjusted accordingly. Reported by: hps[1] Analyzed by: avg[2] Tested by: hps ------------------------------------------------------------------------ r214849 | jkim | 2010-11-05 22:24:26 +0200 (Fri, 05 Nov 2010) | 2 lines Add a forgotten change from the previous commit. ------------------------------------------------------------------------ r214998 | jkim | 2010-11-08 21:52:14 +0200 (Mon, 08 Nov 2010) | 2 lines Consistently use padding `_' in the comment. ------------------------------------------------------------------------ r215002 | jhb | 2010-11-08 22:05:22 +0200 (Mon, 08 Nov 2010) | 2 lines A few small style and whitespace fixes. ------------------------------------------------------------------------ r215023 | jkim | 2010-11-09 02:14:39 +0200 (Tue, 09 Nov 2010) | 2 lines Reduce diff between platforms and fix style(9) bugs. ------------------------------------------------------------------------ r215024 | jkim | 2010-11-09 02:27:18 +0200 (Tue, 09 Nov 2010) | 2 lines Now OsdEnvironment.c is identical on amd64 and i386. Move it to a new home. ------------------------------------------------------------------------ r215072 | jkim | 2010-11-10 03:29:56 +0200 (Wed, 10 Nov 2010) | 3 lines Refactor acpi_machdep.c for amd64 and i386, move APM emulation into a new file acpi_apm.c, and place it on sys/x86/acpica. ------------------------------------------------------------------------ r215097 | jkim | 2010-11-10 20:50:12 +0200 (Wed, 10 Nov 2010) | 3 lines Make APM emulation look more closer to its origin. Use device_get_softc(9) instead of hardcoding acpi(4) unit number as we have device_t for it. ------------------------------------------------------------------------