IntroductionSometimes, people have the problem that their Windows XP is running as a “single core” system, only, although there are two or more cores installed. This can usually be seen in the task manager, where performance shows only a single graph, although “one diagram per CPU” is selected.
I talk about cores here, the same applies to multiple processors. Those are usually used on servers, though, where few people would start “fixing” the HAL.
Hardware Abstraction Layer – HALThe reason is usually, that the normal ACPI HAL (Hardware Abstraction Layer) has been installed which does not support more than one core. In theory, XP recognises when a new CPU is installed, re-checks, and installs the correct hal. This does not always work, though.
The usual HALs are
- Standard PC
- ACPI PC
- ACPI Uni-Processor (UP)
- ACPI Multi-Processor (MP)
- MPS Multi-Processor (APIC)
Especially in the context of virtual machines running under SUN VirtualBox, this does not work. When a windows XP system is installed with only one core active, and more core(s) is/are added later on, the CPU “id” does not change … no redetection is done, the other cores are not recognised. Another reason may be that the “ACPI PC” is not the same as “ACPI UP”, and only ACPI UP is able to support, and thus detect, more than one CPU. In the case of VirtualBox, the situation may also be caused on the IO-APIC not being enabled on install. According to SUN, XP Uniprocessor with IO-APIC is slower than without.
Officially, there is no way to upgrade the HAL. You can downgrade it, though, which is not a good idea … there is no way back.
Using devcon.exe: Forced HAL UpgradeI found a very interesting post about the “devcon.exe”, a tool provided by MS as “the command line version of the device manager”, and its application to the HAL switch problem.
- The Post:
- Download devcon.exe:
- The post describing the forced hal upgrade:
Just execute the following commands in a cmd.exe shell …
Of course, this may completely break your system. Make backups, find out beforehand how to restore, etc. Using a virtual box system, this is easy, just make a snapshot and restore if the upgrade does not work.
devcon sethwid @ROOT\ACPI_HAL\0000 := +acpiapic_mp !acpiapic_up devcon update c:\windows\inf\hal.inf acpiapic_mp
After running devcon, you reboot the system; after the reboot, XP re-detects all hardware, and the requests another reboot. This may change some of the hardware names, especially the LAN connection may get the number 2.
Hidden DevicesYou can use the show-hidden trick of the device manager to display the old devices and remove them: http://support.microsoft.com/?scid=kb%3Ben-us%3B315539&x=14&y=11
set devmgr_show_nonpresent_devices=1 start devmgmt.msc
Switching the HALOnce you get a ACPI MP hal, you can switch it to whatever you like using the device manager. Just select “new driver” for the “Computer” device.
Doing it manuallyBefore I found the post by “hedrums” above, I tried to do it manually. Interestingly, none of the files is locked by windows. They are loaded so early and completely in the boot process that they are no longer “needed” (used) in a running system, and can just be replaced.Yet, I never managed to copy and rename the files correctly.
Afterwards, by comparing the file sizes between the used versions (in system32) and the restore/backup versions (in ServicePackFiles\i386), I recognised the following:
• ntoskrnl.exe == ntkrnlmp.exe (2,04MB)
• ntkrnlpa.exe == ntkrpamp.exe (1,93MB)
• hal.dll == halmacpi.dll (131kB)
So, by copying the three files ntkrnlmp.exe, ntkrnlmp.exe and halmacpi.dll to system32 and renaming them to ntoskrnl.exe, ntkrnlpa.exe and hal.dll, respectively, you may be running an ACPI MP hal. I have not tried this, though.
Alternatively, using the correct ACPI UP files (whichever they are), you may get a UP system that, in turn, is automatically able to detect the multicore and again, install the correct drivers …
Hardware.InfoI now found a tool that does the same stuff, a bit more comfortable: