flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Multicore UEFI in QEMU? |
Author |
|
bitRAKE 27 Apr 2022, 21:35
Are you using something like:
https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Application/Cpuid/ ... to display CPU information, or have you written your own program to detect processors? If QEMU fails to run, it usually displays an error message. What are your tools telling you? _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
27 Apr 2022, 21:35 |
|
HSE 27 Apr 2022, 22:03
Not like that.
I'm using EFI_MP_SERVICES Protocol. Same program from boot detected 8 CPU (they are 4 cores with hyperthread) but in QEMU detect only one. There are no errors. [Just some hours ago I adapted your UINT64__Baseform proc to unicode. Very interesting. I need that exactly to show this numbers (until now I loaded to FPU, not so elegant nor fast).] |
|||
27 Apr 2022, 22:03 |
|
bitRAKE 27 Apr 2022, 22:17
Have you tried specifying the exact topology you'd like to test?
Code: -smp [[cpus=]n][,maxcpus=maxcpus][,sockets=sockets][,dies=dies][,clusters=clusters][,cores=cores][,threads=threads] https://www.qemu.org/docs/master/system/qemu-manpage.html |
|||
27 Apr 2022, 22:17 |
|
HSE 28 Apr 2022, 00:00
Now better:
Code: -smp sockets=1,dies=1,cpus=8,maxcpus=8,clusters=2,cores=2,threads=2 No error, just don't run. Code: -smp sockets=1,dies=1,cpus=8,maxcpus=8,cores=4,threads=2 Run but nothing change, only one cpu. |
|||
28 Apr 2022, 00:00 |
|
bitRAKE 28 Apr 2022, 11:07
Quote: For a particular machine type board, an expected CPU topology hierarchy Does your test program work on real hardware? It would help to insure it's a configuration problem with QEMU. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
28 Apr 2022, 11:07 |
|
HSE 28 Apr 2022, 12:09
Some weeks ago (when was not so relevant ) I read somewhere that multicore depends on machine used. But I don't know if x86_64 machines can do that. Multicore examples I found are ARM, or about images with OS.
The program work in real hardware. Relevant lines are very simple: Code: mov rax, pBootServices invoke [rax].EFI_BOOT_SERVICES.LocateProtocol, ADDR EFI_MP_SERVICES_PROTOCOL_GUID, NULL, ADDR MpProtocol mov rcx, MpProtocol invoke [rcx].MP_SERVICES.GetNumberOfProcessors, MpProtocol, addr ProcessorNum, addr EnabledProcessorNum
|
|||||||||||
28 Apr 2022, 12:09 |
|
bitRAKE 28 Apr 2022, 13:30
Ah, found a better way to confirm QEMU cpus:
Add command line option "-monitor vc" During emulation press <Ctrl><Alt><2> to enter monitor mode. Type command: "info cpus" ... and sure enough there they are. (Here they are - I hope there they are, lol.) |
|||
28 Apr 2022, 13:30 |
|
HSE 28 Apr 2022, 13:43
Perfectly!!
Only one have an asterisk. Then is a limitation of UEFI emulation ¿? |
|||
28 Apr 2022, 13:43 |
|
bitRAKE 28 Apr 2022, 13:53
Maybe, but I always blame myself first.
The EFI app crashed on my end. So, I would try to debug or implement in another way. If that fails too, then try another firmware build. Actually, trying another firmware is quite easy - if that gives same results then the app code is probably in error. |
|||
28 Apr 2022, 13:53 |
|
HSE 28 Apr 2022, 14:34
Must crash after show processors. I rename BOOTX64 and use like boot file.
|
|||
28 Apr 2022, 14:34 |
|
HSE 01 May 2022, 22:34
No luck with QEMU, fortunately worked in VirtualBox, but it's not the same.
Thanks |
|||
01 May 2022, 22:34 |
|
bitRAKE 02 May 2022, 01:17
What version of QEMU are you using?
7.0 was just released, but it's very buggy in Windows, in my experience. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
02 May 2022, 01:17 |
|
HSE 02 May 2022, 13:36
bitRAKE wrote: What version of QEMU are you using? Package is 6.2, but qemu-system-x86_64 is 5.2. Probably machine is too old: Code: q35 Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-5.2) |
|||
02 May 2022, 13:36 |
|
I 09 Jul 2022, 00:41
It's a bit late but what worked for me using a similar command line was adding option "-accel kvm", otherwise only single core .
|
|||
09 Jul 2022, 00:41 |
|
HSE 09 Jul 2022, 03:52
kvm is not valid. Thanks anyway.
|
|||
09 Jul 2022, 03:52 |
|
I 10 Jul 2022, 03:21
You can find out what can be used for your system with "qemu-system-x86_64.exe -accel help"
The default accelerator tcg seems somewhat limited https://wiki.qemu.org/Documentation/Platforms Windows HyperVisor - whpx (only some Windows OS's) Intel HAXM - hax (Only Windows Intel and needs HAXM installed) Be aware trying might end up being more trouble than it's worth. |
|||
10 Jul 2022, 03:21 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.