Wndows 7/2008 R2 Loaders

Discussion in 'MDL Projects and Applications' started by nikmb, Mar 17, 2010.

  1. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
    #141 nikmb, Mar 31, 2010
    Last edited: Apr 27, 2010
    (OP)
  2. jerinicd

    jerinicd MDL Novice

    Jul 29, 2009
    2
    0
    0
    Hi nikmb,

    First, I want to thank you for sharing your knowledge with others! :spoton:

    Do you think it would be possible to use similar method (with grubloader) to change some DMI/SMBIOS data such as motherboard version, m/b serial number, or system builder name by substituting it during boot? You can see the data I'm talking about in attached images. In my case, for example, m/b serial number is "None" and I need to change it

    Thanx
     

    Attached Files:

  3. FreeStyler

    FreeStyler MDL Guru

    Jun 23, 2007
    3,557
    3,832
    120
    @nikmb, the last version booted fine from VirtualBox, nice job ;)
     
  4. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
    #145 nikmb, Apr 1, 2010
    Last edited: Apr 1, 2010
    (OP)
    @FreeStyler. Fantastic news.

    No more updates until I've sorted out the latest way to allocate memory for slic and other tables.
    Looking at the Zsmins grldr I reckon it identifies which reserved memory segment the rsdt and xsdt tables reside in.
    Iterates through the acpi tables in the rsdt and xsdt to create a map of used memory.
    Then looks for a hole in this map large enough to add a slic and relocate rsdt and xsdt.
    It then relocates the rsdp to the edba.

    I will make my loader do the same but first checking for a possible in place update or rsdt and xsdt.
    Then I think this loader will do everything that Zsmins can do.

    Update: It's looking very good now. No more guessing where to load slic and stuff. The end results are looking pretty much the same as Zsmin's version. I will test on more hardware tonight and tomorrow. Looks good to publish on Saturday morning.
    The slic options I introduced in the current version are no longer needed so I will remove them.
     
  5. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
    The answer is no.
    The SMBIOS spec says that at least the entry point should be between
    0xf0000 and 0xfffff and this is BIOS ROM.
     
  6. jerinicd

    jerinicd MDL Novice

    Jul 29, 2009
    2
    0
    0
    OK, but isn't SLIC table in the same range F0000 to FFFFF. In my case it starts at 0xFDD80. I added SLIC to my BIOS by using awardtool.
    In which part of memory your loader writes fake SLIC table?

    In the meantime I was lucky to find Award DMI Configuration Utility (dmicfg) that can modify all DMI data from DOS, but it works only with Award BIOS-es. It seems that it is writing data to motherboard flash

    Thanks for your response...
     
  7. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
    #148 nikmb, Apr 4, 2010
    Last edited: Apr 4, 2010
    (OP)
    BIOS ROM is between F0000 and FFFFF. So is the SMBIOS. As far as I can tell this is the only place for SMBIOS. For some BIOS's everything can fit into the ROM including SLIC and SMBIOS. For some it cannot so the ROM exceeds that which can fit into F0000 and FFFFF. The BIOS ROM can be as big as it needs to be it just won't fit into this memory space that's all. So the tables are populated into real memory and the BIOS sets these memory areas as reserved. When the OS starts it asks the BIOS about which areas are reserved and does not use them for it's virtual memory. So in this case the BIOS ROM is like a packed version of the ROM and at boot time it copies parts of the ROM to real memory and put's pointer tables in memory for the OS to use to locate these tables.

    The starting pointer table is RSDP which is BIOS ROM but also (lucky for us) can be in the Extended Bios Data Area (EBDA) wihch is RAM and can be written to, youll see why this is lucky later.
    The RSDP points to 2 other tables RSDT and optionally XSDT. All three of these tables may be in ROM. In the RSDT and XSDT are pointers to ACPI tables one of which could be a SLIC. For the FACP table there are 2 pointers to tables not shown by the SLIC toolkit, the DSDT and FACS, the DSDT can be huge 32kb or more. Now we're getting to the point where thes tables cannot all fit into BIOS ROM so the BIOS puts them in real memory.

    If there is room in this real memory to put a SLIC and add an entry to the RSDT or XSDT tables I do this and everything works. Sometimes there isn't enough room so I must copy the RSDT, XSDT to the EBDA. But the RSDP still points to the old RSDT/XSDT so the RSDP is copied to the EBDA also. And lucky for us this is a valid place for it to be and is also searched first by the OS. So if we update the RSDP to point to our new RSDT/XSDT everything works again with our new SLIC.
     
  8. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
    Hi Daz

    The improvments have been made and tested.
    I will publish code, setup scripts and source next week.
     
  9. Daz

    Daz MDL Developer / Admin
    Staff Member

    Jul 31, 2009
    9,534
    67,253
    300
    It's good to see you have put time into making the improvements. Upon released I will give it a bit of a testing on some of my systems, my one thought though is does this conflict with Intel hardware the same as the other versions?

    Keep up the great work :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
    I expect it to still NOT work with Intel as these require the SLIC to be added as a PCI Option ROM as WindSlic does.
     
  11. Hazar

    Hazar MDL Guru

    Jul 29, 2009
    2,507
    456
    90
    I think the Intel tool edits the DMI of the BIOS like the DMI boot CD for XP
     
  12. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
    Looking at literals in the code suggests it uses Int 15h EF03h to update EFI data.
    Does anybody have any more ideas on this?
     
  13. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
  14. blackranger

    blackranger MDL Senior Member

    Dec 28, 2009
    466
    33
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
    Thanks, but this is just a loader, it's job is to manipulate real memory and place a slic in it before the operating system starts.
    There are other tools to install certs and keys or you can use the M$ command slmgr -ilc, slmgr -ipk to do the same.

    I am happy with this version and think it will achieve a good success rate. If there are problems please post them here and I will do my best to fix. You can also look at the source code if you want and tell me where I went wrong.;)
     
  16. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,222
    22,280
    210
  17. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
  18. nikmb

    nikmb MDL Member

    Feb 22, 2010
    107
    55
    10
    #160 nikmb, Apr 16, 2010
    Last edited: Apr 27, 2010
    (OP)