cvs commit: src/sys/i386/acpica acpi_wakecode.S

Nate Lawson nate at root.org
Mon Oct 27 11:01:58 PST 2003


On Mon, 27 Oct 2003, User Takawata wrote:
> In message <200310270626.h9R6QpOI039373 at repoman.freebsd.org>, Nate Lawson wrote
> >  Modified files:
> >    sys/i386/acpica      acpi_wakecode.S
> >  Log:
> >  Call the VESA reset BIOS vector on the resume path.  This may help displays
> >  after resume.  I have not found it to break anything.
> >
> >  Revision  Changes    Path
> >  1.4       +9 -0      src/sys/i386/acpica/acpi_wakecode.S
>
> How about initializing stack?
>
> Index: acpi_wakecode.S
> ===================================================================
> RCS file: /home/ncvs/src/sys/i386/acpica/acpi_wakecode.S,v
> retrieving revision 1.4
> diff -u -r1.4 acpi_wakecode.S
> --- acpi_wakecode.S	27 Oct 2003 06:26:51 -0000	1.4
> +++ acpi_wakecode.S	27 Oct 2003 08:02:01 -0000
> @@ -31,6 +31,7 @@
>  #define LOCORE
>
>  #include <machine/specialreg.h>
> +#include <machine/param.h>
>
>  	.align 4
>  	.code16
> @@ -42,7 +43,10 @@
>  	movw	%cs,%ax
>  	movw	%ax,%ds
>  	movw	%ax,%ss
> -
> +
> +	/* Assume 1 page is allocated for wakecode from the entry*/
> +	movw	$PAGE_SIZE, %sp
> +
>  	/*
>  	 * Re-initialize video BIOS.  Restore DS and SS from CS in
>  	 * case the BIOS modified them.

What is this intended to fix?  esp is restored later on and I don't think
the VESA BIOS routine uses the stack.

Also, it appears I'm doing redundant restore of ds and ss from cs.  If I
move the lcall to the beginning, I think this could eliminate 3
instructions.  Would this work?

-Nate


More information about the cvs-src mailing list