Tool to Insert/Replace SLIC in Phoenix / Insyde / Dell / EFI BIOSes

Discussion in 'MDL Projects and Applications' started by andyp, Nov 26, 2009.

  1. kattekop

    kattekop MDL Novice

    Apr 23, 2010
    38
    5
    0
  2. goldfinger

    goldfinger MDL Junior Member

    Dec 29, 2010
    90
    16
    0
    #3043 goldfinger, Aug 27, 2012
    Last edited by a moderator: Apr 20, 2017
    Error 5 - Offset and length when trying to replace DSDT

    Hi Andy,

    Great tool. Thanks for writing it.

    I have one small problem when I try to update the buggy DSDT on a MSI P45 Platinum (UEFI Click BIOS.) I get: "Error 5 - Offset and length were out of bounds....."

    This error happens when the I try to fix one specific DSDT compile error by changing package to buffer. No SLIC mods at all.

    Code:
    dsdt.dsl  1924:                     Name (_FDE, Package (0x05)
    Error    4080 -       Invalid object type for reserved name ^  (found PACKAGE, requires Buffer)
    
    Compiled AML sizes (bytes)
    24893 - original_dsdt.aml
    24893 - mostfixes.aml (all fixes except Package to Buffer fix.)
    24891 - allfixes.aml (all fixes including buffer fix.)

    Compiled DSDT is two bytes smaller than the original and Phoenixtool throws an error.

    UPDATE
    I managed to make the DSDT mods so that it Phoenixtool updates the BIOS file by padding strings or by changing the name block to a method. However, when I try to boot the Windows 7 installer, it give me a BSOD saying that my BIOS is not fully ACPI compliant.

    Even if I only make a trivial change to the DSDT (string change, 0x0FFF to 0xFFFF), Windows gives me a BSOD saying my BIOS is not fully ACPI compliant. Something is wrong with DSDT patching or I'm doing something wrong. Can anyone help?
     
  3. kattekop

    kattekop MDL Novice

    Apr 23, 2010
    38
    5
    0
    More info

    I managed to decompress & recompress EVO Desktops from Compaq. It' done using 'phoedecw.exe', (Phoenix NUBIOS-version decompressor. It works like the tool 'decompaqt' i wrote at newyear, but it's far better. You should use phoedecw.exe and recompress using Phoenix PREPARE.EXE
    In order to recompress you have to made a ROM script to tell PREPARE how to compress.
    Your ROM.SCR should look like this:
    Line1: COMRESS LZARI
    Line2: ACPI 400000000.dec
    That's all, verify the contents, it should be exactly the same as in ROM image you downloaded.
    If we could know the ACPI oprom entry point then it would be cool to add SLIC. Don't forget about the assembly, each table gets pointed to and offset gets filled in behind RSDT as it's empty as you view it at first. One of the last things the code does is copy all table length for later use. The length must be correct so if you add SLIC, update it :) You could code around the entry point but it would be nice if we know where entry point is saved. All I see is a 55AA??CB. The CB is a return far, this would jump to our entry point. Two push instructions can make the way RETF far behaves, but I don't know where it's at. The ?? number behind marker 55AA, multiplied by 512 is the space for the entire module. These things are documented in specs.
     
  4. andyp

    andyp SLIC Tools Author

    Aug 8, 2008
    1,673
    2,570
    60
    #3046 andyp, Aug 29, 2012
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Could you link to the BIOS and the modded DSDT file?

    Thanks
    Andy
     
  5. andyp

    andyp SLIC Tools Author

    Aug 8, 2008
    1,673
    2,570
    60
    To be honest I don't have the time at the moment to do anything non-EFI related.
    Sorry
    Andy

     
  6. kingmax150

    kingmax150 MDL Novice

    Aug 23, 2012
    4
    0
    0
    Hi Andy,

    I'm attaching three original and modded modules. The checksum is the same but files are different.
     
  7. andyp

    andyp SLIC Tools Author

    Aug 8, 2008
    1,673
    2,570
    60
    #3052 andyp, Sep 1, 2012
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Hi

    Found and fixed the error 5.
    For the remainder all the tool does is recompile the DSL file with the intel ASL compiler.
    You could try the compatibility mode in advanced DSDT options (uses -oa command line switch), but other than that I dont think the tool is responsible for the non-ACPI compliant error
    One way to clarify - What happens if you don't change the DSDT_NEW at all just let the tool recompile it and reinsert?? (ie don't change the file and just click OK - I assume also you are ticking 'No SLIC', ticking 'Don't Alter Any ACPI tables' and unticking 'Replace All OEM/Table ID occurences')

    Andy

     
  8. andyp

    andyp SLIC Tools Author

    Aug 8, 2008
    1,673
    2,570
    60
    Yes
    Need alot more info - which BIOS, link to it, RW reports before/after etc..
    Andy

     
  9. andyp

    andyp SLIC Tools Author

    Aug 8, 2008
    1,673
    2,570
    60
    New version 2.10
    See first post
    Andy
     
  10. phrunt

    phrunt MDL Addicted

    May 1, 2007
    896
    90
    30
    Thanks for filling my request Andy, it may seem lazy but it's just handy to have the recovery filename in the clipboard :) I appreciate it.
     
  11. andyp

    andyp SLIC Tools Author

    Aug 8, 2008
    1,673
    2,570
    60
    Hey :)

    No worries at all.... and not lazy... you guys do tons of mods for people :)
    It was two lines of code!!!

    Good to see you back :)
    Andy

     
  12. goldfinger

    goldfinger MDL Junior Member

    Dec 29, 2010
    90
    16
    0
    Cool. Thanks for the fix. I tried compatibility mode and allow user to modify DSDT (with no mods) and Windows 7 booted up fine. I need a test DSDT mods without flashing. Do you know of a bootloader to do that? That will help me figure out if specific DSDT fixes cause the ACPI no fully compliant BSOD.

    Also, if I try to modify an already modified bios with SLIC, it seems to extract the DSDT fine. But it says ALASKA A M I in the definition block. If I boot into Windows 7 and use RW everything it says MSI MEGABOOK in the definition block.

    As of version 2.09, using the add SLI cert option does corrupt ACPI tables badly with this BIOS. No SLIC or DSDT mods made either. Windows fails to boot. Linux boots, but DSDT table from /sys/firmware/acpi/tables is corrupted/truncated.

    I will test out v2.10.

    Thanks again.
     
  13. Roman

    Roman MDL Addicted

    Jun 5, 2007
    646
    82
    30
    Yes, it works.