Dell bios, how to decompose / mod.

Discussion in 'BIOS Mods' started by wolf69, Nov 21, 2009.

  1. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    #441 Apokrif, Jun 25, 2010
    Last edited by a moderator: Apr 20, 2017
    Oops… Latitude D430 doesn’t even have 00:1F.2 device
    Code:
    lspci
    00:1F.1 8086:27DF [0101] IDE controller [PI 8a]
    CPU-Z: Southbridge Intel 82801GHM (ICH7-M/U) rev. A1
    I does have AHCI, but no single SATA HD :(
    I guess, I've tested everything I can...
     
  2. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
    Is used only IDE channel and 00:1F.2 is disabled from function disable bit.
    Or is ICH7-U.
    GRUB2 is ugly and a little confusing me.
    I think problem is not from pci registers but from AHCI registers located in memory space mapped by ABAR.
     
  3. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    Any easy way to enable it and detect model without opening it?

    Right. Still easier then BIOS editing, don’t you think?

    Might be, what the point to fiddle if there is no any SATA devices anyway?
     
  4. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
    Without opening ... I don't know.
    Maybe is easier than bios editing,but with your detailed information is pretty easy,just replace oROM inside bios recalc checksum then flash.

    I think problem is not from pci registers but from AHCI registers located in memory space mapped by ABAR.
    I was reffering at ICH7-M and others.And not to Latitude D430.

    I still make some tries guided using SATA rev 1.0 specs but at moment I'm blocked,I dont know how to check status of few bits and conditions is to continue if in dword bits 0 3 and 7 are 0 .
    Are you familiar with asm programming?
     
  5. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    Post you code and what you do want to do
     
  6. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
    At
    ;pool PxSSTS.DET for device detect
    I must wait a short time and then continue in case of 01h or 03h value,in case of 0h or 04h then mean no drive detected so I need to recheck all.
    Also
    ;clear PxSERR (if 1 need to write 1 to clear then read and write value back will clear?)
    ;check if drive ready at PxTFD bits7:0
    I'm not sure is ok,untested until now.
    Is there a way to read a AHCI register and display it on screen?
    like read [fs:ebx+130h] and print it on screen for a shot time or until step is passed?
    View attachment sata_rev1.zip
     
  7. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
  8. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
    Thanks.

    I'll take a look.
     
  9. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
    According to SATA 1 specs I try this.
    -set ABAR address
    -read Global ICH7 control register -get 00000000h value -seems ok
    -Enable CAP SSS SIS
    -Ports implement -Enable Ports
    -enable interlock switch and hotplug port0
    -enable interlock switch and hotplug port2
    -enable HBA and interrupt
    -make sure pxcmd st cr fre fr are all 0 (port0)
    -make sure pxcmd st cr fre fr are all 0 (port2)
    -disable PxSCTL.DET port0
    -disable PxSCTL.DET port2
    -set PxCLB port 0
    -set PxCLB port 2
    -set PxCLBU port 0
    -set PxCLBU port 2
    -set PxFB port 0
    -set PxFB port 2
    -set PxFBU port 0
    -set PxFBU port 2
    -start FIS receive and spin-up port0
    -start FIS receive and spin-up port2
    -pool PxSSTS.DET for device detect
    -readed value was 00000113h - interface in active state,Gen1 speed,device detected and Phy comm established
    -Read PxSERR and get 04050002h
    -cleared errors and read again and get 00000000h
    -check if drive ready at PxTFD bits7:0
    -get value 00000150 so BSY,DRQ and ERR are 0 bit 6 and bit 5 are 1 but they are not applicable,also bit 8 contain the latest copy of the task file error register,is that bad or is ok?
    (-according to datasheet PxCMD.CLO and PxCMD.ICC must be 1 I tested with that too but result was the same)
    -set bit PxCmd.ST start to 1
    -load bootloader.

    Seems to be ok but I can't boot anymore
    For a short period I see grub is starting from usb device but next is just a blank screen with a blinking cursor.
     
  10. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    Got Southbridge ID:
    Optiplex 620: Intel NH82801GB, 745: Intel NH82801HB
     
  11. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
    Optiplex 620: ICH7 Intel NH82801GB, 745: ICH8 Intel NH82801HB
     
  12. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    None of them support AHCI/RAID :(
    ICH7 307013.pdf page 495
    ICH8 313056.pdf page 470
     
  13. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
    But you was able to change ICH8 from IDE to AHCI, p44 p431
    For ICH8 exist sata ahci orom but ... since device id must match for loading ...
    Take that orom,check for first jump instruction and change address to code you need to insert (for switching controller to AHCI) that code after execution jump to address what was in first jump.Insert this orom as pxe rom and then set boot from network/pxe.
    Possibly to work.
    But maybe you neet to write at offset 90 40h and at offset 24 .... some free address in ram.
    You can find that address if you switch controoler to AHCI and boot some live image of win or linux.
     
  14. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    IMO, it doesn’t mean anything - might be some "rudiment" common for whole ICH8 family…

    I’ve never heard about “ICH8 exist sata ahci orom”.
    What is it for / What it could possibly be for?

    I can do same with grub2 - switch to AHCI, than boot CD, right?
     
  15. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
    Yes switch to ahci and boot from CD
    Af I remember right I see SATA BIOS for ICH greather than 7 ,it was not RAID,was two orom inside BIOS one SATA one RAID I take a look into HDD but most probably I have changed PCIR inside need to search a little.
     
  16. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    Ok. Will try – I guess, it’ll fall back to IDE.
    How do I tell from Linux (Ubuntu) what is the ICH mode?

    It might more than one for different PCI revision BIOSes…
     
  17. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
  18. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
  19. Apokrif

    Apokrif MDL Addicted

    Dec 7, 2008
    542
    35
    30
    #460 Apokrif, Jun 29, 2010
    Last edited by a moderator: Apr 20, 2017