Add sysctl MIB and loader tunable `hw.acpi.no_reset_video' as
the same effect as ACPI_NO_RESET_VIDEO kernel option.
This commit is contained in:
parent
7fc91b3f1d
commit
fbbdf7c7d2
@ -319,6 +319,10 @@ the economy power profile.
|
|||||||
Delay in milliseconds to wait for the EC to respond. Try increasing this
|
Delay in milliseconds to wait for the EC to respond. Try increasing this
|
||||||
number if you get the error
|
number if you get the error
|
||||||
.Er AE_NO_HARDWARE_RESPONSE .
|
.Er AE_NO_HARDWARE_RESPONSE .
|
||||||
|
.It Va hw.acpi.no_reset_video
|
||||||
|
Disables calling the VESA reset BIOS vector on the resume path. Some
|
||||||
|
graphic chips have problems such as LCD white-out after resume. Try
|
||||||
|
setting this to 1 if necessary.
|
||||||
.It Va hw.acpi.os_name
|
.It Va hw.acpi.os_name
|
||||||
Some systems' ASL may have problems because they look for names
|
Some systems' ASL may have problems because they look for names
|
||||||
of Microsoft operating systems. This tunable overrides the
|
of Microsoft operating systems. This tunable overrides the
|
||||||
|
@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <sys/bus.h>
|
#include <sys/bus.h>
|
||||||
#include <sys/conf.h>
|
#include <sys/conf.h>
|
||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
|
#include <sys/kernel.h>
|
||||||
|
#include <sys/sysctl.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
|
|
||||||
#include "acpi.h"
|
#include "acpi.h"
|
||||||
@ -59,6 +61,9 @@ static device_t acpi_dev;
|
|||||||
#include <i386/bios/apm.h>
|
#include <i386/bios/apm.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
u_int32_t acpi_no_reset_video = 0;
|
||||||
|
TUNABLE_INT("hw.acpi.no_reset_video", &acpi_no_reset_video);
|
||||||
|
|
||||||
static struct apm_softc apm_softc;
|
static struct apm_softc apm_softc;
|
||||||
|
|
||||||
static d_open_t apmopen;
|
static d_open_t apmopen;
|
||||||
@ -327,6 +332,11 @@ acpi_machdep_init(device_t dev)
|
|||||||
|
|
||||||
if (intr_model != ACPI_INTR_PIC)
|
if (intr_model != ACPI_INTR_PIC)
|
||||||
acpi_SetIntrModel(intr_model);
|
acpi_SetIntrModel(intr_model);
|
||||||
|
|
||||||
|
SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||||
|
OID_AUTO, "no_reset_video", CTLFLAG_RD | CTLFLAG_RW, &acpi_no_reset_video, 0,
|
||||||
|
"Disable calling the VESA reset BIOS vector on the resume path");
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,12 +48,15 @@ wakeup_16:
|
|||||||
* Re-initialize video BIOS. Restore DS and SS from CS in
|
* Re-initialize video BIOS. Restore DS and SS from CS in
|
||||||
* case the BIOS modified them.
|
* case the BIOS modified them.
|
||||||
*/
|
*/
|
||||||
|
cmp $1, no_reset_video
|
||||||
|
je wakeup_16_gdt
|
||||||
lcall $0xc000, $3
|
lcall $0xc000, $3
|
||||||
movw %cs, %ax
|
movw %cs, %ax
|
||||||
movw %ax, %ds
|
movw %ax, %ds
|
||||||
movw %ax, %ss
|
movw %ax, %ss
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
wakeup_16_gdt:
|
||||||
/* Load GDT for real mode */
|
/* Load GDT for real mode */
|
||||||
lgdt physical_gdt
|
lgdt physical_gdt
|
||||||
|
|
||||||
@ -211,6 +214,7 @@ physical_esp: .long 0
|
|||||||
previous_cr2: .long 0
|
previous_cr2: .long 0
|
||||||
previous_cr3: .long 0
|
previous_cr3: .long 0
|
||||||
previous_cr4: .long 0
|
previous_cr4: .long 0
|
||||||
|
no_reset_video: .long 0
|
||||||
|
|
||||||
/* transfer from real mode to protected mode */
|
/* transfer from real mode to protected mode */
|
||||||
previous_cr0: .long 0
|
previous_cr0: .long 0
|
||||||
|
@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#define vm_page_unlock_queues()
|
#define vm_page_unlock_queues()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern u_int32_t acpi_no_reset_video;
|
||||||
extern void initializecpu(void);
|
extern void initializecpu(void);
|
||||||
|
|
||||||
static struct region_descriptor r_idt, r_gdt, *p_gdt;
|
static struct region_descriptor r_idt, r_gdt, *p_gdt;
|
||||||
@ -232,6 +233,8 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
|
|||||||
WAKECODE_FIXUP(previous_cr3, u_int32_t, r_cr3);
|
WAKECODE_FIXUP(previous_cr3, u_int32_t, r_cr3);
|
||||||
WAKECODE_FIXUP(previous_cr4, u_int32_t, r_cr4);
|
WAKECODE_FIXUP(previous_cr4, u_int32_t, r_cr4);
|
||||||
|
|
||||||
|
WAKECODE_FIXUP(no_reset_video, u_int32_t, acpi_no_reset_video);
|
||||||
|
|
||||||
WAKECODE_FIXUP(previous_tr, u_int16_t, r_tr);
|
WAKECODE_FIXUP(previous_tr, u_int16_t, r_tr);
|
||||||
WAKECODE_BCOPY(previous_gdt, struct region_descriptor, r_gdt);
|
WAKECODE_BCOPY(previous_gdt, struct region_descriptor, r_gdt);
|
||||||
WAKECODE_FIXUP(previous_ldt, u_int16_t, r_ldt);
|
WAKECODE_FIXUP(previous_ldt, u_int16_t, r_ldt);
|
||||||
|
Loading…
Reference in New Issue
Block a user