Hi Marc Jones,

    This is a new patch file. I modified mainboard_interrupt_handlers and setup_interrupt_handlers in the "util/x86emu/x86.c".

    Thanks.
    Libra.


2009/12/22 Libra Li <librali1977@gmail.com>
Hi Marc Jones,

    1.
        +typedef struct {
        +        int mask[256];
        +        int (*intXX_handler[256])(struct eregs *regs);
        +}interrupt_handlers;

        The mainboard_interrupt_handlers need modification if the structure is not needed.

    2.
        +       if(!(*intXX_handler))

        +       {
        +               /* Set up C interrupt handlers */
        +               setup_interrupt_handlers();
        +       }

        Yes, this is because mainboard_interrupt_handlers gets called first.


2009/12/22 Marc Jones <marcj303@gmail.com>

On Mon, Dec 21, 2009 at 6:15 PM, Libra Li <librali1977@gmail.com> wrote:
> Hi,
>
>     The VGA BIOS is through int15 getting LCD panel ID. Then the VBIOS call
> int15's "Get LCD panel ID".
>     The panel ID is selection by switch.
>     This function is reference "AMD RS690 ASIC Family BIOS Developer's
> Guide".
>
>     Thanks.
>
>     Signed-off-by: Libra Li <libra.li@technexion.com>

Hi Libra Li,

Thanks for making these changes. I like the idea of the mainboard
interrupt function. I have a few comments.

+typedef struct {
+        int mask[256];
+        int (*intXX_handler[256])(struct eregs *regs);
+}interrupt_handlers;

This is a really big structure and probably not needed. I don't think
anyone would override every interrupt vector, just one or two like you
are doing. Maybe just use a table that has the interrupt and function
pointer.


+       if(!(*intXX_handler))
+       {
+               /* Set up C interrupt handlers */
+               setup_interrupt_handlers();
+       }
+

Is this because mainboard_interrupt_handlers gets called first and the
interrupts are over written? It would be better if the defaults could
always be loaded and then the main board interrupts get fixed up.

Thanks,
Marc


--
http://marcjonesconsulting.com