Re: Newest loader from CVS not working

From: Pawel Worach <pawel.worach_at_gmail.com>
Date: Sun, 29 May 2005 03:51:48 +0200
Pawel Worach wrote:
  > I'm seeing the same thing if CPUTYPE is set to "pentium-m" while
> "pentium2" works fine. Loader crashes on start, is there a way to make 
> it freeze instead of reset to capture the register dump? Kernel/world 
> works fine with the pentium-m CPUTYPE if booted with loader.old. This in 
> on a IBM T41 with a cpu as detected below.
> 
> CPU: Intel(R) Pentium(R) M processor 1700MHz (1698.56-MHz 686-class CPU)
>   Origin = "GenuineIntel"  Id = 0x695  Stepping = 5
> Features=0xa7e9f9bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE> 
> 
> Features2=0x180<EST,TM2>
> 

I did some more investigation into this and found that MMX registers are used in 
the FICL code in the pentium-m case. Here is a full diff of sys/boot built with 
CPUTYPE?=pentium2 and pentium-m.

diff -ur boot.pentium2/ficl/softcore.c boot.pentium-m/ficl/softcore.c
--- boot.pentium2/ficl/softcore.c	Sun May 29 03:43:23 2005
+++ boot.pentium-m/ficl/softcore.c	Sun May 29 03:42:00 2005
_at__at_ -4,7 +4,7 _at__at_
  ** Words from CORE set written in FICL
  ** Author: John Sadler (john_sadler_at_alum.mit.edu)
  ** Created: 27 December 1997
-** Last update: Sun May 29 03:43:23 CEST 2005
+** Last update: Sun May 29 03:42:00 CEST 2005
  ***************************************************************/

  /*
diff -ur boot.pentium2/ficl/tools.s boot.pentium-m/ficl/tools.s
--- boot.pentium2/ficl/tools.s	Sun May 29 03:43:30 2005
+++ boot.pentium-m/ficl/tools.s	Sun May 29 03:42:18 2005
_at__at_ -1658,19 +1658,19 _at__at_
  	pushl	%esi
  	xorl	%esi, %esi
  	pushl	%ebx
-	subl	$28, %esp
+	subl	$40, %esp
  	movl	8(%ebp), %edx
  	movl	(%edx), %eax
-	movl	16(%eax), %eax
-	movl	%eax, -16(%ebp)
+	movd	16(%eax), %xmm0
+	movd	%xmm0, %eax
  	movl	8(%eax), %eax
-	movl	%eax, -20(%ebp)
+	movl	%eax, -16(%ebp)
  	movl	8(%eax), %eax
  	cmpl	$0, %eax
  	jbe	.L199
  	.p2align 4,,15
  .L203:
-	movl	-20(%ebp), %edx
+	movl	-16(%ebp), %edx
  	movl	12(%edx,%edi,4), %ebx
  	testl	%ebx, %ebx
  	je	.L201
_at__at_ -1680,21 +1680,23 _at__at_
  	incl	%esi
  	movl	%eax, 8(%esp)
  	movl	8(%ebx), %eax
+	movd	%xmm0, -32(%ebp)
  	movl	%eax, 4(%esp)
  	movl	8(%ebp), %eax
  	movl	%eax, (%esp)
  	call	vmTextOut
+	movd	-32(%ebp), %xmm0
  	movl	(%ebx), %ebx
  	testl	%ebx, %ebx
  	jne	.L196
-	movl	-20(%ebp), %edx
+	movl	-16(%ebp), %edx
  	movl	8(%edx), %eax
  .L201:
  	incl	%edi
  	cmpl	%edi, %eax
  	ja	.L203
  .L199:
-	movl	-16(%ebp), %edx
+	movd	%xmm0, %edx
  	movl	8(%ebp), %ebx
  	movl	84(%edx), %eax
  	subl	$-128, %ebx
_at__at_ -1715,7 +1717,7 _at__at_
  	movl	8(%ebp), %eax
  	movl	%eax, (%esp)
  	call	vmTextOut
-	addl	$28, %esp
+	addl	$40, %esp
  	popl	%ebx
  	popl	%esi
  	popl	%edi
diff -ur boot.pentium2/ficl/vm.s boot.pentium-m/ficl/vm.s
--- boot.pentium2/ficl/vm.s	Sun May 29 03:43:30 2005
+++ boot.pentium-m/ficl/vm.s	Sun May 29 03:42:18 2005
_at__at_ -298,21 +298,24 _at__at_
  	xorl	%edi, %edi
  	pushl	%esi
  	pushl	%ebx
-	subl	$16, %esp
-	movl	8(%ebp), %edx
+	subl	$32, %esp
+	movd	8(%ebp), %xmm0
  	movl	$0, -20(%ebp)
  	movl	$0, -16(%ebp)
+	movd	%xmm0, %edx
  	movl	60(%edx), %ecx
  	movl	52(%edx), %eax
  	movl	56(%edx), %esi
+	movd	%xmm0, -36(%ebp)
  	addl	%ecx, %eax
  	movl	%esi, 4(%esp)
  	movl	%eax, (%esp)
  	call	skipSpace
  	movl	%eax, -16(%ebp)
+	cmpl	%eax, %esi
  	movl	%eax, %ecx
-	cmpl	%ecx, %esi
-	movzbl	(%ecx), %ebx
+	movzbl	(%eax), %ebx
+	movd	-36(%ebp), %xmm0
  	je	.L45
  	.p2align 4,,15
  .L52:
_at__at_ -346,13 +349,13 _at__at_
  	cmpl	$1, %eax
  	sbbl	$-1, %ecx
  .L49:
-	movl	8(%ebp), %eax
+	movd	%xmm0, %eax
  	movl	60(%eax), %edx
  	subl	%edx, %ecx
  	movl	%ecx, 52(%eax)
  	movl	-20(%ebp), %eax
  	movl	-16(%ebp), %edx
-	addl	$16, %esp
+	addl	$32, %esp
  	popl	%ebx
  	popl	%esi
  	popl	%edi
diff -ur boot.pentium2/ficl/words.s boot.pentium-m/ficl/words.s
--- boot.pentium2/ficl/words.s	Sun May 29 03:43:32 2005
+++ boot.pentium-m/ficl/words.s	Sun May 29 03:42:19 2005
_at__at_ -5068,15 +5068,16 _at__at_
  	pushl	%edi
  	pushl	%esi
  	pushl	%ebx
-	subl	$16, %esp
-	movl	8(%ebp), %eax
+	subl	$32, %esp
+	movd	8(%ebp), %xmm0
+	movd	%xmm0, %eax
  	movl	60(%eax), %esi
  	movl	52(%eax), %ebx
  	movl	56(%eax), %edi
  	subl	$-128, %eax
+	movl	%eax, -16(%ebp)
  	addl	%esi, %ebx
  	movl	%eax, %esi
-	movl	%eax, -16(%ebp)
  	jmp	.L363
  	.p2align 4,,7
  .L364:
_at__at_ -5095,8 +5096,10 _at__at_
  	movb	$0, (%esi)
  	cmpl	%ebx, %edi
  	setne	%dl
+	movd	%xmm0, (%esp)
  	xorl	%eax, %eax
  	cmpb	$41, %cl
+	movd	%xmm0, -32(%ebp)
  	sete	%al
  	andl	%edx, %eax
  	cmpl	$1, %eax
_at__at_ -5104,15 +5107,14 _at__at_
  	sbbl	$-1, %ebx
  	xorl	%ecx, %ecx
  	movl	%eax, 4(%esp)
-	movl	8(%ebp), %eax
  	movl	%ecx, 8(%esp)
-	movl	%eax, (%esp)
  	call	vmTextOut
-	movl	8(%ebp), %eax
+	movd	-32(%ebp), %xmm0
+	movd	%xmm0, %eax
  	movl	60(%eax), %edx
  	subl	%edx, %ebx
  	movl	%ebx, 52(%eax)
-	addl	$16, %esp
+	addl	$32, %esp
  	popl	%ebx
  	popl	%esi
  	popl	%edi
diff -ur boot.pentium2/i386/loader/vers.c boot.pentium-m/i386/loader/vers.c
--- boot.pentium2/i386/loader/vers.c	Sun May 29 03:43:25 2005
+++ boot.pentium-m/i386/loader/vers.c	Sun May 29 03:42:02 2005
_at__at_ -1,4 +1,4 _at__at_
  char bootprog_name[] = "FreeBSD/i386 bootstrap loader";
  char bootprog_rev[] = "1.1";
-char bootprog_date[] = "Sun May 29 03:43:25 CEST 2005";
+char bootprog_date[] = "Sun May 29 03:42:02 CEST 2005";
  char bootprog_maker[] = "root_at_ibm-se82151";
diff -ur boot.pentium2/i386/loader/vers.i boot.pentium-m/i386/loader/vers.i
--- boot.pentium2/i386/loader/vers.i	Sun May 29 03:43:38 2005
+++ boot.pentium-m/i386/loader/vers.i	Sun May 29 03:42:25 2005
_at__at_ -4,5 +4,5 _at__at_
  # 1 "vers.c"
  char bootprog_name[] = "FreeBSD/i386 bootstrap loader";
  char bootprog_rev[] = "1.1";
-char bootprog_date[] = "Sun May 29 03:43:25 CEST 2005";
+char bootprog_date[] = "Sun May 29 03:42:02 CEST 2005";
  char bootprog_maker[] = "root_at_ibm-se82151";
diff -ur boot.pentium2/i386/loader/vers.s boot.pentium-m/i386/loader/vers.s
--- boot.pentium2/i386/loader/vers.s	Sun May 29 03:43:38 2005
+++ boot.pentium-m/i386/loader/vers.s	Sun May 29 03:42:25 2005
_at__at_ -9,7 +9,7 _at__at_
  	.type	bootprog_date, _at_object
  	.size	bootprog_date, 30
  bootprog_date:
-	.string	"Sun May 29 03:43:25 CEST 2005"
+	.string	"Sun May 29 03:42:02 CEST 2005"
  .globl bootprog_rev
  	.type	bootprog_rev, _at_object
  	.size	bootprog_rev, 4

-- 
Pawel
Received on Sat May 28 2005 - 23:51:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:35 UTC