Remove APM BIOS support
APM BIOS was relevant only to early laptops (approximately P166 or P200 and slower). These have not been relevant for a long time, and this code has been untested for a long time (as far as I can tell). The APM compat code in ACPI and the apm(8) command is not being retired. Both of these items are still in use (apm(8) is more scriptable than the replacement acpiconf, for the most part). This has been commented out of i386 GENERIC since 2002. This code is not relevant to any other port. Discussed on: arch@
This commit is contained in:
parent
28942db891
commit
8c576a279e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366546
@ -162,7 +162,6 @@ acpi_wakedata.h optional acpi \
|
|||||||
no-obj no-implicit-rule before-depend \
|
no-obj no-implicit-rule before-depend \
|
||||||
clean "acpi_wakedata.h"
|
clean "acpi_wakedata.h"
|
||||||
#
|
#
|
||||||
i386/bios/apm.c optional apm
|
|
||||||
i386/bios/smapi.c optional smapi
|
i386/bios/smapi.c optional smapi
|
||||||
i386/bios/smapi_bios.S optional smapi
|
i386/bios/smapi_bios.S optional smapi
|
||||||
i386/cloudabi32/cloudabi32_sysvec.c optional compat_cloudabi32
|
i386/cloudabi32/cloudabi32_sysvec.c optional compat_cloudabi32
|
||||||
|
@ -1,95 +0,0 @@
|
|||||||
/*-
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*
|
|
||||||
* Copyright (c) 1999 Nick Sayer (who stole shamelessly from blank_saver)
|
|
||||||
* 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, immediately at the beginning of the file.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* 3. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
||||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
||||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
||||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, 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 DAMAGE.
|
|
||||||
*
|
|
||||||
* $FreeBSD$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/systm.h>
|
|
||||||
#include <sys/condvar.h>
|
|
||||||
#include <sys/kernel.h>
|
|
||||||
#include <sys/kthread.h>
|
|
||||||
#include <sys/lock.h>
|
|
||||||
#include <sys/module.h>
|
|
||||||
#include <sys/mutex.h>
|
|
||||||
#include <sys/consio.h>
|
|
||||||
#include <sys/fbio.h>
|
|
||||||
|
|
||||||
#include <dev/fb/fbreg.h>
|
|
||||||
#include <dev/fb/splashreg.h>
|
|
||||||
#include <dev/syscons/syscons.h>
|
|
||||||
|
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <machine/apm_bios.h>
|
|
||||||
#include <machine/pc/bios.h>
|
|
||||||
#include <machine/bus.h>
|
|
||||||
#include <i386/bios/apm.h>
|
|
||||||
|
|
||||||
extern int apm_display(int newstate);
|
|
||||||
|
|
||||||
extern struct apm_softc apm_softc;
|
|
||||||
|
|
||||||
static int blanked=0;
|
|
||||||
|
|
||||||
static int
|
|
||||||
apm_saver(video_adapter_t *adp, int blank)
|
|
||||||
{
|
|
||||||
if (!apm_softc.initialized || !apm_softc.active)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (blank==blanked)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
blanked=blank;
|
|
||||||
|
|
||||||
apm_display(!blanked);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
apm_init(video_adapter_t *adp)
|
|
||||||
{
|
|
||||||
if (!apm_softc.initialized || !apm_softc.active)
|
|
||||||
printf("WARNING: apm_saver module requires apm enabled\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
apm_term(video_adapter_t *adp)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static scrn_saver_t apm_module = {
|
|
||||||
"apm_saver", apm_init, apm_term, apm_saver, NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
SAVER_MODULE(apm_saver, apm_module);
|
|
||||||
MODULE_DEPEND(apm_saver, apm, 1, 1, 1);
|
|
1526
sys/i386/bios/apm.c
1526
sys/i386/bios/apm.c
File diff suppressed because it is too large
Load Diff
@ -1,52 +0,0 @@
|
|||||||
/*-
|
|
||||||
* APM (Advanced Power Management) BIOS Device Driver
|
|
||||||
*
|
|
||||||
* Copyright (c) 1994 UKAI, Fumitoshi.
|
|
||||||
* Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org>
|
|
||||||
* Copyright (c) 1996 Nate Williams <nate@FreeBSD.org>
|
|
||||||
* Copyright (c) 1997 Poul-Henning Kamp <phk@FreeBSD.org>
|
|
||||||
*
|
|
||||||
* This software may be used, modified, copied, and distributed, in
|
|
||||||
* both source and binary form provided that the above copyright and
|
|
||||||
* these terms are retained. Under no circumstances is the author
|
|
||||||
* responsible for the proper functioning of this software, nor does
|
|
||||||
* the author assume any responsibility for damages incurred with its
|
|
||||||
* use.
|
|
||||||
*
|
|
||||||
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
|
|
||||||
*
|
|
||||||
* $FreeBSD$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __APM_H__
|
|
||||||
#define __APM_H__
|
|
||||||
|
|
||||||
#define APM_NEVENTS 16
|
|
||||||
#define APM_NPMEV 13
|
|
||||||
#define APM_UNKNOWN 0xff
|
|
||||||
|
|
||||||
/* static data */
|
|
||||||
struct apm_softc {
|
|
||||||
struct mtx mtx;
|
|
||||||
struct cv cv;
|
|
||||||
struct proc *event_thread;
|
|
||||||
int initialized, active, running, bios_busy;
|
|
||||||
int always_halt_cpu, slow_idle_cpu;
|
|
||||||
int disabled, disengaged;
|
|
||||||
int suspending;
|
|
||||||
int standby_countdown, suspend_countdown;
|
|
||||||
u_int minorversion, majorversion;
|
|
||||||
u_int intversion, connectmode;
|
|
||||||
u_int standbys, suspends;
|
|
||||||
struct bios_args bios;
|
|
||||||
struct apmhook sc_suspend;
|
|
||||||
struct apmhook sc_resume;
|
|
||||||
struct selinfo sc_rsel;
|
|
||||||
int sc_flags;
|
|
||||||
int event_count;
|
|
||||||
int event_ptr;
|
|
||||||
struct apm_event_info event_list[APM_NEVENTS];
|
|
||||||
u_char event_filter[APM_NPMEV];
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* !__APM_H__ */
|
|
@ -198,9 +198,6 @@ device vt_vga
|
|||||||
|
|
||||||
device agp # support several AGP chipsets
|
device agp # support several AGP chipsets
|
||||||
|
|
||||||
# Power management support (see NOTES for more options)
|
|
||||||
#device apm
|
|
||||||
|
|
||||||
# PCCARD (PCMCIA) support
|
# PCCARD (PCMCIA) support
|
||||||
# PCMCIA and cardbus bridge support
|
# PCMCIA and cardbus bridge support
|
||||||
device cbb # cardbus (yenta) bridge
|
device cbb # cardbus (yenta) bridge
|
||||||
|
@ -729,7 +729,6 @@ device hyperv # HyperV drivers
|
|||||||
#
|
#
|
||||||
# Miscellaneous hardware:
|
# Miscellaneous hardware:
|
||||||
#
|
#
|
||||||
# apm: Laptop Advanced Power Management (experimental)
|
|
||||||
# ipmi: Intelligent Platform Management Interface
|
# ipmi: Intelligent Platform Management Interface
|
||||||
# smapi: System Management Application Program Interface driver
|
# smapi: System Management Application Program Interface driver
|
||||||
# smbios: DMI/SMBIOS entry point
|
# smbios: DMI/SMBIOS entry point
|
||||||
@ -739,10 +738,6 @@ device hyperv # HyperV drivers
|
|||||||
# si: Specialix International SI/XIO or SX intelligent serial card driver
|
# si: Specialix International SI/XIO or SX intelligent serial card driver
|
||||||
# tpm: Trusted Platform Module
|
# tpm: Trusted Platform Module
|
||||||
|
|
||||||
# Notes on APM
|
|
||||||
# The flags takes the following meaning for apm0:
|
|
||||||
# 0x0020 Statclock is broken.
|
|
||||||
|
|
||||||
# Notes on the Specialix SI/XIO driver:
|
# Notes on the Specialix SI/XIO driver:
|
||||||
# The host card is memory, not IO mapped.
|
# The host card is memory, not IO mapped.
|
||||||
# The Rev 1 host cards use a 64K chunk, on a 32K boundary.
|
# The Rev 1 host cards use a 64K chunk, on a 32K boundary.
|
||||||
@ -761,8 +756,6 @@ device hyperv # HyperV drivers
|
|||||||
# is the only thing truly supported, but apparently a fair percentage
|
# is the only thing truly supported, but apparently a fair percentage
|
||||||
# of the Vaio extra features are controlled by this device.
|
# of the Vaio extra features are controlled by this device.
|
||||||
|
|
||||||
device apm
|
|
||||||
envvar hint.apm.0.flags="0x20"
|
|
||||||
device ipmi
|
device ipmi
|
||||||
device smapi
|
device smapi
|
||||||
device smbios
|
device smbios
|
||||||
|
Loading…
Reference in New Issue
Block a user