Date: Sun, 11 May 2003 15:08:27 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 30966 for review Message-ID: <200305112208.h4BM8RjB019557@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305112208.h4BM8RjB019557>