How to inject code to P.O.S.T. (power on self test) ?

Discussion in 'BIOS Mods' started by mynickname, Jan 16, 2013.

  1. mynickname

    mynickname MDL Novice

    Jul 2, 2012
    7
    0
    0
    #1 mynickname, Jan 16, 2013
    Last edited by a moderator: Apr 20, 2017
  2. Recursion

    Recursion MDL Junior Member

    Dec 26, 2012
    75
    4
    0
    #2 Recursion, Jan 16, 2013
    Last edited: Jan 17, 2013
    It's noob question you don't want to write a new bios? You can flash core bios or write an option rom? Henc I would write an option rom when you can integrate it? When you need ring0 you cannot use a virtualization. At least that what happens to me with a vmware and a winring0.dll.
     
  3. mynickname

    mynickname MDL Novice

    Jul 2, 2012
    7
    0
    0
    #3 mynickname, Apr 14, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Hi it's me again. Can someone please help me with this?
    Or maybe you know how I can contact pinczakko directly?

    I also found this tutorial:
    Code:
    codeproject.com/Articles/36907/How-to-develop-your-own-Boot-Loader
    But I looked at this boot loader tutorial and it looks quite complicated. I think it would be easier for me to simply open up my BIOS inside IDA pro, add my asm code into the POST procedure and export it and then flash it onto my motherboard.
    Does anyone have any experience with this sort of stuff?
    Would be great if someone could help a noob out. Thanks.
     
  4. RussianT530

    RussianT530 MDL Novice

    Mar 21, 2013
    41
    22
    0
    #4 RussianT530, Apr 14, 2013
    Last edited by a moderator: Apr 20, 2017
    First of all, IDA cannot export patched executable. It can export patched listing or create a patch file, but even if you assemble it you will likely be missing parts of the original executable.
    Your best bet would be to learn some assembly, then find a call procedure near the point where you want to execute your code. Find a place for your code in the code segment, Change the originall call to call your code. In your code save the CPU registers to stack, do your thing, then restore the registers and call the original procedure, then return from your code. I haven't touched assembly in 15 years, so someone may correct me if I missed a step.
     
  5. gabiz_ro

    gabiz_ro MDL Member

    Feb 2, 2010
    173
    12
    10
    What's the purpose of your code?
    When you can run it?

    You can make it like an OPROM and replace original PXE boot with that,set your first boot device like network then,all is ok
    If is more complicated,then find where to insert your code,just before boot, push (asm) registers,execute,restore registers,continue boot.
    You may need to rewrite some northbridge registers,since during POST some areas are read-only.
    More info,search my name,RAID0 and Dell,you may found some extra info on some forums.
     
  6. mynickname

    mynickname MDL Novice

    Jul 2, 2012
    7
    0
    0
    #6 mynickname, Apr 28, 2013
    Last edited: May 8, 2013
    (OP)
    The purpose of my code is to print "Hello world!"