Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASRock z-170 k4/d3 sata controller not being initialized correctly when enable "above 4g mmio bios assignment" #38

Open
jnyk opened this issue Mar 12, 2023 · 173 comments
Labels
bios issue with firmware that needs patching help wanted Extra attention is needed

Comments

@jnyk
Copy link

jnyk commented Mar 12, 2023

Motherboard: ASRock z-170 k4/d3
GPU: 6700xt
CPU: 8700k
I can't open the "above 4g decoding" or "above 4g mmio bios assignment"
image
when I turn this to enable ,it can't work, can't into windows system ,because bios can not find any sata drives

image
image

then when i try to use modGRUBShell.efi
setup_var 0x3 0x0
reboot
setup_var 0x3 0x1
but there is nothing happend

It makes me very depressed. Can you give me some suggestions

Originally posted by @jnyk in #11 (comment)

@jnyk
Copy link
Author

jnyk commented Mar 12, 2023

image

@jnyk
Copy link
Author

jnyk commented Mar 12, 2023

image

@dormancygrace
Copy link

dormancygrace commented Mar 12, 2023

I believe that it's same issue #35

@jnyk do you have ch341a or another programmer? If it's dsdt issue, I can reinsert dsdt from another ASRock motherboard, that works as intended

@jnyk
Copy link
Author

jnyk commented Mar 13, 2023

I believe that it's same issue #35

@jnyk do you have ch341a or another programmer? If it's dsdt issue, I can reinsert dsdt from another ASRock motherboard, that works as intended

yes I have met similar situation with him,can not extract DTST from AmiBoardInfo2.I have bought one ch341a ,meybe it will cost two days from online store to me

@xCuri0
Copy link
Owner

xCuri0 commented Mar 13, 2023

DSDT is in DsdtAsl, not AmiBoardInfo2 @jnyk

@dormancygrace
Copy link

@jnyk here you could try this bios, dsdt patched, uefipatched. Just enable Above 4G like usual, the one that made windows hang/freeze. z17gkd37mod.zip

Do you use this mb? Or just made modifications? What you changed in dsdt?

@Koekieezz
Copy link

Koekieezz commented Mar 13, 2023

@jnyk here you could try this bios, dsdt patched, uefipatched. Just enable Above 4G like usual, the one that made windows hang/freeze. z17gkd37mod.zip

Do you use this mb? Or just made modifications? What you changed in dsdt?

i dont use this mb but i've done several dsdt fix on asrock boards (yes they're just pAWJPASJd;JDp[ to fix sometimes)
what did i change? well mainly the qwordfield under the first dwordfield, then also correcting the rest of dsdt errors (its a long list lol)

and no, i dont slap other board DSDT on this bios

@dormancygrace
Copy link

@jnyk here you could try this bios, dsdt patched, uefipatched. Just enable Above 4G like usual, the one that made windows hang/freeze. see if it's working with this bios. z17gkd37mod.zip

Is there coffee lake mod? Because @jnyk use i7-8700

@dormancygrace
Copy link

@jnyk here you could try this bios, dsdt patched, uefipatched. Just enable Above 4G like usual, the one that made windows hang/freeze. z17gkd37mod.zip

Do you use this mb? Or just made modifications? What you changed in dsdt?

i dont use this mb but i've done several dsdt fix on asrock boards (yes they're just pAWJPASJd;JDp[ to fix sometimes) what did i change? well mainly the qwordfield under the first dwordfield, then also correcting the rest of dsdt errors (its a long list lol)

and no, i dont slap other board DSDT on this bios

But there is already qwordfield in dsdt in this board. I'm 90% sure that there is no need to patch uefi not dsdt. I will make bios without patching

@Koekieezz
Copy link

Koekieezz commented Mar 13, 2023

@jnyk here you could try this bios, dsdt patched, uefipatched. Just enable Above 4G like usual, the one that made windows hang/freeze. see if it's working with this bios.
z17gkd37rbarcfl.zip

this one is modded non coffee lake bios:
z17gkd37rbar.zip

@dormancygrace
Copy link

heres the one with coffee lake mod @jnyk z17gkd37_2.zip

Please, make one without any patches.

@Koekieezz
Copy link

heres the one with coffee lake mod @jnyk z17gkd37_2.zip

Please, make one without any patches.

He could test it and if it's working it could be the DSDT faulty? he's the one testing it. if anything went good then DSDT was the one causing it, if its not, then it wasnt it, simple. Even if everything seems to be in place, sometimes it's just sketchy XD

@dormancygrace
Copy link

heres the one with coffee lake mod @jnyk z17gkd37_2.zip

Please, make one without any patches.

He could test it and if it's working it could be the DSDT faulty? he's the one testing it. if anything went good then DSDT was the one causing it, if its not, then it wasnt it, simple. Even if everything seems to be in place, sometimes it's just sketchy XD

As I mentioned, I've compared dsdt from similar ASRock mb - they are +/- same (identical in qwordfield and m1.. parts)

@Koekieezz
Copy link

heres the one with coffee lake mod @jnyk z17gkd37_2.zip

Please, make one without any patches.

He could test it and if it's working it could be the DSDT faulty? he's the one testing it. if anything went good then DSDT was the one causing it, if its not, then it wasnt it, simple. Even if everything seems to be in place, sometimes it's just sketchy XD

As I mentioned, I've compared dsdt from similar ASRock mb - they are +/- same (identical in qwordfield and m1.. parts)

let him reply first okay? he's the one testing

@jnyk
Copy link
Author

jnyk commented Mar 13, 2023

thanks @Koekieezz .I'm working now , may not be able to reply to a message promptly.
I will try this bios when i get home.

@jnyk
Copy link
Author

jnyk commented Mar 13, 2023

By the way ,I try to patched UEFI to my bios last night.After I flashed the ROM whitch I patched into mainboard, windows can be used as usually, but when i insert the usb disk , it could not start windows system, utill i remove the usb disk

@dormancygrace
Copy link

@Koekieezz is it secret, what you changed? i'm asking because stock dsdt and from your file - completely same
image

@Koekieezz
Copy link

Koekieezz commented Mar 13, 2023

@Koekieezz is it secret, what you changed? i'm asking because stock dsdt and from your file - completely same image

no.. both files have 0x7FFFFFFFFF on 1st qwordfield, and for the rbarcfl one have acpi fix on dsdt then apply the dsdt patch

@dormancygrace
Copy link

@Koekieezz is it secret, what you changed? i'm asking because stock dsdt and from your file - completely same image

no.. both files have 0x7FFFFFFFFF on 1st qwordfield, and for the rbarcfl one have acpi fix on dsdt then apply the dsdt patch

I`ve attached screenshot of files compare. only difference is disassembling by iasl

@jnyk
Copy link
Author

jnyk commented Mar 13, 2023

@Koekieezz I just instant flash the bios ,
when i open above 4g mmio bios assignment, it can not find any disk drive as before.
i use asrock's tool to flashed bios,may be use ch431a it will be ok

@dormancygrace
Copy link

@Koekieezz I just instant flash the bios , when i open above 4g mmio bios assignment, it can not find any disk drive as before. i use asrock's tool to flashed bios,may be use ch431a it will be ok

Ch341a you need to use in case of major failure

@dormancygrace
Copy link

@jnyk
z17gkd37.zip

try this one

@jnyk
Copy link
Author

jnyk commented Mar 13, 2023

i flash this bios with ch341a ,but It's still the same as before

@jnyk
Copy link
Author

jnyk commented Mar 13, 2023

@dormancygrace ok I‘ll try it

@Koekieezz
Copy link

@Koekieezz is it secret, what you changed? i'm asking because stock dsdt and from your file - completely same image

no.. both files have 0x7FFFFFFFFF on 1st qwordfield, and for the rbarcfl one have acpi fix on dsdt then apply the dsdt patch

I`ve attached screenshot of files compare. only difference is disassembling by iasl

i have 2 bioses attached 12h ago, they have different dsdt from normal ones, its this one: z17gkd37rbarcfl.zip, check em again

@jnyk
Copy link
Author

jnyk commented Mar 13, 2023

@dormancygrace It's still the same as before . start my conputer can't find any disk drive except usb disk ,and can not inter into
neither windows system or winpe system

@Koekieezz
Copy link

Koekieezz commented Mar 13, 2023

@Koekieezz I just instant flash the bios ,
when i open above 4g mmio bios assignment, it can not find any disk drive as before.
i use asrock's tool to flashed bios,may be use ch431a it will be ok

are you sure it's the correct bios? since i had some edits and deleted the first reply, the correct one have 2 files in 1 post. its this z17gkd37rbarcfl.zip one to use if you had the wrong one. try modgrub method to enable it and see if it's working.

this is similiar to this guy on winraid, he managed to enable it. Here is your above 4g:
image

So try to do setup_var or setup_var_3 0x385 0x0, reboot (type it and enter), then 0x385 0x1, reboot (type it and enter).

@jnyk
Copy link
Author

jnyk commented Mar 13, 2023

@Koekieezz yes wo download this z17gkd37rbarcfl.zip one

i can not find disk drive untill setup_var 0x385 0

@jnyk
Copy link
Author

jnyk commented Mar 13, 2023

your mean is i need try to setup_var 0x385 1 gagin?

@xCuri0
Copy link
Owner

xCuri0 commented Mar 19, 2023

@jnyk the wiki page says that even if it shows 0x1 it can still be disabled

you need to set it to 0x0, reboot and set to 0x1 before rebooting again

i had to do this with setup_var 0x3 on my b75 motherboard

@jnyk
Copy link
Author

jnyk commented Mar 19, 2023

yes you are right but i had did all these steps ,and it was no different

@psyborg55
Copy link

i've noticed, that after AMIBCP microcodes looks like image same file, before amibcp image
There 2 places in BIOS with 4gb decode:
image
image
Maybe, on this MB better to enable it with grub method?

I think @jnyk enabled only the second one. Maybe enabling both or only the first one will fix it ?

Maybe, but how? On other (working) ASRock z170 I've enabled only second one

Enable the first one with "setup_var_cv PCI_COMMON 0x3 0x1 0x1"

@jnyk
Copy link
Author

jnyk commented May 8, 2023

should I use the "setup_var_cv PCI_COMMON 0x3 0x1 0x1" command?
OK I'll try it ,thank you for your help

@jnyk
Copy link
Author

jnyk commented May 8, 2023

e0cecf066dc3d7ba065284c1436ff44

@psyborg55 I think this command can not work , mybe

@psyborg55
Copy link

It shows on screen it is working, set from 0x00 to 0x01.
If it remain 0x01 after power cycle then this is it.
Maybe offset is not 0x3, but 0x2 or some other, you have few settings there so just need to check them.
In laptop support issue i posted screenshot with almost identical pci subsystem menu

@Sortoftired
Copy link

Sortoftired commented May 24, 2023

i have an asrock z170 gaming k6 and experiencing the same problem.
here are my thoughts:
1.can we try update oprom of ahci controller?
2.there are settings of sata controller in bios
捕获
捕获2
捕获3
3.if this mb has a thirdparty sata controller,maybe we can connect drivers to sata ports on it.

@Sortoftired
Copy link

i reported this issue to Asrock Tech Support,and they replied in like 15 mins.they sent me a new bios 7.50A and told me "we have added Above 4G Decoding in it".i haven't tested it yet,but i think maybe contact your mb's manufacturer isn't a bad idea.
PS:maybe we can figure out how to mod all Asrock 100 series mb by comparing 7.50 with 7.50A and find out what they did.
Z170 GAMING K6(P7.50A).zip

@jnyk
Copy link
Author

jnyk commented May 26, 2023

@Sortoftired thank you it's a nice idea, I'll try to connect Asrock Tech Support

@Sortoftired
Copy link

Sortoftired commented May 31, 2023

i'm sorry to tell u that after several mails between me and asrock guys they determined it was some bug in kernel codes,and since it's an 7 yrs old mb,they told me they have no bios update plan on this any time soon.
PS:i have done another test on my mb.my k6 mb has 2 thirdparty sata ports provided by ASMedia ASM1061 chip onboard,and with above 4g on and csm off,this 2 ports can function normally,unlike the 6 sata ports provided by z170 chipset.

@xCuri0
Copy link
Owner

xCuri0 commented May 31, 2023

@Sortoftired did they atleast mention the module with the problem ?

So that we can try swapping it ?

@xCuri0
Copy link
Owner

xCuri0 commented May 31, 2023

@Sortoftired Also can you tell device/vendor ID of SATA controller ? I figured out it's possible to make a patch to force it to be allocated in 32-bit space that will probably fix it

@Sortoftired
Copy link

@xCuri0 no they didn't.
and yes i can tell you device/vendor ID of sata controller once i get home.
to be clear it's the ASMedia ASM1061 sata controller you are talking about yes?

@xCuri0
Copy link
Owner

xCuri0 commented May 31, 2023

@Sortoftired I'm taking about the broken Intel SATA controller. I can add it to 64-bit BAR blacklist in PciBus module with a patch.

Also do your USB 3.0 ports work in BIOS with 4G decoding ? They don't work for me because of a similar issue where UEFI driver doesn't function properly with 64-bit BAR (although it works in OS here)

@Sortoftired
Copy link

@xCuri0 i haven't tested yet but i think it's the same situation with usb 3.0 ports.my mb has thirdparty usb chips ASMedia ASM1142,and work properly in BIOS with 4G decoding.but i haven't tested usb ports on intel z170 chipsets.

@Sortoftired
Copy link

Sortoftired commented May 31, 2023

@xCuri0 i have booted win10 from ASMedia ASM1061 sata controllers,it takes a lot more time than usual.and in device manager there are disks connected to broken sata ports,and disk manager says they haven't been initialized.
aida64,crystaldiskinfo,hwinfo64 all stuck at detecting sata devices
i tested the speed of sys ssd,the result looks fine,so i guess the extra long boot time wasn't ssd's fault.might be bugs in initializing controllers and detecting devices.

image
image
image
image
捕获
捕获6
捕获7

@xCuri0
Copy link
Owner

xCuri0 commented May 31, 2023

@Sortoftired Can you show a screenshot of Device Manager, View->Resources by type and expand memory scroll to bottom ?

And also Intel SATA Controller device IDs

@Sortoftired
Copy link

Sortoftired commented May 31, 2023

@xCuri0 i was just about to lol

捕获8

@Sortoftired
Copy link

@xCuri0 now i'm going to reboot to normal state to check the device id

@Sortoftired
Copy link

image
image
image
image

@Sortoftired
Copy link

Sortoftired commented May 31, 2023

@xCuri0 would that be enough for now?cause i have to go to work at 2pm

@xCuri0
Copy link
Owner

xCuri0 commented May 31, 2023

@Sortoftired yeah it should be for the SATA issue

@xCuri0
Copy link
Owner

xCuri0 commented May 31, 2023

You can try this patch

# PciBus | Add Intel Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller to 64-bit blacklist (fix broken SATA)
3C1DE39F-D207-408A-AACC-731CFB7F1DD7 10 P:DE10D301FFFF00000B:868002A1FFFF00000B

I made it originally for Intel 7 Series USB 3.0 Controller but I just changed device id here for Intel Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller

@Sortoftired
Copy link

@xCuri0 ok,thanks

@Sortoftired
Copy link

Sortoftired commented May 31, 2023

still broken sata

device manager looks the same

image
image
image

@xCuri0
Copy link
Owner

xCuri0 commented May 31, 2023

Screenshot doesn't show Intel SATA Controller in 64-bit space, guess it's another issue then (unless the device is hidden for some reason)

@Sortoftired
Copy link

@xCuri0 maybe standard sata ahci controller is Intel SATA Controller?the name was because of the chipset driver installed

@xCuri0
Copy link
Owner

xCuri0 commented May 31, 2023

it's in 32-bit range, it should be fine if the cause of issue is 64-bit Intel SATA controller

@Vinjul1704
Copy link

Vinjul1704 commented Jun 1, 2024

I seem to be affected by this too on my ASRock Z170 K4/D3. ReBAR seems to be working fine (despite the DSDT range check suggesting otherwise?), but SATA drives don't show up.

Flash drives and even USB Sata adapters work fine and I can load up Linux Mint using those without issues, although it's obviously noticably slower. Windows doesn't boot like that, but I suppose it just doesn't like the adapter I'm using.

It's worth mentioning that I'm also using the coffee lake mod with an 8700k. The vars I had to set to 0x1 were 0x3 for 4G and 0x385 for MMIO.

I'll try to contact ASRock support and ask for a BIOS version with Above 4G support "properly" added/enabled in the BIOS settings, since that seems to have worked for someone else in here.

Is there anything that can be done to fix this issue though? I saw a patch further up in this thread, but that seems to just blacklist the controller entirely to avoid some other issues. Anything I can do or any information I can provide to help get this resolved?

Thanks!

@Vinjul1704
Copy link

Looks like the M.2 slot still works fine. I'll order a PCIe SATA card and see if that one works fine too. If it does, I guess I'll use that as a workaround for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bios issue with firmware that needs patching help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants