help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hotstart / quickstart buttons?


From: Kyle Evans
Subject: Hotstart / quickstart buttons?
Date: Wed, 12 Mar 2014 12:48:34 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi,

I am hopping I can get some help with GRUB_DEFAULT_BUTTON. I have these hotkeys on my laptop that use the Windows hotstart interface (PNP0C32). They call this quickstart in linux.

The purpose behind these keys is so that someone can start a multimedia program or similar from a power off state. But I want to use them to select which version of GNU/Linux I want to boot. I know GRUB_DEFAULT_BUTTON is only designed for one button, but bear with me, I'm using it to test the functionality of such a system.

I spent a lot of time in the DSDT and the EC looking for a way to get these buttons working during runtime, so I am familiar with the DSDT and what offset the button codes are stored.

Now, when I try doing things by the book and look at the nvram, address 0x5A is the sole variable, and things looked great. I had 0x7a, 0x7b, & 7x7c for power button, QBTN, & DBTN. But it isn't consistent, i.e. related. It wasn't working right so I ran the if cmostest 104:0-7 and the numbers did not match my initial numbers. So, I dumped /dev/nvram again to verify and found the numbers are indeed not the same, I just got 0xa3 for DBTN != 0x7c.

I have found previously that the internal button codes for the two quickstart keys that turn on the device are QBTN=0x04 & DBTN=0x05. During runtime these buttons are placed in EC offset 0xA2 before being used to generate a real keycode. I am not sure if that offset contains the code at boot because the PNP0C32 device tests another register for these values. That register is offset 0xC2 from the top of the DSDT. My question is, how can I translate those offsets into something grub can read?

Here are some snips from the DSDT. IVIM is the register used by PNP0C32 and QBBB is an SMBus buffer inside the EC. The keycode value is the same in both locations, but I was not able to find a direct link between the two.

DefinitionBlock ("dsdt.aml", "DSDT", 1, "HP    ", "30F1    ", 0xF0000000)
{
...
    IndexField (INDX, DATA, ByteAcc, NoLock, Preserve)
    {
...
                Offset (0xC2),
        IVIM,   8,
...
    }


                    OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
                    Field (ERAM, ByteAcc, NoLock, Preserve)
                    {
                        ...
                                Offset (0xA2),
                        QBBB,   8,
                        ...
                    }

Thanks,
Kyle Evans



reply via email to

[Prev in Thread] Current Thread [Next in Thread]