cvs commit: src/sys/conf options src/sys/i386/acpica Makefile acpi_wakecode.S src/sys/i386/conf NOTES

Nate Lawson nate at root.org
Tue Oct 28 23:58:05 PST 2003


On Tue, 28 Oct 2003, Mitsuru IWASAKI wrote:
>   Modified files:
>     sys/conf             options
>     sys/i386/acpica      Makefile acpi_wakecode.S
>     sys/i386/conf        NOTES
>   Log:
>   Add kernel option ACPI_NO_RESET_VIDEO as workaround for problems
>   (e.g. LCD white-out after resume) on some machine cased by
>   re-initialize video BIOS code in acpi_wakecode.
>
>   Revision  Changes    Path
>   1.420     +1 -0      src/sys/conf/options
>   1.4       +4 -0      src/sys/i386/acpica/Makefile
>   1.5       +2 -0      src/sys/i386/acpica/acpi_wakecode.S
>   1.1097    +1 -0      src/sys/i386/conf/NOTES

Thanks for testing and then adding this option.

> --- src/sys/conf/options:1.419	Mon Oct 27 21:47:39 2003
> +++ src/sys/conf/options	Tue Oct 28 19:30:45 2003
> @@ -599,6 +599,7 @@
>  ACPI_DEBUG		opt_acpi.h
>  ACPI_MAX_THREADS	opt_acpi.h
>  ACPI_NO_SEMAPHORES	opt_acpi.h
> +ACPI_NO_RESET_VIDEO	opt_acpi.h
>  ACPICA_PEDANTIC		opt_acpi.h
>
>  # options for DEVFS, see sys/fs/devfs/devfs.h

You should use alphabetical order for options (move to before
ACPI_NO_SEMAPHORES).  Same for NOTES.

> --- src/sys/i386/acpica/Makefile:1.3	Wed May  1 14:54:07 2002
> +++ src/sys/i386/acpica/Makefile	Tue Oct 28 19:30:45 2003
> @@ -1,4 +1,4 @@
> -# $FreeBSD: /repoman/r/ncvs/src/sys/i386/acpica/Makefile,v 1.3 2002/05/01 21:54:07 peter Exp $
> +# $FreeBSD: /repoman/r/ncvs/src/sys/i386/acpica/Makefile,v 1.4 2003/10/29 03:30:45 iwasaki Exp $
>
>  # Correct path for kernel builds
>  # Don't rely on the kernel's .depend file
> @@ -10,6 +10,10 @@
>  CLEANFILES= acpi_wakecode.h acpi_wakecode.bin acpi_wakecode.o
>  .endif
>  CFLAGS+=	-I.
> +
> +.ifdef ACPI_NO_RESET_VIDEO
> +CFLAGS+=	-DACPI_NO_RESET_VIDEO
> +.endif
>
>  all: acpi_wakecode.h

Is this needed?  options alone should be sufficient and acpi_wakeup.S
should include opt_acpi.h.

> Index: src/sys/i386/acpica/acpi_wakecode.S
> diff -u src/sys/i386/acpica/acpi_wakecode.S:1.4 src/sys/i386/acpica/acpi_wakecode.S:1.5
> --- src/sys/i386/acpica/acpi_wakecode.S:1.4	Sun Oct 26 22:26:51 2003
> +++ src/sys/i386/acpica/acpi_wakecode.S	Tue Oct 28 19:30:45 2003
> @@ -43,6 +43,7 @@
>  	movw	%ax,%ds
>  	movw	%ax,%ss
>
> +#ifndef ACPI_NO_RESET_VIDEO
>  	/*
>  	 * Re-initialize video BIOS.  Restore DS and SS from CS in
>  	 * case the BIOS modified them.
> @@ -51,6 +52,7 @@
>  	movw	%cs, %ax
>  	movw	%ax, %ds
>  	movw	%ax, %ss
> +#endif
>
>  	/* Load GDT for real mode */
>  	lgdt	physical_gdt

As you can see, I restore DS and SS in two places.  I think we can remove
the first place (above the lcall), right?

-Nate


More information about the cvs-src mailing list