Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2002 21:14:15 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 17827 for review
Message-ID:  <200209210414.g8L4EFqC021690@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17827

Change 17827 by peter@peter_daintree on 2002/09/20 21:14:04

	nuke more old cruft (386bsd-0.1 bootblock support (I'm sure
	bde has them :-) and some VM86 glue I missed before (VME)

Affected files ...

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

Differences ...

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

@@ -237,41 +237,8 @@
 
 	call	identify_cpu
 
-/* clear bss */
-/*
- * XXX this should be done a little earlier.
- *
- * XXX we don't check that there is memory for our bss and page tables
- * before using it.
- *
- * XXX the boot program somewhat bogusly clears the bss.  We still have
- * to do it in case we were unzipped by kzipboot.  Then the boot program
- * only clears kzipboot's bss.
- *
- * XXX the gdt and idt are still somewhere in the boot program.  We
- * depend on the convention that the boot program is below 1MB and we
- * are above 1MB to keep the gdt and idt  away from the bss and page
- * tables.  The idt is not used.
- */
-	movl	$R(end),%ecx
-	movl	$R(edata),%edi
-	subl	%edi,%ecx
-	xorl	%eax,%eax
-	cld
-	rep
-	stosb
-
 	call	create_pagetables
 
-/*
- * If the CPU has support for VME, turn it on.
- */ 
-	testl	$CPUID_VME, R(cpu_feature)
-	jz	1f
-	movl	%cr4, %eax
-	orl	$CR4_VME, %eax
-	movl	%eax, %cr4
-
 /* Now enable paging */
 	movl	R(IdlePTD), %eax
 	movl	%eax,%cr3		/* load ptd addr into mmu */
@@ -365,14 +332,6 @@
 	 */
 
 	/*
-	 * The old style disk boot blocks fake a frame on the stack and
-	 * did an lret to get here.  The frame on the stack has a return
-	 * address of 0.
-	 */
-	cmpl	$0,4(%ebp)
-	je	olddiskboot
-
-	/*
 	 * We have some form of return address, so this is either the
 	 * old diskless netboot code, or the new uniform code.  That can
 	 * be detected by looking at the 5th argument, if it is 0
@@ -408,35 +367,10 @@
 
 1:
 	/*
-	 * If we have a kernelname copy it in
-	 */
-	movl	BI_KERNELNAME(%ebx),%esi
-	cmpl	$0,%esi
-	je	2f			/* No kernelname */
-	movl	$MAXPATHLEN,%ecx	/* Brute force!!! */
-	movl	$R(kernelname),%edi
-	cmpb	$'/',(%esi)		/* Make sure it starts with a slash */
-	je	1f
-	movb	$'/',(%edi)
-	incl	%edi
-	decl	%ecx
-1:
-	cld
-	rep
-	movsb
-
-2:
-	/*
 	 * Determine the size of the boot loader's copy of the bootinfo
-	 * struct.  This is impossible to do properly because old versions
-	 * of the struct don't contain a size field and there are 2 old
-	 * versions with the same version number.
+	 * struct. 
 	 */
-	movl	$BI_ENDCOMMON,%ecx	/* prepare for sizeless version */
-	testl	$RB_BOOTINFO,8(%ebp)	/* bi_size (and bootinfo) valid? */
-	je	got_bi_size		/* no, sizeless version */
 	movl	BI_SIZE(%ebx),%ecx
-got_bi_size:
 
 	/*
 	 * Copy the common part of the bootinfo struct
@@ -451,31 +385,6 @@
 	rep
 	movsb
 
-#ifdef NFS_ROOT
-#ifndef BOOTP_NFSV3
-	/*
-	 * If we have a nfs_diskless structure copy it in
-	 */
-	movl	BI_NFS_DISKLESS(%ebx),%esi
-	cmpl	$0,%esi
-	je	olddiskboot
-	movl	$R(nfs_diskless),%edi
-	movl	$NFSDISKLESS_SIZE,%ecx
-	cld
-	rep
-	movsb
-	movl	$R(nfs_diskless_valid),%edi
-	movl	$1,(%edi)
-#endif
-#endif
-
-	/*
-	 * The old style disk boot.
-	 *	(*btext)(howto, bootdev, cyloffset, esym);
-	 * Note that the newer boot code just falls into here to pick
-	 * up howto and bootdev, cyloffset and esym are no longer used
-	 */
-olddiskboot:
 	movl	8(%ebp),%eax
 	movl	%eax,R(boothowto)
 	movl	12(%ebp),%eax

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?200209210414.g8L4EFqC021690>