Add option in AMI UEFI bios menu (how to?)

@davidm71 @mtothaj I found the module, it´s named VARSTORE_OCMR_SETTINGS_NAME like mentioned in post #34

First I changed value 204F to 24 and after additional 2078 to 23. But nothing happend.



As far as I know, under full load and if all cores used, the core clock does not exceed the value set for the last core. So it must be 35 (23 in hex), but windows shows 37 on all cores, like set on core 4 in bios from me.

@oldirdey

Are you sure thats the correct module? For example if you set values in bios for 1…4 core ratios do you note the change in values in the OCMR module?

@davidm71 I am very sure about the module. In ru.efi the module shows the value according to what I set in bios. Here are my bios settings for core ratio. Multiplier 45-42 is choosen. (take a look at the bottom of picture, bios gives a hint to core 5 “4-core ratio value must be higher or equal to 5-core ratio value…”)



Here is what I have in RU.efi. Values matching bios values.



Then I changed values for 5-core and 6-core ratio in ru.efi to 41 and 40 (hex 29/28)

Nothing happens in Windows, but Intel XTU does notice that there is some changes in bios/nvram. The little X in circle behind core 5 and 6 has the Info “undo changes” And I am wondering why Intel XTU shows core 5 and 6 in yellow and not in blue font. Maybe cause it´s not adjusted via bios. Under full load system goes up to core 42, that´s the value set to 4-core ratio in bios.



And if I then use XTU to change values for 5-core or 6-core ratio, font changes to blue color and changings are accepted by windows. Maximum core clock under full load is now 40 instead of 42, before I used XTU to change value for 5-core and 6-core ratio.

@oldirdey ,

My only guess is maybe there is an undocumented variable that sets the number of cores to control via bios setup.

For example when adjusting the fit table I noticed there was a value corresponding to the number of entries in the microcode list.
Such that changing a 4 to a 5 added another microcode to the list of microcodes that could be recognized by the bios.

Perhaps there is a similar variable or value. In anycase changing the values corresponding to the 5th and 6th cores creates a recognizable change in XTU?

Thats a positive step forward. Dump your variables to a file and I’ll help you look.

Edit: Maybe this:

One Of: Active Processor Cores, VarStoreInfo (VarOffset/VarName): 0x4D0, VarStore: 0x1, QuestionId: 0x1DF, Size: 1, Min: 0x0, Max 0x3, Step: 0x0 {05 91 44 01 45 01 DF 01 01 00 D0 04 10 10 00 03 00}

Change Max 0x3 to 0x5

Yes, XTU recognizes the changes in nvram via ru.efi. If I don´t write anything to 204B and 2078 XTU has no X in circle behind 5-active cores and 6-active cores. If I hover over the circled X it gives the info "undo changes". This only happens if altering the values before over ru.efi.

In case of fit table it would make sense that bios is reading this and just adding the info. If I find the time maybe I try to use another bios without patched acpi tables and only 8 core support and take a look if this information is still there.

€dit: Good finding, I will try to change the value from 0x3 to 0x5 at adress 4D0 and will report what happened.

@oldirdey

Did you see the edit I just wrote about the setting for active processor cores??

@davidm71 yes, and I wrote my answear as edit too, maybe not the best option to see every change on a posting :slight_smile:

I will try what you wrote and when I am back at the system I will dump the variables to.

€dit: Need to find the corresponding module in ru.efi first.

@davidm71

btw, here is the dump from setup module and pci devices. I can upload more dumps later, at the moment I have no access to the Z170/CFL system.

https://filehorst.de/d/cawJjsta

I am just thinking now, it is possible to monitor nvram in realtime while windows is running? Maybe it´s possible to use XTU to change core value 5 and 6 and see what changes happen.

@oldirdey

You can try RWEverything and or try the SIV Tool.

I tried a few things and first changed the following line of code in setup module to 0x7 instead of 0x3.

One Of: Active Processor Cores, VarStoreInfo (VarOffset/VarName): 0x4D0, VarStore: 0x1, QuestionId: 0x1DF, Size: 1, Min: 0x0, Max 0x3, Step: 0x0 {05 91 44 01 45 01 DF 01 01 00 D0 04 10 10 00 03 00}

It did nothing, but I think its just the first line of code from another menu in setup where you can choose how many cores are active.

After that I tried to change the surrounding bits of 204F and 2078 but nothing happens.

Only thing that I noticed is, if in bios Core Ratio is set to “per core” and all 4 available cores set to the same value in bios, XTU shows all 6 cores in blue color with the correct multiplier. If 4 available cores in bios set to different ratio, XTU shows them in yellow color and if you hover over core 5 and 6 with mouse it says a default and a proposed value. The default value for core 5 and 6 is always the core ratio from core 1 and 2 choosen in bios.

BTW: Another question for understanding. Why is it important to not change file size? For example the setup module.

Edit: As for know, due to my lack of knowledge, I stopped trying to alter settings for Core Ratio.

Instead I tried to change Bios entries for Active Core Count. And there is some progress and success. I failed adding new entries, even after changing file size in header, but I succeeded changing entries to other values.

These are Bios entries before editing, only 1 up to 3 active processor cores available. After modding values for 3 up to 5 active cores available.



@oldirdey ,

I’m confused. Do you have an 8 core or 6 core? I thought you had six so you should have set the value to ‘5’ as opposed to ‘7’. Also did you try to change the value in RU by altering x04D0 variable or did you alter the bios code and flash?

As far as changing the size of setup I am not sure what would happen to tell you the truth. If its byte code should not make a difference but if there are assembly address jumps in there it may break something. I would try it if your dual bios capable or have a usb flash programmer on hand.

Will look more after work. Hard to study code on my smart phone.

Ok, I try to explain. I have 6 core CPU, but I want to get the bios ready for upcoming 9000 series from Intel with 8 Cores. And the bios CpuMpPei Module and ACPI Table are already patched for up to 8 native cores plus hyperthreading. s.napi doubled the values in CpuMpPei Table and added 4 more native cores to ACPI Table.

Thats the reason why I have choosen 0x7 instead of 0x5. Here I have 2 Bios Files from ASRock with Coffee Lake Support for Z170 and I compared them to stock ones. That´s why I came to 8 Cores. Nick Shih, Designer from ASRock OCF, did this edit to the bios file. So it´s unofficial/official bios…

As I told in another post before I was not able to write with RU to x04D0 variable cause I didn´t find it. Var Storage says 0x1, thats Setup Module itself, but RU does not show the value at offset x04D0.

So I patched setup module with hex editor and flashed bios file with spd programmer. We can try everything, more then bricking the board is not possible, but I am ready to recover.

I also tried to add another 3 variables to both Menus, Core Ratio and Active Core Count. I knew that I have to take care about the string and all the other values, but I have no succeess at adding values.

I succeeded in altering the Active Core Count and it´s working and as next Step I will try to alter the entries for Core Ratio, maybe on this way there is some succeess.

But every time adding code and changing file size I end up with some binary file that the IFR extractor can´t extract. Will add the Code as Edit to this Post later.

Thank you very much for helping me out. Without your postings and help I had have no succeess at all.

€dit: Setup Files, setup.bin is the one with altered entries, setup_mod.bin is the one with added code that is not working, even with file size changed in header. this is not done in this file.

https://filehorst.de/d/cpCpHpDx

@oldirdey
>Core Ratio Limit
It can’t be done by modifying varstore only. The BIOS only cares for 4 cores. You also need to add code, in some PEI module(s), to support other cores (5-8). Forget about it, you better use XTU if you really need this feature. Or start learning assembler…

>The default value for core 5 and 6 is always the core ratio from core 1 and 2 choosen in bios.
This is because, I guess, you used my modded BIOS with sync all cores patch (this patch was meant to be used with sync all cores option) - did you read the readme.txt?

- sync all cores patched to work on 5+ cores cpus - patched module C654E340-2DB5-4896-BBC4-6EA45CFEB434 (on 2 locations)
- core ratio for cores 1,2,3,4 is copied for cores 5,6,7,8
- notice that if ratio 50 for 1 core, 40 for 2 cores, 30 for 3 cores, 20 for 4 cores is set, in bios setup,
then ratio 50 for 5 cores, 40 for 6 cores, 30 for 7 cores, 20 for 8 cores will be also set.
Now ratio for 5 cores (50) is more than ratio for 4 cores (20) but the cpu expects the ratio
for (x + 1) cores to be less or equal then ratio for x cores so we set unexpected/undocumented state.
The cpu, for 5 cores, won’t have ratio 50 in this case. When the ratio is fixed - 50 for cores 1,2,3,4
then ratio 50 will be set for cores 5,6,7,8 and will work as expected

>Active processor cores
This will work, I think. If you expand menu with other entries/values (4, 5, 6, 7), the existing code will handle it (if you change var 4d0 to 5 then 5 cores will be active with 8700K).

@s.napi

First at all, thank you very much for your reply. I really appreciate any additional info I can get, cause I am very new into this kind of “complex” bios mod.

>Core Ratio Limit

I saw that you edit CpuMpPei Module to add 4 more Cores so I thought about it, but didn´t knew where to start. My first problem is, I can´t get the information from assembler like you got in your Topic about HT Fix. Maybe it´s cause I only have IDA Free version and it has not the correct Processor Plugin to list the file correct or it´s just cause of my lack of knowledge. That´s why I asked you about disassembler software, but your answear was not so satisfying :slight_smile: No, i don´t really need this feature, XTU will do it fine. But to learn more uefi modding I have choosen this topic just to get a “better” bios, more like an stock bios. That´s why I wanted to extend the bios entry to get the options for more cores. I really wan´t to learn more about this topic, but I don´t know where to start. If you have a source for getting information please let me know. I am no programmer or coder at all, so everything I knew is teached by myself. That´s why some normal knowlegde, a programmer or coder has, is missing for me.

But for now your Spoiler explained very well why it is not working and why I see same values on core 5 and 6 in XTU as for Core 1 and 2. I modded the bios before you edited it to the patcher variant, so no, I didn´t read the readme.txt.

>Active Core Count.

I tried to expand the entries, but this didn´t work for me. IFR Extractor was no longer able to extract the file so I didn´t try to flash it. Altering the entries worked. I set var 04d to 7 instead of 5, cause of new intel 9000 series, and changed the values for the 3 given entries. Setting one of the new values worked like you can see on the pictures in the thread before. So this was a partial success for me, but I need to figure out why the extension for core 4 up to 7 did not work. I will post my code later as edit to this post.

€dit: Here 2 pictures and files attached.

Code after altering setup entries (that worked)

https://abload.de/img/setup_changessjifg.jpg

Code after adding setup entries (this didnt work)

https://abload.de/img/setup_changes2njfrr.jpg

And here the 2 files if you want to take a look for yourself

https://filehorst.de/d/cpCpHpDx

>I am no programmer or coder at all
I mean no offence, but this can be the problem. It’s not about what tools do you use. You need to have some (good) knowledge about how computer/cpu works. You need to create and insert your own (or borrowed) code into some existing code (which you need to locate first), test it for bugs… Although it is not a rocket science, it is too complex for a newbie. I’m sure you can google thousands of pages about programming/assembler…

>Active Core Count
Expanding code/entries can be a problem - if you insert something in the middle, then all that follows will change its offset. And things (that depends on exact offset) might stop to work. But, I think, the existing entries could be (easily) modified - if you don’t like 1,2,3,all active cores, you can replace it with 2,4,6,all. But it is too much work for no reward, I think. Whats the point of buying 6 core cpu and run it with only 4/less than all active cores?

Everything can be done but time is precious.

Thats the point. If you say you can borrow code and copy it, so you have to find it. If you don´t know what to search about, then it´s a problem. For you it sounds stupid, but thats the way I learn things that I didn´t know about. Just start digging and if I found related things I can start to learn about it.

Sure that I googled a lot, but I have no teacher, so there is no one that gives me advise what to take a look at. That´s why I am asking :slight_smile:

That´s what what davidm71 told in his post before, that insert in the middle can be problematic. For you it´s sure to think about this, I didn´t know about and just tried. And as I wrote, altering the code was no problem. If it´s worth or not editiing that function that should not be the problem. It´s about to learn new things, and that was achieved.

Hi, I’m trying to mod the BIOS on a Supermicro board in a similar way to enable bifurcation.

I have a Supermicro X9DR7-LN4F with Bios 3.3, and although bifurcation settings are visible, when I try to change x16 for instance, x16 is the only option I can select. The help strings even refer to other options (x4x4x4x4, x8x8, etc.), but those just don’t appear for selection. Even in AMIBCP, the drop-down for these only show the single option I’m able to select.

I thought I might be able to modify using a similar process to you, but the IFR Extractor tool has not worked for me – anything I try to read with it spits back an error “Unknown protocol detected”. I’ve tried it on several extracts from UEFI Tool; same result. Any ideas / tips? Thanks.

Hi

I saw a post saying that you were able to solve your problem, but I didn’t find a post stating how. Could you possibly tell me? Thanks!

@mhilt - I checked BIOS 713 and this is not possible on that BIOS, maybe too old of a BIOS or chipset. You may have luck asking them to add directly, if it’s a possible thing for that chipset

@Iraija - what do you need to do, on what BIOS?

I’m trying to install MacOS on my Asus FX505GM laptop, and in order to pass the installer booting screen, I would have to disable the xHCI Hand-off option, as apparently that’s very important in the process. My bios is one by American Megatrends, version 305. I’ve been stuck with this process for a week now, so I really hope you or someone else on this site can help me.

Thanks a lot!

-------------

I actually need to enable the hand-off, not disable it.