What controls Turbo Core in Xeons?

Page 46 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

kjboughton

Senior member
Dec 19, 2007
330
118
116
Adding a driver to UEFI firmware:
https://github.com/pbatard/efifs/wiki/Adding-a-driver-to-a-UEFI-firmware

Here's what I'd like to see, of course, others may vary in opinion: convert V3x2_50_vcc.EFI to FFS. I can insert into Z10PE-D8 WS latest ROM and test out...

Oh, and I'll just leave this here: STABLE 3570 MHz all-core turbo x 18 cores (CPU1), 3465 MHz all-core turbo x 18 cores (CPU0). This is with -50mV to core/cache/SA.

With 105 BCLK I show up to 6 cores per CPU (!) at one time (!!) bursting up to 4GHz (105x38=3990) !!!

Look at that VID.... GOLDEN CPU



-FCG
 
Last edited:
Reactions: sciff and MOF

C_Payne

Junior Member
May 16, 2017
22
11
41
convert V3x2_50_vcc.EFI to FFS

That probably wont work... for me all V3x2 cannot be included for some reason... BIOS wont post.

Not Sure why... thats why I have been asking for the source a few times. Maybe its issues with the C compiler, or it is related to SMP functions. I am trying to find out.

I have uploaded some more undervolting core/cache voltage driver combos, also including the .ffs already:

https://peine-braun.net/public_files/XEON_V3_BIOS_MODS/EFI-Drivers/

Enjoy.

Use UEFITOOL to add .ffs files directly to BIOS after finding out your silicon luck with .efi
 
Reactions: glitchman

MOF

Member
Jul 31, 2017
118
33
101
if i put v3.efi into clean bios (no haswell microcodes), do i need to do any modification on Windows?
 

kjboughton

Senior member
Dec 19, 2007
330
118
116
if i put v3.efi into clean bios (no haswell microcodes), do i need to do any modification on Windows?

Rename mcupdate_GenuineIntel.dll in C:\Windows\System32 to prevent loading at startup for no ucode in Windows, otherwise ucode 36 will be loaded.
 

C_Payne

Junior Member
May 16, 2017
22
11
41
if i put v3.efi into clean bios (no haswell microcodes), do i need to do any modification on Windows?

Only if you wish to use a different Version of uCode, which is not really neccesary, only if you wish to achieve high AVX Clocks.
 
Reactions: sciff

CANONKONG

Member
Jul 11, 2017
98
62
46
That probably wont work... for me all V3x2 cannot be included for some reason... BIOS wont post.

Not Sure why... thats why I have been asking for the source a few times. Maybe its issues with the C compiler, or it is related to SMP functions. I am trying to find out.

I have uploaded some more undervolting core/cache voltage driver combos, also including the .ffs already:

https://peine-braun.net/public_files/XEON_V3_BIOS_MODS/EFI-Drivers/

Enjoy.

Use UEFITOOL to add .ffs files directly to BIOS after finding out your silicon luck with .efi
I have the source of the V3x2,do you need it?
 

CANONKONG

Member
Jul 11, 2017
98
62
46
@CANONKONG YES!
A list of tool and steps necessary to compile would be helpful as well!
Code:
#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Protocol/SimpleTextOut.h>
#include <Protocol/MpService.h>

EFI_MP_SERVICES_PROTOCOL *mpp = NULL;
UINT32 unlock_status = 0;

VOID EFIAPI unlock(IN OUT VOID* Buffer)
{
    UINT32 EAX;

    AsmCpuid(0x0001, &EAX, NULL, NULL, NULL);
    if (EAX != 0x306F2)
    {
        unlock_status = 1;
        return;
    }

    UINT64 edx_m    = 0xFFFFFFFF00000000ULL;
//    UINT64 eax_m    = 0x00000000FFFFFFFFULL;
    UINT64 eax14_m  = 0x0000000000100000ULL;
    UINT64 dl_m        = 0x000000FF00000000ULL;
    UINT64 al_m        = 0x00000000000000FFULL;
    UINT64 v1, v2;
    
    UINT64 rm;
    rm = AsmReadMsr64(0x8B);
    if ((rm & edx_m) != 0)
    {
        unlock_status = 2;
        return;
    }

    rm = AsmReadMsr64(0x194);
    if ((rm & eax14_m) != 0)
    {
        unlock_status = 3;
        return;
    }

    AsmWriteMsr64(0x150, 0x8000000100000000ULL);
    rm = AsmReadMsr64(0x150);
    if ((rm & dl_m) != 0)
    {
        unlock_status = 4;
        return;
    }
    v1 = rm & al_m;

    AsmWriteMsr64(0x150, 0x8000020100000000ULL);
    rm = AsmReadMsr64(0x150);
    if ((rm & dl_m) != 0)
    {
        unlock_status = 5;
        return;
    }
    v2 = rm & al_m;

    AsmWriteMsr64(0x150, 0x80000011FD600000ULL | v1);
    rm = AsmReadMsr64(0x150);
    if ((rm & dl_m) != 0)
    {
        unlock_status = 6;
        return;
    }

    AsmWriteMsr64(0x150, 0x80000211FD600000ULL | v2);
    rm = AsmReadMsr64(0x150);
    if ((rm & dl_m) != 0)
    {
        unlock_status = 7;
        return;
    }

    UINT64 mvr = v1 | (v1 << 8) | (v1 << 16) | (v1 << 24) | (v1 << 32) | (v1 << 40) | (v1 << 48) | (v1 << 56);
    AsmWriteMsr64(0x1AD, mvr);
    AsmWriteMsr64(0x1AE, mvr);
    mvr = mvr | 0x8000000000000000ULL;
    AsmWriteMsr64(0x1AF, mvr);

    rm = AsmReadMsr64(0x620);
    rm = (rm & 0xFFFFFFFFFFFF0000) | (v2) | (v2 << 8);
    AsmWriteMsr64(0x620, rm);

    rm = AsmReadMsr64(0x194);
    rm = rm | eax14_m;
    AsmWriteMsr64(0x194,rm);

    //UnicodeSPrint(msg, sizeof(msg), L"CPUID %8X\n", EAX);
    //Print(msg);
    /*
    UINTN apn;
    CHAR16 msg[16];

    mpp->WhoAmI(mpp, &apn);
    UnicodeSPrint(msg, sizeof(msg), L"CPU #%03x\n", apn);
    Print(msg);
    // Print(L"Hello world.\n");
    */
}

VOID PrintStatus(IN UINTN pknum)
{
    CHAR16 msg[16];
    UnicodeSPrint(msg, sizeof(msg), L"V3 CPU_%2X ", pknum);
    Print(msg);

    switch (unlock_status)
    {
    case 0:
        Print(L"All Turbo set.\n");
        break;
    case 1:
        Print(L"Wrong CPU.\n");
        break;
    case 2:
        Print(L"MicroCode present.\n");
        break;
    case 3:
        Print(L"Error:0x194.14\n");
        break;
    case 4:
        Print(L"Error:0x150.1\n");
        break;
    case 5:
        Print(L"Error:0x150.201\n");
        break;
    case 6:
        Print(L"Error:0x150.11\n");
        break;
    case 7:
        Print(L"Error:0x150.211\n");
        break;
    }
}

EFI_STATUS EFIAPI V3x2Entry (
    IN EFI_HANDLE         ImageHandle,
    IN EFI_SYSTEM_TABLE   *SystemTable
    )
{
    gBS->LocateProtocol(&gEfiMpServiceProtocolGuid, NULL, (VOID**)&mpp);

    UINTN cores_num;
    UINTN cores_enum;
    mpp->GetNumberOfProcessors(mpp, &cores_num, &cores_enum);

/*
// CHECK
EAX = 1
check_cpu_id EAX == 0x306F2 // Wrong CPU
READ MSR 0x8B: EDX == 0x0    // MicroCode Present


READ MSR 0x194: EAX.0x14 == 0 // OverClocking Locked
// WRITE

WRITE MSR 0x150 EDX:0x80000001 EAX:00000000
READ MSR 0x150 dl == 0 // MailBox Error
AL->Var1

WRITE MSR 0x150 EDX : 0x80000201 EAX : 00000000
READ MSR 0x150 dl == 0 // MailBox Error
AL->Var2

WRITE MSR 0x150 EDX : 0x80000011 EAX : 0xFD600000 + Var1
READ MSR 0x150 dl == 0 // MailBox Error

WRITE MSR 0x150 EDX : 0x80000211 EAX : 0xFD600000 + Var2
READ MSR 0x150 dl == 0 // MailBox Error

WRITE MSR 0x1AD  Var1 to each byte EDX and EAX
WRITE MSR 0x1AE  Var1 to each byte EDX and EAX
WRITE MSR 0x1AF  Var1 to each byte EDX and EAX, EDX = EDX or 0x80000000

READ MSR 0x620
Var2 -> AL
Var2 -> AH
WRITE MSR 0x620

READ MSR 0x194
Check ? EAX.0x14
SET EAX.0x14
WRITE MSR 0x194
        // All Turbo Set
*/



    CHAR16 msg[256];
    UnicodeSPrint(msg, sizeof(msg), L"Cores:%3x, enabled:%3x\n", cores_num, cores_enum);
    // Print(msg);
 

kjboughton

Senior member
Dec 19, 2007
330
118
116
...

The 2 CPU's above, are first E5-2679v4, the fastest LGA2011v3 CPU (20cores all turbo at 3,2Ghz stock), and above are my old two Haswell-E enginnering samples. They are two 12 cores 30MB L3, run at 3,1Ghz full load (the turbo is only to 32x and has to be disabled with Cstates otherwise they are unstable those are old samples), but at the same time these do not have any AVX delta, aka run 31x even in full AVX load. And this works fine and uncore does not throttle. These use some ancient microcode with TSX enabled but there definitely is a microcode cause there are no uncore issues.

Now, this brings to me an idea. The 2696v3 can either be ran without microcode and C-states so there is no AVX underclock, but the uncore throttles down, or with C-states enabled so uncore is fine and the CPU generally performs better out of AVX. But the thing is, the 12 core ES could do both. But I was not able to find anywhere on the internet a valid uncore of that kind. Aka pre-launch uncore with TSX and no uncore throttle, no AVX throttle.

If you go to Asrock X99 extreme 4:

http://www.asrock.com/mb/Intel/X99 Extreme4/?cat=Download&os=BIOS

The very first bios 1.2 uses the old TSX microcode even for retail Haswells. The bios also has the 2 microcodes for the engineering samples. These would be amazing if someone was able to extract them or find them somewhere so we could use them. I'm not skilled enough to extract them from the bios. And I was unable to find them. The first microcode Intel released for Haswell-E is already post launch with all the errata fixes.

This same microcode (0x1F / rev 31) was in ASUS Z10PE-D8 WS BIOS release 0301 (initial).
I have extracted the raw binary and converted to to comma delimited ASCII for use with VMWare CPU Microcode Update Driver for Windows.
http://www.kristech.net/haswell/0x1F.zip

EDIT: Also found 0x38 (thanks, Supermicro)
http://www.kristech.net/haswell/0x38.zip

 
Last edited:
Reactions: MooNiSLe

sciff

Member
Mar 6, 2017
136
52
71
ASUS&GIGABYTE can use a bios delete the microcode and set all the settings in the BIOS(set max turbo radio,CoreVOffset -70mv & CacheVOffset -50mv) and it worked higher frequency
very well without a EFI driver.

CANONKONG, do you think this is possible with stepping 1 v3 Xeons (ES) and with v4 Xeons??

Does this hack of yours still require a bug in CPU microcode?
 
Last edited:

C_Payne

Junior Member
May 16, 2017
22
11
41
I (think I) have successfully added SMP to my v3.asm

I have uploaded it to https://peine-braun.net/public_files/XEON_V3_BIOS_MODS/EFI-Drivers/v3x2/
one is -20mV and one -50mV on both core and cache.

IT is untested YET.
Unfortunatly I have no Xeon v3 around to test it out and my friend with the dual CPU board is not around for a few days.

If you would kindly test v3x2_payne*.efi and let me know how it goes.
I have also prepared *.ffs files, but please test .efi first before bricking your boards.

Again: completely untested.
 
Reactions: kjboughton

kjboughton

Senior member
Dec 19, 2007
330
118
116
@C_Payne
Working...
Error in Driver shows: "Failure - EFI_MP_SERVICES_PROTOCOL Error"
Boot into Windows was sluggish... like multiple minutes of the spinning twirly before finally coming to rest at logon screen

Observables:
-- Cores set to maximum multi by MSR
-- Uncore stays at 3Ghz even with no ucode loaded!!! Best of both worlds: highest multi's for AVX/non-AVX workloads (no ucode) and max Uncore frequency! Perhaps this is because the earlier v3x2_vcc files also applied a -50V bias to SA and this driver does not
-- Cores are using more energy... idle temps up about 5C it seems. Needs longer period of observation and characterization to confirm any real diff... PowerCut looks to be in operations and SVID telemetry is non-nonsensical
-- Performance limit reasons appear unchanged (EDP/Max Turbo)
-- Highest performance/scoring driver I have used with my SMP Xeon system

On another note, my highest performing CPU switched from CPU#1 to CPU#0. This is good in that it indicates that uneven multi limits on SMP systems is not necessarily a result of individual CPU performance but rather a feature of working with this hack (thus far).

Can you build two more? One at -70mV and a second at -100mV?

In all, great work!
 
Last edited:
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |