diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-05-17 01:34:04 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-05-17 01:34:04 +0200 |
commit | 4e95ccf97e0d6ef22849a36061a1d39586eea449 (patch) | |
tree | 222e18c3721f8125ad4d67ad0af1d096d9d03371 | |
parent | b3027e26ccc8de8ea2ed092a083ed8f1e22c8a9e (diff) |
Clear direction flag after bios32 call
Linux does this, there are probably wild BIOSes out there.
* linux/src/arch/i386/kernel/bios32.c (bios32_service, check_pcibios,
pci_bios_find_class, pci_bios_find_device, pci_bios_read_config_byte,
pci_bios_read_config_word, pci_bios_read_config_dword,
pci_bios_write_config_byte, pci_bios_write_config_word,
pci_bios_write_config_dword): Clear direction flag after lcall to bios32.
-rw-r--r-- | linux/src/arch/i386/kernel/bios32.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/linux/src/arch/i386/kernel/bios32.c b/linux/src/arch/i386/kernel/bios32.c index 0b357be..4747972 100644 --- a/linux/src/arch/i386/kernel/bios32.c +++ b/linux/src/arch/i386/kernel/bios32.c @@ -166,7 +166,7 @@ static unsigned long bios32_service(unsigned long service) unsigned long flags; save_flags(flags); cli(); - __asm__("lcall *(%%edi)" + __asm__("lcall *(%%edi); cld" : "=a" (return_code), "=b" (address), "=c" (length), @@ -209,7 +209,7 @@ static int check_pcibios(void) pci_indirect.address = pcibios_entry; save_flags(flags); cli(); - __asm__("lcall *(%%edi)\n\t" + __asm__("lcall *(%%edi); cld\n\t" "jc 1f\n\t" "xor %%ah, %%ah\n" "1:\tshl $8, %%eax\n\t" @@ -254,7 +254,7 @@ static int pci_bios_find_class (unsigned int class_code, unsigned short index, unsigned long flags; save_flags(flags); cli(); - __asm__ ("lcall *(%%edi)\n\t" + __asm__ ("lcall *(%%edi); cld\n\t" "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -279,7 +279,7 @@ static int pci_bios_find_device (unsigned short vendor, unsigned short device_id unsigned long flags; save_flags(flags); cli(); - __asm__("lcall *(%%edi)\n\t" + __asm__("lcall *(%%edi); cld\n\t" "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -304,7 +304,7 @@ static int pci_bios_read_config_byte(unsigned char bus, unsigned long flags; save_flags(flags); cli(); - __asm__("lcall *(%%esi)\n\t" + __asm__("lcall *(%%esi); cld\n\t" "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -326,7 +326,7 @@ static int pci_bios_read_config_word (unsigned char bus, unsigned long flags; save_flags(flags); cli(); - __asm__("lcall *(%%esi)\n\t" + __asm__("lcall *(%%esi); cld\n\t" "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -348,7 +348,7 @@ static int pci_bios_read_config_dword (unsigned char bus, unsigned long flags; save_flags(flags); cli(); - __asm__("lcall *(%%esi)\n\t" + __asm__("lcall *(%%esi); cld\n\t" "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -370,7 +370,7 @@ static int pci_bios_write_config_byte (unsigned char bus, unsigned long flags; save_flags(flags); cli(); - __asm__("lcall *(%%esi)\n\t" + __asm__("lcall *(%%esi); cld\n\t" "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -392,7 +392,7 @@ static int pci_bios_write_config_word (unsigned char bus, unsigned long flags; save_flags(flags); cli(); - __asm__("lcall *(%%esi)\n\t" + __asm__("lcall *(%%esi); cld\n\t" "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -414,7 +414,7 @@ static int pci_bios_write_config_dword (unsigned char bus, unsigned long flags; save_flags(flags); cli(); - __asm__("lcall *(%%esi)\n\t" + __asm__("lcall *(%%esi); cld\n\t" "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" |