From owner-svn-src-all@FreeBSD.ORG Mon Feb 7 07:39:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A27E81065670; Mon, 7 Feb 2011 07:39:09 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 918748FC08; Mon, 7 Feb 2011 07:39:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p177d9bG001087; Mon, 7 Feb 2011 07:39:09 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p177d9mh001085; Mon, 7 Feb 2011 07:39:09 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201102070739.p177d9mh001085@svn.freebsd.org> From: Takahashi Yoshihiro Date: Mon, 7 Feb 2011 07:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218389 - head/sys/pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2011 07:39:09 -0000 Author: nyan Date: Mon Feb 7 07:39:09 2011 New Revision: 218389 URL: http://svn.freebsd.org/changeset/base/218389 Log: MFi386: revision 217886 Set td_kstack_pages for thread0. Modified: head/sys/pc98/pc98/machdep.c Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Mon Feb 7 05:36:32 2011 (r218388) +++ head/sys/pc98/pc98/machdep.c Mon Feb 7 07:39:09 2011 (r218389) @@ -2088,11 +2088,13 @@ init386(first) { struct gate_descriptor *gdp; int gsel_tss, metadata_missing, x, pa; + size_t kstack0_sz; struct pcpu *pc; thread0.td_kstack = proc0kstack; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; + thread0.td_kstack_pages = KSTACK_PAGES; + kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; + thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1; /* * This may be done better later if it gets more high level @@ -2262,7 +2264,7 @@ init386(first) /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ PCPU_SET(common_tss.tss_esp0, thread0.td_kstack + - KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb) - 16); + kstack0_sz - sizeof(struct pcb) - 16); PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL)); gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd);