Ignore:
Timestamp:
Dec 20, 2009, 3:02:02 PM (10 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Fix indentation and add licensing and copyright headers to kernel
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/kernel/drivers/processor.h

    r4154 r4158  
     1/*
     2 *  libcaca       
     3 *  libcaca       Colour ASCII-Art library
     4 *  Copyright (c) 2006 Sam Hocevar <sam@hocevar.net>
     5 *                2009 Jean-Yves Lamoureux <jylam@lnxscene.org>
     6 *                All Rights Reserved
     7 *
     8 *  $Id: kernel.h 4154 2009-12-20 13:33:11Z jylam $
     9 *
     10 *  This library is free software. It comes without any warranty, to
     11 *  the extent permitted by applicable law. You can redistribute it
     12 *  and/or modify it under the terms of the Do What The Fuck You Want
     13 *  To Public License, Version 2, as published by Sam Hocevar. See
     14 *  http://sam.zoy.org/wtfpl/COPYING for more details.
     15 */
    116
    2 enum cpuid_requests {
     17enum cpuid_requests
     18{
    319    CPUID_GETVENDORSTRING,
    420    CPUID_GETFEATURES,
    521    CPUID_GETTLB,
    622    CPUID_GETSERIAL,
    7    
    8     CPUID_INTELEXTENDED=0x80000000,
     23
     24    CPUID_INTELEXTENDED = 0x80000000,
    925    CPUID_INTELFEATURES,
    1026    CPUID_INTELBRANDSTRING,
     
    1329};
    1430
    15 enum {
    16     CPUID_FEAT_ECX_SSE3         = 1 << 0,
    17     CPUID_FEAT_ECX_PCLMUL       = 1 << 1,
    18     CPUID_FEAT_ECX_DTES64       = 1 << 2,
    19     CPUID_FEAT_ECX_MONITOR      = 1 << 3, 
    20     CPUID_FEAT_ECX_DS_CPL       = 1 << 4, 
    21     CPUID_FEAT_ECX_VMX          = 1 << 5, 
    22     CPUID_FEAT_ECX_SMX          = 1 << 6, 
    23     CPUID_FEAT_ECX_EST          = 1 << 7, 
    24     CPUID_FEAT_ECX_TM2          = 1 << 8, 
    25     CPUID_FEAT_ECX_SSSE3        = 1 << 9, 
    26     CPUID_FEAT_ECX_CID          = 1 << 10,
    27     CPUID_FEAT_ECX_FMA          = 1 << 12,
    28     CPUID_FEAT_ECX_CX16         = 1 << 13,
    29     CPUID_FEAT_ECX_ETPRD        = 1 << 14,
    30     CPUID_FEAT_ECX_PDCM         = 1 << 15,
    31     CPUID_FEAT_ECX_DCA          = 1 << 18,
    32     CPUID_FEAT_ECX_SSE4_1       = 1 << 19,
    33     CPUID_FEAT_ECX_SSE4_2       = 1 << 20,
    34     CPUID_FEAT_ECX_x2APIC       = 1 << 21,
    35     CPUID_FEAT_ECX_MOVBE        = 1 << 22,
    36     CPUID_FEAT_ECX_POPCNT       = 1 << 23,
    37     CPUID_FEAT_ECX_XSAVE        = 1 << 26,
    38     CPUID_FEAT_ECX_OSXSAVE      = 1 << 27,
    39     CPUID_FEAT_ECX_AVX          = 1 << 28,
    40    
    41     CPUID_FEAT_EDX_FPU          = 1 << 0, 
    42     CPUID_FEAT_EDX_VME          = 1 << 1, 
    43     CPUID_FEAT_EDX_DE           = 1 << 2, 
    44     CPUID_FEAT_EDX_PSE          = 1 << 3, 
    45     CPUID_FEAT_EDX_TSC          = 1 << 4, 
    46     CPUID_FEAT_EDX_MSR          = 1 << 5, 
    47     CPUID_FEAT_EDX_PAE          = 1 << 6, 
    48     CPUID_FEAT_EDX_MCE          = 1 << 7, 
    49     CPUID_FEAT_EDX_CX8          = 1 << 8, 
    50     CPUID_FEAT_EDX_APIC         = 1 << 9, 
    51     CPUID_FEAT_EDX_SEP          = 1 << 11,
    52     CPUID_FEAT_EDX_MTRR         = 1 << 12,
    53     CPUID_FEAT_EDX_PGE          = 1 << 13,
    54     CPUID_FEAT_EDX_MCA          = 1 << 14,
    55     CPUID_FEAT_EDX_CMOV         = 1 << 15,
    56     CPUID_FEAT_EDX_PAT          = 1 << 16,
    57     CPUID_FEAT_EDX_PSE36        = 1 << 17,
    58     CPUID_FEAT_EDX_PSN          = 1 << 18,
    59     CPUID_FEAT_EDX_CLF          = 1 << 19,
    60     CPUID_FEAT_EDX_DTES         = 1 << 21,
    61     CPUID_FEAT_EDX_ACPI         = 1 << 22,
    62     CPUID_FEAT_EDX_MMX          = 1 << 23,
    63     CPUID_FEAT_EDX_FXSR         = 1 << 24,
    64     CPUID_FEAT_EDX_SSE          = 1 << 25,
    65     CPUID_FEAT_EDX_SSE2         = 1 << 26,
    66     CPUID_FEAT_EDX_SS           = 1 << 27,
    67     CPUID_FEAT_EDX_HTT          = 1 << 28,
    68     CPUID_FEAT_EDX_TM1          = 1 << 29,
    69     CPUID_FEAT_EDX_IA64         = 1 << 30,
    70     CPUID_FEAT_EDX_PBE          = 1 << 31
     31enum
     32{
     33    CPUID_FEAT_ECX_SSE3 = 1 << 0,
     34    CPUID_FEAT_ECX_PCLMUL = 1 << 1,
     35    CPUID_FEAT_ECX_DTES64 = 1 << 2,
     36    CPUID_FEAT_ECX_MONITOR = 1 << 3,
     37    CPUID_FEAT_ECX_DS_CPL = 1 << 4,
     38    CPUID_FEAT_ECX_VMX = 1 << 5,
     39    CPUID_FEAT_ECX_SMX = 1 << 6,
     40    CPUID_FEAT_ECX_EST = 1 << 7,
     41    CPUID_FEAT_ECX_TM2 = 1 << 8,
     42    CPUID_FEAT_ECX_SSSE3 = 1 << 9,
     43    CPUID_FEAT_ECX_CID = 1 << 10,
     44    CPUID_FEAT_ECX_FMA = 1 << 12,
     45    CPUID_FEAT_ECX_CX16 = 1 << 13,
     46    CPUID_FEAT_ECX_ETPRD = 1 << 14,
     47    CPUID_FEAT_ECX_PDCM = 1 << 15,
     48    CPUID_FEAT_ECX_DCA = 1 << 18,
     49    CPUID_FEAT_ECX_SSE4_1 = 1 << 19,
     50    CPUID_FEAT_ECX_SSE4_2 = 1 << 20,
     51    CPUID_FEAT_ECX_x2APIC = 1 << 21,
     52    CPUID_FEAT_ECX_MOVBE = 1 << 22,
     53    CPUID_FEAT_ECX_POPCNT = 1 << 23,
     54    CPUID_FEAT_ECX_XSAVE = 1 << 26,
     55    CPUID_FEAT_ECX_OSXSAVE = 1 << 27,
     56    CPUID_FEAT_ECX_AVX = 1 << 28,
     57
     58    CPUID_FEAT_EDX_FPU = 1 << 0,
     59    CPUID_FEAT_EDX_VME = 1 << 1,
     60    CPUID_FEAT_EDX_DE = 1 << 2,
     61    CPUID_FEAT_EDX_PSE = 1 << 3,
     62    CPUID_FEAT_EDX_TSC = 1 << 4,
     63    CPUID_FEAT_EDX_MSR = 1 << 5,
     64    CPUID_FEAT_EDX_PAE = 1 << 6,
     65    CPUID_FEAT_EDX_MCE = 1 << 7,
     66    CPUID_FEAT_EDX_CX8 = 1 << 8,
     67    CPUID_FEAT_EDX_APIC = 1 << 9,
     68    CPUID_FEAT_EDX_SEP = 1 << 11,
     69    CPUID_FEAT_EDX_MTRR = 1 << 12,
     70    CPUID_FEAT_EDX_PGE = 1 << 13,
     71    CPUID_FEAT_EDX_MCA = 1 << 14,
     72    CPUID_FEAT_EDX_CMOV = 1 << 15,
     73    CPUID_FEAT_EDX_PAT = 1 << 16,
     74    CPUID_FEAT_EDX_PSE36 = 1 << 17,
     75    CPUID_FEAT_EDX_PSN = 1 << 18,
     76    CPUID_FEAT_EDX_CLF = 1 << 19,
     77    CPUID_FEAT_EDX_DTES = 1 << 21,
     78    CPUID_FEAT_EDX_ACPI = 1 << 22,
     79    CPUID_FEAT_EDX_MMX = 1 << 23,
     80    CPUID_FEAT_EDX_FXSR = 1 << 24,
     81    CPUID_FEAT_EDX_SSE = 1 << 25,
     82    CPUID_FEAT_EDX_SSE2 = 1 << 26,
     83    CPUID_FEAT_EDX_SS = 1 << 27,
     84    CPUID_FEAT_EDX_HTT = 1 << 28,
     85    CPUID_FEAT_EDX_TM1 = 1 << 29,
     86    CPUID_FEAT_EDX_IA64 = 1 << 30,
     87    CPUID_FEAT_EDX_PBE = 1 << 31
    7188};
    7289
    73 struct processor_info {
    74     int  id;
     90struct processor_info
     91{
     92    int id;
    7593    char vendor[13];
    7694    unsigned int features;
Note: See TracChangeset for help on using the changeset viewer.