Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2003 17:35:34 -0800 (PST)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 26801 for review
Message-ID:  <200303130135.h2D1ZYnO067289@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=26801

Change 26801 by peter@peter_daintree on 2003/03/12 17:35:07

	part 2 of previous IFC

Affected files ...

.. //depot/projects/hammer/sys/x86_64/x86_64/locore.s#18 integrate

Differences ...

==== //depot/projects/hammer/sys/x86_64/x86_64/locore.s#18 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)locore.s	7.3 (Berkeley) 5/13/91
- * $FreeBSD: src/sys/i386/i386/locore.s,v 1.160 2002/10/25 19:10:56 peter Exp $
+ * $FreeBSD: src/sys/i386/i386/locore.s,v 1.169 2003/02/23 22:12:07 jake Exp $
  *
  *		originally from: locore.s, by William F. Jolitz
  *
@@ -111,13 +111,13 @@
  *	prot = protection bits
  */
 #define	fillkpt(base, prot)		  \
-	shll	$3,%ebx			; \
+	shll	$PTESHIFT,%ebx		; \
 	addl	base,%ebx		; \
 	orl	$PG_V,%eax		; \
 	orl	prot,%eax		; \
 1:	movl	%eax,(%ebx)		; \
 	addl	$PAGE_SIZE,%eax		; /* increment physical address */ \
-	addl	$8,%ebx			; /* next pte */ \
+	addl	$PTESIZE,%ebx		; /* next pte */ \
 	loop	1b
 
 /*
@@ -202,7 +202,6 @@
 	orl	$CR0_PG, %eax		/* enable paging */
 	movl	%eax,%cr0		/* and let's page NOW! */
 
-
 /*
  * Now, we're running with paging turned on, but still running with V==P
  * in low memory.  We are still using the bootblock gdt/idt.  Switch to
@@ -285,6 +284,7 @@
 	movl	$1,%eax
 	cpuid					# cpuid 1
 	movl	%eax,R(cpu_id)			# store cpu_id
+	movl	%ebx,R(cpu_procinfo)		# store cpu_procinfo
 	movl	%edx,R(cpu_feature)		# store cpu_feature
 
 	movl	$CPU_686,R(cpu)			# call it a pentium pro
@@ -308,7 +308,7 @@
 	movl	%esi,R(KPTphys)
 
 /* Allocate Page Table Directory */
-	ALLOCPAGES(1)
+	ALLOCPAGES(NPGPTD)
 	movl	%esi,R(IdlePTD)
 
 /* Allocate UPAGES */
@@ -323,7 +323,7 @@
 	movl	%esi, R(proc0kstack)
 
 /* Map read-only from zero to the end of the kernel text section */
-	xorl	%eax,%eax
+	xorl	%eax, %eax
 	xorl	%edx,%edx
 	movl	$R(etext),%ecx
 	addl	$PAGE_MASK,%ecx
@@ -334,7 +334,6 @@
 	movl	$R(etext),%eax
 	addl	$PAGE_MASK, %eax
 	andl	$~PAGE_MASK, %eax
-map_read_write:
 	movl	$PG_RW,%edx
 	movl	R(KERNend),%ecx
 	subl	%eax,%ecx
@@ -343,7 +342,7 @@
 
 /* Map page directory. */
 	movl	R(IdlePTD), %eax
-	movl	$1, %ecx
+	movl	$NPGPTD, %ecx
 	fillkptphys($PG_RW)
 
 /* Map proc0's UPAGES in the physical way ... */
@@ -376,7 +375,7 @@
 /* install a pde recursively mapping page directory as a page table */
 	movl	R(IdlePTD), %eax
 	movl	$PTDPTDI, %ebx
-	movl	$1,%ecx
+	movl	$NPGPTD,%ecx
 	fillkpt(R(IdlePTD), $PG_RW)
 
 	ret
@@ -429,4 +428,3 @@
 KPTphys:	.space	4		/* phys addr of kernel page tables */
 p0upa:		.space	4		/* phys addr of proc0's UAREA */
 p0kpa:		.space	4		/* phys addr of proc0's STACK */
-

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303130135.h2D1ZYnO067289>