mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
prep: disable VBE extensions when executing client program
PReP payloads such as Linux expect to be able to set standard VGA modes on startup, but VBE prevents certain modes such as text-only. Disable VBE extensions when executing the client program to allow this behaviour which also matches that of Open HackWare. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
This commit is contained in:
@ -613,10 +613,26 @@ static void arch_go(void);
|
||||
static void
|
||||
arch_go(void)
|
||||
{
|
||||
phandle_t ph;
|
||||
xt_t xt;
|
||||
|
||||
/* Insert copyright property for MacOS 9 and below */
|
||||
if (find_dev("/rom/macos")) {
|
||||
fword("insert-copyright-property");
|
||||
}
|
||||
|
||||
/* PReP machines expect a standard VGA console, so disable
|
||||
VBE extensions just before we transfer control */
|
||||
if (!is_apple()) {
|
||||
ph = dt_iterate_type(find_dev("/"), "display");
|
||||
if (ph != 0) {
|
||||
xt = find_package_method("vbe-deinit", ph);
|
||||
if (xt != 0) {
|
||||
PUSH(xt);
|
||||
fword("execute");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void kvm_of_init(void)
|
||||
|
||||
@ -226,6 +226,17 @@ defer mol-color!
|
||||
loop
|
||||
;
|
||||
|
||||
\
|
||||
\ Cancel Bochs VBE mode
|
||||
\
|
||||
|
||||
: vbe-deinit ( -- )
|
||||
\ Switching VBE on and off clears the framebuffer
|
||||
VBE_DISPI_DISABLED VBE_DISPI_INDEX_ENABLE vbe-iow!
|
||||
VBE_DISPI_ENABLED VBE_DISPI_INDEX_ENABLE vbe-iow!
|
||||
VBE_DISPI_DISABLED VBE_DISPI_INDEX_ENABLE vbe-iow!
|
||||
;
|
||||
|
||||
headerless
|
||||
|
||||
\
|
||||
|
||||
Reference in New Issue
Block a user