All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Reinauer <stepan@coresystems.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Dell Media Direct button
Date: Thu, 21 Aug 2008 14:13:05 +0200	[thread overview]
Message-ID: <48AD5BD1.3060301@coresystems.de> (raw)
In-Reply-To: <20080820101259.GB8201@thorin>

Robert Millan wrote:
> On Wed, Aug 20, 2008 at 10:57:22AM +0200, Per Öberg wrote:
>   
>> Hi
>>
>> Some laptops, e.g., from Dell have a special button that they use to
>> boot a special embedded OS for media only instead of the ordinary OS.
>>
>> For my Dell XPS1330M I can determine if the Media button was pressed by
>> first writing 0xf9 to port 0x70 and then testing bit 0x08 of port 0x71.
>>
>> It would be really nice if such a test could be enabled in grub so that
>> grub can go directly to a specific menu alternative without showing the
>> gui if the media button was pressed.
>>
>> Is this interesting? I'd like to contribute but I don't know where to start.
>>     
>
> Sounds interesting, but this needs some thought on how to design it.
>
> I suppose what you want is change the 'default' variable.  Perhaps increase
> it by 1?  But then, where do you do this?  grub_machine_init is too early as
> 'default' hasn't been set yet.
>
> Maybe we could have a global 'int default_offset' variable that is initialized
> in grub_machine_init and later on used by normal.mod?
>
>   

The sequence of writing to port 0x70 / reading from port 0x71 reflects
reading from the computer's "cmos" nvram memory.
bit 7 of 0x70 is reserved for disabling NMIs, so the actual information
is stored in byte 0x79[8] in the cmos.

To allow full flexibility, there should just be a module that allows
reading / writing the cmos values (could also be useful for other
things, such as reading a boot order set by the bios).

Everything else makes more sense in scripting:
- changing "default"
- changing "timeout"
- support for bit operations in the parser
- etc...

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info@coresystems.de  • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866




  parent reply	other threads:[~2008-08-21 12:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20  8:57 Dell Media Direct button Per Öberg
2008-08-20 10:12 ` Robert Millan
2008-08-20 17:00   ` Vesa Jääskeläinen
2008-08-20 18:02   ` Colin D Bennett
2008-08-20 19:22     ` Javier Martín
2008-08-21  7:21       ` Per Öberg
2008-08-21 12:13   ` Stefan Reinauer [this message]
2008-08-21 12:20     ` Javier Martín
2008-08-21 13:20     ` Robert Millan

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=48AD5BD1.3060301@coresystems.de \
    --to=stepan@coresystems.de \
    --cc=grub-devel@gnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.