Browse Source

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

tags/v0.9.3
Marty Connor 17 years ago
parent
commit
77c1777b44
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      src/arch/i386/include/io.h

+ 7
- 6
src/arch/i386/include/io.h View File

1
 #ifndef	ETHERBOOT_IO_H
1
 #ifndef	ETHERBOOT_IO_H
2
 #define ETHERBOOT_IO_H
2
 #define ETHERBOOT_IO_H
3
 
3
 
4
+#include <stdint.h>
4
 #include "virtaddr.h"
5
 #include "virtaddr.h"
5
 
6
 
6
 /* virt_to_bus converts an addresss inside of etherboot [_start, _end]
7
 /* virt_to_bus converts an addresss inside of etherboot [_start, _end]
71
  * differently. On the x86 architecture, we just read/write the
72
  * differently. On the x86 architecture, we just read/write the
72
  * memory location directly.
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
 #define memcpy_fromio(a,b,c)	memcpy((a),(void *)(b),(c))
83
 #define memcpy_fromio(a,b,c)	memcpy((a),(void *)(b),(c))
83
 #define memcpy_toio(a,b,c)	memcpy((void *)(a),(b),(c))
84
 #define memcpy_toio(a,b,c)	memcpy((void *)(a),(b),(c))

Loading…
Cancel
Save