[Lost] [Patch] sysinfo
Kevin Wolf ·
stultus / dunklermeuchler schrieb:
> +/**
> + * Struktur fuer die Infos aus CPUID, Level 1
> + * Enthaelt Infos ueber den APIC (ebx) sowie die Standardflags (edx, ecx)
> + */
> +typedef struct {
> + dword eax;
> + union {
> + dword ebx;
> + struct {
> + byte apic_id;
> + byte cpu_count;
> + byte clflush;
> + byte brand_id;
> + };
> + };
> + dword ecx;
> + dword edx;
> +} cpuid_1;
Hier sind die Einrückungen kaputt.
> void cpuid(dword* eax, dword* ebx, dword* ecx, dword* edx)
> {
> asm volatile("cpuid"
> - : "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
> - : "a"(eax), "b"(ebx), "c"(ecx), "d"(edx));
> + : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx)
> + : "a"(*eax), "b"(*ebx), "c"(*ecx), "d"(*edx)
> + );
> }
Hier zu groß. Vier Zeichen Einrückung bezüglich dem asm jeweils vor den
Doppelpunkten, die schließende Klammer auf dieselbe Spalte wie das asm.
> + cpuid(&result.max_level,
> + (dword*)(&result.vendorID[0]),
> + (dword*)(&result.vendorID[8]),
> + (dword*)(&result.vendorID[4]));
Hier auch nur vier Zeichen (dieser Aufruf kommt mehrfach vor)