Jordan Crouse wrote:
On 26/09/08 01:19 +0200, Stefan Reinauer wrote:
See patch
-- 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
- add keyboard layout support to libpayload
- add a reset handler mechanism (CTRL-ALT-DEL)
Signed-off-by: Stefan Reinauer stepan@coresystems.de
Acked-by: Jordan Crouse jordan.crouse@amd.com
Hehe - the CTRL-ALT-DEL handler makes me laugh. But libpayload doesn't actually have any reset code - that sounds like something we should add.
Well, the CTRL-ALT-DEL is not really useful in all cases, I admit. It only works as long as the payload is actually reading from the keyboard.
But it's simple enough to not really hurt much... In our FILO tree I added this reset function:
static inline void kbc_wait(void) { int i; for (i = 0; i < 0x10000; i++) { if ((inb(0x64) & 0x02) == 0) break; udelay(2); } }
void platform_reboot(void) { int i;
for (i = 0; i < 10; i++) { kbc_wait();
outb(0x60, 0x64); /* Write controller command */ udelay(50); kbc_wait();
outb(0x14, 0x60); /* Set system flag */ udelay(50); kbc_wait();
outb(0xfe, 0x64); /* Pulse reset low */ udelay(50); }
for (;;) ; }
It resets the machine using the keyboard controller. This works a lot more reliable on the chipset I'm working on than doing the cf9 method.
Rebooting a machine can actually be quite a complex thing, I had to learn. (There's a lot to reboot or leave unrebooted)