Skip to content

Commit

Permalink
Add New Option to report CPUID And Flags. Move position of x2apic and…
Browse files Browse the repository at this point in the history
… remove duplication of fpu.
  • Loading branch information
eloaders committed Jan 22, 2014
1 parent 959f347 commit cd2a7a1
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 40 deletions.
32 changes: 12 additions & 20 deletions cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,23 +233,23 @@ int main(void)
printf(" \"FEATURE\": \"cx8\",\n");
printf(" \"WEBSITE\": \"mmxext\",\n");
printf(" \"HAVEWEBSITE\": 0 ,\n");
printf(" \"DESC\": \"CMPXCHG8B instruction supported\"\n");
printf(" \"DESC\": \"CMPXCHG8/CMPXCHG8B instruction supported\"\n");
printf(" },\n");
printf(" \"24\": {\n");
printf(" \"VALUE\": %s \n", data.flags[CPU_FEATURE_APIC] ? "1 ," : "0 ,");
printf(" \"NAME\": \"CPU_FEATURE_APIC\",\n");
printf(" \"FEATURE\": \"apic\",\n");
printf(" \"WEBSITE\": \"http://en.wikipedia.org/wiki/Advanced_Programmable_Interrupt_Controller\",\n");
printf(" \"HAVEWEBSITE\": 1 ,\n");
printf(" \"DESC\": \"APIC support\"\n");
printf(" \"DESC\": \"Advanced Programmable Interrupt Controller support\"\n");
printf(" },\n");
printf(" \"25\": {\n");
printf(" \"VALUE\": %s \n", data.flags[CPU_FEATURE_MTRR] ? "1 ," : "0 ,");
printf(" \"NAME\": \"CPU_FEATURE_MTRR\",\n");
printf(" \"FEATURE\": \"mtrr\",\n");
printf(" \"WEBSITE\": \"http://en.wikipedia.org/wiki/Memory_type_range_register\",\n");
printf(" \"VALUE\": %s \n", data.flags[CPU_FEATURE_X2APIC] ? "1 ," : "0 ,");
printf(" \"NAME\": \"CPU_FEATURE_X2APIC\",\n");
printf(" \"FEATURE\": \"x2apic\",\n");
printf(" \"WEBSITE\": \"http://en.wikipedia.org/wiki/X2APIC\",\n");
printf(" \"HAVEWEBSITE\": 1 ,\n");
printf(" \"DESC\": \"Memory type range registers\"\n");
printf(" \"DESC\": \"Intel 64 Architecture x2APIC Specification\"\n");
printf(" },\n");
printf(" \"26\": {\n");
printf(" \"VALUE\": %s \n", data.flags[CPU_FEATURE_SEP] ? "1 ," : "0 ,");
Expand Down Expand Up @@ -796,20 +796,12 @@ int main(void)
printf(" \"DESC\": \"MMX instruction set supported\"\n");
printf(" },\n");
printf(" \"94\": {\n");
printf(" \"VALUE\": %s \n", data.flags[CPU_FEATURE_FPU] ? "1 ," : "0 ,");
printf(" \"NAME\": \"CPU_FEATURE_FPU\",\n");
printf(" \"FEATURE\": \"fpu\",\n");
printf(" \"WEBSITE\": \"http://en.wikipedia.org/wiki/X87\",\n");
printf(" \"HAVEWEBSITE\": 1 ,\n");
printf(" \"DESC\": \"Floating point unit\"\n");
printf(" },\n");
printf(" \"95\": {\n");
printf(" \"VALUE\": %s \n", data.flags[CPU_FEATURE_X2APIC] ? "1 ," : "0 ,");
printf(" \"NAME\": \"CPU_FEATURE_X2APIC\",\n");
printf(" \"FEATURE\": \"x2apic\",\n");
printf(" \"WEBSITE\": \"http://en.wikipedia.org/wiki/X2APIC\",\n");
printf(" \"VALUE\": %s \n", data.flags[CPU_FEATURE_MTRR] ? "1 ," : "0 ,");
printf(" \"NAME\": \"CPU_FEATURE_MTRR\",\n");
printf(" \"FEATURE\": \"mtrr\",\n");
printf(" \"WEBSITE\": \"http://en.wikipedia.org/wiki/Memory_type_range_register\",\n");
printf(" \"HAVEWEBSITE\": 1 ,\n");
printf(" \"DESC\": \"Intel 64 Architecture x2APIC Specification\"\n");
printf(" \"DESC\": \"Memory type range registers\"\n");
printf(" }\n");
printf(" },\n");
printf(" \"L1_DATA_CACHE\": \"%d\",\n", data.l1_data_cache);
Expand Down
9 changes: 5 additions & 4 deletions src/i-nex/.settings
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ File[9]=".src/ScreenShotM.module:2.19"
File[10]=".src/USB_Drives.module:2.19"
File[11]=".src/Asound_Drives.module:2.19"
File[12]=".src/FReport_Gen.form"
File[13]=".src/FReport_Gen.class:42.41"
File[13]=".src/FReport_Gen.class:60.26"
File[14]=".src/Start_App_Args.form"
File[15]=".src/Start_App_Args.class:2.19"
File[16]=".src/ChkPrm.module:2.19"
Expand All @@ -48,8 +48,7 @@ File[21]=".src/net.module:2.19"
File[22]="Data/report-ng.sh:5.3"
File[23]=".src/Distribution_Detect.module:13.1"
File[24]=".src/FFlags.module:2.19"
Active=25
File[25]=".src/Finfosys.class:623.2"
File[25]=".src/Finfosys.class:144.34"
File[26]=".src/FDF.form"
File[27]=".src/FDF.class:26.6"
File[28]=".src/FNET_R_T.form"
Expand Down Expand Up @@ -88,7 +87,9 @@ File[60]=".src/FFileDialog.class:2.19"
File[61]=".src/FInputDate.class:2.19"
File[62]=".src/FDIMM.form"
File[63]=".src/FDIMM.class:72.16"
Count=63
Active=64
File[64]=".src/Reports/FCPUID_REPORT.module:2.0"
Count=64

[Watches]
Count=0
Expand Down
4 changes: 3 additions & 1 deletion src/i-nex/.src/FReport_Gen.class
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ Shell "rm " & ButtonBox1.Text & "" Wait
If CheckBox1.Value = True Then
Object.Call(MCPU_REPORT, "_inits")
Endif

If CheckBox22.Value = True Then
Object.Call(FCPUID_REPORT, "_inits")
Endif
If CheckBox3.Value = True Then
Object.Call(MGPU_REPORT, "_inits")
Endif
Expand Down
39 changes: 32 additions & 7 deletions src/i-nex/.src/FReport_Gen.form
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,49 @@
Move(7,7,224,350)
{ CheckBox1 CheckBox
Move(0,0,156,24)
Font = Font["Bold,8"]
Expand = True
Text = ("CPU Tab")
}
{ CheckBox22 CheckBox
Move(0,21,154,28)
Font = Font["Bold,8"]
Expand = True
Text = ("CPUID")
}
{ CheckBox3 CheckBox
Move(0,28,156,24)
Move(0,49,156,24)
Font = Font["Bold,8"]
Expand = True
Text = ("Graphics Tab")
}
{ CheckBox2 CheckBox
Move(0,56,156,24)
Move(0,77,156,24)
Font = Font["Bold,8"]
Expand = True
Text = ("Motherboard / Bios Tab")
}
{ CheckBox4 CheckBox
Move(0,84,156,24)
Move(0,105,156,24)
Font = Font["Bold,8"]
Expand = True
Text = ("Sound Tab")
}
{ CheckBox14 CheckBox
Move(0,112,168,28)
Move(0,133,168,28)
Font = Font["Bold,8"]
Expand = True
Text = ("Drives Tab")
}
{ CheckBox5 CheckBox
Move(0,140,168,28)
Move(0,161,168,28)
Font = Font["Bold,8"]
Expand = True
Text = ("System Tab")
}
{ CheckBox12 CheckBox
Move(0,168,168,28)
Move(0,189,168,28)
Font = Font["Bold,8"]
Expand = True
Text = ("Kernel Tab")
}
Expand All @@ -78,61 +91,73 @@
Move(245,7,224,350)
{ CheckBox6 CheckBox
Move(0,0,144,24)
Font = Font["8"]
Expand = True
Text = ("Include lspci")
}
{ CheckBox7 CheckBox
Move(0,24,144,24)
Font = Font["8"]
Expand = True
Text = ("Include lsusb")
}
{ CheckBox8 CheckBox
Move(0,48,196,28)
Move(0,48,196,21)
Font = Font["8"]
Expand = True
Text = ("Include /proc/scsi/scsi")
}
{ CheckBox9 CheckBox
Move(0,72,144,24)
Font = Font["8"]
Expand = True
Text = ("Include dmesg")
}
{ CheckBox15 CheckBox
Move(0,98,168,28)
Font = Font["8"]
Expand = True
Text = ("Include /proc/mtrr")
}
{ CheckBox16 CheckBox
Move(0,126,168,28)
Font = Font["8"]
Expand = True
Text = ("Include /proc/devices")
}
{ CheckBox17 CheckBox
Move(0,154,168,28)
Font = Font["8"]
Expand = True
Text = ("Include /proc/diskstats")
}
{ CheckBox18 CheckBox
Move(0,182,168,28)
Font = Font["8"]
Expand = True
Text = ("Include /proc/dma")
}
{ CheckBox10 CheckBox
Move(0,210,168,28)
Font = Font["8"]
Expand = True
Text = ("Include /proc/partitions")
}
{ CheckBox19 CheckBox
Move(0,238,168,28)
Font = Font["8"]
Expand = True
Text = ("Include /proc/modules")
}
{ CheckBox20 CheckBox
Move(0,266,168,28)
Font = Font["8"]
Expand = True
Text = ("Include /proc/cmdline")
}
{ CheckBox21 CheckBox
Move(0,294,168,28)
Font = Font["8"]
Expand = True
Text = ("Include /etc/default/grub")
}
Expand Down
16 changes: 8 additions & 8 deletions src/i-nex/.src/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.
Private ToolButton[96] As ToolButton
Private Label[96] As Label ' Dim the array of controls
Private Button[96] As Button
Private TextLabel[96] As TextLabel
Private ToolButton[95] As ToolButton
Private Label[95] As Label ' Dim the array of controls
Private Button[95] As Button
Private TextLabel[95] As TextLabel
Private YESNO As Picture
Public AllowLog As Boolean
Public sLine As String
Expand Down Expand Up @@ -84,7 +84,7 @@ Public Sub Form_Open()

Logs("Create Labels in ScrollView1", Logger.Info)

For i = 1 To 95
For i = 1 To 94
Label[i] = New Label(ScrollView1)
With Label[i]
.X = 2
Expand All @@ -98,7 +98,7 @@ Public Sub Form_Open()
End With
Next
Logs("Create ToolButtons in ScrollView1", Logger.Info)
For i = 1 To 95
For i = 1 To 94
ToolButton[i] = New ToolButton(ScrollView1)
If DATAT["Flags"][i]["VALUE"] = 1 Then
YESNO = Picture["Data/check_true.png"]
Expand All @@ -115,7 +115,7 @@ Public Sub Form_Open()
End With
Next
Logs("Create TextLabels in ScrollView1", Logger.Info)
For i = 1 To 95
For i = 1 To 94
Button[i] = New Button(ScrollView1) As "Buttongroup"
With Button[i]
.X = 400
Expand All @@ -131,7 +131,7 @@ Public Sub Form_Open()
.Picture = Picture["AppIcons/applications-internet.png"]
End With
Next
For i = 1 To 95
For i = 1 To 94
TextLabel[i] = New TextLabel(ScrollView1)
With TextLabel[i]
.X = 320
Expand Down
51 changes: 51 additions & 0 deletions src/i-nex/.src/Reports/FCPUID_REPORT.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
' Gambas module file

Public Sub _inits()
Dim i As Integer
Shell "echo '==========================================================CPUID==================================================================='>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "" & Finfosys.DATAT["VENDOR_STR"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "" & Finfosys.DATAT["CPU_CODENAME"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "" & Finfosys.DATAT["BRAND_STR"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "Cores: " & Finfosys.DATAT["NUM_CORES"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "Logical CPUS: " & Finfosys.DATAT["NUM_LOGICAL_CPUS"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "Total Logical CPUS: " & Finfosys.DATAT["TOTAL_LOGICAL_CPUS"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "Family: " & Finfosys.DATAT["FAMILY"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "Model: " & Finfosys.DATAT["MODEL"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "Stepping: " & Finfosys.DATAT["STEPPING"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "Ext Family: " & Finfosys.DATAT["EXT_FAMILY"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "Ext Model: " & Finfosys.DATAT["EXT_MODEL"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "CPU Clock: " & Finfosys.DATAT["CPU_CLOCK"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "CPU Clock BY OS: " & Finfosys.DATAT["CPU_CLOCK_BY_OS"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "CPU Clock BY IC: " & Finfosys.DATAT["CPU_CLOCK_BY_IC"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "CPU Clock Measure: " & Finfosys.DATAT["CPU_CLOCK_MEASURE"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "Mark TSC: " & Finfosys.DATAT["MARK_TSC"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "Mark SYS Clock: " & Finfosys.DATAT["MARK_SYS_CLOCK"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "L1 Data: " & Finfosys.DATAT["L1_DATA_CACHE"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "L1 Instr: " & Finfosys.DATAT["L1_INSTRUCTION_CACHE"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "L2 Cache: " & Finfosys.DATAT["L2_CACHE"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "L3 Cache: " & Finfosys.DATAT["L3_CACHE"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "L1 Assoc: " & Finfosys.DATAT["L1_ASSOC"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "L2 Assoc: " & Finfosys.DATAT["L2_ASSOC"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "L3 Assoc: " & Finfosys.DATAT["L3_ASSOC"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "L1 Cacheline: " & Finfosys.DATAT["L1_CACHELINE"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "L2 Cacheline: " & Finfosys.DATAT["L2_CACHELINE"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "L3 Cacheline: " & Finfosys.DATAT["L3_CACHELINE"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '" & "SSE Size: " & Finfosys.DATAT["SSE_SIZE"] & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Shell "echo '==========================================================FLAGS==================================================================='>>" & FReport_Gen.ButtonBox1.Text & "" Wait
For i = 1 To 94
FReport_Gen.ProgressBar1.Value = i / 94
Shell "echo '" & Finfosys.DATAT["Flags"][i]["DESC"] & " | " & Finfosys.DATAT["Flags"][i]["FEATURE"] & " | " & get_value(0, i) & " | " & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
Next
'Shell "echo '" & DATA_RETURN & "'>>" & FReport_Gen.ButtonBox1.Text & "" Wait
End

Function get_value(Value As Integer, Pos As Integer) As String

If Finfosys.DATAT["Flags"][Pos]["VALUE"] = 1 Then
Return "Is Supported"
Else
Return "Not Supported"
Endif

End

0 comments on commit cd2a7a1

Please sign in to comment.