Insyde module headers

Discussion in 'BIOS Mods' started by andyp, Oct 28, 2009.

  1. andyp

    andyp SLIC Tools Author

    Aug 8, 2008
    1,673
    2,568
    60
    #1 andyp, Oct 28, 2009
    Last edited by a moderator: Apr 20, 2017
    Playing around. EzH2O cannot be automated using SendKeys the same way MMTool can so looking at doing manually. Comparing before/after mods done using EzH20 there appear to be 3 checksums....... several hours staring at a hex editor reveal the following:

    Code:
    Offset (h)Length (h)Item
    ------------------------
    0 10GUID - [EFI_GUID]
    10 1Header checksum (2's complement sum of first 17h bytes - assume extra checksum is 0)      \  [EFI_FFS_INTEGRITY_CHECK]
    111Module checksum (2's complement sum of bytes from 18h to end of module (excluding any FFh padding)) /
    121Type of module - [EFI_FV_FILETYPE]
    13              1        Module attributes - [EFI_FFS_FILE_ATTRIBUTES]
    143Size of header and module (excluding FFh padding at end, but including 00h padding) - [Size]
    171State - [EFI_FFS_FILE_STATE] - only ever seen F8h
    
    Common header
    
    183Size of extended header and module (from 18h in header, excluding FFh padding, but including 00h padding)
    1b1Type byte / Extended header byte
    - if 1,10h-1Bh then module follows directly
    - if 2 then extended header
    Extended header
    
    1c10GUID (? always FC1BCDB0-7D31-49AA-936A-A4600D9DD083)
    2c              2               Data offset (from common header - normally 1Ch)
    2e2Attributes (1 = Processing required, 2 = Status valid)
    304CRC32 of module (including last 4 bytes of header, excluding FFh padding, including 00h padding)
    
    Next common header
    
    343Module size (including these 4 bytes, excluding ALL padding)
    371Type byte
    
    All modules are padded 00h/FFh to QWORD boundry
    
    Type
    EFI_FV_FILETYPE_ALL 0x00
    EFI_FV_FILETYPE_RAW 0x01
    EFI_FV_FILETYPE_FREEFORM 0x02
    EFI_FV_FILETYPE_SECURITY_CORE 0x03
    EFI_FV_FILETYPE_PEI_CORE 0x04
    EFI_FV_FILETYPE_DXE_CORE 0x05
    EFI_FV_FILETYPE_PEIM 0x06
    EFI_FV_FILETYPE_DRIVER 0x07
    EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER 0x08
    EFI_FV_FILETYPE_APPLICATION 0x09
    
    Attributes
    00000001 - Tail present
    00000010 - Needed for crisis recovery
    00000100 - Reserved (0)
    00111000 - Alignment (000 - 111)
    01000000 - If set, module checksum present
    
    State
    00000001 - EFI_FILE_HEADER_CONSTRUCTION
    00000010 - EFI_FILE_HEADER_VALID
    00000100 - EFI_FILE_DATA_VALID
    00001000 - EFI_FILE_MARKED_FOR_UPDATE
    00010000 - EFI_FILE_DELETED
    00100000 - EFI_FILE_HEADER_INVALID
    11000000 - ? Always 11
    
    Type of region
    EFI_SECTION_COMPRESSION 0x01 (not compressed in most insyde)
    EFI_SECTION_GUID_DEFINED 0x02
    EFI_SECTION_PE32 0x10
    EFI_SECTION_PIC 0x11
    EFI_SECTION_TE 0x12
    EFI_SECTION_DXE_DEPEX 0x13
    EFI_SECTION_VERSION 0x14
    EFI_SECTION_USER_INTERFACE 0x15
    EFI_SECTION_COMPATIBILITY16 0x16
    EFI_SECTION_FIRMWARE_VOLUME_IMAGE 0x17
    EFI_SECTION_FREEFORM_SUBTYPE_GUID 0x18
    EFI_SECTION_RAW 0x19
    EFI_SECTION_PEI_DEPEX 0x1B
    Andy
     
  2. sgysgy

    sgysgy MDL Novice

    Nov 10, 2018
    1
    0
    0
    thinkyou!
     
  3. arif maryono

    arif maryono MDL Novice

    May 21, 2018
    3
    0
    0
    Thanks for this amazing tool
     
  4. akhfar

    akhfar MDL Novice

    Oct 23, 2020
    1
    0
    0
    what can i do with this header? and how to use them im noobs so could someone explain to me this topic. thanks
     
  5. ken eglinton

    ken eglinton MDL Novice

    May 1, 2021
    8
    0
    0
    Anybody care to share how to use this info? struggling with insyde lenovo bios trying to add nvme support
     
  6. Asparagus Lover

    Asparagus Lover MDL Senior Member

    May 17, 2019
    304
    64
    10
    You don't need this info to add NVME support.
     
  7. ken eglinton

    ken eglinton MDL Novice

    May 1, 2021
    8
    0
    0
    really? care to share how to add nvme support to lenovo insyde laptop bios? the one with RSA1 signature(not that TCBA 5 beeps crap)
    because my mod passess stock oem flasher and tanks on boot with the classic not valid/secure blah blah-in fact using andys tool a certain way keeps the sig intact
    but Im getting checksum errors ive no idea how to fix-I think my driver needs to be signed before insertion on top of the sanity check checksum that defeats hardware programmer
    all thats left is smm backdoor or exploit but I have to moddify the script for my bios and again clueless as all phoenix tool tutorials and links are gone or blog invite only
    this was probably solved back in 2016-I have yet to find even one example or post of even an attempt at insyde nvme so learning how to correct checksums via posts like these
    are essential for nvme support-but as usuall an essentailly braging post is made with no further info but lots of talks about SLIC which is the key to RSA but all that effort fro just windoze activation?
    so @ Asparagus Lover since I dont need this posts info for nvme then how do you add nvme to lenovo insyde laptop bios

    B40-30 laptop with oldest found ver 26 bios with sleepbug

    things ive tried
    1.editing memory dump after opening bios in h2oeze
    2. inserting nvme module at end of FFV2 nvme_5-small, full and smmdxecombo nvme driver pulled from another lenovo insyde with native nvme
    3.uefi tool 21-28 and many insyde tools-I can pass the stock oem flasher but tanks on insecure image-I cant believe nobody knows andys tool keeps the sig intact

    im certain the module has to be signed and then the whole bios hardware flashed or maybe recovery method(cant get that to work however)