Remove code from dev/apm/apm.c for setting global variables to parameterise
the i386 bios apm code (now removed). Remove the same code from the clone dev/hpc/apm/apmdev.c Remove some not-used options from dev/apm/files.apm and the commented out lines in ALL and GENERIC. Maybe the APM_V10_ONLY and APM_NO_V12 could also be shot, but they are further entwined in the code.
This commit is contained in:
parent
f800b89bbc
commit
5eb5222cc8
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: ALL,v 1.344 2012/09/23 01:03:39 chs Exp $
|
||||
# $NetBSD: ALL,v 1.345 2012/09/30 21:36:18 dsl Exp $
|
||||
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
|
||||
#
|
||||
# ALL machine description file
|
||||
|
@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386"
|
|||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "ALL-$Revision: 1.344 $"
|
||||
#ident "ALL-$Revision: 1.345 $"
|
||||
|
||||
maxusers 64 # estimated number of users
|
||||
|
||||
|
@ -327,7 +327,6 @@ p64h2apic* at pci? dev? function? # P64H2 IOxAPIC
|
|||
#apm0 at mainbus0 # Advanced power management
|
||||
|
||||
# Tuning for power management, see apm(4) for more details.
|
||||
#options APM_NO_IDLE # Don't call BIOS CPU idle function
|
||||
#options APM_V10_ONLY # Use only the APM 1.0 calls
|
||||
#options APM_NO_POWEROFF # Don't power off on halt(8)
|
||||
#options APM_POWER_PRINT # Print stats on the console
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: GENERIC,v 1.1080 2012/09/23 01:05:21 chs Exp $
|
||||
# $NetBSD: GENERIC,v 1.1081 2012/09/30 21:36:18 dsl Exp $
|
||||
#
|
||||
# GENERIC machine description file
|
||||
#
|
||||
|
@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386"
|
|||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "GENERIC-$Revision: 1.1080 $"
|
||||
#ident "GENERIC-$Revision: 1.1081 $"
|
||||
|
||||
maxusers 64 # estimated number of users
|
||||
|
||||
|
@ -312,7 +312,6 @@ config netbsd root on ? type ?
|
|||
#apm0 at mainbus0 # Advanced power management
|
||||
|
||||
# Tuning for power management, see apm(4) for more details.
|
||||
#options APM_NO_IDLE # Don't call BIOS CPU idle function
|
||||
#options APM_V10_ONLY # Use only the APM 1.0 calls
|
||||
#options APM_NO_POWEROFF # Don't power off on halt(8)
|
||||
#options APM_POWER_PRINT # Print stats on the console
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: apm.c,v 1.27 2011/07/17 20:54:50 joerg Exp $ */
|
||||
/* $NetBSD: apm.c,v 1.28 2012/09/30 21:36:19 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -33,14 +33,10 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.27 2011/07/17 20:54:50 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.28 2012/09/30 21:36:19 dsl Exp $");
|
||||
|
||||
#include "opt_apm.h"
|
||||
|
||||
#ifdef APM_NOIDLE
|
||||
#error APM_NOIDLE option deprecated; use APM_NO_IDLE instead
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG) && !defined(APMDEBUG)
|
||||
#define APMDEBUG
|
||||
#endif
|
||||
|
@ -123,17 +119,6 @@ const struct cdevsw apm_cdevsw = {
|
|||
};
|
||||
|
||||
/* configurable variables */
|
||||
int apm_bogus_bios = 0;
|
||||
#ifdef APM_DISABLE
|
||||
int apm_enabled = 0;
|
||||
#else
|
||||
int apm_enabled = 1;
|
||||
#endif
|
||||
#ifdef APM_NO_IDLE
|
||||
int apm_do_idle = 0;
|
||||
#else
|
||||
int apm_do_idle = 1;
|
||||
#endif
|
||||
#ifdef APM_NO_STANDBY
|
||||
int apm_do_standby = 0;
|
||||
#else
|
||||
|
@ -149,16 +134,6 @@ int apm_v12_enabled = 0;
|
|||
#else
|
||||
int apm_v12_enabled = 1;
|
||||
#endif
|
||||
#ifdef APM_FORCE_64K_SEGMENTS
|
||||
int apm_force_64k_segments = 1;
|
||||
#else
|
||||
int apm_force_64k_segments = 0;
|
||||
#endif
|
||||
#ifdef APM_ALLOW_BOGUS_SEGMENTS
|
||||
int apm_allow_bogus_segments = 1;
|
||||
#else
|
||||
int apm_allow_bogus_segments = 0;
|
||||
#endif
|
||||
|
||||
/* variables used during operation (XXX cgd) */
|
||||
u_char apm_majver, apm_minver;
|
||||
|
@ -597,20 +572,6 @@ apm_set_ver(struct apm_softc *sc)
|
|||
ok:
|
||||
aprint_normal("Power Management spec V%d.%d", apm_majver, apm_minver);
|
||||
apm_inited = 1;
|
||||
if (sc->sc_detail & APM_IDLE_SLOWS) {
|
||||
#ifdef DIAGNOSTIC
|
||||
/* not relevant often */
|
||||
aprint_normal(" (slowidle)");
|
||||
#endif
|
||||
/* leave apm_do_idle at its user-configured setting */
|
||||
} else
|
||||
apm_do_idle = 0;
|
||||
#ifdef DIAGNOSTIC
|
||||
if (sc->sc_detail & APM_BIOS_PM_DISABLED)
|
||||
aprint_normal(" (BIOS mgmt disabled)");
|
||||
if (sc->sc_detail & APM_BIOS_PM_DISENGAGED)
|
||||
aprint_normal(" (BIOS managing devices)");
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: apmbios.h,v 1.6 2012/09/30 21:05:14 dsl Exp $ */
|
||||
/* $NetBSD: apmbios.h,v 1.7 2012/09/30 21:36:20 dsl Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1995 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -109,14 +109,6 @@
|
|||
#define APM_MAJOR_VERS(info) (((info)&0xff00)>>8)
|
||||
#define APM_MINOR_VERS(info) ((info)&0xff)
|
||||
|
||||
#define APM_CPUIDLE_SLOW 0x04
|
||||
#define APM_DISABLED 0x08
|
||||
#define APM_DISENGAGED 0x10
|
||||
|
||||
#define APM_IDLE_SLOWS (APM_CPUIDLE_SLOW << 16)
|
||||
#define APM_BIOS_PM_DISABLED (APM_DISABLED << 16)
|
||||
#define APM_BIOS_PM_DISENGAGED (APM_DISENGAGED << 16)
|
||||
|
||||
#define APMDEBUG_INFO 0x01
|
||||
#define APMDEBUG_EVENTS 0x04
|
||||
#define APMDEBUG_DEVICE 0x20
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
# $NetBSD: files.apm,v 1.3 2006/07/08 20:22:19 christos Exp $
|
||||
# $NetBSD: files.apm,v 1.4 2012/09/30 21:36:20 dsl Exp $
|
||||
|
||||
#
|
||||
# Common APM support files
|
||||
#
|
||||
defflag opt_apm.h APM_DISABLE APM_FORCE_64K_SEGMENTS APM_NO_IDLE
|
||||
APM_NO_STANDBY APM_V10_ONLY APM_NO_V12 APMDEBUG
|
||||
APM_POWER_PRINT APM_ALLOW_BOGUS_SEGMENTS
|
||||
APM_USE_KVM86
|
||||
defflag opt_apm.h APM_V10_ONLY APM_NO_V12 APMDEBUG
|
||||
APM_POWER_PRINT
|
||||
defparam opt_apm.h APMDEBUG_VALUE APM_DISABLE_INTERRUPTS
|
||||
device apm
|
||||
file dev/apm/apm.c apm
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: apmdev.c,v 1.25 2011/07/17 20:54:51 joerg Exp $ */
|
||||
/* $NetBSD: apmdev.c,v 1.26 2012/09/30 21:36:20 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -33,16 +33,12 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: apmdev.c,v 1.25 2011/07/17 20:54:51 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: apmdev.c,v 1.26 2012/09/30 21:36:20 dsl Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_apm.h"
|
||||
#endif
|
||||
|
||||
#ifdef APM_NOIDLE
|
||||
#error APM_NOIDLE option deprecated; use APM_NO_IDLE instead
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG) && !defined(APMDEBUG)
|
||||
#define APMDEBUG
|
||||
#endif
|
||||
|
@ -132,16 +128,6 @@ const struct cdevsw apmdev_cdevsw = {
|
|||
|
||||
/* configurable variables */
|
||||
int apm_bogus_bios = 0;
|
||||
#ifdef APM_DISABLE
|
||||
int apm_enabled = 0;
|
||||
#else
|
||||
int apm_enabled = 1;
|
||||
#endif
|
||||
#ifdef APM_NO_IDLE
|
||||
int apm_do_idle = 0;
|
||||
#else
|
||||
int apm_do_idle = 1;
|
||||
#endif
|
||||
#ifdef APM_NO_STANDBY
|
||||
int apm_do_standby = 0;
|
||||
#else
|
||||
|
@ -598,14 +584,6 @@ apm_set_ver(struct apm_softc *sc)
|
|||
ok:
|
||||
aprint_normal("Power Management spec V%d.%d", apm_majver, apm_minver);
|
||||
apm_inited = 1;
|
||||
if (sc->sc_detail & APM_IDLE_SLOWS) {
|
||||
#ifdef DIAGNOSTIC
|
||||
/* not relevant often */
|
||||
aprint_normal(" (slowidle)");
|
||||
#endif
|
||||
/* leave apm_do_idle at its user-configured setting */
|
||||
} else
|
||||
apm_do_idle = 0;
|
||||
#ifdef DIAGNOSTIC
|
||||
if (sc->sc_detail & APM_BIOS_PM_DISABLED)
|
||||
aprint_normal(" (BIOS mgmt disabled)");
|
||||
|
|
Loading…
Reference in New Issue