Interesting info, but need MCFG region, not only table header. On your device it located at address 3EF00000, size 256kb.
SFI systems support
Moderator: Moderator Team
Re: SFI systems support
Ah sorry. How to dump that memory region (any tool for that, or would lspci -xxxx out be fine)?
Edit: I made a dump of whole mmconfig area with memtool.
- Attachments
-
- mmconfig.zip
- (182.84 KiB) Downloaded 73 times
Last edited by Illen on Mon Nov 29, 2021 12:16 pm, edited 2 times in total.
- binarymaster
- Posts: 482
- Joined: Sun Nov 16, 2014 7:05 pm
- Location: Russia, Moscow
- Contact:
Re: SFI systems support
Everything is a file in Linux, so...
https://superuser.com/a/164968/402784
Something like this should work:
Code: Select all
dd if=/dev/mem of=dump.bin skip=1055916032 bs=1024 count=256 iflag=skip_bytes
by Stas'M | https://github.com/binarymaster
Re: SFI systems support
How you dump first 1MB? It was physical dump? MCFG dump is fine, but seems strange that there is no realmode interrupt vector table at address 0. SFI tables is ok, but there is also no VGA BIOS and I still unable to find it.
So looking for anyone with Win8 tablet/notebook on CloverTrail platform, who can dump VGA BIOS.
Re: SFI systems support
With dd, I compared the output with memtool and it looks ok.
Is there a chance that GMA 3600/3650 Video BIOS could work? It seems to be similar to the Z2760 iGPU, and these Z2760 tablets aren't very common (and most of them appear to be UEFI Class 3, so they might not have Video BIOS at all).
- Attachments
-
- memory.7z
- (709.78 KiB) Downloaded 69 times
Re: SFI systems support
So seems there is no RM interrupt vector table on your device. Should be not critical if noone use this interrupts. On my device, dd works fine for low memory regions (and interrupts is ok), but unable to dump MCFG table.
I hope, I already got one for GMA3600.
Seems so, I check 2 devices, but unable to find VGA BIOS in their UEFI.
Re: SFI systems support
SFI freeldr is here. This version is working and able to boot kernel (ofc, if you have working one). Limitations: no user input, delay function is hardcoded cycle.
mbexec is my tool to run raw multiboot files via kexec api. Unfortunally, native linux kexec tool is able to run only ELF files, and cant run raw files like freeldr.
Usage:
mbexec main_module cmdline module1_file module1_cmd ...
command lines must be specified, at least any string.
Example:
mbexec freeldr.sys "bootpath=xxx" VgaBiosGMA600.bin VgaBios
bootpath can be sdhci(x)emmc(x)mmcp(x)partition(x) or sdhci(x)sd(x)partition(x). If bootpath is incorrect or not specified you will see list of all avaliable paths.
Vga bios is not necessary if it is present on device or was loaded before. VGA BIOS should be passed as module with "VgaBios" cmd.
If you just dump VGA BIOS from UEFI device, it probably will not work on SFI systems without 2 patches: need to disable int15 calls, and fix delay function (avoid using of legacy timer).
I will post sources later, after I finish remain things and decide how to post it.
mbexec is my tool to run raw multiboot files via kexec api. Unfortunally, native linux kexec tool is able to run only ELF files, and cant run raw files like freeldr.
Usage:
mbexec main_module cmdline module1_file module1_cmd ...
command lines must be specified, at least any string.
Example:
mbexec freeldr.sys "bootpath=xxx" VgaBiosGMA600.bin VgaBios
bootpath can be sdhci(x)emmc(x)mmcp(x)partition(x) or sdhci(x)sd(x)partition(x). If bootpath is incorrect or not specified you will see list of all avaliable paths.
Vga bios is not necessary if it is present on device or was loaded before. VGA BIOS should be passed as module with "VgaBios" cmd.
If you just dump VGA BIOS from UEFI device, it probably will not work on SFI systems without 2 patches: need to disable int15 calls, and fix delay function (avoid using of legacy timer).
I will post sources later, after I finish remain things and decide how to post it.
- Attachments
-
- sfi_freeldr.zip
- (386.76 KiB) Downloaded 70 times
Re: SFI systems support
Thanks. I tested it briefly on my device with following results:
mbexec freeldr.sys "bootpath=sdhci(1)sd(0)partition(1)" - stuck on android screen.
mbexec freeldr.sys "bootpath=sdhci(1)sd(0)partition(1)" VgaBiosGMA600.bin VgaBios - screen turns black (with backlight).
mbexec freeldr.sys "bootpath=sdhci(1)sd(0)partition(1)" VgaBiosGMA3600.bin VgaBios - blinking rainbow artifacts (like on attached photo). In any case the device would reboot after some time (90 seconds or so). I will do more testing later.
Re: SFI systems support
Thanks for testing.
If freeldr.ini is located it should be loaded and may affect on screen.
Argument is PCI index of the SD controller, =bus*256+dev*8+func or index of its MCFG table. For your device it should be 8, 32, 33.
If freeldr.ini is located it should be loaded and may affect on screen.
Seems there is a watchdog timer. To prevent reboot it must be disabled or periodically reseted.
Probably there is a problem - it produces video output at wrong frequency and display cannot receive it correctly. So there is 2 ways to fix it - find another BIOS, exactly matching to your device, or fix existing by adjusting clock configuration.GMA 3650 Similar to the GMA 3600, but this version is clocked at 640 MHz.
Re: SFI systems support
Ah, so the SD card would be on sdhci(32) then. Sadly passing this bootpath didn't change the screen output.
Is your Video BIOS from a GMA 3650 or 3600? As far as I know GMA 3600 runs at 400 MHz which would be the same frequency as the GMA on my device. The problem might be also that, unlike CloverTrail which uses SGX545, CloverTrail+ uses SGX544MP2 which is from the newer PowerVR 5XT serie. Sadly there are no CloverTrail+ based PC/UEFI platforms apparently.Xen wrote: ↑Wed Dec 01, 2021 11:48 pmProbably there is a problem - it produces video output at wrong frequency and display cannot receive it correctly. So there is 2 ways to fix it - find another BIOS, exactly matching to your device, or fix existing by adjusting clock configuration.GMA 3650 Similar to the GMA 3600, but this version is clocked at 640 MHz.
Re: SFI systems support
Its from cedarwiev platform device (and gma600 from oaktrail), not sure which one exactly.
I fount where timing settings is located: GMA600: 0x1984; GMA3600: 0x1BB6
Structure:
uint32_t refclk, vco_max, vco_min;
uint8_t m1_max, m1_min, m2_max, m2_min, p1_max, p1_min;
For GMA600 there is 3 sets, but last seems unused, GMA3600 - 5 sets. Only one set is used (BIOS select it by device detection), so you need to determine which one is your and try to fix it.
Almost same parameters is used in psb_intel_find_best_PLL function of linux drivers (google it).
Re: SFI systems support
SFI freeldr is complete and im ready to post sources, but any suggestion how to do it? I have a gitlab account, but idk if there is any actual ROS repo exists on gitlab? Should I clone full repo or just post modified files or something else?
RawExec (ex mbexec) is here: https://gitlab.com/XenRE/rawexec
RawExec (ex mbexec) is here: https://gitlab.com/XenRE/rawexec
- binarymaster
- Posts: 482
- Joined: Sun Nov 16, 2014 7:05 pm
- Location: Russia, Moscow
- Contact:
Re: SFI systems support
GitHub is our primary development platform, all development and testing goes there. It would be better if you sign up there, so you can just fork the main repository, and then create SFI branch in your fork.Xen wrote: ↑Wed Dec 15, 2021 11:34 am SFI freeldr is complete and im ready to post sources, but any suggestion how to do it? I have a gitlab account, but idk if there is any actual ROS repo exists on gitlab? Should I clone full repo or just post modified files or something else?
RawExec (ex mbexec) is here: https://gitlab.com/XenRE/rawexec
Here is a guide article on our wiki: https://reactos.org/wiki/Commiting_Changes
If you don't want to register on GitHub, you can probably perform full repository import into GitLab, and then create your branch there. But this will make it more complicated for developers to review and for testers to test (since our workflow is tied to GitHub).
As a secondary platform, we have our self-hosted git repository server, but it's just a read-only mirror, we don't use it to push commits.
by Stas'M | https://github.com/binarymaster
Re: SFI systems support
Sources is here: https://gitlab.com/XenRE/sfi-freeldr
I decide to pack all new/modified files to archive, you can extract it over existing ReactOS sources and build. Sources is updated to lastest version from github.
Common changes: fixes in fs.c (described above), new CallFar16 realmode function, new bootpath command line argument.
Warning: I set [set(SARCH "sfi"] in base\sdk\cmake\config.cmake so SFI build will be default. Set it back to "pc" before merging with main repository.
I decide to pack all new/modified files to archive, you can extract it over existing ReactOS sources and build. Sources is updated to lastest version from github.
Common changes: fixes in fs.c (described above), new CallFar16 realmode function, new bootpath command line argument.
Warning: I set [set(SARCH "sfi"] in base\sdk\cmake\config.cmake so SFI build will be default. Set it back to "pc" before merging with main repository.
- binarymaster
- Posts: 482
- Joined: Sun Nov 16, 2014 7:05 pm
- Location: Russia, Moscow
- Contact:
Re: SFI systems support
Illen wrote: ↑Fri Dec 03, 2021 3:21 am Is your Video BIOS from a GMA 3650 or 3600? As far as I know GMA 3600 runs at 400 MHz which would be the same frequency as the GMA on my device. The problem might be also that, unlike CloverTrail which uses SGX545, CloverTrail+ uses SGX544MP2 which is from the newer PowerVR 5XT serie. Sadly there are no CloverTrail+ based PC/UEFI platforms apparently.
Guys check this one out:Xen wrote: ↑Sat Dec 04, 2021 5:07 pm For GMA600 there is 3 sets, but last seems unused, GMA3600 - 5 sets. Only one set is used (BIOS select it by device detection), so you need to determine which one is your and try to fix it.
Almost same parameters is used in psb_intel_find_best_PLL function of linux drivers (google it).
- https://www.phoronix.com/scan.php?page= ... rVR-Vulkan
Maybe it could help here as well.
by Stas'M | https://github.com/binarymaster
Who is online
Users browsing this forum: Ahrefs [Bot] and 65 guests