Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Apr 2003 12:10:29 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 28348 for review
Message-ID:  <200304061910.h36JATtG061759@repoman.freebsd.org>

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

Change 28348 by peter@peter_overcee on 2003/04/06 12:09:50

	kill R() with extreme prejudice.  Now we'll start up at the
	correct virtual address.

Affected files ...

.. //depot/projects/hammer/sys/x86_64/x86_64/locore.s#26 edit

Differences ...

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

@@ -71,13 +71,11 @@
  *
  */
 
-#define R(foo) ((foo)-KERNBASE)
-
 #define ALLOCPAGES(foo) \
-	movl	R(physfree), %esi ; \
+	movl	physfree, %esi ; \
 	movl	$((foo)*PAGE_SIZE), %eax ; \
 	addl	%esi, %eax ; \
-	movl	%eax, R(physfree) ; \
+	movl	%eax, physfree ; \
 	movl	%esi, %edi ; \
 	movl	$((foo)*PAGE_SIZE),%ecx ; \
 	xorl	%eax,%eax ; \
@@ -112,7 +110,7 @@
 #define	fillkptphys(prot)		  \
 	movl	%eax, %ebx		; \
 	shrl	$PAGE_SHIFT, %ebx	; \
-	fillkpt(R(KPTphys), prot)
+	fillkpt(KPTphys, prot)
 
 #define PING(a) \
 	movb	$(a),%al;		\
@@ -131,7 +129,7 @@
 	movw	$0x1234,0x472
 
 /* Get onto a stack that we can trust and set up a real frame. */
-#	movl	$R(HIDENAME(tmpstk)),%esp
+#	movl	$HIDENAME(tmpstk),%esp
 	pushl	%ebp
 	movl	%esp, %ebp
 
@@ -174,7 +172,7 @@
 
 	PING('e');
 /* Point to the PML4 */
-	movl	R(IdlePML4), %eax
+	movl	IdlePML4, %eax
 	movl	%eax,%cr3		/* load ptd addr into mmu */
 
 	PING('r');
@@ -251,9 +249,9 @@
 	 */
 
 	movl	32(%ebp),%eax		/* modulep */
-	movl	%eax,R(modulep)
+	movl	%eax,modulep
 	movl	36(%ebp),%eax		/* kernend */
-	movl	%eax,R(KERNend)
+	movl	%eax,KERNend
 
 	ret
 
@@ -267,17 +265,17 @@
 
 	xorl	%eax,%eax
 	cpuid					# cpuid 0
-	movl	%eax,R(cpu_high)		# highest capability
-	movl	%ebx,R(cpu_vendor)		# store vendor string
-	movl	%edx,R(cpu_vendor+4)
-	movl	%ecx,R(cpu_vendor+8)
-	movb	$0,R(cpu_vendor+12)
+	movl	%eax,cpu_high			# highest capability
+	movl	%ebx,cpu_vendor			# store vendor string
+	movl	%edx,cpu_vendor+4
+	movl	%ecx,cpu_vendor+8
+	movb	$0,cpu_vendor+12
 
 	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	%eax,cpu_id			# store cpu_id
+	movl	%ebx,cpu_procinfo		# store cpu_procinfo
+	movl	%edx,cpu_feature		# store cpu_feature
 	ret
 
 
@@ -290,70 +288,70 @@
 create_pagetables:
 
 /* We are told where the end of the kernel space is. */
-	movl	R(KERNend),%esi		/* get end of kernel */
-	movl	%esi,R(physfree)	/* next free page is at end of kernel */
+	movl	KERNend, %esi		/* get end of kernel */
+	movl	%esi, physfree		/* next free page is at end of kernel */
 
 /* Allocate Kernel Page Tables */
 	ALLOCPAGES(NKPT)
-	movl	%esi,R(KPTphys)
+	movl	%esi, KPTphys
 
 /* Allocate Page Table Directory */
 	ALLOCPAGES(1)
-	movl	%esi,R(IdlePML4)
+	movl	%esi, IdlePML4
 	ALLOCPAGES(1)
-	movl	%esi,R(IdlePDP)
+	movl	%esi, IdlePDP
 	ALLOCPAGES(NPGPTD)
-	movl	%esi,R(IdlePTD)
+	movl	%esi, IdlePTD
 
 /* Allocate UPAGES */
 	ALLOCPAGES(UAREA_PAGES)
-	movl	%esi,R(p0upa)
+	movl	%esi, p0upa
 	addl	$KERNBASE, %esi
-	movl	%esi, R(proc0uarea)
+	movl	%esi, proc0uarea
 
 	ALLOCPAGES(KSTACK_PAGES)
-	movl	%esi,R(p0kpa)
+	movl	%esi, p0kpa
 	addl	$KERNBASE, %esi
-	movl	%esi, R(proc0kstack)
+	movl	%esi, proc0kstack
 
 /* Map read-only from zero to the end of the kernel text section */
 	xorl	%eax, %eax
 	xorl	%edx,%edx
-	movl	$R(etext),%ecx
+	movl	$etext,%ecx
 	addl	$PAGE_MASK,%ecx
 	shrl	$PAGE_SHIFT,%ecx
 	fillkptphys(%edx)
 
 /* Map read-write, data, bss and symbols */
-	movl	$R(etext),%eax
+	movl	$etext, %eax
 	addl	$PAGE_MASK, %eax
 	andl	$~PAGE_MASK, %eax
 	movl	$PG_RW,%edx
-	movl	R(KERNend),%ecx
+	movl	KERNend, %ecx
 	subl	%eax,%ecx
 	shrl	$PAGE_SHIFT,%ecx
 	fillkptphys(%edx)
 
 /* Map page directory. */
-	movl	R(IdlePML4), %eax
+	movl	IdlePML4, %eax
 	movl	$1, %ecx
 	fillkptphys($PG_RW)
 
-	movl	R(IdlePDP), %eax
+	movl	IdlePDP, %eax
 	movl	$1, %ecx
 	fillkptphys($PG_RW)
 
-	movl	R(IdlePTD), %eax
+	movl	IdlePTD, %eax
 	movl	$NPGPTD, %ecx
 	fillkptphys($PG_RW)
 
 /* Map proc0's UPAGES in the physical way ... */
-	movl	R(p0upa), %eax
+	movl	p0upa, %eax
 	movl	$(UAREA_PAGES), %ecx
 	fillkptphys($PG_RW)
 
 /* Map proc0's KSTACK in the physical way ... */
-	movl	R(p0kpa), %eax
+	movl	p0kpa, %eax
 	movl	$(KSTACK_PAGES), %ecx
 	fillkptphys($PG_RW)
 
@@ -363,32 +361,32 @@
 	fillkptphys($PG_RW)
 
 /* install a pde for temporary double map of bottom of VA */
-	movl	R(KPTphys), %eax
+	movl	KPTphys, %eax
 	xorl	%ebx, %ebx
 	movl	$NKPT, %ecx
-	fillkpt(R(IdlePTD), $PG_RW)
+	fillkpt(IdlePTD, $PG_RW)
 
 /* install pde's for pt's */
-	movl	R(KPTphys), %eax
+	movl	KPTphys, %eax
 	movl	$KPTDI, %ebx
 	movl	$NKPT, %ecx
-	fillkpt(R(IdlePTD), $PG_RW)
+	fillkpt(IdlePTD, $PG_RW)
 
 /* install a pde recursively mapping page directory as a page table */
-	movl	R(IdlePTD), %eax
+	movl	IdlePTD, %eax
 	movl	$PTDPTDI, %ebx
 	movl	$NPGPTD,%ecx
-	fillkpt(R(IdlePTD), $PG_RW)
+	fillkpt(IdlePTD, $PG_RW)
 
-	movl	R(IdlePTD), %eax
+	movl	IdlePTD, %eax
 	xorl	%ebx, %ebx
 	movl	$NPGPTD, %ecx
-	fillkpt(R(IdlePDP), $0x0)
+	fillkpt(IdlePDP, $0x0)
 
-	movl	R(IdlePDP), %eax
+	movl	IdlePDP, %eax
 	xorl	%ebx, %ebx
 	movl	$1, %ecx
-	fillkpt(R(IdlePML4), $0x0)
+	fillkpt(IdlePML4, $0x0)
 
 	ret
 
@@ -428,7 +426,7 @@
 
 /* Region descriptor for the gdt above */
 gdt_rd:	.word	(gdt_end - gdt)
-	.word	R(gdt)
+	.word	gdt
 #endif
 
 	.bss



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