diff --git a/sys/arch/pc532/pc532/clock.c b/sys/arch/pc532/pc532/clock.c index 44a2e72835e8..bc12ea0d7cd1 100644 --- a/sys/arch/pc532/pc532/clock.c +++ b/sys/arch/pc532/pc532/clock.c @@ -35,7 +35,7 @@ * * @(#)clock.c 7.2 (Berkeley) 5/12/91 * - * $Id: clock.c,v 1.3 1994/02/22 22:55:24 phil Exp $ + * $Id: clock.c,v 1.4 1994/05/03 07:30:30 phil Exp $ */ /* @@ -126,16 +126,22 @@ inittodr(base) unsigned int sec; int leap; - if (!have_rtc) return; + if (!have_rtc) + { + time.tv_sec = 0; + return; + } /* Read rtc and convert to seconds since Jan 1, 1970. */ rw_rtc ( buffer, 0); /* Read the rtc. */ - /* Check to see if it was really the rtc! */ - if (buffer[0] == 0x6d) /* The first byte of the rom. */ + /* Check to see if it was really the rtc by checking for bad date info. */ + if (buffer[1] > 59 || buffer[2] > 59 || buffer[3] > 23 || buffer[5] > 31 + || buffer[6] > 12) { have_rtc = 0; + time.tv_sec = 0; return; } diff --git a/sys/arch/pc532/pc532/mem.c b/sys/arch/pc532/pc532/mem.c index 76dfe8737663..ac0626916a1a 100644 --- a/sys/arch/pc532/pc532/mem.c +++ b/sys/arch/pc532/pc532/mem.c @@ -62,7 +62,11 @@ extern char *vmmap; /* poor name! */ +#ifndef NO_RTC int have_rtc = 1; /* For access to rtc. */ +#else +int have_rtc = 0; /* For no rtc. */ +#endif #define ROM_ORIGIN 0xFFF00000 /* Mapped origin! */ /* Do the actual reading and writing of the rtc. We have to read diff --git a/sys/arch/pc532/pc532/pmap.c b/sys/arch/pc532/pc532/pmap.c index a0ec00bcd8f4..14ab6fceec27 100644 --- a/sys/arch/pc532/pc532/pmap.c +++ b/sys/arch/pc532/pc532/pmap.c @@ -36,7 +36,7 @@ * * @(#)pmap.c 7.7 (Berkeley) 5/12/91 * - * $Id: pmap.c,v 1.4 1994/04/19 17:14:21 phil Exp $ + * $Id: pmap.c,v 1.5 1994/05/03 07:30:33 phil Exp $ */ /* @@ -202,7 +202,7 @@ void pmap_clear_modify(); /* * All those kernel PT submaps that BSD is so fond of */ -struct pte *CMAP1, *CMAP2, *mmap; +struct pte *CMAP1, *CMAP2, *xxx_mmap; caddr_t CADDR1, CADDR2, vmmap; struct pte *msgbufmap; struct msgbuf *msgbufp; @@ -406,7 +406,7 @@ pmap_bootstrap(firstaddr, loadaddr) SYSMAP(caddr_t ,CMAP1 ,CADDR1 ,1 ) SYSMAP(caddr_t ,CMAP2 ,CADDR2 ,1 ) - SYSMAP(caddr_t ,mmap ,vmmap ,1 ) + SYSMAP(caddr_t ,xxx_mmap ,vmmap ,1 ) SYSMAP(struct msgbuf * ,msgbufmap ,msgbufp ,1 ) virtual_avail = va; #endif