Skip to content

Commit

Permalink
💩 I have just finished the part of the cpuid instruction.
Browse files Browse the repository at this point in the history
I have just finished the part of the cpuid instruction that works but is bad and not optimised. I have found few solutions to optimise it.
  • Loading branch information
Unam3dd committed Jun 11, 2024
1 parent ff25987 commit b0e61a3
Show file tree
Hide file tree
Showing 6 changed files with 586 additions and 109 deletions.
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tasks:
- sh: '{{if eq OS "windows"}} powershell.exe -Command Test-Path dist {{else}} test ! -d dist {{end}}'
msg: "Nothing to be done."
cmds:
- meson setup build --buildtype=debugoptimized --prefix=$(pwd)
- meson setup build --buildtype=debug --prefix=$(pwd)
- ninja -C build install
silent: true
desc: "Build the project in dev build"
Expand Down
282 changes: 207 additions & 75 deletions inc/eth-cpuid-flag.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,17 @@ typedef enum eth_cpuid_eax_flag_t

typedef enum eth_cpuid_ecx_flag_t
{
ETH_CPUID_EXT_FEAT_ECX_PAGE_1 = 0x0,
ETH_CPUID_EXT_FEAT_ECX_PAGE_2 = 0x1,
ETH_CPUID_EXT_FEAT_ECX_PAGE_3 = 0x2,
ETH_CPUID_XSAVE_FEAT_ECX_PAGE_1 = 0x0,
ETH_CPUID_XSAVE_FEAT_ECX_PAGE_2 = 0x1,
ETH_CPUID_SGX_ECX_PAGE_1 = 0x0,
ETH_CPUID_SGX_ECX_PAGE_2 = 0x1,
ETH_CPUID_SGX_ECX_PAGE_3 = 0x2,
ETH_CPUID_PROC_TRACE_ECX = 0x0,
ETH_CPUID_SOC_VENDOR_ATTRIB_ECX = 0x0,
ETH_CPUID_AVX10_FEAT_ECX = 0x0,
ETH_CPUID_DISCRET_AVX10_FEAT_ECX = 0x1
FEAT_ECX_PAGE_1 = 0x1,
FEAT_ECX_PAGE_2 = 0x2,
XSAVE_FEAT_ECX_PAGE_1 = 0x0,
XSAVE_FEAT_ECX_PAGE_2 = 0x1,
SGX_ECX_PAGE_1 = 0x0,
SGX_ECX_PAGE_2 = 0x1,
SGX_ECX_PAGE_3 = 0x2,
PROC_TRACE_ECX = 0x0,
SOC_VENDOR_ATTRIB_ECX = 0x0,
AVX10_FEAT_ECX = 0x0,
DISCRET_AVX10_FEAT_ECX = 0x1
} eth_cpuid_ecx_flag_t;

typedef enum eth_cpuid_reg_index_t
Expand All @@ -85,68 +84,200 @@ typedef enum eth_cpuid_reg_index_t
#pragma GCC diagnostic ignored "-Wpedantic"
typedef enum eth_cpuid_feat_flag_t
{
ETH_CPUID_FEAT_FPU = BIN_NUM_1(0),
ETH_CPUID_FEAT_VME = BIN_NUM_1(1),
ETH_CPUID_FEAT_DE = BIN_NUM_1(2),
ETH_CPUID_FEAT_PSE = BIN_NUM_1(3),
ETH_CPUID_FEAT_TSC = BIN_NUM_1(4),
ETH_CPUID_FEAT_MSR = BIN_NUM_1(5),
ETH_CPUID_FEAT_PAE = BIN_NUM_1(6),
ETH_CPUID_FEAT_MCE = BIN_NUM_1(7),
ETH_CPUID_FEAT_CX8 = BIN_NUM_1(8),
ETH_CPUID_FEAT_APIC = BIN_NUM_1(9),
ETH_CPUID_FEAT_SEP = BIN_NUM_1(11),
ETH_CPUID_FEAT_MTRR = BIN_NUM_1(12),
ETH_CPUID_FEAT_PGE = BIN_NUM_1(13),
ETH_CPUID_FEAT_MCA = BIN_NUM_1(14),
ETH_CPUID_FEAT_CMOV = BIN_NUM_1(15),
ETH_CPUID_FEAT_PAT = BIN_NUM_1(16),
ETH_CPUID_FEAT_PSE36 = BIN_NUM_1(17),
ETH_CPUID_FEAT_PSN = BIN_NUM_1(18),
ETH_CPUID_FEAT_CLFSH = BIN_NUM_1(19),
ETH_CPUID_FEAT_NX = BIN_NUM_1(20),
ETH_CPUID_FEAT_DS = BIN_NUM_1(21),
ETH_CPUID_FEAT_ACPI = BIN_NUM_1(22),
ETH_CPUID_FEAT_MMX = BIN_NUM_1(23),
ETH_CPUID_FEAT_FXSR = BIN_NUM_1(24),
ETH_CPUID_FEAT_SSE = BIN_NUM_1(25),
ETH_CPUID_FEAT_SSE2 = BIN_NUM_1(26),
ETH_CPUID_FEAT_SS = BIN_NUM_1(27),
ETH_CPUID_FEAT_HTT = BIN_NUM_1(28),
ETH_CPUID_FEAT_TM = BIN_NUM_1(29),
ETH_CPUID_FEAT_IA64 = BIN_NUM_1(30),
ETH_CPUID_FEAT_PBE = BIN_NUM_1(31),
ETH_CPUID_FEAT_SSE3 = BIN_NUM_1(0),
ETH_CPUID_FEAT_PCLMULQDQ = BIN_NUM_1(1),
ETH_CPUID_FEAT_DTES64 = BIN_NUM_1(2),
ETH_CPUID_FEAT_MONITOR = BIN_NUM_1(3),
ETH_CPUID_FEAT_DS_CPL = BIN_NUM_1(4),
ETH_CPUID_FEAT_VMX = BIN_NUM_1(5),
ETH_CPUID_FEAT_SMX = BIN_NUM_1(6),
ETH_CPUID_FEAT_EST = BIN_NUM_1(7),
ETH_CPUID_FEAT_TM2 = BIN_NUM_1(8),
ETH_CPUID_FEAT_SSSE3 = BIN_NUM_1(9),
ETH_CPUID_FEAT_CNXT_ID = BIN_NUM_1(10),
ETH_CPUID_FEAT_SDBG = BIN_NUM_1(11),
ETH_CPUID_FEAT_FMA = BIN_NUM_1(12),
ETH_CPUID_FEAT_CX16 = BIN_NUM_1(13),
ETH_CPUID_FEAT_XTPR = BIN_NUM_1(14),
ETH_CPUID_FEAT_PDCM = BIN_NUM_1(15),
ETH_CPUID_FEAT_PCID = BIN_NUM_1(17),
ETH_CPUID_FEAT_DCA = BIN_NUM_1(18),
ETH_CPUID_FEAT_SSE41 = BIN_NUM_1(19),
ETH_CPUID_FEAT_SSE42 = BIN_NUM_1(20),
ETH_CPUID_FEAT_X2APIC = BIN_NUM_1(21),
ETH_CPUID_FEAT_MOVBE = BIN_NUM_1(22),
ETH_CPUID_FEAT_POPCNT = BIN_NUM_1(23),
ETH_CPUID_FEAT_TSC_DLINE = BIN_NUM_1(24),
ETH_CPUID_FEAT_AES_NI = BIN_NUM_1(25),
ETH_CPUID_FEAT_XSAVE = BIN_NUM_1(26),
ETH_CPUID_FEAT_OSXSAVE = BIN_NUM_1(27),
ETH_CPUID_FEAT_AVX = BIN_NUM_1(28),
ETH_CPUID_FEAT_F16C = BIN_NUM_1(29),
ETH_CPUID_FEAT_RDRND = BIN_NUM_1(30),
ETH_CPUID_FEAT_HYPERVISOR = BIN_NUM_1(31)
ETH_CPUID_FEAT_FPU = BIN_NUM_1(0),
ETH_CPUID_FEAT_VME = BIN_NUM_1(1),
ETH_CPUID_FEAT_DE = BIN_NUM_1(2),
ETH_CPUID_FEAT_PSE = BIN_NUM_1(3),
ETH_CPUID_FEAT_TSC = BIN_NUM_1(4),
ETH_CPUID_FEAT_MSR = BIN_NUM_1(5),
ETH_CPUID_FEAT_PAE = BIN_NUM_1(6),
ETH_CPUID_FEAT_MCE = BIN_NUM_1(7),
ETH_CPUID_FEAT_CX8 = BIN_NUM_1(8),
ETH_CPUID_FEAT_APIC = BIN_NUM_1(9),
ETH_CPUID_FEAT_SEP = BIN_NUM_1(11),
ETH_CPUID_FEAT_MTRR = BIN_NUM_1(12),
ETH_CPUID_FEAT_PGE = BIN_NUM_1(13),
ETH_CPUID_FEAT_MCA = BIN_NUM_1(14),
ETH_CPUID_FEAT_CMOV = BIN_NUM_1(15),
ETH_CPUID_FEAT_PAT = BIN_NUM_1(16),
ETH_CPUID_FEAT_PSE36 = BIN_NUM_1(17),
ETH_CPUID_FEAT_PSN = BIN_NUM_1(18),
ETH_CPUID_FEAT_CLFSH = BIN_NUM_1(19),
ETH_CPUID_FEAT_NX = BIN_NUM_1(20),
ETH_CPUID_FEAT_DS = BIN_NUM_1(21),
ETH_CPUID_FEAT_ACPI = BIN_NUM_1(22),
ETH_CPUID_FEAT_MMX = BIN_NUM_1(23),
ETH_CPUID_FEAT_FXSR = BIN_NUM_1(24),
ETH_CPUID_FEAT_SSE = BIN_NUM_1(25),
ETH_CPUID_FEAT_SSE2 = BIN_NUM_1(26),
ETH_CPUID_FEAT_SS = BIN_NUM_1(27),
ETH_CPUID_FEAT_HTT = BIN_NUM_1(28),
ETH_CPUID_FEAT_TM = BIN_NUM_1(29),
ETH_CPUID_FEAT_IA64 = BIN_NUM_1(30),
ETH_CPUID_FEAT_PBE = BIN_NUM_1(31),
ETH_CPUID_FEAT_SSE3 = BIN_NUM_1(0),
ETH_CPUID_FEAT_PCLMULQDQ = BIN_NUM_1(1),
ETH_CPUID_FEAT_DTES64 = BIN_NUM_1(2),
ETH_CPUID_FEAT_MONITOR = BIN_NUM_1(3),
ETH_CPUID_FEAT_DS_CPL = BIN_NUM_1(4),
ETH_CPUID_FEAT_VMX = BIN_NUM_1(5),
ETH_CPUID_FEAT_SMX = BIN_NUM_1(6),
ETH_CPUID_FEAT_EST = BIN_NUM_1(7),
ETH_CPUID_FEAT_TM2 = BIN_NUM_1(8),
ETH_CPUID_FEAT_SSSE3 = BIN_NUM_1(9),
ETH_CPUID_FEAT_CNXT_ID = BIN_NUM_1(10),
ETH_CPUID_FEAT_SDBG = BIN_NUM_1(11),
ETH_CPUID_FEAT_FMA = BIN_NUM_1(12),
ETH_CPUID_FEAT_CX16 = BIN_NUM_1(13),
ETH_CPUID_FEAT_XTPR = BIN_NUM_1(14),
ETH_CPUID_FEAT_PDCM = BIN_NUM_1(15),
ETH_CPUID_FEAT_PCID = BIN_NUM_1(17),
ETH_CPUID_FEAT_DCA = BIN_NUM_1(18),
ETH_CPUID_FEAT_SSE41 = BIN_NUM_1(19),
ETH_CPUID_FEAT_SSE42 = BIN_NUM_1(20),
ETH_CPUID_FEAT_X2APIC = BIN_NUM_1(21),
ETH_CPUID_FEAT_MOVBE = BIN_NUM_1(22),
ETH_CPUID_FEAT_POPCNT = BIN_NUM_1(23),
ETH_CPUID_FEAT_TSC_DLINE = BIN_NUM_1(24),
ETH_CPUID_FEAT_AES_NI = BIN_NUM_1(25),
ETH_CPUID_FEAT_XSAVE = BIN_NUM_1(26),
ETH_CPUID_FEAT_OSXSAVE = BIN_NUM_1(27),
ETH_CPUID_FEAT_AVX = BIN_NUM_1(28),
ETH_CPUID_FEAT_F16C = BIN_NUM_1(29),
ETH_CPUID_FEAT_RDRND = BIN_NUM_1(30),
ETH_CPUID_FEAT_HYPERVISOR = BIN_NUM_1(31),
ETH_CPUID_EXT_FEAT_FSGSBASE = BIN_NUM_1(0),
ETH_CPUID_EXT_FEAT_IA32_TSC_ADJUST_MSR = BIN_NUM_1(1),
ETH_CPUID_EXT_FEAT_SGX = BIN_NUM_1(2),
ETH_CPUID_EXT_FEAT_BMI1 = BIN_NUM_1(3),
ETH_CPUID_EXT_FEAT_HLE = BIN_NUM_1(4),
ETH_CPUID_EXT_FEAT_AVX2 = BIN_NUM_1(5),
ETH_CPUID_EXT_FEAT_FDP = BIN_NUM_1(6),
ETH_CPUID_EXT_FEAT_SMEP = BIN_NUM_1(7),
ETH_CPUID_EXT_FEAT_BMI2 = BIN_NUM_1(8),
ETH_CPUID_EXT_FEAT_ERMS = BIN_NUM_1(9),
ETH_CPUID_EXT_FEAT_INVPCID = BIN_NUM_1(10),
ETH_CPUID_EXT_FEAT_RTM = BIN_NUM_1(11),
ETH_CPUID_EXT_FEAT_RDTM_PQM = BIN_NUM_1(12),
ETH_CPUID_EXT_FEAT_X87_FPU = BIN_NUM_1(13),
ETH_CPUID_EXT_FEAT_MPX = BIN_NUM_1(14),
ETH_CPUID_EXT_FEAT_RDTA_PQE = BIN_NUM_1(15),
ETH_CPUID_EXT_FEAT_AVX512F = BIN_NUM_1(16),
ETH_CPUID_EXT_FEAT_AVX512DQ = BIN_NUM_1(17),
ETH_CPUID_EXT_FEAT_RDSEED = BIN_NUM_1(18),
ETH_CPUID_EXT_FEAT_ADX = BIN_NUM_1(19),
ETH_CPUID_EXT_FEAT_SMAP = BIN_NUM_1(20),
ETH_CPUID_EXT_FEAT_AVX512_IFMA = BIN_NUM_1(21),
ETH_CPUID_EXT_FEAT_PCOMMIT = BIN_NUM_1(22),
ETH_CPUID_EXT_FEAT_CLFLUSHOPT = BIN_NUM_1(23),
ETH_CPUID_EXT_FEAT_CLWB = BIN_NUM_1(24),
ETH_CPUID_EXT_FEAT_PT = BIN_NUM_1(25),
ETH_CPUID_EXT_FEAT_AVX512_PF = BIN_NUM_1(26),
ETH_CPUID_EXT_FEAT_AVX512_ER = BIN_NUM_1(27),
ETH_CPUID_EXT_FEAT_AVX512_CD = BIN_NUM_1(28),
ETH_CPUID_EXT_FEAT_SHA = BIN_NUM_1(29),
ETH_CPUID_EXT_FEAT_AVX512_BW = BIN_NUM_1(30),
ETH_CPUID_EXT_FEAT_AVX512_VL = BIN_NUM_1(31),
ETH_CPUID_EXT_FEAT_PREFETCHWT1 = BIN_NUM_1(0),
ETH_CPUID_EXT_FEAT_AVX512_VBMI = BIN_NUM_1(1),
ETH_CPUID_EXT_FEAT_UMIP = BIN_NUM_1(2),
ETH_CPUID_EXT_FEAT_PKU = BIN_NUM_1(3),
ETH_CPUID_EXT_FEAT_OSPKE = BIN_NUM_1(4),
ETH_CPUID_EXT_FEAT_WAITPKG = BIN_NUM_1(5),
ETH_CPUID_EXT_FEAT_AVX512_VBMI2 = BIN_NUM_1(6),
ETH_CPUID_EXT_FEAT_CET_SS = BIN_NUM_1(7),
ETH_CPUID_EXT_FEAT_GFNI = BIN_NUM_1(8),
ETH_CPUID_EXT_FEAT_VAES = BIN_NUM_1(9),
ETH_CPUID_EXT_FEAT_VPCLMULQDQ = BIN_NUM_1(10),
ETH_CPUID_EXT_FEAT_AVX512_VNNI = BIN_NUM_1(11),
ETH_CPUID_EXT_FEAT_AVX512_BITALG = BIN_NUM_1(12),
ETH_CPUID_EXT_FEAT_TME_EN = BIN_NUM_1(13),
ETH_CPUID_EXT_FEAT_AVX512_VPOPCNTDQ = BIN_NUM_1(14),
ETH_CPUID_EXT_FEAT_FZM = BIN_NUM_1(15),
ETH_CPUID_EXT_FEAT_LA57 = BIN_NUM_1(16),
ETH_CPUID_EXT_FEAT_MAWAU = BIN_NUM_5(17),
ETH_CPUID_EXT_FEAT_RDPID = BIN_NUM_1(22),
ETH_CPUID_EXT_FEAT_KL = BIN_NUM_1(23),
ETH_CPUID_EXT_FEAT_BUS_LOCK_DETECT = BIN_NUM_1(24),
ETH_CPUID_EXT_FEAT_CLDEMOTE = BIN_NUM_1(25),
ETH_CPUID_EXT_FEAT_MPRR = BIN_NUM_1(26),
ETH_CPUID_EXT_FEAT_MOVDIRI = BIN_NUM_1(27),
ETH_CPUID_EXT_FEAT_MOVDIR64B = BIN_NUM_1(28),
ETH_CPUID_EXT_FEAT_ENQCMD = BIN_NUM_1(29),
ETH_CPUID_EXT_FEAT_SGX_LC = BIN_NUM_1(30),
ETH_CPUID_EXT_FEAT_PKS = BIN_NUM_1(31),
ETH_CPUID_EXT_FEAT_SGX_TERM = BIN_NUM_1(0),
ETH_CPUID_EXT_FEAT_SGX_KEYS = BIN_NUM_1(1),
ETH_CPUID_EXT_FEAT_AVX512_4VNNIW = BIN_NUM_1(2),
ETH_CPUID_EXT_FEAT_AVX512_4FMAPS = BIN_NUM_1(3),
ETH_CPUID_EXT_FEAT_FSRM = BIN_NUM_1(4),
ETH_CPUID_EXT_FEAT_UINTR = BIN_NUM_1(5),
ETH_CPUID_EXT_FEAT_AVX512_VP2INTERSECT = BIN_NUM_1(8),
ETH_CPUID_EXT_FEAT_SRBDS_CTRL = BIN_NUM_1(9),
ETH_CPUID_EXT_FEAT_MD_CLEAR = BIN_NUM_1(10),
ETH_CPUID_EXT_FEAT_RTM_ALWAYS_ABORT = BIN_NUM_1(11),
ETH_CPUID_EXT_FEAT_RTM_FORCE_ABORT = BIN_NUM_1(13),
ETH_CPUID_EXT_FEAT_SERIALIZE = BIN_NUM_1(14),
ETH_CPUID_EXT_FEAT_HYBRID = BIN_NUM_1(15),
ETH_CPUID_EXT_FEAT_TSXLDTRK = BIN_NUM_1(16),
ETH_CPUID_EXT_FEAT_PCONFIG = BIN_NUM_1(18),
ETH_CPUID_EXT_FEAT_LBR = BIN_NUM_1(19),
ETH_CPUID_EXT_FEAT_CET_IBT = BIN_NUM_1(20),
ETH_CPUID_EXT_FEAT_AMX_BF16 = BIN_NUM_1(22),
ETH_CPUID_EXT_FEAT_AVX512_FP16 = BIN_NUM_1(23),
ETH_CPUID_EXT_FEAT_AMX_TILE = BIN_NUM_1(24),
ETH_CPUID_EXT_FEAT_AMX_INT8 = BIN_NUM_1(25),
ETH_CPUID_EXT_FEAT_IBRS = BIN_NUM_1(26),
ETH_CPUID_EXT_FEAT_STIBP = BIN_NUM_1(27),
ETH_CPUID_EXT_FEAT_L1D_FLUSH = BIN_NUM_1(28),
ETH_CPUID_EXT_FEAT_IA32_ARCH_CAP_MSR = BIN_NUM_1(29),
ETH_CPUID_EXT_FEAT_IA32_CORE_CAP_MSR = BIN_NUM_1(30),
ETH_CPUID_EXT_FEAT_SSBD = BIN_NUM_1(31),
ETH_CPUID_EXT_FEAT_SHA512 = BIN_NUM_1(0),
ETH_CPUID_EXT_FEAT_SM3 = BIN_NUM_1(1),
ETH_CPUID_EXT_FEAT_SM4 = BIN_NUM_1(2),
ETH_CPUID_EXT_FEAT_RAO_INT = BIN_NUM_1(3),
ETH_CPUID_EXT_FEAT_AVX_VNNI = BIN_NUM_1(4),
ETH_CPUID_EXT_FEAT_AVX512_BF16 = BIN_NUM_1(5),
ETH_CPUID_EXT_FEAT_LASS = BIN_NUM_1(6),
ETH_CPUID_EXT_FEAT_CMPCCXADD = BIN_NUM_1(7),
ETH_CPUID_EXT_FEAT_ARCHPERFMONEXT = BIN_NUM_1(8),
ETH_CPUID_EXT_FEAT_DEDUP = BIN_NUM_1(9),
ETH_CPUID_EXT_FEAT_FZRM = BIN_NUM_1(10),
ETH_CPUID_EXT_FEAT_FSRS = BIN_NUM_1(11),
ETH_CPUID_EXT_FEAT_RSRCS = BIN_NUM_1(12),
ETH_CPUID_EXT_FEAT_FRED = BIN_NUM_1(17),
ETH_CPUID_EXT_FEAT_LKGS = BIN_NUM_1(18),
ETH_CPUID_EXT_FEAT_WRMSRNS = BIN_NUM_1(19),
ETH_CPUID_EXT_FEAT_NMI_SRC = BIN_NUM_1(20),
ETH_CPUID_EXT_FEAT_AMX_FP16 = BIN_NUM_1(21),
ETH_CPUID_EXT_FEAT_HRESET = BIN_NUM_1(22),
ETH_CPUID_EXT_FEAT_AVX_IFMA = BIN_NUM_1(23),
ETH_CPUID_EXT_FEAT_LAM = BIN_NUM_1(26),
ETH_CPUID_EXT_FEAT_MSRLIST = BIN_NUM_1(27),
ETH_CPUID_EXT_FEAT_INVD_DISABLE_POST_BIOS_DONE = BIN_NUM_1(30),
ETH_CPUID_EXT_FEAT_IA32_PPIN_CTL = BIN_NUM_1(0),
ETH_CPUID_EXT_FEAT_PBNDKB = BIN_NUM_1(1),
ETH_CPUID_EXT_FEAT_LEGACY_REDUCED_ISA = BIN_NUM_1(2),
ETH_CPUID_EXT_FEAT_SIPI_64 = BIN_NUM_1(4),
ETH_CPUID_EXT_FEAT_AVX_VNNI_INT8 = BIN_NUM_1(4),
ETH_CPUID_EXT_FEAT_AVX_NE_CONVERT = BIN_NUM_1(5),
ETH_CPUID_EXT_FEAT_AMX_COMPLEX = BIN_NUM_1(8),
ETH_CPUID_EXT_FEAT_AVX_VNNI_INT16 = BIN_NUM_1(10),
ETH_CPUID_EXT_FEAT_UTMR = BIN_NUM_1(13),
ETH_CPUID_EXT_FEAT_PREFETCHI = BIN_NUM_1(14),
ETH_CPUID_EXT_FEAT_USER_MSR = BIN_NUM_1(15),
ETH_CPUID_EXT_FEAT_UIRET_UIF_FROM_RFLAGS = BIN_NUM_1(17),
ETH_CPUID_EXT_FEAT_CET_SSS = BIN_NUM_1(18),
ETH_CPUID_EXT_FEAT_AVX10 = BIN_NUM_1(19),
ETH_CPUID_EXT_FEAT_APX_F = BIN_NUM_1(21),
ETH_CPUID_EXT_FEAT_MWAIT = BIN_NUM_1(23),
ETH_CPUID_EXT_FEAT_PSFD = BIN_NUM_1(0),
ETH_CPUID_EXT_FEAT_IPRED_CTRL = BIN_NUM_1(1),
ETH_CPUID_EXT_FEAT_RRSBA_CTRL = BIN_NUM_1(2),
ETH_CPUID_EXT_FEAT_DDPD_U = BIN_NUM_1(3),
ETH_CPUID_EXT_FEAT_BHI_CTRL = BIN_NUM_1(4),
ETH_CPUID_EXT_FEAT_MCDT_NO = BIN_NUM_1(5)
} eth_cpuid_feat_flag_t;
#pragma GCC diagnostic pop

Expand Down Expand Up @@ -196,6 +327,7 @@ struct eth_cpuid_feat_ext_t
//////////////////////////////////////


#define DEF_BASIC_FEAT(n,r,sz) eth_cpuid_feat_ext_t *n = e_cpuid_basic_feat(r,sz)
#define DEF_BASIC_FEAT(n,index) const eth_cpuid_feat_ext_t *n = e_cpuid_feat(index,0,0)
#define DEF_EXT_FEAT(n, index, page) const eth_cpuid_feat_ext_t *n = e_cpuid_feat(index, 1, page)

#endif
Loading

0 comments on commit b0e61a3

Please sign in to comment.