Use Intel NIC PXE image mod for 2.1 SLIC?

Discussion in 'MDL Projects and Applications' started by SirSilentBob, Aug 25, 2009.

  1. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    I meant to ask something different, actually:
    There is a problem with XP boot with some WinSLIC versions.
    There is no problem with anything else W7, DOS, linux, etc with the same WinSLIC versions.
    Q:
    The problem with XP exists only when XP loader is used directly, right?
    Or XP doesn’t boot even if grub of W7 loader executed first?

    In your case, with GRUB – does XP loads fine or breaks?
     
  2. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    I.e. there is no SLIC when AMI wakes up? :(
    I read somewhere, it’s should work like this, actually.
    Don’t remember where…

    Let me know if you want Dell compression. Decompress code is really tiny. And there is no dictionary.
    I guess, you code is so small, it won’t get much benefit, but add complexity instead… :rolleyes:

    I don’t know much about EFI stuff. :eek:
    Does non EFI and EFI BIOSes completely different?
    Can you have both at the same time and choose which one should to run?
    Does non EFI BIOS signed too?

    It’s gotta be somewhere! It was some PXE or SATA extension ROM integration instructions for BIOS writers on Intel site. And it talks about sharing EEPROM between them. I hope what you looking for might be there.
    I did read it few weeks ago and cannot find it now… :eek:
     
  3. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    Nope - found doc but nothing is there... :(
    Intel® iSCSI Remote Boot Application Notes for BIOS Engineers
     
  4. truthinjection

    truthinjection MDL Member

    Aug 27, 2009
    247
    46
    10
    Sounds like a decent/easy idea. You can do the old bisect/binary-search algorithm and put it halfway down, then if it boots move it half the distance up and try again until it fails.

    Let me know how it turns out.

    And, good luck!
    -tij-
     
  5. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,354
    2,026
    210
    Observation:
    Just to test it I used old Dell GX240 (of course it would not be used to even try to install W7) with XP on it & Intel Pro 100/S card
    XP will not even start booting with Windslic (latest version) as first boot device (it will boot with F5)

    sebus
     
  6. truthinjection

    truthinjection MDL Member

    Aug 27, 2009
    247
    46
    10
    Good job on the trackdowns so far.

    So, the ol' Int15H handler causes trouble? Not really surprising, sadly, since it's the most complicated part of the whole program, I guess.

    The question becomes what to do about it. Retaining the Int15H handler lets us reserve memory even on pre-PCI_Firmware_v3.0 boards, which is handy.

    On PCIFW-v3.0-compliant boards (I'm unsure of the time-frame that became the standard on new motherboards) I can probably just use PMM-from-PCIFW3.0 permanent-memory reservation. On older boards, I'm stuck either repairing whatever's wrong with the Int15H-handler or (maybe) grabbing a chunk of EBDA and sticking the RSDT and XSDT there.

    Hmm.
    -tij-
     
  7. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    Some mobos might have 100% static RSDT and XSDT – i.e. you could move them to WinSLIC memory during INIT phase. I hope it’s not quite radical idea. :eek:
    How difficult it’ll be to add code for conditional compilation?
     
  8. truthinjection

    truthinjection MDL Member

    Aug 27, 2009
    247
    46
    10
    Hmm. I haven't messed with WindSLIC too much in the past few days.

    Removing the lea thing would cause it to use the wrong address to compare against, which would basically disable the interrupt, I think.

    I'm probably going to try to replace the whole mechanism behind the _ivt_ stuff.

    If you want to try something, you can take a WindSLIC from a few releases ago, and get the cmp_ivt macro out of it (before it called the proc_ivt_tool routine). That one wouldn't have the same issues (theoretically).

    Anyway, I did figure out how to get VMWare working with WindSLIC, so that's something, at least.

    -tij-
     
  9. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    Could you share a bit? ;)
     
  10. truthinjection

    truthinjection MDL Member

    Aug 27, 2009
    247
    46
    10
    Using WindSLIC with VMWare 7

    Sure thing.

    Assumptions:

    1. You have a functional VMWare v7.0.1 installation. Older versions should work, but haven't been tested in a while.
    2. These instructions apply to a Linux Host-OS. Windows as a Host-OS should work as well, but any file paths used will have to be updated.
    Make sure at least one Virtual NIC is enabled in your VM
    1. Make a backup of the .VMX file for your VM
    2. Manually text edit the .VMX file for your VM
    3. Add the following lines to the end of the file:

      ethernet0.virtualDev = "e1000"
      e1000bios.filename = "/opt/windslic.rom"
    4. Note: You will have to convert the file path above to the correct file path
    5. Compile WindSLIC with PCI Vendor ID "8086h" and Device ID "100Fh"
    6. Boot the VM
    7. Press F2 quickly enough to get into the VM's BIOS
    8. Set WindSLIC as the first boot device
    9. Save and Exit the BIOS
    That should do it.

    Good luck,
    -tij-
     
  11. truthinjection

    truthinjection MDL Member

    Aug 27, 2009
    247
    46
    10
    Those are 32-bit registers. EAX is the 32-bit extended version of AX, which is 16-bits, comprised of AH (top 8-bits) and AL (bottom 8-bits). I think the 64-bit version is called RAX, but I've never used it.

    Right. This seems the same as this bug has always been.

    Maybe it's like the Star Trek movies. Only the even ones don't suck. ;)

    OK. Thanks. Don't kill yourself, though. Whatever this bug is, it's more subtle than it looks.

    The way I figure it, it has to be one or more of the following:

    1. A stack corruption bug in the Int0x15 handler. The code for that is pretty skanky at best.
    2. A totally wrong instruction somewhere in the code, that appears to work, but is actually doing something subtle and wrong, clobbering some totally unrelated area of memory that XP happens to look at.
    3. A FASM bug. Early in development, I disassembled the output file with NASM's 'ndisasm' and looked, and FASM was generating code that was not the instructions I had requested. I changed to a different instruction in the source and the bad output went away. Granted, I had been trying to do something completely stupid/wrong ('pop CS'), but FASM didn't complain, it just generated completely wrong code.
    As for which of the three it is, I have never been able to tell.

    Interrupt Handlers are more brittle than regular code, so my plan is to re-write the code to just (mis-?)use the EBDA to hold all the tables we need. The total size of all the memory we actually use on most machines is less than 1K, so it should be fine. Theoretically, of course.

    in thought mode,
    -tij-
     
  12. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    Cool. I didn't know it's possible to add extension ROM that easy ;)
    I thought, you were replacing whole BIOS :eek:
     
  13. psyco

    psyco MDL Novice

    Aug 26, 2009
    13
    0
    0
    TNX a lot!!!! :worthy:
     
  14. TomT

    TomT MDL Novice

    May 28, 2009
    22
    0
    0
    This is a significant way of installing a 2.1 SLIC, so why isn't this thread stickied? I only found it by accident!
     
  15. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,354
    2,026
    210
    Sorry, but what would be the practical reason to do it, when VM BIOS is modified whichever way one wants?

    If this could be done for Parallels then it would be magical

    sebus
     
  16. truthinjection

    truthinjection MDL Member

    Aug 27, 2009
    247
    46
    10
    #499 truthinjection, Feb 15, 2010
    Last edited: Feb 15, 2010
    Parallels PXE Information

    I dunno. Apokrif asked, although perhaps he was looking for knowledge regarding actual hacking of the VM BIOS, rather than just editing one text file.

    On the other hand, this method is a lot more practical than actually editing a VMWare BIOS, since it passes the "grandma-phone" test, meaning I think if my life depended on it, I could explain to a grandma how to do it over the phone. :) Kinda like the time I helped a grandma get her TV menu back from Spanish mode from 500 miles away. :cool:

    From a quick Google search, this is (indirectly) possible, at least with the GPXE PXE stack. It should be adaptable to WindSLIC if someone wants to try.

    Apparently the trick is to make a bootable ISO that boots to GPXE, then boot to that. From that, at least on a regular PC, it should fail-over to the next boot device, which should be the HDD.

    Hope that helps,
    -tij-
     
  17. truthinjection

    truthinjection MDL Member

    Aug 27, 2009
    247
    46
    10