Просмотр исходного кода

Merge branch 'master' of /pub/scm/gpxe

tags/v0.9.3
Marty Connor 17 лет назад
Родитель
Сommit
77c1777b44
1 измененных файлов: 7 добавлений и 6 удалений
  1. 7
    6
      src/arch/i386/include/io.h

+ 7
- 6
src/arch/i386/include/io.h Просмотреть файл

@@ -1,6 +1,7 @@
1 1
 #ifndef	ETHERBOOT_IO_H
2 2
 #define ETHERBOOT_IO_H
3 3
 
4
+#include <stdint.h>
4 5
 #include "virtaddr.h"
5 6
 
6 7
 /* virt_to_bus converts an addresss inside of etherboot [_start, _end]
@@ -71,13 +72,13 @@ static inline void iounmap(void *virt_addr __unused)
71 72
  * differently. On the x86 architecture, we just read/write the
72 73
  * memory location directly.
73 74
  */
74
-#define readb(addr) (*(volatile unsigned char *) (addr))
75
-#define readw(addr) (*(volatile unsigned short *) (addr))
76
-#define readl(addr) (*(volatile unsigned int *) (addr))
75
+#define readb(addr) (*(volatile uint8_t *) (addr))
76
+#define readw(addr) (*(volatile uint16_t *) (addr))
77
+#define readl(addr) (*(volatile uint32_t *) (addr))
77 78
 
78
-#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b))
79
-#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b))
80
-#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b))
79
+#define writeb(b,addr) ((*(volatile uint8_t *) (addr)) = (b))
80
+#define writew(b,addr) ((*(volatile uint16_t *) (addr)) = (b))
81
+#define writel(b,addr) ((*(volatile uint32_t *) (addr)) = (b))
81 82
 
82 83
 #define memcpy_fromio(a,b,c)	memcpy((a),(void *)(b),(c))
83 84
 #define memcpy_toio(a,b,c)	memcpy((void *)(a),(b),(c))

Загрузка…
Отмена
Сохранить