Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Apr 2006 20:06:08 +0900
From:      Ganbold <ganbold@micom.mng.net>
To:        Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        freebsd-current@freebsd.org
Subject:   Re: CPU class not configured problem in CURRENT-solved, boot problem remains
Message-ID:  <4433A4A0.5060300@micom.mng.net>
In-Reply-To: <20060405102528.GE699@turion.vk2pj.dyndns.org>
References:  <4431D4E5.3080507@micom.mng.net> <20060404090837.GC683@turion.vk2pj.dyndns.org> <44323B37.4040605@micom.mng.net> <20060404101223.GH683@turion.vk2pj.dyndns.org> <44336331.40909@micom.mng.net> <20060405075841.GB699@turion.vk2pj.dyndns.org> <443381F9.3010504@micom.mng.net> <20060405090326.GD699@turion.vk2pj.dyndns.org> <44338D08.3070000@micom.mng.net> <20060405102528.GE699@turion.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Jeremy wrote:
> On Wed, 2006-Apr-05 18:25:28 +0900, Ganbold wrote:
>   
>> db> x/lu cpu
>> cpu:    16
>>     
>
> That's correct for CPU_P4 but my reading of the code suggests that it
> should be initialised by identify_cpu to CPU_686 (7).
>
>   
>> db> x/lu cpu_class
>> cpu_class:      4
>>     
>
> And that's correct for CPUCLASS_686.
>
> It's beginning to look like the "switch (cpu_class)" statement doesn't
> have the I686_CPU code compiled in.  Do you want to double check that
> your kernel config really does have "cpu I686_CPU" and that you are
> running a kernel compiled from that config.  
>   
Sorry for the noise, it was my big fault, I was using I486_CPU instead 
of I686_CPU in the config and never thought this problem might happen 
because of incorrect CPU definition in the config.
Thanks a lot Peter, for pointing me this out.

Only one problem still remains, it still can not boot without
pressing "Enter" key at the boot prompt (- sign waits forever).
I created /boot.config with -Dh, now it shows boot.config: -Dh and waits 
for
user to press "Enter". FYI, it boots fine with Ubuntu Linux.
Please advise me, where should I look in the code for solution?
Is it under /usr/src/sys/boot/ or somewhere else?

thanks a lot,

Ganbold

> If your i386 assembler is up to it, you might like to disassemble
> printcpuinfo() using gdb and confirm that the above switch statement
> looks correct.  Unfortunately, it's a massive function so finding the
> relevant code is not trivial - though the extensive use of global
> variables makes it a lot easier than it could be.
>
> The relevant code in a -current kernel that I built last night looks
> like the following.  This covers the switch statement and the printf()
> statements that immediately preceded and follow it.  This was built
> using CPUTYPE=athlon-xp COPTFLAGS="-O -pipe" - the relative offsets
> may be different if you use different flags.  If you find the address
> of cpu_class (0xc0799440 in the following), there are only a couple of
> references to it and only one is followed by those cmp statements.
>
> The critical code is the 'cmp $0x4,%eax' - this is the
> 'case CPUCLASS_686:' test.
>
> 0xc0673400 <printcpuinfo+4432>: movl   $0xc0799460,0x4(%esp)
> 0xc0673408 <printcpuinfo+4440>: movl   $0xc06e3416,(%esp)
> 0xc067340f <printcpuinfo+4447>: call   0xc05243e0 <printf>
> 0xc0673414 <printcpuinfo+4452>: mov    0xc0799440,%eax
> 0xc0673419 <printcpuinfo+4457>: cmp    $0x1,%eax
> 0xc067341c <printcpuinfo+4460>: je     0xc067344b <printcpuinfo+4507>
> 0xc067341e <printcpuinfo+4462>: cmp    $0x1,%eax
> 0xc0673421 <printcpuinfo+4465>: jg     0xc0673430 <printcpuinfo+4480>
> 0xc0673423 <printcpuinfo+4467>: test   %eax,%eax
> 0xc0673425 <printcpuinfo+4469>: je     0xc067343a <printcpuinfo+4490>
> 0xc0673427 <printcpuinfo+4471>: jmp    0xc0673526 <printcpuinfo+4726>
> 0xc067342c <printcpuinfo+4476>: lea    0x0(%esi),%esi
> 0xc0673430 <printcpuinfo+4480>: cmp    $0x4,%eax
> 0xc0673433 <printcpuinfo+4483>: je     0xc067345c <printcpuinfo+4524>
> 0xc0673435 <printcpuinfo+4485>: jmp    0xc0673526 <printcpuinfo+4726>
> 0xc067343a <printcpuinfo+4490>: movl   $0xc06cdbea,(%esp)
> 0xc0673441 <printcpuinfo+4497>: call   0xc05243e0 <printf>
> 0xc0673446 <printcpuinfo+4502>: jmp    0xc0673532 <printcpuinfo+4738>
> 0xc067344b <printcpuinfo+4507>: movl   $0xc06e2d76,(%esp)
> 0xc0673452 <printcpuinfo+4514>: call   0xc05243e0 <printf>
> 0xc0673457 <printcpuinfo+4519>: jmp    0xc0673532 <printcpuinfo+4738>
> 0xc067345c <printcpuinfo+4524>: mov    0xc079b960,%ebx
> 0xc0673462 <printcpuinfo+4530>: mov    0xc079b964,%esi
> 0xc0673468 <printcpuinfo+4536>: mov    %ebx,%eax
> 0xc067346a <printcpuinfo+4538>: mov    %esi,%edx
> 0xc067346c <printcpuinfo+4540>: add    $0x1388,%eax
> 0xc0673471 <printcpuinfo+4545>: adc    $0x0,%edx
> 0xc0673474 <printcpuinfo+4548>: movl   $0xf4240,0x8(%esp)
> 0xc067347c <printcpuinfo+4556>: movl   $0x0,0xc(%esp)
> 0xc0673484 <printcpuinfo+4564>: mov    %eax,(%esp)
> 0xc0673487 <printcpuinfo+4567>: mov    %edx,0x4(%esp)
> 0xc067348b <printcpuinfo+4571>: call   0xc068bca0 <__udivdi3>
> 0xc0673490 <printcpuinfo+4576>: mov    %eax,0xc07994e0
> 0xc0673495 <printcpuinfo+4581>: add    $0x1387,%ebx
> 0xc067349b <printcpuinfo+4587>: adc    $0x0,%esi
> 0xc067349e <printcpuinfo+4590>: movl   $0x2710,0x8(%esp)
> 0xc06734a6 <printcpuinfo+4598>: movl   $0x0,0xc(%esp)
> 0xc06734ae <printcpuinfo+4606>: mov    %ebx,(%esp)
> 0xc06734b1 <printcpuinfo+4609>: mov    %esi,0x4(%esp)
> 0xc06734b5 <printcpuinfo+4613>: call   0xc068bca0 <__udivdi3>
> 0xc06734ba <printcpuinfo+4618>: mov    %eax,%ecx
> 0xc06734bc <printcpuinfo+4620>: mov    $0x51eb851f,%edx
> 0xc06734c1 <printcpuinfo+4625>: mov    %ecx,%eax
> 0xc06734c3 <printcpuinfo+4627>: mul    %edx
> 0xc06734c5 <printcpuinfo+4629>: shr    $0x5,%edx
> 0xc06734c8 <printcpuinfo+4632>: imul   $0x64,%edx,%edx
> 0xc06734cb <printcpuinfo+4635>: mov    %ecx,%eax
> 0xc06734cd <printcpuinfo+4637>: sub    %edx,%eax
> 0xc06734cf <printcpuinfo+4639>: mov    %eax,0xc(%esp)
> 0xc06734d3 <printcpuinfo+4643>: mov    0x8(%esp),%edx
> 0xc06734d7 <printcpuinfo+4647>: mov    0xc(%esp),%ecx
> 0xc06734db <printcpuinfo+4651>: mov    %edx,0xffffffdc(%ebp)
> 0xc06734de <printcpuinfo+4654>: mov    %ecx,0xffffffe0(%ebp)
> 0xc06734e1 <printcpuinfo+4657>: movl   $0xf4240,0x8(%esp)
> 0xc06734e9 <printcpuinfo+4665>: movl   $0x0,0xc(%esp)
> 0xc06734f1 <printcpuinfo+4673>: mov    %ebx,(%esp)
> 0xc06734f4 <printcpuinfo+4676>: mov    %esi,0x4(%esp)
> 0xc06734f8 <printcpuinfo+4680>: call   0xc068b610 <__divdi3>
> 0xc06734fd <printcpuinfo+4685>: mov    0xffffffe0(%ebp),%ebx
> 0xc0673500 <printcpuinfo+4688>: mov    %ebx,0xc(%esp)
> 0xc0673504 <printcpuinfo+4692>: mov    %eax,0x4(%esp)
> 0xc0673508 <printcpuinfo+4696>: mov    %edx,0x8(%esp)
> 0xc067350c <printcpuinfo+4700>: movl   $0xc06e341b,(%esp)
> 0xc0673513 <printcpuinfo+4707>: call   0xc05243e0 <printf>
> 0xc0673518 <printcpuinfo+4712>: movl   $0xc06e3171,(%esp)
> 0xc067351f <printcpuinfo+4719>: call   0xc05243e0 <printf>
> 0xc0673524 <printcpuinfo+4724>: jmp    0xc0673532 <printcpuinfo+4738>
> 0xc0673526 <printcpuinfo+4726>: movl   $0xc06e33dc,(%esp)
> 0xc067352d <printcpuinfo+4733>: call   0xc05243e0 <printf>
> 0xc0673532 <printcpuinfo+4738>: movl   $0xc06e3429,(%esp)
> 0xc0673539 <printcpuinfo+4745>: call   0xc05243e0 <printf>
>
>
>   
>> db>
>>
>> Ganbold
>>
>>
>> _______________________________________________
>> freebsd-current@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>>     
>
>   




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