So this is the 3º patch for Processor.cs with some luck it will identify
correct amd family and modelto apply in Kernel\Core\ADC\X86\Processor.cs
so it will need someone to test it before i dint have a AMD cpu abandoned here
:P
----------------------------------------------------------------We lay our
souls into your handsand our freedom remainswe ride on wings of hopeand our
star will rise againBy John StormDrakeOpen your soul...Open your code...Free
your mind...Free your Software...Break the chains
_________________________________________________________________
Conheça o Windows Live Spaces, a rede de relacionamentos do Messenger!
http://www.amigosdomessenger.com.br/
Index: Processor.cs
===================================================================
--- Processor.cs (revision 1122)
+++ Processor.cs (working copy)
@@ -7,7 +7,7 @@
// Cédric Rousseau <[EMAIL PROTECTED]>
// João Manganeli Neto <[EMAIL PROTECTED]>
//
-// Licensed under the terms of the GNU GPL v3,
+// Licensed under the terms of the GNU GPL v3,
// with Classpath Linking Exception for Libraries
//
@@ -402,9 +402,104 @@
internal unsafe void SetAMD()
{
- brandName = GetBrandName();
- familyName = CString8.Copy("Not implemented yet");
- modelName = CString8.Copy("Not implemented yet");
+ UInt32 eax = 0, ebx = 0, ecx = 0, edx = 0;
+ uint family, model;
+ Asm.XOR(R32.EAX, R32.EAX);
+ Asm.INC(R32.EAX);
+ Asm.CPUID();
+ Asm.MOV(&eax, R32.EAX);
+ Asm.MOV(&ebx, R32.EBX);
+ Asm.MOV(&edx, R32.EDX);
+ Asm.MOV(&ecx, R32.ECX);
+
+ //brand = ebx & 0x0F;
+
+ family = ((eax >> 8) & 0x0F);// +((eax >> 20) & 0x0F);
+
+ model = ((eax >> 4) & 0x0F);// | ((eax >> 12) & 0x0F);
+
+ switch (family)
+ {
+ case 0x4:
+ familyName = CString8.Copy("AMD Family 486");
+ switch (model)
+ {
+ case 0x1:
+ case 0x3:
+ case 0x7:
+ case 0x8:
+ case 0x9:
+ modelName = CString8.Copy("Am486");
+ break;
+ case 0xE:
+ case 0xF:
+ modelName = CString8.Copy("Am5x86");
+ break;
+ }
+ break;
+ case 0x5:
+ familyName = CString8.Copy("AMD Family 586");
+ switch (model)
+ {
+ case 0x0:
+ case 0x1:
+ case 0x2:
+ case 0x3:
+ modelName = CString8.Copy("AMD-K5");
+ break;
+ case 0x6:
+ case 0x7:
+ modelName = CString8.Copy("AMD-K6");
+ break;
+ case 0x8:
+ modelName = CString8.Copy("AMD-K6-2");
+ break;
+ case 0x9:
+ modelName = CString8.Copy("AMD-K6-III");
+ break;
+ }
+ break;
+ case 0x6:
+ familyName = CString8.Copy("AMD Family 686");
+ switch (model)
+ {
+ case 0x1:
+ case 0x2:
+ case 0x4:
+ case 0x6:
+ case 0x8:
+ case 0xA:
+ modelName = CString8.Copy("AMD Athlon");
+ break;
+ case 0x3:
+ case 0x7:
+ modelName = CString8.Copy("AMD Duron");
+ break;
+ default:
+ modelName = CString8.Copy("Unknown AMD Athlon");
+ break;
+ }
+ break;
+ case 0xF:
+ familyName = CString8.Copy("AMD Family Extended");
+ switch (model)
+ {
+ case 0x4:
+ modelName = CString8.Copy("AMD Athlon 64");
+ break;
+ case 0x5:
+ modelName = CString8.Copy("AMD Opteron");
+ break;
+ default:
+ modelName = CString8.Copy("Unknown AMD-64");
+ break;
+ }
+ break;
+ default:
+ familyName = CString8.Copy("Unknown AMD");
+ modelName = CString8.Copy("Unknown AMD");
+ break;
+ }
}
internal unsafe static bool HaveCPUID()
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
SharpOS-Developers mailing list
SharpOS-Developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpos-developers