From owner-p4-projects@FreeBSD.ORG Sun May 11 15:08:29 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F371537B404; Sun, 11 May 2003 15:08:28 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E5EE37B401 for ; Sun, 11 May 2003 15:08:28 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACB2943F3F for ; Sun, 11 May 2003 15:08:27 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BM8R0U019560 for ; Sun, 11 May 2003 15:08:27 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BM8RjB019557 for perforce@freebsd.org; Sun, 11 May 2003 15:08:27 -0700 (PDT) Date: Sun, 11 May 2003 15:08:27 -0700 (PDT) Message-Id: <200305112208.h4BM8RjB019557@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30966 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 22:08:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=30966 Change 30966 by peter@peter_hammer on 2003/05/11 15:07:38 Well, that was clever. I'd have sworn that I'd not only compiled this before, but booted it as well. Add back the rather necessary "unnecessary" casts. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/machdep.c#19 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#19 (text+ko) ==== @@ -1085,44 +1085,44 @@ /* Read-only from zero to physfree */ /* XXX not fully used, underneath 2M pages */ for (i = 0; (i << PAGE_SHIFT) < physfree; i++) { - KPTphys[i] = i << PAGE_SHIFT; - KPTphys[i] |= PG_RW | PG_V; + ((pt_entry_t *)KPTphys)[i] = i << PAGE_SHIFT; + ((pt_entry_t *)KPTphys)[i] |= PG_RW | PG_V; } /* Now map the page tables at their location within PTmap */ for (i = 0; i < NKPT; i++) { - IdlePTD[i + KPTDI] = KPTphys + (i << PAGE_SHIFT); - IdlePTD[i + KPTDI] |= PG_RW | PG_V; + ((pd_entry_t *)IdlePTD)[i + KPTDI] = KPTphys + (i << PAGE_SHIFT); + ((pd_entry_t *)IdlePTD)[i + KPTDI] |= PG_RW | PG_V; } /* Map from zero to end of allocations under 2M pages */ /* This replaces some of the PTD entries above */ for (i = 0; (i << PDRSHIFT) < physfree; i++) { - IdlePTD[i] = i << PDRSHIFT; - IdlePTD[i] |= PG_RW | PG_V | PG_PS; + ((pd_entry_t *)IdlePTD)[i] = i << PDRSHIFT; + ((pd_entry_t *)IdlePTD)[i] |= PG_RW | PG_V | PG_PS; } /* Now map the page tables at their location within PTmap */ for (i = 0; i < NKPT; i++) { - IdlePTD[i] = KPTphys + (i << PAGE_SHIFT); - IdlePTD[i] |= PG_RW | PG_V; + ((pd_entry_t *)IdlePTD)[i] = KPTphys + (i << PAGE_SHIFT); + ((pd_entry_t *)IdlePTD)[i] |= PG_RW | PG_V; } /* Now map the PTD at the top of the PTmap (ie: PTD[]) */ for (i = 0; i < NPGPTD; i++) { - IdlePTD[i + PTDPTDI] = IdlePTD + (i << PAGE_SHIFT); - IdlePTD[i + PTDPTDI] |= PG_RW | PG_V; + ((pd_entry_t *)IdlePTD)[i + PTDPTDI] = IdlePTD + (i << PAGE_SHIFT); + ((pd_entry_t *)IdlePTD)[i + PTDPTDI] |= PG_RW | PG_V; } /* And connect up the PTD to the PDP */ for (i = 0; i < NPGPTD; i++) { - IdlePDP[i] = IdlePTD + (i << PAGE_SHIFT); - IdlePDP[i] |= PG_RW | PG_V | PG_U; + ((pdp_entry_t *)IdlePDP)[i] = IdlePTD + (i << PAGE_SHIFT); + ((pdp_entry_t *)IdlePDP)[i] |= PG_RW | PG_V | PG_U; } /* And connect up the PDP to the PML4 */ - IdlePML4[0] = IdlePDP; - IdlePML4[0] |= PG_RW | PG_V | PG_U; + ((pdp_entry_t *)IdlePML4)[0] = IdlePDP; + ((pdp_entry_t *)IdlePML4)[0] |= PG_RW | PG_V | PG_U; } void