Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. diff --git a/grub-core/kern/i386/tsc.c b/grub-core/kern/i386/tsc.c
  2. index f266eb131..99fc9f7fb 100644
  3. --- a/grub-core/kern/i386/tsc.c
  4. +++ b/grub-core/kern/i386/tsc.c
  5. @@ -68,7 +68,7 @@ grub_tsc_init (void)
  6. #ifdef GRUB_MACHINE_XEN
  7. (void) (grub_tsc_calibrate_from_xen () || calibrate_tsc_hardcode());
  8. #elif defined (GRUB_MACHINE_EFI)
  9. - (void) (grub_tsc_calibrate_from_pmtimer () ||
  10. grub_tsc_calibrate_from_pit () || grub_tsc_calibrate_from_efi() ||
  11. calibrate_tsc_hardcode());
  12. + (void) (grub_tsc_calibrate_from_efi() || calibrate_tsc_hardcode());
  13. #elif defined (GRUB_MACHINE_COREBOOT)
  14. (void) (grub_tsc_calibrate_from_pmtimer () ||
  15. grub_tsc_calibrate_from_pit () || calibrate_tsc_hardcode());
  16. #else
  17. diff --git a/include/grub/i386/io.h b/include/grub/i386/io.h
  18. index ae12a3e3d..9fbeef916 100644
  19. --- a/include/grub/i386/io.h
  20. +++ b/include/grub/i386/io.h
  21. @@ -26,47 +26,40 @@ typedef unsigned short int grub_port_t;
  22. static __inline unsigned char
  23. grub_inb (unsigned short int port)
  24. {
  25. - unsigned char _v;
  26. + unsigned char _v = 0;
  27.  
  28. - __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (port));
  29. return _v;
  30. }
  31.  
  32. static __inline unsigned short int
  33. grub_inw (unsigned short int port)
  34. {
  35. - unsigned short _v;
  36. + unsigned short _v = 0;
  37.  
  38. - __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (port));
  39. return _v;
  40. }
  41.  
  42. static __inline unsigned int
  43. grub_inl (unsigned short int port)
  44. {
  45. - unsigned int _v;
  46. + unsigned int _v = 0;
  47.  
  48. - __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (port));
  49. return _v;
  50. }
  51.  
  52. static __inline void
  53. grub_outb (unsigned char value, unsigned short int port)
  54. {
  55. - __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port));
  56. }
  57.  
  58. static __inline void
  59. grub_outw (unsigned short int value, unsigned short int port)
  60. {
  61. - __asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (port));
  62. -
  63. }
  64.  
  65. static __inline void
  66. grub_outl (unsigned int value, unsigned short int port)
  67. {
  68. - __asm__ __volatile__ ("outl %0,%w1": :"a" (value), "Nd" (port));
  69. }
  70.  
  71. #endif /* _SYS_IO_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement