| bretjohn Rio Rancho, NM, 12.09.2011, 02:15 |
Using Multiple CPU Cores in DOS? (Miscellaneous) |
I had a thought this morning that I thought I would "throw against the wall to see if it sticks or not". I figured I would start on this forum since it seems to be where a lot of technical knowledge and "outside the box" thinkers hang out. |
| RayeR CZ, 12.09.2011, 15:26 @ bretjohn |
Using Multiple CPU Cores in DOS? |
Hehe, this is challenging. 1st you may have to look at ACPI spec to learn how to determine available CPU cores and obtain their APIC ID (I'm at the beginning of on this 1st step). Then learn how to program and turn on APIC to be able to swich cores. But I think it's not possible to run each core in different mode. It would be nice if in 64bit long mode the second core could run in v86 so NTVDM support for old 161bit apps would be possible but I think it can't. --- |
| Laaca Czech republic, 12.09.2011, 17:26 @ RayeR |
Using Multiple CPU Cores in DOS? |
If you really want to use two CPU cores you could find some help on forums in http://www.osdev.org --- |
| RayeR CZ, 12.09.2011, 20:13 @ Laaca |
Using Multiple CPU Cores in DOS? |
> Or you couls maybe requiere loaded DPMI server, if it could help, of --- |
| bretjohn Rio Rancho, NM, 12.09.2011, 22:36 @ Laaca |
Using Multiple CPU Cores in DOS? |
> But you still will have to solve the speed on single core CPUs. |
| RayeR CZ, 13.09.2011, 00:33 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> Also in DPMI/PM, most INT calls need to be reflected to real mode. In --- |
| bretjohn Rio Rancho, NM, 13.09.2011, 04:25 @ RayeR |
Using Multiple CPU Cores in DOS? |
> This thing is still not clear to me. Some years ago I wrote mp3 player with |
| RayeR CZ, 13.09.2011, 19:32 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> Let's do a quick calculation, using my Sony Laptop as an example. We'll --- |
| Laaca Czech republic, 13.09.2011, 21:12 @ RayeR |
Using Multiple CPU Cores in DOS? |
Bret, can you somehow reduce the frequency of IRQ event? --- |
| bretjohn Rio Rancho, NM, 13.09.2011, 23:02 @ Laaca |
Using Multiple CPU Cores in DOS? |
> Bret, can you somehow reduce the frequency of IRQ event? |
| RayeR CZ, 14.09.2011, 03:30 @ bretjohn |
Using Multiple CPU Cores in DOS? |
BTW how do you measure CPU mode switch? Do you have some small util for this? I could test it on my C2D E8400 how fast will it be... --- |
| bretjohn Rio Rancho, NM, 14.09.2011, 18:24 @ RayeR |
Using Multiple CPU Cores in DOS? |
> BTW how do you measure CPU mode switch? Do you have some small util for |
| RayeR CZ, 15.09.2011, 01:15 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> What I do is measure how long it takes to do a small INT 15.87 memory --- |
| bretjohn Rio Rancho, NM, 15.09.2011, 19:11 @ RayeR |
Using Multiple CPU Cores in DOS? |
> But you don't know how BIOS implements this service. If BIOS writer make it |
| Rugxulo Usono, 13.09.2011, 02:27 @ bretjohn |
Using Multiple CPU Cores in DOS? |
(CAVEAT: this was not meant to be a long rant, sorry, and I hope it's not too off-topic or unhelpful, that wasn't my goal. Please keep this in mind.) |
| RayeR CZ, 14.09.2011, 03:52 @ Rugxulo |
Using Multiple CPU Cores in DOS? |
> Honestly, it's kinda dopey that we don't have portable drivers or binaries --- |
| tom Germany (West), 14.09.2011, 13:24 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> To do an INT 15.87 memory transfer on a Sony laptop (approx 5 years old): |
| bretjohn Rio Rancho, NM, 14.09.2011, 19:03 @ tom |
Using Multiple CPU Cores in DOS? |
> if in real mode, |
| tom Germany (West), 15.09.2011, 14:43 (edited by tom, 15.09.2011, 18:34) @ bretjohn |
Using Multiple CPU Cores in DOS? |
> > if in real mode, |
| bretjohn Rio Rancho, NM, 15.09.2011, 18:24 @ tom |
Using Multiple CPU Cores in DOS? |
> in protected mode, this very much depends on the DPMI host, as you are |
| tom Germany (West), 15.09.2011, 18:40 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> > in protected mode, this very much depends on the DPMI host, as you are |
| bretjohn Rio Rancho, NM, 16.09.2011, 01:33 (edited by bretjohn, 16.09.2011, 02:20) @ tom |
Using Multiple CPU Cores in DOS? |
> please use www.drivesnapshot.de/freedos/himem.exe and run |
| RayeR CZ, 16.09.2011, 02:26 @ tom |
Using Multiple CPU Cores in DOS? |
Here's my test results with various memmgrs (dos 6.22, c2d e8400) --- |
| bretjohn Rio Rancho, NM, 16.09.2011, 18:06 @ tom |
Using Multiple CPU Cores in DOS? |
I will have some time to mess with this over the weekend, and will let you know what happens. |
| RayeR CZ, 16.09.2011, 18:22 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> Based on what I --- |
| bretjohn Rio Rancho, NM, 17.09.2011, 02:03 @ RayeR |
Using Multiple CPU Cores in DOS? |
> I think that A20 is fiddled only when acessing HMA so it's useless for |
| Laaca Czech republic, 17.09.2011, 07:47 @ bretjohn |
Using Multiple CPU Cores in DOS? |
Discussion about multicore under DOS turned into another direction however yesterday at FreeDOS discussion board appeared this entry" --- |
| tom Germany (West), 17.09.2011, 14:09 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> > I think that A20 is fiddled only when acessing HMA so it's useless for |
| bretjohn Rio Rancho, NM, 18.09.2011, 04:27 @ tom |
Using Multiple CPU Cores in DOS? |
> > ... but there must be something going on in the BIOS that makes it so |
| tom Germany (West), 19.09.2011, 15:03 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> I've seen statements that vary from (paraphrasing), "There are a lot of |
| bretjohn Rio Rancho, NM, 19.09.2011, 19:50 @ tom |
Using Multiple CPU Cores in DOS? |
> BUT early versions of Microsoft LINK /EXEPACK and early versions of |
| tom Germany (West), 19.09.2011, 22:00 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> I don't think I want that to be the default behavior, though, since it |
| bretjohn Rio Rancho, NM, 19.09.2011, 23:19 @ tom |
Using Multiple CPU Cores in DOS? |
> wrong. A20 will be enabled almost always, and only a few microseconds after |
| tom Germany (West), 20.09.2011, 12:02 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> > wrong. A20 will be enabled almost always, and only a few microseconds |
| DOS386 20.09.2011, 12:24 @ tom |
Using Multiple CPU Cores in DOS? |
tom wrote: --- |
| bretjohn Rio Rancho, NM, 20.09.2011, 18:23 @ tom |
Using Multiple CPU Cores in DOS? |
> A20 will be enabled by each INT 21, (usually DOS lives in memory above 1M), |
| tom Germany (West), 20.09.2011, 20:17 (edited by tom, 21.09.2011, 12:43) @ bretjohn |
Using Multiple CPU Cores in DOS? |
> > A20 will be enabled by each INT 21, (usually DOS lives in memory above |
| RayeR CZ, 19.09.2011, 15:01 @ tom |
Using Multiple CPU Cores in DOS? |
> > > I think that A20 is fiddled only when acessing HMA so it's useless for --- |
| bretjohn Rio Rancho, NM, 19.09.2011, 20:25 @ RayeR |
Using Multiple CPU Cores in DOS? |
> Yes but I though that when accessing all mem >1MB in PM it use some native |
| RayeR CZ, 20.09.2011, 03:14 @ bretjohn |
Using Multiple CPU Cores in DOS? |
> Since I hadn't messed directly with PM before (all I had ever done was set --- |
| DOS386 13.09.2011, 07:11 (edited by DOS386, 13.09.2011, 07:23) @ bretjohn |
Using Multiple CPU Cores in DOS? |
> why not have one CPU/Core running in RM/V86 and another running in PM --- |
| bretjohn Rio Rancho, NM, 13.09.2011, 19:14 @ DOS386 |
Using Multiple CPU Cores in DOS? |
> IIRC the problem we discussed 2 years ago was that you were using INT $15 / |
| FFK 18.09.2011, 04:44 @ DOS386 |
Using Multiple CPU Cores in DOS? |
> |
| RayeR CZ, 19.09.2011, 14:50 @ FFK |
Using Multiple CPU Cores in DOS? |
> I guess that the best choice is a standarised DPMI 1.1 Multi-cores, --- |
| FFK 21.09.2011, 01:30 @ RayeR |
Using Multiple CPU Cores in DOS? |
> > I guess that the best choice is a standarised DPMI 1.1 Multi-cores, |
| DOS386 20.09.2011, 09:10 @ bretjohn |
USBDOS | A20-BUG | no need for 1'000'000'000 cores |
> I did some experimenting today on one of my computers, and it --- |
| bretjohn Rio Rancho, NM, 20.09.2011, 19:34 @ DOS386 |
USBDOS | A20-BUG | no need for 1'000'000'000 cores |
> Voila. Problem gone. No need for multi-core "technology" |
| RayeR CZ, 23.09.2011, 02:27 @ bretjohn |
Using Multiple CPU Cores in DOS? |
Today I was on a beer with my friend Rudolf, coreboot developer, and I ask him about multicore usage. He told me it's not hard to use it. System starts with one core enabled and other cores are halted (but they are initialized during POST, e.g. MTRRs are set). You need to program APIC to send a message to second core to start up. You specify an address where the 2nd core will start executing code. It will start in realmode so the address must be <1MB. The APIC is controlled via MMIO acessing some FFxxxxxx registers near top of address range so you need be in pmode or use INT service to access this high address. I don't know anything how APIC works so we didn't discuss it further. He pointed me to sources of SeaBIOS - one of the coreboot possible payload, that there is an example of probing multiple cores and APIC programming. Executing an ISR on 2nd core is possible but it's more complex. It needs to disable legacy PIC and reprogram APIC/LAPIC, I don't remember exactly... --- |
Thread view
I'm just saying, doing everything in pure DOS is infeasible, not the least because of lack of drivers and developers. Dual booting is fine (I'm doing it now), but it's not a perfect solution, nor is virtualization, nor is NTVDM or MDOS or DOSEMU or whatever, nor buying old (prone to failure) hardware.




