From tate@spa.is.uec.ac.jp Sun Mar  7 09:27:51 1999
Return-Path: <tate@spa.is.uec.ac.jp>
Received: from mailgate.spa.is.uec.ac.jp (ns.spa.is.uec.ac.jp [130.153.67.2])
	by hub.freebsd.org (Postfix) with ESMTP id 8CD2D14D3B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Mar 1999 09:27:46 -0800 (PST)
	(envelope-from tate@spa.is.uec.ac.jp)
Received: from leaf.tate.nerv.org (dhcp51.spa.is.uec.ac.jp [192.168.166.51])
	by mailgate.spa.is.uec.ac.jp (8.8.8+2.7Wbeta7/3.6W+spa-2.0a) with ESMTP id CAA19933;
	Mon, 8 Mar 1999 02:27:28 +0900 (JST)
Received: (from tate@localhost)
	by leaf.tate.nerv.org (8.8.8/3.6W/leaf-19980212) id CAA00328;
	Mon, 8 Mar 1999 02:29:08 +0900 (JST)
Message-Id: <199903071729.CAA00328@leaf.tate.nerv.org>
Date: Mon, 8 Mar 1999 02:29:08 +0900 (JST)
From: tate@spa.is.uec.ac.jp
Reply-To: tate@spa.is.uec.ac.jp
To: FreeBSD-gnats-submit@freebsd.org
Cc: tate@spa.is.uec.ac.jp
Subject: resume causes crashes if BIOS extmem != RTC extmem
X-Send-Pr-Version: 3.2

>Number:         10466
>Category:       kern
>Synopsis:       resume causes crashes if BIOS extmem != RTC extmem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar  7 09:30:00 PST 1999
>Closed-Date:    Fri Jan 11 20:36:58 PST 2002
>Last-Modified:  Fri Jan 11 20:37:23 PST 2002
>Originator:     TATEOKA Takamichi
>Release:        FreeBSD 2.2.8-RELEASE i386
>Organization:
University of Electro-Communications, Tokyo, JAPAN
>Environment:

Machine: TOSHIBA DynaBook SS Portage 3300 with 64MB memory (standard)
Kernel: FeeBSD 2.2.8-RELEASE i386 + PAO19990114

  At bootup, kernel says:
BIOS basemem (639K) != RTC basemem (640K), setting to BIOS value
BIOS extmem (64384K) != RTC extmem (64512K)

>Description:

  With or without APM support by kernel, resume from suspend
(with apm -z or power switch) causes kernel crash.  Crash pattern is
precarious (hang up, suddenly reboot or work a while and suddenly reboot).

>How-To-Repeat:

  Suspend the machine with "apm -z" or power switch, and resume from it.

>Fix:
	
  1. Set kernel configuration option "MAXMEM=(63*1024)".
     This shrinks memory usage and it worked.

  or

  2. Apply following patch to i386/i386/machdep.c .
     With this patch, kernel takes extmem value from BIOS instead of RTC
     when these values are different.
     I'm not sure we can trust BIOS value even when memory size is
     larger than 64M.  Anyway, some adustments is required, I think.


*** i386/i386/machdep.c.DIST	Fri Mar  5 16:53:05 1999
--- i386/i386/machdep.c	Mon Mar  8 01:13:35 1999
***************
*** 1143,1151 ****
  				*pte = pa | PG_RW | PG_V;
  			}
  		}
! 		if (bootinfo.bi_extmem != biosextmem)
! 			printf("BIOS extmem (%ldK) != RTC extmem (%dK)\n",
  			       bootinfo.bi_extmem, biosextmem);
  	}
  
  	pagesinbase = biosbasemem * 1024 / PAGE_SIZE;
--- 1143,1153 ----
  				*pte = pa | PG_RW | PG_V;
  			}
  		}
! 		if (bootinfo.bi_extmem != biosextmem){
! 			printf("BIOS extmem (%ldK) != RTC extmem (%dK), setting to BIOS value\n",
  			       bootinfo.bi_extmem, biosextmem);
+ 			biosextmem = bootinfo.bi_extmem;
+ 		}
  	}
  
  	pagesinbase = biosbasemem * 1024 / PAGE_SIZE;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: mike 
State-Changed-When: Thu Jul 19 16:32:06 PDT 2001 
State-Changed-Why:  

Does this problem still occur in newer versions of FreeBSD, 
such as 4.3-RELEASE? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=10466 
State-Changed-From-To: feedback->closed 
State-Changed-By: bmah 
State-Changed-When: Fri Jan 11 20:36:58 PST 2002 
State-Changed-Why:  
Feedback timeout (5+ months). 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=10466 
>Unformatted:
