[kbd] [PATCH v2] setleds: add option to reset state to the BIOS default
ptesarik at suse.cz
Mon Jul 30 21:27:11 MSK 2012
glad you didn't smash the idea from an ideological standpoint.
Dne Ne 29. července 2012 23:10:19 Alexey Gladkov napsal(a):
> 27.07.2012 11:09, Petr Tesarik wrote:
> > +#if defined(__i386__) || defined(__x86_64__)
> > +# define HAVE_BIOS 1
> I think it's strange condition.
It is, indeed. For one thing, some Itanium machines also have the standard PC
BIOS Data Area (BDA), and they don't get this new feature. Unfortunately, some
(early?) SGI Altix machines don't have physical memory at 0x400, and they
don't handle accesses to non-existent RAM very well (read: freeze or reboot).
OTOH detecting the machine model and maintaining a blacklist or whitelist of
well-known IA-64 systems in setleds sounds like overkill, especially for a
dying platform. So, I didn't include them.
> How your code will work on the EFI ?
Well, UEFI will work just fine, same with Intel's EFI, because they include a
Compatibility Support Module (CSM), which (among other things) initializes
legacy BDA. Yes, some machines don't do that properly (IIRC Phoenix issued an
errata a few years ago exactly to fix LED states in the BDA).
Even Apple includes a CSM for their EFI implementation...
I would be a bit more concerned about embedded hardware like the one I used to
have in one of my ancient D-Link routers in the early 2000's, which emulated
an x86 on top of ICplus Corp. IC175. However, platforms like this usually run
in a well-controlled environment, so the firmware writer will probably not
even attemp to use this new setleds feature.
In any case, even if the BDA is not initialized properly, the worst thing that
happens is that the LEDs are set incorrectly when you run "setleds bios".
More information about the kbd