mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Christian Leber <christian@leber.de>,
	kernel list <linux-kernel@vger.kernel.org>
Subject: Re: beeping patch for debugging acpi sleep
Date: Mon, 11 Jun 2007 12:00:34 -0700	[thread overview]
Message-ID: <20070611120034.f6d972de.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070609130817.GI27793@elf.ucw.cz>

On Sat, 9 Jun 2007 15:08:17 +0200
Pavel Machek <pavel@ucw.cz> wrote:

> 
> Starting beeper as soon as ACPI sleep returns is very useful in
> debugging "apparently dead" machines. If it beeps at all, it makes
> sense to start playing with CMOS tracer.
> 
> Signed-off-by: Pavel Machek <pavel@suse.cz>
> 
> diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S
> index b781b38..cbf136e 100644
> --- a/arch/i386/kernel/acpi/wakeup.S
> +++ b/arch/i386/kernel/acpi/wakeup.S
> @@ -11,7 +11,22 @@ # Do we need to deal with A20? It is oka
>  #
>  # If physical address of wakeup_code is 0x12345, BIOS should call us with
>  # cs = 0x1234, eip = 0x05
> -# 
> +#
> +
> +#define BEEP \
> +	inb	$97, %al; 	\
> +	outb	%al, $0x80; 	\
> +	movb	$3, %al; 	\
> +	outb	%al, $97; 	\
> +	outb	%al, $0x80; 	\
> +	movb	$-74, %al; 	\
> +	outb	%al, $67; 	\
> +	outb	%al, $0x80; 	\
> +	movb	$-119, %al; 	\
> +	outb	%al, $66; 	\
> +	outb	%al, $0x80; 	\
> +	movb	$15, %al; 	\
> +	outb	%al, $66;
>  
>  ALIGN
>  	.align	4096
> @@ -20,6 +35,9 @@ wakeup_code:
>  	wakeup_code_start = .
>  	.code16
>  
> +# Uncomment this to make your computer start producing ugly noise as soon
> +# as BIOS returns to this real-mode entry point.
> +#	BEEP
>   	movw	$0xb800, %ax
>  	movw	%ax,%fs
>  	movw	$0x0e00 + 'L', %fs:(0x10)
> 

How does the beep get turned off again?

Should the BEEP line be uncommented (in -mm at least)?


  parent reply	other threads:[~2007-06-11 19:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-18 21:37 [BUG] acpi double resume and fail Christian Leber
2007-05-18 22:45 ` Andrew Morton
2007-05-19 19:42   ` Christian Leber
2007-05-20 20:01 ` Pavel Machek
     [not found]   ` <20070602182014.GB29546@core>
2007-06-09 13:08     ` beeping patch for debugging acpi sleep Pavel Machek
2007-06-09 13:16       ` Jan-Benedict Glaw
2007-06-09 22:54         ` Pavel Machek
2007-06-09 23:27           ` Nigel Cunningham
2007-06-09 23:35             ` Pavel Machek
2007-06-11  8:56       ` Stefan Seyfried
2007-06-11 16:50         ` Pavel Machek
2007-06-11 19:00       ` Andrew Morton [this message]
2007-06-11 19:49         ` Matthieu CASTET
2007-06-12 15:12           ` Pavel Machek
2007-06-13 17:58             ` Stefan Seyfried
2007-06-11 21:26         ` Pavel Machek
2007-06-11 22:42         ` Nigel Cunningham
2007-06-12 12:11           ` Rafael J. Wysocki
2007-06-13  1:17             ` Nigel Cunningham
2007-06-13  8:24               ` Pavel Machek
2007-06-13 11:32                 ` Nigel Cunningham
2007-06-13 12:28                   ` Pavel Machek
2007-06-13 12:40                     ` Rafael J. Wysocki
2007-06-16 19:46       ` Christian Leber
2007-06-24 20:46         ` Christian Leber
2007-06-28 14:08           ` Pavel Machek
2007-08-12 21:37             ` Christian Leber
2007-05-22 22:16 ` [BUG] acpi double resume and fail Mark Lord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070611120034.f6d972de.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=christian@leber.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome