[tlinux-users:08137] Re: New release of omnibook module soon: testing welcome
Holger Nelson <[email protected]>
| Newsgroups | gmane.linux.hardware.toshiba |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 11 Sep 2006, Mathieu Bérard wrote:
> Which mean that I will have to recode the
> whole block in asm to control precisely what is going on.
> This might also explain the failures reported by Renato S. Yamane
>
> * While not precised anywhere in the doc I have assumed it does
> not include esp or I fail to see how we can recover.
Setting/reading display brightness works after applying the patch below,
but it complains about bad return-codes from smi-commands.
"cat /proc/omnibook/display" and "cat /proc/omnibook/hotkeys" fail with
"cat: write error: Bad address"
Holger
diff -uprN -X /usr/src/linux-2.6.17.3/Documentation/dontdiff xxx/trunk/nbsmi.c trunk/nbsmi.c
- --- xxx/trunk/nbsmi.c 2006-09-11 01:45:42.000000000 +0200
+++ trunk/nbsmi.c 2006-09-11 08:57:20.000000000 +0200
@@ -84,15 +84,15 @@ extern const struct pci_device_id lpc_br
static inline void save_all_regs_flag(void)
{
spin_lock_irq(&smi_spinlock);
- - __asm__ __volatile__("pushal ; pushfl");
+/* __asm__ __volatile__("pushal ; pushfl");*/
}
static inline void restore_all_regs_flag(void)
{
- - __asm__ __volatile__("popfl; popal"
+/* __asm__ __volatile__("popfl; popal"
:
:
- - : "eax", "ecx", "edx", "ebx", "esp", "esi", "edi");
+ : "eax", "ecx", "edx", "ebx", "esp", "esi", "edi");*/
spin_unlock_irq(&smi_spinlock);
}
@@ -109,17 +109,22 @@ static inline void intel_do_smi_call(int
state = inl(sci_en);
outl( 0, sci_en );
- - outw( function, INTEL_SMI_PORT ); /* Call to SMI */
+// outw( function, INTEL_SMI_PORT ); /* Call to SMI */
+
+ __asm__ __volatile__("pushf;push %%ecx;push %%edx;push %%ebx;push %%esi;push %%edi; push %%ebp;out %w1,%w2;pop %%ebp; pop %%edi; pop %%esi; pop %%ebx; pop %%edx; pop %%ecx; popf; movl %%eax, %0"
+ : "=m"(retval)
+ : "a"(function), "Nd"(INTEL_SMI_PORT)
+ : "ecx", "edx", "ebx", "esi", "edi", "ebp", "esp");
/*
* Success/Failure state in now stored in eax
- - */
__asm__ __volatile__("movl %%eax, %0"
:
: "m" (retval)
- - );
+ );*/
outl( state, sci_en );
+
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Made with pgp4pine 1.76
iD8DBQFFBQvMV71P2fDJM84RAoOiAKCEpHygJCorn4oypxcqghpqS2kmaQCgjzEF
BR2uoz/pgLR+xfds75G8Jks=
=JI4O
-----END PGP SIGNATURE-----