[OpenBIOS] Back at it again( PCI Passthrough )

Joe van Tunen joevt at shaw.ca
Thu May 10 21:35:58 CEST 2018


From: Jd Lyons <lyons_dj at yahoo.com>
Date: Thursday, May 10, 2018 at 3:46 AM

: execute-tmp-comp  ( ffffffff 1 0 ffffffff 0 0 ffffffff fff41a48 0 0 0 0 0 0 ffffffff )<—— We should be seeing fff5723c 0 here?


That is the second execute-tmp-comp which is called by the second b(>resolve), but first, b(>resolve) calls resolve-orig.
resolve-orig pops the top 2 items from the stack. if you trace it, it will look something like this:

                    fff5723c 0 )
    :resolve-orig   
        here        fff5723c 0 fff57290 )
        nip         fff5723c fff57290 )
        over        fff5723c fff57290 fff5723c )
        /n          fff5723c fff57290 fff5723c 4 )
        +           fff5723c fff57290 fff57240 )
        -           fff5723c 50 )
        swap        50 fff5723c )
        !           )

resolve-orig is setting the branch offset in the temporary compiled code to 0x50 which b?branch had initialized to 0. The temporary compiled code starts like this:


    here                    executing       contents at here
    ---------------------------------------------------------
                            setup-tmp-comp
    fff57230=tmp-comp-buf                   here
    fff57234                                1 = DOCOL (start of colon word definition)
                            b?branch
    fff57238                                do?branch
    fff5723c                                0 = don't know the branch offset until b(>resolve) is encountered
                            , in (feval)
    fff57240                                0x9bd
                                            ...


(feval) executes b?branch and b(>resolve) even while in compile state because their ?flags has immediate (the same is done for compile-only flag?)

When you do a debug of a word, OpenBIOS displays this message:

    Stepper keys: <space>/<enter> Up Down Trace Rstack Forth

That means you can press the following keys when debugging:

    space: Perform a single step
    return: (supposed to be same as space but just prints the Stepper keys again)
    U: unmark current word for debug, mark its caller for debugging and finish executing current word
    D: mark current word for debug and step into it
    T: Trace mode
    R: Display rstack
    F: Start subordinate Forth interpreter. Use resume to get back to where you left off.


So when you're debugging b(>resolve) or execute-tmp-comp, press the space bar until you get to execute, then press D to start stepping through execute. That won't work because execute is a primitive word. So try that again, except when you get to execute, press F, then type

    debug my-space
    dup (see) \ optional - this should show the contents of the temporary compiled code
    resume

then when you get to my-space, step through it, when you get to (semis) press U to step through the rest of the temporary compiled code (I don't know if U will work here)

It may be possible to do it this way: when you get to execute, press F, then type the following:

    dup (debug
    dup (see) \ optional - this should show the contents of the temporary compiled code
    resume

Then press space to step through the code. Press D where you want to step into a word (especially 0xa08)






More information about the OpenBIOS mailing list