Add MKWATCHDOG option
This commit is contained in:
parent
89f0baab63
commit
1a8cf59d04
11 changed files with 30 additions and 23 deletions
|
@ -7,7 +7,7 @@ PROG= kernel
|
||||||
SRCS= mpx.S
|
SRCS= mpx.S
|
||||||
SRCS+= start.c table.c main.c proc.c \
|
SRCS+= start.c table.c main.c proc.c \
|
||||||
system.c clock.c utility.c debug.c interrupt.c \
|
system.c clock.c utility.c debug.c interrupt.c \
|
||||||
watchdog.c cpulocals.c
|
cpulocals.c
|
||||||
|
|
||||||
.ifdef CONFIG_SMP
|
.ifdef CONFIG_SMP
|
||||||
SRCS += smp.c
|
SRCS += smp.c
|
||||||
|
@ -44,6 +44,11 @@ MAN=
|
||||||
.include "system/Makefile.inc"
|
.include "system/Makefile.inc"
|
||||||
.include "arch/${ARCH}/Makefile.inc"
|
.include "arch/${ARCH}/Makefile.inc"
|
||||||
|
|
||||||
|
.if ${USE_WATCHDOG} != "no"
|
||||||
|
SRCS+= watchdog.c arch_watchdog.c
|
||||||
|
CPPFLAGS+= -DUSE_WATCHDOG
|
||||||
|
.endif
|
||||||
|
|
||||||
# These come last, so the profiling buffer is at the end of the data segment
|
# These come last, so the profiling buffer is at the end of the data segment
|
||||||
SRCS+= profile.c do_sprofile.c
|
SRCS+= profile.c do_sprofile.c
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ SRCS+= arch_do_vmctl.c \
|
||||||
arch_system.c \
|
arch_system.c \
|
||||||
apic.c \
|
apic.c \
|
||||||
apic_asm.S \
|
apic_asm.S \
|
||||||
arch_watchdog.c \
|
|
||||||
pre_init.c \
|
pre_init.c \
|
||||||
acpi.c
|
acpi.c
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "acpi.h"
|
#include "acpi.h"
|
||||||
|
|
||||||
#ifdef CONFIG_WATCHDOG
|
#ifdef USE_WATCHDOG
|
||||||
#include "kernel/watchdog.h"
|
#include "kernel/watchdog.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#ifdef CONFIG_APIC
|
#ifdef CONFIG_APIC
|
||||||
#include "apic.h"
|
#include "apic.h"
|
||||||
#ifdef CONFIG_WATCHDOG
|
#ifdef USE_WATCHDOG
|
||||||
#include "kernel/watchdog.h"
|
#include "kernel/watchdog.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1046,7 +1046,7 @@ PUBLIC int arch_enable_paging(struct proc * caller, const message * m_ptr)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_WATCHDOG
|
#ifdef USE_WATCHDOG
|
||||||
/*
|
/*
|
||||||
* We make sure that we don't enable the watchdog until paging is turned
|
* We make sure that we don't enable the watchdog until paging is turned
|
||||||
* on as we might get an NMI while switching and we might still use wrong
|
* on as we might get an NMI while switching and we might still use wrong
|
||||||
|
|
|
@ -507,7 +507,7 @@ LABEL(single_step_exception)
|
||||||
EXCEPTION_NO_ERR_CODE(DEBUG_VECTOR)
|
EXCEPTION_NO_ERR_CODE(DEBUG_VECTOR)
|
||||||
|
|
||||||
LABEL(nmi)
|
LABEL(nmi)
|
||||||
#ifndef CONFIG_WATCHDOG
|
#ifndef USE_WATCHDOG
|
||||||
EXCEPTION_NO_ERR_CODE(NMI_VECTOR)
|
EXCEPTION_NO_ERR_CODE(NMI_VECTOR)
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
#include "clock.h"
|
#include "clock.h"
|
||||||
|
|
||||||
#ifdef CONFIG_WATCHDOG
|
#ifdef USE_WATCHDOG
|
||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ PUBLIC int timer_int_handler(void)
|
||||||
struct proc * p, * billp;
|
struct proc * p, * billp;
|
||||||
|
|
||||||
/* FIXME watchdog for slave cpus! */
|
/* FIXME watchdog for slave cpus! */
|
||||||
#ifdef CONFIG_WATCHDOG
|
#ifdef USE_WATCHDOG
|
||||||
/*
|
/*
|
||||||
* we need to know whether local timer ticks are happening or whether
|
* we need to know whether local timer ticks are happening or whether
|
||||||
* the kernel is locked up. We don't care about overflows as we only
|
* the kernel is locked up. We don't care about overflows as we only
|
||||||
|
|
|
@ -7,11 +7,6 @@
|
||||||
#endif
|
#endif
|
||||||
/* boot verbose */
|
/* boot verbose */
|
||||||
#define CONFIG_BOOT_VERBOSE
|
#define CONFIG_BOOT_VERBOSE
|
||||||
/*
|
|
||||||
* compile in the nmi watchdog by default. It is not enabled until watchdog=1
|
|
||||||
* (non-zero) is set in monitor
|
|
||||||
*/
|
|
||||||
#define CONFIG_WATCHDOG
|
|
||||||
|
|
||||||
#ifndef CONFIG_MAX_CPUS
|
#ifndef CONFIG_MAX_CPUS
|
||||||
#define CONFIG_MAX_CPUS 1
|
#define CONFIG_MAX_CPUS 1
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
#include "smp.h"
|
#include "smp.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_WATCHDOG
|
#ifdef USE_WATCHDOG
|
||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
#endif
|
#endif
|
||||||
#include "spinlock.h"
|
#include "spinlock.h"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "proto.h"
|
#include "proto.h"
|
||||||
|
|
||||||
#ifdef CONFIG_WATCHDOG
|
#ifdef USE_WATCHDOG
|
||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ PUBLIC void cstart(
|
||||||
config_apic_timer_x = 1;
|
config_apic_timer_x = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_WATCHDOG
|
#ifdef USE_WATCHDOG
|
||||||
value = env_get("watchdog");
|
value = env_get("watchdog");
|
||||||
if (value)
|
if (value)
|
||||||
watchdog_enabled = atoi(value);
|
watchdog_enabled = atoi(value);
|
||||||
|
|
|
@ -756,6 +756,9 @@ _MKVARS.yes= \
|
||||||
MKSHARE MKSKEY MKSTATICLIB \
|
MKSHARE MKSKEY MKSTATICLIB \
|
||||||
MKX11FONTS \
|
MKX11FONTS \
|
||||||
MKYP
|
MKYP
|
||||||
|
#MINIX-specific vars
|
||||||
|
_MKVARS.yes+= \
|
||||||
|
MKWATCHDOG
|
||||||
.for var in ${_MKVARS.yes}
|
.for var in ${_MKVARS.yes}
|
||||||
${var}?= yes
|
${var}?= yes
|
||||||
.endfor
|
.endfor
|
||||||
|
@ -813,6 +816,11 @@ MKMAN:= no
|
||||||
MKNLS:= no
|
MKNLS:= no
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
# MINIX
|
||||||
|
.if ${MKEMBED} == "yes"
|
||||||
|
MKWATCHDOG:= no
|
||||||
|
.endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# install(1) parameters.
|
# install(1) parameters.
|
||||||
#
|
#
|
||||||
|
@ -871,7 +879,8 @@ ${var}?= no
|
||||||
# USE_* options which default to "yes" unless their corresponding MK*
|
# USE_* options which default to "yes" unless their corresponding MK*
|
||||||
# variable is set to "no".
|
# variable is set to "no".
|
||||||
#
|
#
|
||||||
.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
|
.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP \
|
||||||
|
USE_WATCHDOG
|
||||||
.if (${${var:S/USE_/MK/}} == "no")
|
.if (${${var:S/USE_/MK/}} == "no")
|
||||||
${var}:= no
|
${var}:= no
|
||||||
.else
|
.else
|
||||||
|
|
|
@ -236,12 +236,6 @@ AR?= aal
|
||||||
.elif !empty(CC:M*gcc) || !empty(CC:M*clang) || !empty(CC:M*pcc)
|
.elif !empty(CC:M*gcc) || !empty(CC:M*clang) || !empty(CC:M*pcc)
|
||||||
COMPILER_TYPE=gnu
|
COMPILER_TYPE=gnu
|
||||||
AR?= ar
|
AR?= ar
|
||||||
|
|
||||||
.if defined(MKEMBED) && ${MKEMBED} == "yes"
|
|
||||||
DBG= -Os
|
|
||||||
CFLAGS+= -DNDEBUG=1
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# Set NBSD_LIBC to either "yes" or "no".
|
# Set NBSD_LIBC to either "yes" or "no".
|
||||||
|
@ -250,3 +244,8 @@ NBSD_LIBC= no
|
||||||
.else
|
.else
|
||||||
NBSD_LIBC= yes
|
NBSD_LIBC= yes
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if ${COMPILER_TYPE} == "gnu" && defined(MKEMBED) && ${MKEMBED} == "yes"
|
||||||
|
DBG= -Os
|
||||||
|
CFLAGS+= -DNDEBUG=1
|
||||||
|
.endif
|
||||||
|
|
Loading…
Reference in a new issue