package is indicated by setting those bits to (at least) 111b. The cache details, including cache type, size, and associativity are communicated via the other registers on leaf 4. Beware that older versions of the Intel app note 485 contain some misleading information, particularly with respect to identifying and counting cores in a multi-core processor; errors from misinterpreting this information have even been incorporated in the Microsoft sample code for using CPUID, even for the 2013 edition of Visual Studio, and also in the sandpile.org page for CPUID, but the Intel code sample for identifying processor topology has the correct interpretation, and the current Intel Software Developer’s Manual has a more clear language. The (open source) cross-platform production code from Wildfire Games also implements the correct interpretation of the Intel documentation. Topology detection examples involving older (pre-2010) Intel processors that lack x2APIC (thus don't implement the EAX=Bh leaf) are given in a 2010 Intel presentation. Beware that using that older detection method on 2010 and newer Intel processors may overestimate the number of cores and logical processors because the old detection method assumes there are no gaps in the APIC id space, and this assumption is violated by some newer processors (starting with the Core i3 5x0 series), but these newer processors also come with an x2APIC, so their topology can be correctly determined using the EAX=Bh leaf method. EAX=6: Thermal and power management This returns information in EAX, EBX, ECX registers. EAX=7, ECX=0: Extended Features This returns extended feature flags in EBX, ECX, and EDX. Returns the maximum ECX value for EAX=7 in EAX. EAX=7, ECX=1: Extended Features This returns extended feature flags in EAX, EBX, and EDX. ECX is reserved. EAX=0Dh, ECX=1 EAX=12h, ECX=0: SGX Leaf Functions EAX=14h, ECX=0 EAX=19h EAX=80000000h: Get Highest Extended Function Implemented The highest calling parameter is returned in EAX. EAX=80000001h: Extended Processor Info and Feature Bits This returns extended feature flags in EDX and ECX. Bits 0 through 9, 12 through 17, 23, and 24 of EDX are duplicates of EDX from the EAX=1 leaf. AMD feature flags are as follows: EAX=80000002h,80000003h,80000004h: Processor Brand String These return the processor brand string in EAX, EBX, ECX and EDX. CPUID must be issued with each parameter in sequence to get the entire 48-byte null-terminated ASCII processor brand string. It is necessary to check whether the feature is present in the CPU by issuing CPUID with