[SeaBIOS] [PATCH 5/6] sercon: split-output implementation

Kevin O'Connor kevin at koconnor.net
Fri Sep 8 20:53:48 CEST 2017


On Fri, Sep 08, 2017 at 08:18:27AM +0200, Gerd Hoffmann wrote:
> Allows to run the serial console in parallel with a vga display.
> Output will show up on both vga and serial line.
> Input will be accepted from both keyboard and serial line.
[...]
> +        SET_LOW(sercon_enable, (mode == 0x03));
[...]
> +        // sercon disabled - verify not 0x03 modeset and otherwise exit
> +3:      popl %eax
> +        cmpw $0x0003, %ax
> +        jne 5f

Minor note - I realized after I sent my last patch that doing:

    SET_LOW(sercon_enable, (mode <= 0x07));

and:

        cmpw $0x0007, %ax
        jg 5f

Is more flexible and still safe.

-Kevin



More information about the SeaBIOS mailing list