Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Replacing my HAL.DLL to get multi-core support (solved)  (Read 5756 times)

Jurph

  • Bay Watcher
  • Minister of Belt-fed Weaponry
    • View Profile
Replacing my HAL.DLL to get multi-core support (solved)
« on: April 23, 2010, 02:54:13 pm »

Hey Dwarfy Friends!  I had a computer crash about 3 months ago, and when the Windows XP repair installation was finished, my CPU showed up as a single processor (it's not).  I've determined that this is because I somehow got the wrong HAL.DLL auto-detected during installation.  Worse yet, all of my Googling seems to indicate two contradictory claims:

  • It is entirely impossible to switch HAL.DLL from a single processor to a sexy multiprocessor version once you've done the install, unless you want to do a re-install.
  • It is possible but dangerous, and if done incorrectly will result in your machine being unbootable.

I'm a DF player, so I'm betting it's probably #2, but I can't find anyone who has explicitly outlined what "correctly" is.  Also, with the release of DF2010, I would like to get a second and third core back up in preparation for the d# merge, and to facilitate browsing the wiki while I play.  So: can you help me out with some excruciatingly simple instructions that don't involve reinstalling Windows?  I believe the key lies in redirecting my boot.ini to the correct files but I'm lost on the command syntax in that file.
« Last Edit: April 26, 2010, 04:07:58 pm by Jurph »
Logged
Dreambrother has my original hammer-shaped Great Hall.  Towerweak has taken the idea to the next level.

Jurph

  • Bay Watcher
  • Minister of Belt-fed Weaponry
    • View Profile
Re: Replacing my HAL.DLL to get multi-core support
« Reply #1 on: April 23, 2010, 05:50:10 pm »

Huh.  I fixed it.  For any Googlers out there, I added an extra boot option to my boot.ini with the following text:
Quote
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition - Multicore" /fastdetect /HAL=halmacpi.dll /kernel=ntkrnlmp.exe
...and then extracted the two named files from my Windows install CD to my C:\WINDOWS\system32 directory using
Quote
>> expand D:\i386\halmacpi.dl_ C:\WINDOWS\system32\halmacpi.dll
>> expand D:\i386\ntkrnlmp.ex_ C:\WINDOWS\system32\ntkrnlmp.exe

The first time I had a typo, and it wouldn't boot, but luckily I had left it switchable so I could boot back to single-core Windows and fix the boot.ini file.  Not terribly hard but a bit scary.  Kind of like breaching your first cavern in DF2010!
Logged
Dreambrother has my original hammer-shaped Great Hall.  Towerweak has taken the idea to the next level.

psyn

  • Bay Watcher
    • View Profile
Re: Replacing my HAL.DLL to get multi-core support
« Reply #2 on: April 23, 2010, 07:21:27 pm »

This is because Windows was (re)installed with the uniprocessor HAL (IIRC ACPI used to also be non-default) and needs to be changed by hitting F5 before the initial setup. I don't know if what you did is officially supported.
Logged

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: Replacing my HAL.DLL to get multi-core support
« Reply #3 on: April 25, 2010, 03:23:26 am »

This is because Windows was (re)installed with the uniprocessor HAL (IIRC ACPI used to also be non-default) and needs to be changed by hitting F5 before the initial setup. I don't know if what you did is officially supported.
It's not supported at all, but it should be fine. There shouldn't be anything outside of the HAL subsystem that really cares about it.
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

psyn

  • Bay Watcher
    • View Profile
Re: Replacing my HAL.DLL to get multi-core support
« Reply #4 on: April 25, 2010, 11:35:18 pm »

I think, if the non-ACPI HAL was installed, then a reinstall was (in most cases) necessary, because it would incorrectly allocate a bunch of (fixed) shared IRQs. But for the multiprocessor HAL, you're probably right -- I only don't know for sure; I'm not very familiar with the Windows HAL architecture. It should theoretically be detected as a hardware change anyway. Some AMD sockets supported upgrades from single- to multi-core CPUs IIRC.
Logged

Jurph

  • Bay Watcher
  • Minister of Belt-fed Weaponry
    • View Profile
Re: Replacing my HAL.DLL to get multi-core support
« Reply #5 on: April 26, 2010, 06:46:47 am »

It should theoretically be detected as a hardware change anyway. Some AMD sockets supported upgrades from single- to multi-core CPUs IIRC.

Give this man a cookie!  It was detected as a hardware change, and Plug-and-Play handled it perfectly.
Logged
Dreambrother has my original hammer-shaped Great Hall.  Towerweak has taken the idea to the next level.

psyn

  • Bay Watcher
    • View Profile
Re: Replacing my HAL.DLL to get multi-core support
« Reply #6 on: April 26, 2010, 01:03:32 pm »

Awesome photo, by the way. Is that another A-10 in the background?
Logged

Schilcote

  • Bay Watcher
    • View Profile
Re: Replacing my HAL.DLL to get multi-core support
« Reply #7 on: April 26, 2010, 01:12:04 pm »

What's HAL?
Logged
WHY DID YOU HAVE ME KICK THEM WTF I DID NOT WANT TO BE SHOT AT.
I dunno, you guys have survived Thomas the tank engine, golems, zombies, nuclear explosions, laser whales, and being on the same team as ragnarock.  I don't think something as tame as a world ending rain of lava will even slow you guys down.

Jurph

  • Bay Watcher
  • Minister of Belt-fed Weaponry
    • View Profile
Re: Replacing my HAL.DLL to get multi-core support
« Reply #8 on: April 26, 2010, 04:07:43 pm »

What's HAL?

Hardware Abstraction Layer, which tells Windows (approximately) which interfaces it can expect to find on your motherboard, and therefore how many IRQs of which varieties to reserve.  Installing Windows with a single-core HAL means that your OS kernel and HAL are both expecting to see only one core, and therefore a CPU with multiple cores will not be recognized.  Adding the above switches to your boot.ini will allow you switch this on the fly, which isn't strictly recommended (see my OP).

Awesome photo, by the way. Is that another A-10 in the background?

I forget whether it was or not; it was taken at an air show back when I was a lieutenant (many moons ago).  I suspect it was not another A-10, because from what I remember there were very few duplicate airframes on display.  Squinting at the pic, it might even be the starboard wing and farthest outboard hardpoint from the same A-10.  Check out this diagram and try to reconcile the front view with where I must have been standing to get that pic. 
Logged
Dreambrother has my original hammer-shaped Great Hall.  Towerweak has taken the idea to the next level.