Replace u8_t by uint8_t

This commit is contained in:
2018-01-02 21:44:19 +01:00
parent 798554fd92
commit 925bb832c4
125 changed files with 550 additions and 550 deletions
+3 -3
View File
@@ -51,9 +51,9 @@ void usage(void)
int main(int argc, char *argv[])
{
static u8_t font[256][32];
static u8_t font_file[256 * (16+14+8) + 1];
u8_t *ff;
static uint8_t font[256][32];
static uint8_t font_file[256 * (16+14+8) + 1];
uint8_t *ff;
int fd, size, tsize, ch, ln;
struct winsize ws;
+1 -1
View File
@@ -574,7 +574,7 @@ static void do_pci_device(config_t *cpe, struct rs_start *rs_start)
static void do_pci_class(config_t *cpe, struct rs_start *rs_start)
{
u8_t baseclass, subclass, interface;
uint8_t baseclass, subclass, interface;
u32_t class_id, mask;
char *check;
+1 -1
View File
@@ -270,7 +270,7 @@ static int dev_probe(void) {
int devind, i, ioflag;
u32_t device, bar, size, base;
u16_t vid, did, temp;
u8_t *reg;
uint8_t *reg;
pci_init();
device = pci_first_dev(&devind, &vid, &did);
+1 -1
View File
@@ -94,7 +94,7 @@ typedef struct aud_sub_dev_conf_t {
u32_t sign;
u32_t busy;
u32_t fragment_size;
u8_t format;
uint8_t format;
} aud_sub_dev_conf_t;
typedef struct DEV_STRUCT {
+5 -5
View File
@@ -6,16 +6,16 @@
#include "als4000.h"
/* I/O function */
static u8_t my_inb(u32_t port) {
static uint8_t my_inb(u32_t port) {
u32_t value;
int r;
#ifdef DMA_BASE_IOMAP
value = *(volatile u8_t *)(port);
value = *(volatile uint8_t *)(port);
#else
if ((r = sys_inb(port, &value)) != OK)
printf("SDR: sys_inb failed: %d\n", r);
#endif
return (u8_t)value;
return (uint8_t)value;
}
#define sdr_in8(port, offset) (my_inb((port) + (offset)))
@@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) {
static void my_outb(u32_t port, u32_t value) {
int r;
#ifdef DMA_BASE_IOMAP
*(volatile u8_t *)(port) = value;
*(volatile uint8_t *)(port) = value;
#else
if ((r = sys_outb(port, (u8_t)value)) != OK)
if ((r = sys_outb(port, (uint8_t)value)) != OK)
printf("SDR: sys_outb failed: %d\n", r);
#endif
}
+1 -1
View File
@@ -1,7 +1,7 @@
#include "mixer.h"
#ifdef MIXER_AK4531
u8_t mixer_value[] = {
uint8_t mixer_value[] = {
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08,
0x7e, 0x3d, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00,
+1 -1
View File
@@ -226,7 +226,7 @@ static int dev_probe(void) {
int devind, i, ioflag;
u32_t device, bar, size, base;
u16_t vid, did, temp;
u8_t *reg;
uint8_t *reg;
pci_init();
device = pci_first_dev(&devind, &vid, &did);
+1 -1
View File
@@ -93,7 +93,7 @@ typedef struct aud_sub_dev_conf_t {
u32_t sign;
u32_t busy;
u32_t fragment_size;
u8_t format;
uint8_t format;
} aud_sub_dev_conf_t;
typedef struct DEV_STRUCT {
+5 -5
View File
@@ -6,16 +6,16 @@
#include "cmi8738.h"
/* I/O function */
static u8_t my_inb(u32_t port) {
static uint8_t my_inb(u32_t port) {
u32_t value;
int r;
#ifdef DMA_BASE_IOMAP
value = *(volatile u8_t *)(port);
value = *(volatile uint8_t *)(port);
#else
if ((r = sys_inb(port, &value)) != OK)
printf("SDR: sys_inb failed: %d\n", r);
#endif
return (u8_t)value;
return (uint8_t)value;
}
#define sdr_in8(port, offset) (my_inb((port) + (offset)))
@@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) {
static void my_outb(u32_t port, u32_t value) {
int r;
#ifdef DMA_BASE_IOMAP
*(volatile u8_t *)(port) = value;
*(volatile uint8_t *)(port) = value;
#else
if ((r = sys_outb(port, (u8_t)value)) != OK)
if ((r = sys_outb(port, (uint8_t)value)) != OK)
printf("SDR: sys_outb failed: %d\n", r);
#endif
}
+1 -1
View File
@@ -1,7 +1,7 @@
#include "mixer.h"
#ifdef MIXER_AK4531
u8_t mixer_value[] = {
uint8_t mixer_value[] = {
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08,
0x7e, 0x3d, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00,
+1 -1
View File
@@ -301,7 +301,7 @@ static int dev_probe(void) {
int devind, i, ioflag;
u32_t device, bar, size, base;
u16_t vid, did, temp;
u8_t *reg;
uint8_t *reg;
pci_init();
device = pci_first_dev(&devind, &vid, &did);
+1 -1
View File
@@ -119,7 +119,7 @@ typedef struct aud_sub_dev_conf_t {
u32_t sign;
u32_t busy;
u32_t fragment_size;
u8_t format;
uint8_t format;
} aud_sub_dev_conf_t;
typedef struct DEV_STRUCT {
+5 -5
View File
@@ -6,16 +6,16 @@
#include "cs4281.h"
/* I/O function */
static u8_t my_inb(u32_t port) {
static uint8_t my_inb(u32_t port) {
u32_t value;
int r;
#ifdef DMA_BASE_IOMAP
value = *(volatile u8_t *)(port);
value = *(volatile uint8_t *)(port);
#else
if ((r = sys_inb(port, &value)) != OK)
printf("SDR: sys_inb failed: %d\n", r);
#endif
return (u8_t)value;
return (uint8_t)value;
}
#define sdr_in8(port, offset) (my_inb((port) + (offset)))
@@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) {
static void my_outb(u32_t port, u32_t value) {
int r;
#ifdef DMA_BASE_IOMAP
*(volatile u8_t *)(port) = value;
*(volatile uint8_t *)(port) = value;
#else
if ((r = sys_outb(port, (u8_t)value)) != OK)
if ((r = sys_outb(port, (uint8_t)value)) != OK)
printf("SDR: sys_outb failed: %d\n", r);
#endif
}
+1 -1
View File
@@ -1,7 +1,7 @@
#include "mixer.h"
#ifdef MIXER_AK4531
u8_t mixer_value[] = {
uint8_t mixer_value[] = {
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08,
0x7e, 0x3d, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00,
+4 -4
View File
@@ -26,7 +26,7 @@
#define MUTE 0x80
static int ak4531_write(u8_t address, u8_t data);
static int ak4531_write(uint8_t address, uint8_t data);
static int ak4531_finished(void);
static int set_volume(struct volume_level *level, int cmd_left, int
cmd_right, int max_level);
@@ -36,14 +36,14 @@ static u16_t status_register;
static u16_t status_bit;
static u16_t poll_address;
u8_t mixer_values[0x20] = {
uint8_t mixer_values[0x20] = {
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* 0x00 - 0x07 */
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, /* 0x08 - 0x0f */
0x7e, 0x3d, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00, /* 0x10 - 0x17 */
0x00, 0x01 /* 0x18 - 0x19 */
};
#if 0
u8_t mixer_values[0x20] = {
uint8_t mixer_values[0x20] = {
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* 0x00 - 0x07 */
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* 0x08 - 0x0f */
0x7f, 0x3d, 0x55, 0x26, 0xf7, 0xef, 0x03, 0x00, /* 0x10 - 0x17 */
@@ -66,7 +66,7 @@ static int ak4531_finished(void) {
}
static int ak4531_write (u8_t address, u8_t data) {
static int ak4531_write (uint8_t address, uint8_t data) {
u16_t to_be_written;
+1 -1
View File
@@ -41,7 +41,7 @@ u32_t pci_inl(u16_t port) {
}
void pci_outb(u16_t port, u8_t value) {
void pci_outb(u16_t port, uint8_t value) {
int s;
if ((s=sys_outb(port, value)) !=OK)
printf("%s: warning, sys_outb failed: %d\n", DRIVER_NAME, s);
+1 -1
View File
@@ -5,7 +5,7 @@ unsigned pci_inb(u16_t port);
unsigned pci_inw(u16_t port);
unsigned pci_inl(u16_t port);
void pci_outb(u16_t port, u8_t value);
void pci_outb(u16_t port, uint8_t value);
void pci_outw(u16_t port, u16_t value);
void pci_outl(u16_t port, u32_t value);
+3 -3
View File
@@ -340,7 +340,7 @@ static void set_nice_volume(void) {
}
static int get_volume(u8_t *left, u8_t *right, int cmd) {
static int get_volume(uint8_t *left, uint8_t *right, int cmd) {
u16_t value = 0;
AC97_read_unsynced(dev, (u16_t)cmd, &value);
@@ -395,8 +395,8 @@ int AC97_get_set_volume(struct volume_level *level, int flag) {
static int AC97_get_volume(struct volume_level *level) {
int cmd;
u8_t left;
u8_t right;
uint8_t left;
uint8_t right;
switch(level->device) {
case Master:
+1 -1
View File
@@ -41,7 +41,7 @@ u32_t pci_inl(u16_t port) {
}
void pci_outb(u16_t port, u8_t value) {
void pci_outb(u16_t port, uint8_t value) {
int s;
if ((s=sys_outb(port, value)) !=OK)
printf("%s: warning, sys_outb failed: %d\n", DRIVER_NAME, s);
+1 -1
View File
@@ -5,7 +5,7 @@ unsigned pci_inb(u16_t port);
unsigned pci_inw(u16_t port);
unsigned pci_inl(u16_t port);
void pci_outb(u16_t port, u8_t value);
void pci_outb(u16_t port, uint8_t value);
void pci_outw(u16_t port, u16_t value);
void pci_outl(u16_t port, u32_t value);
+7 -7
View File
@@ -296,11 +296,11 @@ static void dsp_dma_setup(phys_bytes address, int count, int DmaMode) {
/* set DMA mode */
pv_set(pvb[2], DMA8_MODE, (DmaMode == WRITE_DMA ? DMA8_AUTO_PLAY : DMA8_AUTO_REC));
pv_set(pvb[3], DMA8_ADDR, (u8_t)(address >> 0)); /* Low_byte of address */
pv_set(pvb[4], DMA8_ADDR, (u8_t)(address >> 8)); /* High byte of address */
pv_set(pvb[5], DMA8_PAGE, (u8_t)(address >> 16)); /* 64K page number */
pv_set(pvb[6], DMA8_COUNT, (u8_t)(count >> 0)); /* Low byte of count */
pv_set(pvb[7], DMA8_COUNT, (u8_t)(count >> 8)); /* High byte of count */
pv_set(pvb[3], DMA8_ADDR, (uint8_t)(address >> 0)); /* Low_byte of address */
pv_set(pvb[4], DMA8_ADDR, (uint8_t)(address >> 8)); /* High byte of address */
pv_set(pvb[5], DMA8_PAGE, (uint8_t)(address >> 16)); /* 64K page number */
pv_set(pvb[6], DMA8_COUNT, (uint8_t)(count >> 0)); /* Low byte of count */
pv_set(pvb[7], DMA8_COUNT, (uint8_t)(count >> 8)); /* High byte of count */
pv_set(pvb[8], DMA8_MASK, SB_DMA_8); /* Enable DMA channel */
sys_voutb(pvb, 9);
@@ -317,8 +317,8 @@ static void dsp_dma_setup(phys_bytes address, int count, int DmaMode) {
pv_set(pvb[3], DMA16_ADDR, (address >> 1) & 0xFF); /* Low_byte of address */
pv_set(pvb[4], DMA16_ADDR, (address >> 9) & 0xFF); /* High byte of address */
pv_set(pvb[5], DMA16_PAGE, (address >> 16) & 0xFE); /* 128K page number */
pv_set(pvb[6], DMA16_COUNT, (u8_t)(count >> 1)); /* Low byte of count */
pv_set(pvb[7], DMA16_COUNT, (u8_t)(count >> 9)); /* High byte of count */
pv_set(pvb[6], DMA16_COUNT, (uint8_t)(count >> 1)); /* Low byte of count */
pv_set(pvb[7], DMA16_COUNT, (uint8_t)(count >> 9)); /* High byte of count */
pv_set(pvb[8], DMA16_MASK, SB_DMA_16 & 3); /* Enable DMA channel */
sys_voutb(pvb, 9);
+5 -5
View File
@@ -6,16 +6,16 @@
#include "trident.h"
/* I/O function */
static u8_t my_inb(u32_t port) {
static uint8_t my_inb(u32_t port) {
u32_t value;
int r;
#ifdef DMA_BASE_IOMAP
value = *(volatile u8_t *)(port);
value = *(volatile uint8_t *)(port);
#else
if ((r = sys_inb(port, &value)) != OK)
printf("SDR: sys_inb failed: %d\n", r);
#endif
return (u8_t)value;
return (uint8_t)value;
}
#define sdr_in8(port, offset) (my_inb((port) + (offset)))
@@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) {
static void my_outb(u32_t port, u32_t value) {
int r;
#ifdef DMA_BASE_IOMAP
*(volatile u8_t *)(port) = value;
*(volatile uint8_t *)(port) = value;
#else
if ((r = sys_outb(port, (u8_t)value)) != OK)
if ((r = sys_outb(port, (uint8_t)value)) != OK)
printf("SDR: sys_outb failed: %d\n", r);
#endif
}
+1 -1
View File
@@ -1,7 +1,7 @@
#include "mixer.h"
#ifdef MIXER_AK4531
u8_t mixer_value[] = {
uint8_t mixer_value[] = {
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08,
0x7e, 0x3d, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00,
+1 -1
View File
@@ -234,7 +234,7 @@ static int dev_probe(void) {
int devind, i, ioflag;
u32_t device, bar, size, base;
u16_t vid, did, temp;
u8_t *reg;
uint8_t *reg;
pci_init();
device = pci_first_dev(&devind, &vid, &did);
+1 -1
View File
@@ -83,7 +83,7 @@ typedef struct aud_sub_dev_conf_t {
u32_t sign;
u32_t busy;
u32_t fragment_size;
u8_t format;
uint8_t format;
} aud_sub_dev_conf_t;
typedef struct DEV_STRUCT {
+3 -3
View File
@@ -117,7 +117,7 @@ static void
do_find_dev(message *mp)
{
int r, devind;
u8_t bus, dev, func;
uint8_t bus, dev, func;
bus= mp->m1_i1;
dev= mp->m1_i2;
@@ -341,7 +341,7 @@ static void
do_attr_r8(message *mp)
{
int r, devind, port;
u8_t v;
uint8_t v;
devind= mp->m2_i1;
port= mp->m2_i2;
@@ -419,7 +419,7 @@ static void
do_attr_w8(message *mp)
{
int r, devind, port;
u8_t v;
uint8_t v;
devind= mp->m2_i1;
port= mp->m2_i2;
+28 -28
View File
@@ -48,10 +48,10 @@ static struct pcibus
int pb_devind;
int pb_busnr;
u8_t (*pb_rreg8)(int busind, int devind, int port);
uint8_t (*pb_rreg8)(int busind, int devind, int port);
u16_t (*pb_rreg16)(int busind, int devind, int port);
u32_t (*pb_rreg32)(int busind, int devind, int port);
void (*pb_wreg8)(int busind, int devind, int port, u8_t value);
void (*pb_wreg8)(int busind, int devind, int port, uint8_t value);
void (*pb_wreg16)(int busind, int devind, int port, u16_t value);
void (*pb_wreg32)(int busind, int devind, int port, u32_t value);
u16_t (*pb_rsts)(int busind);
@@ -61,19 +61,19 @@ static int nr_pcibus= 0;
static struct pcidev
{
u8_t pd_busnr;
u8_t pd_dev;
u8_t pd_func;
u8_t pd_baseclass;
u8_t pd_subclass;
u8_t pd_infclass;
uint8_t pd_busnr;
uint8_t pd_dev;
uint8_t pd_func;
uint8_t pd_baseclass;
uint8_t pd_subclass;
uint8_t pd_infclass;
u16_t pd_vid;
u16_t pd_did;
u16_t pd_sub_vid;
u16_t pd_sub_did;
u8_t pd_ilr;
uint8_t pd_ilr;
u8_t pd_inuse;
uint8_t pd_inuse;
endpoint_t pd_proc;
struct bar
@@ -125,7 +125,7 @@ pci_inl(u16_t port) {
}
static void
pci_outb(u16_t port, u8_t value) {
pci_outb(u16_t port, uint8_t value) {
int s;
if ((s=sys_outb(port, value)) !=OK)
printf("PCI: warning, sys_outb failed: %d\n", s);
@@ -145,10 +145,10 @@ pci_outl(u16_t port, u32_t value) {
printf("PCI: warning, sys_outl failed: %d\n", s);
}
static u8_t
static uint8_t
pcii_rreg8(int busind, int devind, int port)
{
u8_t v;
uint8_t v;
int s;
v= PCII_RREG8_(pcibus[busind].pb_busnr,
@@ -206,7 +206,7 @@ pcii_rreg32(int busind, int devind, int port)
}
static void
pcii_wreg8(int busind, int devind, int port, u8_t value)
pcii_wreg8(int busind, int devind, int port, uint8_t value)
{
int s;
#if 0
@@ -312,7 +312,7 @@ get_busind(int busnr)
/*===========================================================================*
* Unprotected helper functions *
*===========================================================================*/
static u8_t
static uint8_t
__pci_attr_r8(int devind, int port)
{
int busnr, busind;
@@ -343,7 +343,7 @@ __pci_attr_r32(int devind, int port)
}
static void
__pci_attr_w8(int devind, int port, u8_t value)
__pci_attr_w8(int devind, int port, uint8_t value)
{
int busnr, busind;
@@ -417,7 +417,7 @@ pcii_wsts(int busind, u16_t value)
}
static int
is_duplicate(u8_t busnr, u8_t dev, u8_t func)
is_duplicate(uint8_t busnr, uint8_t dev, uint8_t func)
{
int i;
@@ -463,7 +463,7 @@ pci_vid_name(u16_t vid)
static void
print_hyper_cap(int devind, u8_t capptr)
print_hyper_cap(int devind, uint8_t capptr)
{
u32_t v;
u16_t cmd;
@@ -530,7 +530,7 @@ print_hyper_cap(int devind, u8_t capptr)
static void
print_capabilities(int devind)
{
u8_t status, capptr, type, next, subtype;
uint8_t status, capptr, type, next, subtype;
const char *str;
/* Check capabilities bit in the device status register */
@@ -659,7 +659,7 @@ static int
do_amd_isabr(int devind)
{
int i, busnr, dev, func, xdevind, irq, edge;
u8_t levmask;
uint8_t levmask;
u16_t pciirq;
/* Find required function */
@@ -734,7 +734,7 @@ static int
do_via_isabr(int devind)
{
int i, irq, edge;
u8_t levmask;
uint8_t levmask;
levmask= __pci_attr_r8(devind, VIA_ISABR_EL);
irq= 0; /* lint */
@@ -1523,8 +1523,8 @@ probe_bus(int busind)
uint32_t t3;
#endif
u16_t vid, did, sts, sub_vid, sub_did;
u8_t headt;
u8_t baseclass, subclass, infclass;
uint8_t headt;
uint8_t baseclass, subclass, infclass;
int devind, busnr;
const char *s, *dstr;
@@ -1785,7 +1785,7 @@ do_pcibridge(int busind)
int devind, busnr;
int ind, type;
u16_t vid, did;
u8_t sbusn, baseclass, subclass, infclass, headt;
uint8_t sbusn, baseclass, subclass, infclass, headt;
u32_t t3;
vid= did= 0; /* lint */
@@ -2184,7 +2184,7 @@ map_service(struct rprocpub *rpub)
* _pci_find_dev *
*===========================================================================*/
int
_pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp)
_pci_find_dev(uint8_t bus, uint8_t dev, uint8_t func, int *devindp)
{
int devind;
@@ -2379,7 +2379,7 @@ _pci_ids(int devind, u16_t *vidp, u16_t *didp)
* _pci_rescan_bus *
*===========================================================================*/
void
_pci_rescan_bus(u8_t busnr)
_pci_rescan_bus(uint8_t busnr)
{
int busind;
@@ -2472,7 +2472,7 @@ _pci_get_bar(int devind, int port, u32_t *base, u32_t *size,
* _pci_attr_r8 *
*===========================================================================*/
int
_pci_attr_r8(int devind, int port, u8_t *vp)
_pci_attr_r8(int devind, int port, uint8_t *vp)
{
if (devind < 0 || devind >= nr_pcidev)
return EINVAL;
@@ -2517,7 +2517,7 @@ _pci_attr_r32(int devind, int port, u32_t *vp)
* _pci_attr_w8 *
*===========================================================================*/
int
_pci_attr_w8(int devind, int port, u8_t value)
_pci_attr_w8(int devind, int port, uint8_t value)
{
if (devind < 0 || devind >= nr_pcidev)
return EINVAL;
+4 -4
View File
@@ -47,9 +47,9 @@ int _pci_first_dev(struct rs_pci *aclp, int *devindp, u16_t *vidp,
u16_t *didp);
int _pci_next_dev(struct rs_pci *aclp, int *devindp, u16_t *vidp, u16_t
*didp);
int _pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp);
int _pci_find_dev(uint8_t bus, uint8_t dev, uint8_t func, int *devindp);
void _pci_rescan_bus(u8_t busnr);
void _pci_rescan_bus(uint8_t busnr);
const char *_pci_dev_name(u16_t vid, u16_t did);
@@ -59,12 +59,12 @@ int _pci_slot_name(int devind, char **cpp);
int _pci_ids(int devind, u16_t *vidp, u16_t *didp);
/* PCI Config Read functions */
int _pci_attr_r8(int devind, int port, u8_t *vp);
int _pci_attr_r8(int devind, int port, uint8_t *vp);
int _pci_attr_r16(int devind, int port, u16_t *vp);
int _pci_attr_r32(int devind, int port, u32_t *vp);
/* PCI Config Write functions */
int _pci_attr_w8(int devind, int port, u8_t value);
int _pci_attr_w8(int devind, int port, uint8_t value);
int _pci_attr_w16(int devind, int port, u16_t value);
int _pci_attr_w32(int devind, int port, u32_t value);
+3 -3
View File
@@ -20,7 +20,7 @@ Created: Dec 2005 by Philip Homburg
static struct port
{
int p_devind;
u8_t p_cb_busnr;
uint8_t p_cb_busnr;
u16_t p_exca_port;
#if USE_INTS
int p_irq;
@@ -138,7 +138,7 @@ static int hw_probe(int skip)
*===========================================================================*/
static void hw_init(struct port *pp, int devind)
{
u8_t v8;
uint8_t v8;
u16_t v16;
u32_t v32;
#if USE_INTS
@@ -250,7 +250,7 @@ static void do_int(struct port *pp)
socket_5v, socket_3v, socket_Xv, socket_Yv;
spin_t spin;
u32_t csr_event, csr_present, csr_control;
u8_t v8;
uint8_t v8;
u16_t v16;
#if USE_INTS
int r;
+5 -5
View File
@@ -46,10 +46,10 @@ Driver for the AMD Device Exclusion Vector (DEV)
#define DEVF_ERR_ADDR_HI 7
static int dev_devind;
static u8_t dev_capptr;
static u8_t *table;
static uint8_t dev_capptr;
static uint8_t *table;
static int find_dev(int *devindp, u8_t *capaddrp);
static int find_dev(int *devindp, uint8_t *capaddrp);
static u32_t read_reg(int function, int index);
static void write_reg(int function, int index, u32_t value);
static void init_domain(int index);
@@ -200,10 +200,10 @@ static void sef_cb_signal_handler(int signo)
/* Returns 0 if no device found, or 1 if a device is found. */
static int find_dev(devindp, capaddrp)
int *devindp;
u8_t *capaddrp;
uint8_t *capaddrp;
{
int r, devind, first;
u8_t capptr, type, next, subtype;
uint8_t capptr, type, next, subtype;
u16_t vid, did, status;
pci_init();
+3 -3
View File
@@ -34,7 +34,7 @@ static void de_reset(const dpeth_t *);
static void de_hw_conf(const dpeth_t *);
static void de_start(const dpeth_t *);
static void de_setup_frame(const dpeth_t *, const netdriver_addr_t *);
static u16_t de_read_rom(const dpeth_t *, u8_t, u8_t);
static u16_t de_read_rom(const dpeth_t *, uint8_t, uint8_t);
static dpeth_t de_state;
@@ -137,7 +137,7 @@ static int de_probe(dpeth_t *dep, unsigned int skip)
return TRUE;
}
static u16_t de_read_rom(const dpeth_t *dep, u8_t addr, u8_t nbAddrBits)
static u16_t de_read_rom(const dpeth_t *dep, uint8_t addr, uint8_t nbAddrBits)
{
u16_t retVal = 0;
int i;
@@ -294,7 +294,7 @@ static void de_init_buf(dpeth_t *dep)
descr_vir += sizeof(de_descr_t);
/* assign space for buffer */
loc_descr->buf1 = (u8_t*)buffer_vir;
loc_descr->buf1 = (uint8_t*)buffer_vir;
buffer_vir += (i==DESCR_RECV ? DE_RECV_BUF_SIZE : DE_SEND_BUF_SIZE);
loc_descr->buf2 = 0;
loc_descr++;
+5 -5
View File
@@ -32,8 +32,8 @@ typedef struct de_descr {
typedef struct de_local_descr {
de_descr_t *descr;
u8_t *buf1;
u8_t *buf2;
uint8_t *buf1;
uint8_t *buf2;
} de_loc_descr_t;
typedef struct dpeth {
@@ -45,9 +45,9 @@ typedef struct dpeth {
/* Space reservation. We will allocate all structures later in the code.
here we just make sure we have the space we need at compile time */
u8_t sendrecv_descr_buf[(DE_NB_SEND_DESCR+DE_NB_RECV_DESCR)*
uint8_t sendrecv_descr_buf[(DE_NB_SEND_DESCR+DE_NB_RECV_DESCR)*
sizeof(de_descr_t)];
u8_t sendrecv_buf[DE_NB_SEND_DESCR*DE_SEND_BUF_SIZE +
uint8_t sendrecv_buf[DE_NB_SEND_DESCR*DE_SEND_BUF_SIZE +
DE_NB_RECV_DESCR*DE_RECV_BUF_SIZE];
phys_bytes sendrecv_descr_phys_addr[2];
de_loc_descr_t descr[2][MAX(DE_NB_RECV_DESCR, DE_NB_SEND_DESCR)];
@@ -59,7 +59,7 @@ typedef struct dpeth {
/* Serial ROM */
#define SROM_BITWIDTH 6
u8_t srom[((1<<SROM_BITWIDTH)-1)*2]; /* Space to read in
uint8_t srom[((1<<SROM_BITWIDTH)-1)*2]; /* Space to read in
all the configuration ROM */
} dpeth_t;
+2 -2
View File
@@ -932,7 +932,7 @@ static void map_hw_buffer(dpeth_t *dep)
panic("map_hw_buffer: vm_map_phys failed");
}
u8_t inb(port_t port)
uint8_t inb(port_t port)
{
int r;
u32_t value;
@@ -957,7 +957,7 @@ u16_t inw(port_t port)
return (u16_t) value;
}
void outb(port_t port, u8_t value)
void outb(port_t port, uint8_t value)
{
int r;
+4 -4
View File
@@ -154,10 +154,10 @@ Created: before Dec 28, 1992 by Philip Homburg
typedef struct dp_rcvhdr
{
u8_t dr_status; /* Copy of rsr */
u8_t dr_next; /* Pointer to next packet */
u8_t dr_rbcl; /* Receive Byte Count Low */
u8_t dr_rbch; /* Receive Byte Count High */
uint8_t dr_status; /* Copy of rsr */
uint8_t dr_next; /* Pointer to next packet */
uint8_t dr_rbcl; /* Receive Byte Count Low */
uint8_t dr_rbch; /* Receive Byte Count High */
} dp_rcvhdr_t;
#define DP_PAGESIZE 256
+2 -2
View File
@@ -12,9 +12,9 @@ struct dpeth;
int el2_probe(struct dpeth* dep);
/* dp8390.c */
u8_t inb(port_t port);
uint8_t inb(port_t port);
u16_t inw(port_t port);
void outb(port_t port, u8_t v);
void outb(port_t port, uint8_t v);
void outw(port_t port, u16_t v);
/* ne2000.c */
+11 -11
View File
@@ -22,15 +22,15 @@ extern u32_t system_hz;
#define MILLIS_TO_TICKS(m) (((m)*system_hz/1000)+1)
typedef int(*testf_t) (dpeth_t *dep, int pos, u8_t *pat);
typedef int(*testf_t) (dpeth_t *dep, int pos, uint8_t *pat);
static u8_t pat0[]= { 0x00, 0x00, 0x00, 0x00 };
static u8_t pat1[]= { 0xFF, 0xFF, 0xFF, 0xFF };
static u8_t pat2[]= { 0xA5, 0x5A, 0x69, 0x96 };
static u8_t pat3[]= { 0x96, 0x69, 0x5A, 0xA5 };
static uint8_t pat0[]= { 0x00, 0x00, 0x00, 0x00 };
static uint8_t pat1[]= { 0xFF, 0xFF, 0xFF, 0xFF };
static uint8_t pat2[]= { 0xA5, 0x5A, 0x69, 0x96 };
static uint8_t pat3[]= { 0x96, 0x69, 0x5A, 0xA5 };
static int test_8(dpeth_t *dep, int pos, u8_t *pat);
static int test_16(dpeth_t *dep, int pos, u8_t *pat);
static int test_8(dpeth_t *dep, int pos, uint8_t *pat);
static int test_16(dpeth_t *dep, int pos, uint8_t *pat);
static void ne_stop(dpeth_t *dep);
static void milli_delay(unsigned long millis);
@@ -198,9 +198,9 @@ dpeth_t *dep;
static int test_8(dep, pos, pat)
dpeth_t *dep;
int pos;
u8_t *pat;
uint8_t *pat;
{
u8_t buf[4];
uint8_t buf[4];
int i;
int r;
@@ -250,9 +250,9 @@ u8_t *pat;
static int test_16(dep, pos, pat)
dpeth_t *dep;
int pos;
u8_t *pat;
uint8_t *pat;
{
u8_t buf[4];
uint8_t buf[4];
int i;
int r;
+2 -2
View File
@@ -34,7 +34,7 @@ int skip;
int r, devind;
u16_t vid, did;
u32_t bar;
u8_t ilr;
uint8_t ilr;
const char *dname;
pci_init();
@@ -80,7 +80,7 @@ int skip;
static void rtl_init(dep)
dpeth_t *dep;
{
u8_t reg_a, reg_b, cr, config0, config2, config3;
uint8_t reg_a, reg_b, cr, config0, config2, config3;
#if DEBUG
printf("rtl_init called\n");
+2 -2
View File
@@ -309,7 +309,7 @@ dpeth_t *dep;
* 8 bit board.
*/
int icr;
u8_t tlb;
uint8_t tlb;
icr= inb_we(dep, EPL_ICR);
@@ -345,7 +345,7 @@ static int we_ultra(dep)
dpeth_t *dep;
{
/* Determine if we has an '790 chip. */
u8_t tlb;
uint8_t tlb;
tlb= inb_we(dep, EPL_TLB);
return tlb == E_TLB_SMC8216T || tlb == E_TLB_SMC8216C;
+4 -4
View File
@@ -161,10 +161,10 @@
#define outb_reg1(dep,reg,data) (outb(dep->de_dp8390_port+reg,data))
typedef struct dp_rcvhdr {
u8_t dr_status; /* Copy of rsr */
u8_t dr_next; /* Pointer to next packet */
u8_t dr_rbcl; /* Receive Byte Count Low */
u8_t dr_rbch; /* Receive Byte Count High */
uint8_t dr_status; /* Copy of rsr */
uint8_t dr_next; /* Pointer to next packet */
uint8_t dr_rbcl; /* Receive Byte Count Low */
uint8_t dr_rbch; /* Receive Byte Count High */
} dp_rcvhdr_t;
void ns_init(dpeth_t *);
+2 -2
View File
@@ -259,7 +259,7 @@ static int we_16bitboard(dpeth_t *dep)
* 8 bit board.
*/
unsigned int icr;
u8_t tlb;
uint8_t tlb;
icr = inb_we(dep, EPL_ICR);
@@ -292,7 +292,7 @@ static int we_16bitslot(dpeth_t *dep)
static int we_ultra(dpeth_t *dep)
{
/* Determine if we has an '790 chip. */
u8_t tlb;
uint8_t tlb;
tlb = inb_we(dep, EPL_TLB);
return tlb == E_TLB_SMC8216C;
+1 -1
View File
@@ -854,7 +854,7 @@ eeprom_ich(e1000_t * e, int reg)
u32_t flash_linear_addr;
u32_t flash_data = 0;
int ret_val = -1;
u8_t count = 0;
uint8_t count = 0;
u16_t data = 0;
E1000_DEBUG(3, ("e1000_read_flash_data_ich8lan"));
+2 -2
View File
@@ -114,8 +114,8 @@ typedef struct e1000
{
int irq; /**< Interrupt Request Vector. */
int irq_hook; /**< Interrupt Request Vector Hook. */
u8_t *regs; /**< Memory mapped hardware registers. */
u8_t *flash; /**< Optional flash memory. */
uint8_t *regs; /**< Memory mapped hardware registers. */
uint8_t *flash; /**< Optional flash memory. */
u32_t flash_base_addr; /**< Flash base address. */
u16_t (*eeprom_read)(struct e1000 *, int reg);
/**< Function to read the EEPROM. */
+6 -6
View File
@@ -34,8 +34,8 @@ typedef struct e1000_rx_desc
u32_t buffer_h; /**< High 32-bits of the receive data buffer (unused). */
u16_t length; /**< Size of the receive buffer. */
u16_t checksum; /**< Packet checksum. */
u8_t status; /**< Descriptor status. */
u8_t errors; /**< Descriptor errors. */
uint8_t status; /**< Descriptor status. */
uint8_t errors; /**< Descriptor errors. */
u16_t special; /**< VLAN information. */
}
e1000_rx_desc_t;
@@ -48,10 +48,10 @@ typedef struct e1000_tx_desc
u32_t buffer; /**< Address of the transmit buffer (64-bit). */
u32_t buffer_h; /**< High 32-bits of the transmit buffer (unused). */
u16_t length; /**< Size of the transmit buffer contents. */
u8_t checksum_off; /**< Checksum Offset. */
u8_t command; /**< Command field. */
u8_t status; /**< Status field. */
u8_t checksum_st; /**< Checksum Start. */
uint8_t checksum_off; /**< Checksum Offset. */
uint8_t command; /**< Command field. */
uint8_t status; /**< Status field. */
uint8_t checksum_st; /**< Checksum Start. */
u16_t special; /**< Optional special bits. */
}
e1000_tx_desc_t;
+10 -10
View File
@@ -75,7 +75,7 @@ typedef struct fxp
irq_hook_t fxp_hook;
struct sc fxp_stat;
u8_t fxp_conf_bytes[CC_BYTES_NR];
uint8_t fxp_conf_bytes[CC_BYTES_NR];
} fxp_t;
/* fxp_type */
@@ -123,9 +123,9 @@ static void fxp_report_link(fxp_t *fp);
static u16_t eeprom_read(fxp_t *fp, int reg);
static void eeprom_addrsize(fxp_t *fp);
static u16_t mii_read(fxp_t *fp, int reg);
static u8_t do_inb(port_t port);
static uint8_t do_inb(port_t port);
static u32_t do_inl(port_t port);
static void do_outb(port_t port, u8_t v);
static void do_outb(port_t port, uint8_t v);
static void do_outl(port_t port, u32_t v);
static void tell_iommu(vir_bytes start, size_t size, int pci_bus, int
pci_dev, int pci_func);
@@ -236,7 +236,7 @@ static int fxp_probe(fxp_t *fp, int skip)
int r, devind;
u16_t vid, did, cr;
u32_t bar;
u8_t ilr, rev;
uint8_t ilr, rev;
const char *str;
#if VERBOSE
const char *dname;
@@ -792,7 +792,7 @@ static int fxp_send(struct netdriver_data *data, size_t size)
static void fxp_check_restart(fxp_t *fp)
{
port_t port;
u8_t scb_status;
uint8_t scb_status;
if (!fp->fxp_rx_need_restart)
return;
@@ -936,7 +936,7 @@ int check_idle;
{
spin_t spin;
port_t port;
u8_t scb_cmd;
uint8_t scb_cmd;
port= fp->fxp_base_port;
@@ -976,7 +976,7 @@ int check_idle;
{
spin_t spin;
port_t port;
u8_t scb_cmd;
uint8_t scb_cmd;
port= fp->fxp_base_port;
@@ -1128,7 +1128,7 @@ static void fxp_check_ints(fxp_t *fp)
port_t port;
u32_t busaddr;
u16_t tx_status;
u8_t scb_status;
uint8_t scb_status;
struct tx *txp;
netdriver_recv();
@@ -1702,7 +1702,7 @@ static u16_t mii_read(fxp_t *fp, int reg)
return v & CM_DATA_MASK;
}
static u8_t do_inb(port_t port)
static uint8_t do_inb(port_t port)
{
int r;
u32_t value;
@@ -1724,7 +1724,7 @@ static u32_t do_inl(port_t port)
return value;
}
static void do_outb(port_t port, u8_t value)
static void do_outb(port_t port, uint8_t value)
{
int r;
+7 -7
View File
@@ -170,8 +170,8 @@ struct ias
u16_t ias_status;
u16_t ias_command;
u32_t ias_linkaddr;
u8_t ias_ethaddr[6];
u8_t ias_reserved[2];
uint8_t ias_ethaddr[6];
uint8_t ias_reserved[2];
};
/* Configure (2) */
@@ -181,7 +181,7 @@ struct cbl_conf
u16_t cc_status;
u16_t cc_command;
u32_t cc_linkaddr;
u8_t cc_bytes[CC_BYTES_NR];
uint8_t cc_bytes[CC_BYTES_NR];
};
/* Byte 0 */
@@ -427,9 +427,9 @@ struct tx
u32_t tx_linkaddr;
u32_t tx_tbda;
u16_t tx_size;
u8_t tx_tthresh;
u8_t tx_ntbd;
u8_t tx_buf[NDEV_ETH_PACKET_MAX_TAGGED];
uint8_t tx_tthresh;
uint8_t tx_ntbd;
uint8_t tx_buf[NDEV_ETH_PACKET_MAX_TAGGED];
};
#define TXS_C 0x8000 /* Transmit DMA has completed */
@@ -506,7 +506,7 @@ struct rfd
u32_t rfd_reserved;
u16_t rfd_res;
u16_t rfd_size;
u8_t rfd_buf[NDEV_ETH_PACKET_MAX_TAGGED];
uint8_t rfd_buf[NDEV_ETH_PACKET_MAX_TAGGED];
};
#define RFDS_C 0x8000 /* Frame Reception Completed */
+5 -5
View File
@@ -6,16 +6,16 @@
#include "ip1000.h"
/* I/O function */
static u8_t my_inb(u32_t port) {
static uint8_t my_inb(u32_t port) {
u32_t value;
int r;
#ifdef DMA_BASE_IOMAP
value = *(volatile u8_t *)(port);
value = *(volatile uint8_t *)(port);
#else
if ((r = sys_inb(port, &value)) != OK)
printf("NDR: sys_inb failed: %d\n", r);
#endif
return (u8_t)value;
return (uint8_t)value;
}
#define ndr_in8(port, offset) (my_inb((port) + (offset)))
@@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) {
static void my_outb(u32_t port, u32_t value) {
int r;
#ifdef DMA_BASE_IOMAP
*(volatile u8_t *)(port) = value;
*(volatile uint8_t *)(port) = value;
#else
if ((r = sys_outb(port, (u8_t)value)) != OK)
if ((r = sys_outb(port, (uint8_t)value)) != OK)
printf("NDR: sys_outb failed: %d\n", r);
#endif
}
+16 -16
View File
@@ -34,7 +34,7 @@ static int dev_init_io(u32_t *base);
static int dev_init_mii(u32_t *base);
static void dev_intr_control(u32_t *base, int flag);
static void dev_rx_tx_control(u32_t *base, int flag);
static void dev_get_addr(u32_t *base, u8_t *pa);
static void dev_get_addr(u32_t *base, uint8_t *pa);
static int dev_check_link(u32_t *base);
static void dev_set_rec_mode(u32_t *base, int mode);
static void dev_start_tx(u32_t *base);
@@ -77,7 +77,7 @@ static u16_t read_eeprom(u32_t base, int addr) {
static u16_t read_phy_reg(u32_t base, int phy_addr, int phy_reg) {
int i, j, fieldlen[8];
u32_t field[8];
u8_t data, polar;
uint8_t data, polar;
field[0] = 0xffffffff; fieldlen[0] = 32;
field[1] = 0x0001; fieldlen[1] = 2;
@@ -130,7 +130,7 @@ static u16_t read_phy_reg(u32_t base, int phy_addr, int phy_reg) {
static void write_phy_reg(u32_t base, int phy_addr, int phy_reg, u16_t val) {
int i, j, fieldlen[8];
u32_t field[8];
u8_t data, polar;
uint8_t data, polar;
field[0] = 0xffffffff; fieldlen[0] = 32;
field[1] = 0x0001; fieldlen[1] = 2;
@@ -212,7 +212,7 @@ static int dev_init_io(u32_t *base) {
* -- Return OK means success, Others means failure */
static int dev_init_mii(u32_t *base) {
int i, phyaddr;
u8_t revision;
uint8_t revision;
u16_t phyctrl, cr1000, length, address, value;
u16_t *param;
u32_t status, base0 = base[0];
@@ -234,7 +234,7 @@ static int dev_init_mii(u32_t *base) {
param = &PhyParam[0];
length = (*param) & 0x00ff;
revision = (u8_t)((*param) >> 8);
revision = (uint8_t)((*param) >> 8);
param++;
while (length != 0) {
if (g_driver.revision == revision) {
@@ -250,7 +250,7 @@ static int dev_init_mii(u32_t *base) {
else {
param += length / 2;
length = *param & 0x00ff;
revision = (u8_t)((*param) >> 8);
revision = (uint8_t)((*param) >> 8);
param++;
}
}
@@ -280,18 +280,18 @@ static void dev_rx_tx_control(u32_t *base, int flag) {
}
/* Get MAC address to the array 'pa' (### GET_MAC_ADDR ###) */
static void dev_get_addr(u32_t *base, u8_t *pa) {
static void dev_get_addr(u32_t *base, uint8_t *pa) {
u32_t i, sta_addr[3], base0 = base[0];
for (i = 0; i < 3; i++) {
sta_addr[i] = read_eeprom(base0, 16 + i);
ndr_out16(base0, (REG_STA_ADDR0 + i * 2), sta_addr[i]);
}
pa[0] = (u8_t)(ndr_in16(base0, REG_STA_ADDR0) & 0x00ff);
pa[1] = (u8_t)((ndr_in16(base0, REG_STA_ADDR0) & 0xff00) >> 8);
pa[2] = (u8_t)(ndr_in16(base0, REG_STA_ADDR1) & 0x00ff);
pa[3] = (u8_t)((ndr_in16(base0, REG_STA_ADDR1) & 0xff00) >> 8);
pa[4] = (u8_t)(ndr_in16(base0, REG_STA_ADDR2) & 0x00ff);
pa[5] = (u8_t)((ndr_in16(base0, REG_STA_ADDR2) & 0xff00) >> 8);
pa[0] = (uint8_t)(ndr_in16(base0, REG_STA_ADDR0) & 0x00ff);
pa[1] = (uint8_t)((ndr_in16(base0, REG_STA_ADDR0) & 0xff00) >> 8);
pa[2] = (uint8_t)(ndr_in16(base0, REG_STA_ADDR1) & 0x00ff);
pa[3] = (uint8_t)((ndr_in16(base0, REG_STA_ADDR1) & 0xff00) >> 8);
pa[4] = (uint8_t)(ndr_in16(base0, REG_STA_ADDR2) & 0x00ff);
pa[5] = (uint8_t)((ndr_in16(base0, REG_STA_ADDR2) & 0xff00) >> 8);
}
/* Check link status (### CHECK_LINK ###)
@@ -655,8 +655,8 @@ static int dev_probe(NDR_driver *pdev, int instance) {
int devind, ioflag, i;
u16_t cr, vid, did;
u32_t bar, size, base;
u8_t irq, rev;
u8_t *reg;
uint8_t irq, rev;
uint8_t *reg;
/* Find pci device */
pci_init();
@@ -797,7 +797,7 @@ err_real_reset:
/* Configure MAC address */
static void dev_conf_addr(NDR_driver *pdev, netdriver_addr_t *addr) {
u8_t pa[6];
uint8_t pa[6];
/* Get MAC address */
/* ### GET_MAC_ADDR ### */
+5 -5
View File
@@ -17,7 +17,7 @@ static void lan8710a_tick(void);
static void lan8710a_enable_interrupt(int interrupt);
static void lan8710a_map_regs(void);
static void lan8710a_dma_config_tx(u8_t desc_idx);
static void lan8710a_dma_config_tx(uint8_t desc_idx);
static void lan8710a_dma_reset_init(void);
static void lan8710a_init_addr(netdriver_addr_t *addr, unsigned int instance);
static void lan8710a_init_desc(void);
@@ -342,7 +342,7 @@ lan8710a_stop(void)
* lan8710a_dma_config_tx *
*============================================================================*/
static void
lan8710a_dma_config_tx(u8_t desc_idx)
lan8710a_dma_config_tx(uint8_t desc_idx)
{
phys_bytes phys_addr;
int i;
@@ -416,7 +416,7 @@ lan8710a_init_desc(void)
lan8710a_desc_t *p_rx_desc;
lan8710a_desc_t *p_tx_desc;
phys_bytes buf_phys_addr;
u8_t i;
uint8_t i;
/* Attempt to allocate. */
if ((lan8710a_state.p_rx_buf = alloc_contig((LAN8710A_NUM_RX_DESC
@@ -704,7 +704,7 @@ lan8710a_send(struct netdriver_data * data, size_t size)
{
lan8710a_t *e = &lan8710a_state;
lan8710a_desc_t *p_tx_desc;
u8_t *buf;
uint8_t *buf;
/* setup descriptors */
p_tx_desc = &(e->tx_desc[e->tx_desc_idx]);
@@ -757,7 +757,7 @@ lan8710a_recv(struct netdriver_data * data, size_t max)
lan8710a_t *e = &lan8710a_state;
lan8710a_desc_t *p_rx_desc;
u32_t flags;
u8_t *buf;
uint8_t *buf;
size_t off, size, chunk;
/*
+3 -3
View File
@@ -68,10 +68,10 @@ typedef struct lan8710a_t
phys_bytes tx_desc_phy;
int irq_rx_hook; /* Rx interrupt Request Vector Hook. */
int irq_tx_hook; /* Tx interrupt Request Vector Hook. */
u8_t *regs;
uint8_t *regs;
u32_t phy_address;
u8_t *p_rx_buf; /* pointer to the buffer with receive frames */
u8_t *p_tx_buf; /* pointer to the buffer with transmit frames */
uint8_t *p_rx_buf; /* pointer to the buffer with receive frames */
uint8_t *p_tx_buf; /* pointer to the buffer with transmit frames */
u16_t tx_desc_idx; /* index of the next transmit desciptor */
u16_t rx_desc_idx; /* index of the next receive desciptor */
+2 -2
View File
@@ -41,7 +41,7 @@ static void lance_init_hw(ether_card_t *ec, netdriver_addr_t *addr,
unsigned int instance);
/* Accesses Lance Control and Status Registers */
static u8_t in_byte(port_t port);
static uint8_t in_byte(port_t port);
static u16_t in_word(port_t port);
static void out_word(port_t port, u16_t value);
static u16_t read_csr(port_t ioaddr, u16_t csrno);
@@ -838,7 +838,7 @@ static void lance_init_hw(ether_card_t *ec, netdriver_addr_t *addr,
/*===========================================================================*
* in_byte *
*===========================================================================*/
static u8_t in_byte(port_t port)
static uint8_t in_byte(port_t port)
{
int r;
u32_t value;
+5 -5
View File
@@ -43,7 +43,7 @@ static unsigned my_inl(u16_t port) {
#define rl_inw(port, offset) (my_inw((port) + (offset)))
#define rl_inl(port, offset) (my_inl((port) + (offset)))
static void my_outb(u16_t port, u8_t value) {
static void my_outb(u16_t port, uint8_t value) {
int s;
if ((s=sys_outb(port, value)) !=OK)
printf("RTL8139: warning, sys_outb failed: %d\n", s);
@@ -260,7 +260,7 @@ static int rl_probe(re_t *rep, unsigned int skip)
int r, devind;
u16_t cr, vid, did;
u32_t bar;
u8_t ilr;
uint8_t ilr;
#if VERBOSE
const char *dname;
#endif
@@ -798,7 +798,7 @@ static void rl_check_ints(re_t *rep)
static unsigned int rl_get_link(uint32_t *media)
{
port_t port;
u8_t msr;
uint8_t msr;
u16_t mii_ctrl;
re_t *rep;
@@ -832,7 +832,7 @@ static void rl_report_link(re_t *rep)
{
port_t port;
u16_t mii_ctrl, mii_status, mii_ana, mii_anlpa, mii_ane, mii_extstat;
u8_t msr;
uint8_t msr;
int f, link_up;
port= rep->re_base_port;
@@ -1123,7 +1123,7 @@ static void mii_print_stat_speed(u16_t stat, u16_t extstat)
static void rl_clear_rx(re_t *rep)
{
port_t port;
u8_t cr;
uint8_t cr;
rep->re_clear_rx= FALSE;
port= rep->re_base_port;
+4 -4
View File
@@ -126,7 +126,7 @@ static unsigned my_inl(u16_t port)
#define rl_inw(port, offset) (my_inw((port) + (offset)))
#define rl_inl(port, offset) (my_inl((port) + (offset)))
static void my_outb(u16_t port, u8_t value)
static void my_outb(u16_t port, uint8_t value)
{
int s;
@@ -402,7 +402,7 @@ static int rl_probe(re_t *rep, unsigned int skip)
int r, devind;
u16_t vid, did;
u32_t bar;
u8_t ilr;
uint8_t ilr;
#if VERBOSE
const char *dname;
#endif
@@ -1057,7 +1057,7 @@ static void rl_check_ints(re_t *rep)
static unsigned int rl_get_link(uint32_t *media)
{
re_t *rep;
u8_t mii_status;
uint8_t mii_status;
rep = &re_state;
@@ -1088,7 +1088,7 @@ static unsigned int rl_get_link(uint32_t *media)
static void rl_report_link(re_t *rep)
{
port_t port;
u8_t mii_status;
uint8_t mii_status;
port = rep->re_base_port;
+7 -7
View File
@@ -59,7 +59,7 @@
struct virtio_net_config {
/* The config defining mac address (if VIRTIO_NET_F_MAC) */
u8_t mac[6];
uint8_t mac[6];
/* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */
u16_t status;
} __attribute__((packed));
@@ -69,13 +69,13 @@ struct virtio_net_config {
struct virtio_net_hdr {
#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset
#define VIRTIO_NET_HDR_F_DATA_VALID 2 // Csum is valid
u8_t flags;
uint8_t flags;
#define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame
#define VIRTIO_NET_HDR_GSO_TCPV4 1 // GSO frame, IPv4 TCP (TSO)
#define VIRTIO_NET_HDR_GSO_UDP 3 // GSO frame, IPv4 UDP (UFO)
#define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP
#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set
u8_t gso_type;
uint8_t gso_type;
u16_t hdr_len; /* Ethernet + IP + tcp/udp hdrs */
u16_t gso_size; /* Bytes to append to hdr_len per frame */
u16_t csum_start; /* Position to start checksumming from */
@@ -97,11 +97,11 @@ struct virtio_net_hdr_mrg_rxbuf {
* command goes in between.
*/
struct virtio_net_ctrl_hdr {
u8_t class;
u8_t cmd;
uint8_t class;
uint8_t cmd;
} __attribute__((packed));
typedef u8_t virtio_net_ctrl_ack;
typedef uint8_t virtio_net_ctrl_ack;
#define VIRTIO_NET_OK 0
#define VIRTIO_NET_ERR 1
@@ -139,7 +139,7 @@ typedef u8_t virtio_net_ctrl_ack;
struct virtio_net_ctrl_mac {
u32_t entries;
#define ETH_ALEN 6
u8_t macs[][ETH_ALEN];
uint8_t macs[][ETH_ALEN];
} __attribute__((packed));
#define VIRTIO_NET_CTRL_MAC 1
+5 -5
View File
@@ -6,16 +6,16 @@
#include "vt6105.h"
/* I/O function */
static u8_t my_inb(u32_t port) {
static uint8_t my_inb(u32_t port) {
u32_t value;
int r;
#ifdef DMA_BASE_IOMAP
value = *(volatile u8_t *)(port);
value = *(volatile uint8_t *)(port);
#else
if ((r = sys_inb(port, &value)) != OK)
printf("NDR: sys_inb failed: %d\n", r);
#endif
return (u8_t)value;
return (uint8_t)value;
}
#define ndr_in8(port, offset) (my_inb((port) + (offset)))
@@ -48,9 +48,9 @@ static u32_t my_inl(u32_t port) {
static void my_outb(u32_t port, u32_t value) {
int r;
#ifdef DMA_BASE_IOMAP
*(volatile u8_t *)(port) = value;
*(volatile uint8_t *)(port) = value;
#else
if ((r = sys_outb(port, (u8_t)value)) != OK)
if ((r = sys_outb(port, (uint8_t)value)) != OK)
printf("NDR: sys_outb failed: %d\n", r);
#endif
}
+6 -6
View File
@@ -34,7 +34,7 @@ static int dev_init_io(u32_t *base);
static int dev_init_mii(u32_t *base);
static void dev_intr_control(u32_t *base, int flag);
static void dev_rx_tx_control(u32_t *base, int flag);
static void dev_get_addr(u32_t *base, u8_t *pa);
static void dev_get_addr(u32_t *base, uint8_t *pa);
static int dev_check_link(u32_t *base);
static void dev_set_rec_mode(u32_t *base, int mode);
static void dev_start_tx(u32_t *base);
@@ -76,7 +76,7 @@ static int dev_real_reset(u32_t *base) {
* -- Return OK means success, Others means failure */
static int dev_init_io(u32_t *base) {
u32_t base0 = base[0];
u8_t stick;
uint8_t stick;
stick = ndr_in8(base0, REG_STICK);
ndr_out8(base0, REG_STICK, stick & 0xfc);
ndr_out16(base0, REG_BCR, 0x0006);
@@ -124,7 +124,7 @@ static void dev_rx_tx_control(u32_t *base, int flag) {
}
/* Get MAC address to the array 'pa' (### GET_MAC_ADDR ###) */
static void dev_get_addr(u32_t *base, u8_t *pa) {
static void dev_get_addr(u32_t *base, uint8_t *pa) {
u32_t i, base0 = base[0];
for (i = 0; i < 6; i++)
pa[i] = ndr_in8(base0, REG_ADDR + i);
@@ -463,8 +463,8 @@ static int dev_probe(NDR_driver *pdev, int instance) {
int devind, ioflag, i;
u16_t cr, vid, did;
u32_t bar, size, base;
u8_t irq, rev;
u8_t *reg;
uint8_t irq, rev;
uint8_t *reg;
/* Find pci device */
pci_init();
@@ -605,7 +605,7 @@ err_real_reset:
/* Configure MAC address */
static void dev_conf_addr(NDR_driver *pdev, netdriver_addr_t *addr) {
u8_t pa[6];
uint8_t pa[6];
/* Get MAC address */
/* ### GET_MAC_ADDR ### */
+2 -2
View File
@@ -82,7 +82,7 @@ static u32_t pci_inl(u16_t port) {
return value;
}
static void pci_outb(u16_t port, u8_t value) {
static void pci_outb(u16_t port, uint8_t value) {
int s;
if ((s=sys_outb(port, value)) !=OK)
printf("ACPI: warning, sys_outb failed: %d\n", s);
@@ -958,7 +958,7 @@ AcpiOsReadPciConfiguration (
switch (Width) {
case 8:
*(u8_t *)Value = PCII_RREG8_(PciId->Bus, PciId->Device,
*(uint8_t *)Value = PCII_RREG8_(PciId->Bus, PciId->Device,
PciId->Function, Register);
break;
case 16:
+1 -1
View File
@@ -137,7 +137,7 @@ void do_get_irq(message *m)
static void add_irq(struct pci_bridge * bridge,
unsigned dev,
unsigned pin,
u8_t irq)
uint8_t irq)
{
assert(dev < PCI_MAX_DEVICES && pin < PCI_MAX_PINS);
+18 -18
View File
@@ -143,7 +143,7 @@ static struct port_state {
volatile u32_t *reg; /* memory-mapped port registers */
u8_t *mem_base; /* primary memory buffer virtual address */
uint8_t *mem_base; /* primary memory buffer virtual address */
phys_bytes mem_phys; /* primary memory buffer physical address */
vir_bytes mem_size; /* primary memory buffer size */
@@ -152,12 +152,12 @@ static struct port_state {
phys_bytes fis_phys; /* FIS receive buffer physical address */
u32_t *cl_base; /* command list buffer virtual address */
phys_bytes cl_phys; /* command list buffer physical address */
u8_t *ct_base[NR_CMDS]; /* command table virtual address */
uint8_t *ct_base[NR_CMDS]; /* command table virtual address */
phys_bytes ct_phys[NR_CMDS]; /* command table physical address */
u8_t *tmp_base; /* temporary storage buffer virtual address */
uint8_t *tmp_base; /* temporary storage buffer virtual address */
phys_bytes tmp_phys; /* temporary storage buffer physical address */
u8_t *pad_base; /* sector padding buffer virtual address */
uint8_t *pad_base; /* sector padding buffer virtual address */
phys_bytes pad_phys; /* sector padding buffer physical address */
vir_bytes pad_size; /* sector padding buffer size */
@@ -229,7 +229,7 @@ static int ahci_exiting = FALSE; /* exit after last close? */
#define millis_to_hz(ms) (((ms) * sys_hz() + 999) / 1000)
static void port_set_cmd(struct port_state *ps, int cmd, cmd_fis_t *fis,
u8_t packet[ATAPI_PACKET_SIZE], prd_t *prdt, int nr_prds, int write);
uint8_t packet[ATAPI_PACKET_SIZE], prd_t *prdt, int nr_prds, int write);
static void port_issue(struct port_state *ps, int cmd, clock_t timeout);
static int port_exec(struct port_state *ps, int cmd, clock_t timeout);
static void port_timeout(int arg);
@@ -265,7 +265,7 @@ static struct blockdriver ahci_dtab = {
* atapi_exec *
*===========================================================================*/
static int atapi_exec(struct port_state *ps, int cmd,
u8_t packet[ATAPI_PACKET_SIZE], size_t size, int write)
uint8_t packet[ATAPI_PACKET_SIZE], size_t size, int write)
{
/* Execute an ATAPI command. Return OK or error.
*/
@@ -304,7 +304,7 @@ static int atapi_test_unit(struct port_state *ps, int cmd)
{
/* Test whether the ATAPI device and medium are ready.
*/
u8_t packet[ATAPI_PACKET_SIZE];
uint8_t packet[ATAPI_PACKET_SIZE];
memset(packet, 0, sizeof(packet));
packet[0] = ATAPI_CMD_TEST_UNIT;
@@ -320,7 +320,7 @@ static int atapi_request_sense(struct port_state *ps, int cmd, int *sense)
/* Request error (sense) information from an ATAPI device, and return
* the sense key. The additional sense codes are not used at this time.
*/
u8_t packet[ATAPI_PACKET_SIZE];
uint8_t packet[ATAPI_PACKET_SIZE];
int r;
memset(packet, 0, sizeof(packet));
@@ -348,7 +348,7 @@ static int atapi_load_eject(struct port_state *ps, int cmd, int load)
{
/* Load or eject a medium in an ATAPI device.
*/
u8_t packet[ATAPI_PACKET_SIZE];
uint8_t packet[ATAPI_PACKET_SIZE];
memset(packet, 0, sizeof(packet));
packet[0] = ATAPI_CMD_START_STOP;
@@ -364,7 +364,7 @@ static int atapi_read_capacity(struct port_state *ps, int cmd)
{
/* Retrieve the LBA count and sector size of an ATAPI medium.
*/
u8_t packet[ATAPI_PACKET_SIZE], *buf;
uint8_t packet[ATAPI_PACKET_SIZE], *buf;
int r;
memset(packet, 0, sizeof(packet));
@@ -495,7 +495,7 @@ static int atapi_transfer(struct port_state *ps, int cmd, u64_t start_lba,
/* Perform data transfer from or to an ATAPI device.
*/
cmd_fis_t fis;
u8_t packet[ATAPI_PACKET_SIZE];
uint8_t packet[ATAPI_PACKET_SIZE];
/* Fill in a Register Host to Device FIS. */
memset(&fis, 0, sizeof(fis));
@@ -773,7 +773,7 @@ static int gen_set_wcache(struct port_state *ps, int enable)
/*===========================================================================*
* ct_set_fis *
*===========================================================================*/
static vir_bytes ct_set_fis(u8_t *ct, cmd_fis_t *fis, unsigned int tag)
static vir_bytes ct_set_fis(uint8_t *ct, cmd_fis_t *fis, unsigned int tag)
{
/* Fill in the Frame Information Structure part of a command table,
* and return the resulting FIS size (in bytes). We only support the
@@ -811,7 +811,7 @@ static vir_bytes ct_set_fis(u8_t *ct, cmd_fis_t *fis, unsigned int tag)
/*===========================================================================*
* ct_set_packet *
*===========================================================================*/
static void ct_set_packet(u8_t *ct, u8_t packet[ATAPI_PACKET_SIZE])
static void ct_set_packet(uint8_t *ct, uint8_t packet[ATAPI_PACKET_SIZE])
{
/* Fill in the packet part of a command table.
*/
@@ -822,7 +822,7 @@ static void ct_set_packet(u8_t *ct, u8_t packet[ATAPI_PACKET_SIZE])
/*===========================================================================*
* ct_set_prdt *
*===========================================================================*/
static void ct_set_prdt(u8_t *ct, prd_t *prdt, int nr_prds)
static void ct_set_prdt(uint8_t *ct, prd_t *prdt, int nr_prds)
{
/* Fill in the PRDT part of a command table.
*/
@@ -843,12 +843,12 @@ static void ct_set_prdt(u8_t *ct, prd_t *prdt, int nr_prds)
* port_set_cmd *
*===========================================================================*/
static void port_set_cmd(struct port_state *ps, int cmd, cmd_fis_t *fis,
u8_t packet[ATAPI_PACKET_SIZE], prd_t *prdt, int nr_prds, int write)
uint8_t packet[ATAPI_PACKET_SIZE], prd_t *prdt, int nr_prds, int write)
{
/* Prepare the given command for execution, by constructing a command
* table and setting up a command list entry pointing to the table.
*/
u8_t *ct;
uint8_t *ct;
u32_t *cl;
vir_bytes size;
@@ -1916,7 +1916,7 @@ static void port_alloc(struct port_state *ps)
ps->fis_phys = ps->mem_phys + fis_off;
assert(ps->fis_phys % AHCI_FIS_SIZE == 0);
ps->tmp_base = (u8_t *) (ps->mem_base + tmp_off);
ps->tmp_base = (uint8_t *) (ps->mem_base + tmp_off);
ps->tmp_phys = ps->mem_phys + tmp_off;
assert(ps->tmp_phys % AHCI_TMP_ALIGN == 0);
@@ -1987,7 +1987,7 @@ static void port_init(struct port_state *ps)
for (i = 0; i < NR_CMDS; i++)
init_timer(&ps->cmd_info[i].timer);
ps->reg = (u32_t *) ((u8_t *) hba_state.base +
ps->reg = (u32_t *) ((uint8_t *) hba_state.base +
AHCI_MEM_BASE_SIZE + AHCI_MEM_PORT_SIZE * (ps - port_state));
/* Allocate memory for the port. */
+7 -7
View File
@@ -241,15 +241,15 @@
* the contents of this structure are later converted to an actual FIS.
*/
typedef struct {
u8_t cf_cmd; /* Command */
u8_t cf_feat; /* Features */
uint8_t cf_cmd; /* Command */
uint8_t cf_feat; /* Features */
u32_t cf_lba; /* LBA (24-bit) */
u8_t cf_dev; /* Device */
uint8_t cf_dev; /* Device */
u32_t cf_lba_exp; /* LBA (exp) (24-bit) */
u8_t cf_feat_exp; /* Features (exp) */
u8_t cf_sec; /* Sector Count */
u8_t cf_sec_exp; /* Sector Count (exp) */
u8_t cf_ctl; /* Control */
uint8_t cf_feat_exp; /* Features (exp) */
uint8_t cf_sec; /* Sector Count */
uint8_t cf_sec_exp; /* Sector Count (exp) */
uint8_t cf_ctl; /* Control */
} cmd_fis_t;
/* Physical Region Descriptor (PRD). For internal and sys_vumap() use only;
+19 -19
View File
@@ -24,19 +24,19 @@
/* Common command block */
struct command {
u8_t precomp; /* REG_PRECOMP, etc. */
u8_t count;
u8_t sector;
u8_t cyl_lo;
u8_t cyl_hi;
u8_t ldh;
u8_t command;
uint8_t precomp; /* REG_PRECOMP, etc. */
uint8_t count;
uint8_t sector;
uint8_t cyl_lo;
uint8_t cyl_hi;
uint8_t ldh;
uint8_t command;
/* The following at for LBA48 */
u8_t count_prev;
u8_t sector_prev;
u8_t cyl_lo_prev;
u8_t cyl_hi_prev;
uint8_t count_prev;
uint8_t sector_prev;
uint8_t cyl_lo_prev;
uint8_t cyl_hi_prev;
};
/* Timeouts and max retries. */
@@ -84,7 +84,7 @@ int w_command; /* current command in execution */
static int w_drive; /* selected drive */
static struct device *w_dv; /* device's base and size */
static u8_t *tmp_buf;
static uint8_t *tmp_buf;
#define ATA_DMA_SECTORS 64
#define ATA_DMA_BUF_SIZE (ATA_DMA_SECTORS*SECTOR_SIZE)
@@ -98,8 +98,8 @@ struct prdte
{
phys_bytes prdte_base;
u16_t prdte_count;
u8_t prdte_reserved;
u8_t prdte_flags;
uint8_t prdte_reserved;
uint8_t prdte_flags;
};
#define PRDT_BYTES (sizeof(struct prdte) * N_PRDTE)
@@ -137,7 +137,7 @@ static int at_intr_wait(void);
static int w_waitfor(int mask, int value);
static int w_waitfor_dma(unsigned int mask, unsigned int value);
static void w_geometry(devminor_t minor, struct part_geom *entry);
static int atapi_sendpacket(u8_t *packet, unsigned cnt, int do_dma);
static int atapi_sendpacket(uint8_t *packet, unsigned cnt, int do_dma);
static int atapi_intr_wait(int dma, size_t max);
static int atapi_open(void);
static void atapi_close(void);
@@ -356,7 +356,7 @@ static void w_init(int devind, u16_t vid, u16_t did)
* from the PCI slot if it is there.
*/
int r, irq, native_hook, compat_hook, is_ide, nhooks;
u8_t bcr, scr, interface;
uint8_t bcr, scr, interface;
u16_t cr;
u32_t base_cmd, base_ctl, base_dma;
@@ -1745,7 +1745,7 @@ static void atapi_close(void)
static void sense_request(void)
{
int r, i;
static u8_t sense[100], packet[ATAPI_PACKETSIZE];
static uint8_t sense[100], packet[ATAPI_PACKETSIZE];
packet[0] = SCSI_SENSE;
packet[1] = 0;
@@ -1790,7 +1790,7 @@ static int atapi_transfer(
unsigned long block;
u64_t dv_size = w_dv->dv_size;
unsigned nbytes, nblocks, before, chunk;
static u8_t packet[ATAPI_PACKETSIZE];
static uint8_t packet[ATAPI_PACKETSIZE];
size_t addr_offset = 0;
int dmabytes = 0, piobytes = 0;
ssize_t total = 0;
@@ -1974,7 +1974,7 @@ static int atapi_transfer(
* atapi_sendpacket *
*===========================================================================*/
static int atapi_sendpacket(packet, cnt, do_dma)
u8_t *packet;
uint8_t *packet;
unsigned cnt;
int do_dma;
{
+20 -20
View File
@@ -159,14 +159,14 @@
* 3 720K 1.44M 9 80 300 RPM 250 kbps PS/2, et al.
*/
static struct density {
u8_t secpt; /* sectors per track */
u8_t cyls; /* tracks per side */
u8_t steps; /* steps per cylinder (2 = double step) */
u8_t test; /* sector to try for density test */
u8_t rate; /* data rate (2=250, 1=300, 0=500 kbps) */
uint8_t secpt; /* sectors per track */
uint8_t cyls; /* tracks per side */
uint8_t steps; /* steps per cylinder (2 = double step) */
uint8_t test; /* sector to try for density test */
uint8_t rate; /* data rate (2=250, 1=300, 0=500 kbps) */
clock_t start_ms; /* motor start (milliseconds) */
u8_t gap; /* gap size */
u8_t spec1; /* first specify byte (SRT/HUT) */
uint8_t gap; /* gap size */
uint8_t spec1; /* first specify byte (SRT/HUT) */
} fdensity[NT] = {
{ 9, 40, 1, 4*9, 2, 500, 0x2A, 0xDF }, /* 360K / 360K */
{ 15, 80, 1, 14, 0, 500, 0x1B, 0xDF }, /* 1.2M / 1.2M */
@@ -188,8 +188,8 @@ static struct density {
#define b(d) (1 << (d)) /* bit for density d. */
static struct test_order {
u8_t t_density; /* floppy/drive type */
u8_t t_class; /* limit drive to this class of densities */
uint8_t t_density; /* floppy/drive type */
uint8_t t_class; /* limit drive to this class of densities */
} test_order[NT-1] = {
{ 6, b(3) | b(6) }, /* 1.44M {720K, 1.44M} */
{ 1, b(1) | b(4) | b(5) }, /* 1.2M {1.2M, 360K, 720K} */
@@ -210,8 +210,8 @@ static struct floppy { /* main drive struct, one entry per drive */
unsigned fl_sector; /* sector addressed */
unsigned fl_head; /* head number addressed */
char fl_calibration; /* CALIBRATED or UNCALIBRATED */
u8_t fl_density; /* NO_DENS = ?, 0 = 360K; 1 = 360K/1.2M; etc.*/
u8_t fl_class; /* bitmap for possible densities */
uint8_t fl_density; /* NO_DENS = ?, 0 = 360K; 1 = 360K/1.2M; etc.*/
uint8_t fl_class; /* bitmap for possible densities */
minix_timer_t fl_tmr_stop; /* timer to stop motor */
struct device fl_geom; /* Geometry of the drive */
struct device fl_part[NR_PARTITIONS]; /* partition's base & size */
@@ -229,7 +229,7 @@ static unsigned f_sectors; /* equal to f_dp->secpt (needed a lot) */
u16_t f_busy; /* BSY_IDLE, BSY_IO, BSY_WAKEN */
static struct device *f_dv; /* device's base and size */
static struct disk_parameter_s fmt_param; /* parameters for format */
static u8_t f_results[MAX_RESULTS];/* the controller can give lots of output */
static uint8_t f_results[MAX_RESULTS];/* the controller can give lots of output */
/* The floppy uses various timers. These are managed by the floppy driver
* itself, because only a single synchronous alarm is available per process.
@@ -252,7 +252,7 @@ static void start_motor(void);
static int seek(void);
static int fdc_transfer(int do_write);
static int fdc_results(void);
static int fdc_command(const u8_t *cmd, int len);
static int fdc_command(const uint8_t *cmd, int len);
static void fdc_out(int val);
static int recalibrate(void);
static void f_reset(void);
@@ -461,7 +461,7 @@ static ssize_t f_transfer(
unsigned long position;
signed long uoffsets[MAX_SECTORS], *up;
cp_grant_id_t ugrants[MAX_SECTORS], *ug = NULL;
u8_t cmd[3];
uint8_t cmd[3];
ssize_t total;
if (f_prepare(minor) == NULL) return(ENXIO);
@@ -808,7 +808,7 @@ static int seek(void)
int r;
message mess;
int ipc_status;
u8_t cmd[3];
uint8_t cmd[3];
/* Are we already on the correct cylinder? */
if (fp->fl_calibration == UNCALIBRATED)
@@ -869,7 +869,7 @@ static int fdc_transfer(int do_write)
struct floppy *fp = f_fp;
int r, s;
u8_t cmd[9];
uint8_t cmd[9];
/* Never attempt a transfer if the drive is uncalibrated or motor is off. */
if (fp->fl_calibration == UNCALIBRATED) return(ERR_TRANSFER);
@@ -985,7 +985,7 @@ static int fdc_results(void)
* fdc_command *
*===========================================================================*/
static int fdc_command(
const u8_t *cmd, /* command bytes */
const uint8_t *cmd, /* command bytes */
int len /* command length */
)
{
@@ -1055,7 +1055,7 @@ static int recalibrate(void)
struct floppy *fp = f_fp;
int r;
u8_t cmd[2];
uint8_t cmd[2];
/* Issue the RECALIBRATE command and wait for the interrupt. */
cmd[0] = FDC_RECALIBRATE; /* tell drive to recalibrate itself */
@@ -1106,7 +1106,7 @@ static void f_reset(void)
* 3) the sense interrupt clears the interrupt (not clear which one).
* and for some reason the reset does not work.
*/
(void) fdc_command((u8_t *) 0, 0); /* need only the timer */
(void) fdc_command((uint8_t *) 0, 0); /* need only the timer */
motor_status = 0;
pv_set(byte_out[0], DOR, 0); /* strobe reset bit low */
pv_set(byte_out[1], DOR, ENABLE_INT); /* strobe it high again */
@@ -1219,7 +1219,7 @@ static int read_id(void)
struct floppy *fp = f_fp;
int result;
u8_t cmd[2];
uint8_t cmd[2];
/* Never attempt a read id if the drive is uncalibrated or motor is off. */
if (fp->fl_calibration == UNCALIBRATED) return(ERR_READ_ID);
@@ -94,7 +94,7 @@ static int virtio_blk_device(devminor_t minor, device_id_t *id);
static int virtio_blk_flush(void);
static void virtio_blk_terminate(void);
static void virtio_blk_cleanup(void);
static int virtio_blk_status2error(u8_t status);
static int virtio_blk_status2error(uint8_t status);
static int virtio_blk_alloc_requests(void);
static void virtio_blk_free_requests(void);
static int virtio_blk_feature_setup(void);
@@ -351,7 +351,7 @@ virtio_blk_transfer(devminor_t minor, int write, u64_t position,
/* Put the status at the end */
phys[pcnt + 1].vp_addr = status_phys + tid * sizeof(status_vir[0]);
phys[pcnt + 1].vp_size = sizeof(u8_t);
phys[pcnt + 1].vp_size = sizeof(uint8_t);
/* Status always needs write access */
phys[1 + pcnt].vp_addr |= 1;
@@ -546,7 +546,7 @@ virtio_blk_cleanup(void)
}
static int
virtio_blk_status2error(u8_t status)
virtio_blk_status2error(uint8_t status)
{
/* Convert a status from the host to an error */
switch (status) {
@@ -54,8 +54,8 @@ struct virtio_blk_config {
/* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */
struct virtio_blk_geometry {
u16_t cylinders;
u8_t heads;
u8_t sectors;
uint8_t heads;
uint8_t sectors;
} geometry;
/* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */
@@ -63,9 +63,9 @@ struct virtio_blk_config {
/* the next 4 entries are guarded by VIRTIO_BLK_F_TOPOLOGY */
/* exponent for physical block per logical block. */
u8_t physical_block_exp;
uint8_t physical_block_exp;
/* alignment offset in logical blocks. */
u8_t alignment_offset;
uint8_t alignment_offset;
/* minimum I/O size without performance penalty in logical blocks. */
u16_t min_io_size;
/* optimal sustained I/O size in logical blocks. */
+5 -5
View File
@@ -26,7 +26,7 @@ static int pool_ind[TOTAL_SOURCES];
static SHA256_CTX pool_ctx[NR_POOLS];
static unsigned samples= 0;
static int got_seeded= 0;
static u8_t random_key[2*AES_BLOCKSIZE];
static uint8_t random_key[2*AES_BLOCKSIZE];
static u32_t count_lo, count_hi;
static u32_t reseed_count;
@@ -83,9 +83,9 @@ void *buf;
size_t size;
{
int n, r;
u8_t *cp;
uint8_t *cp;
rd_keyinstance key;
u8_t output[AES_BLOCKSIZE];
uint8_t output[AES_BLOCKSIZE];
r= rijndael_makekey(&key, sizeof(random_key), random_key);
assert(r == 0);
@@ -183,7 +183,7 @@ rd_keyinstance *keyp;
void *data;
{
int r;
u8_t input[AES_BLOCKSIZE];
uint8_t input[AES_BLOCKSIZE];
memset(input, '\0', sizeof(input));
@@ -207,7 +207,7 @@ static void reseed()
{
int i;
SHA256_CTX ctx;
u8_t digest[SHA256_DIGEST_LENGTH];
uint8_t digest[SHA256_DIGEST_LENGTH];
if (samples < MIN_SAMPLES)
return;
+1 -1
View File
@@ -913,7 +913,7 @@ tty_t *tp;
/* Initialize the screen driver. */
console_t *cons;
u16_t bios_columns, bios_crtbase, bios_fontlines;
u8_t bios_rows;
uint8_t bios_rows;
int line;
int s;
static int vdu_initialized = 0;
+2 -2
View File
@@ -604,7 +604,7 @@ hub_port_feature(int port_num, class_code code, class_feature feature)
/* Standard get endpoint request */
setup_buf.bRequestType = 0x23;
setup_buf.bRequest = (u8_t)code;
setup_buf.bRequest = (uint8_t)code;
setup_buf.wValue = (u16_t)feature;
setup_buf.wIndex = (u16_t)port_num;
setup_buf.wLength = 0;
@@ -659,7 +659,7 @@ hub_get_port_status(int port_num, hub_port_status * p)
/* Standard get endpoint request */
setup_buf.bRequestType = 0xA3;
setup_buf.bRequest = (u8_t)GET_STATUS;
setup_buf.bRequest = (uint8_t)GET_STATUS;
setup_buf.wValue = 0x00;
setup_buf.wIndex = (u16_t)port_num;
setup_buf.wLength = sizeof(*p);
+1 -1
View File
@@ -350,7 +350,7 @@ paint_restartlogo(int minor)
static void
paint_centered(int minor, char *data, int width, int height)
{
u8_t pixel[3];
uint8_t pixel[3];
u32_t i, min_x, min_y, max_x, max_y, x_painted = 0, rows = 0;
int r, bytespp;
struct device dev;
+1 -1
View File
@@ -458,7 +458,7 @@ static int store_pages(int conn, int req, vbox_param_t *inp, size_t *offp)
return OK;
pagelist = (struct VMMDevHGCMPageList *)
(((u8_t *) hgcm_conn[conn].req[req].ptr) + *offp);
(((uint8_t *) hgcm_conn[conn].req[req].ptr) + *offp);
pagelist->flags = 0;
if (inp->ptr.dir & VBOX_DIR_IN)
+6 -6
View File
@@ -46,24 +46,24 @@ EXTERN struct inode {
u32_t i_faddr; /* Fragment address */
union {
struct {
u8_t l_i_frag; /* Fragment number */
u8_t l_i_fsize; /* Fragment size */
uint8_t l_i_frag; /* Fragment number */
uint8_t l_i_fsize; /* Fragment size */
u16_t i_pad1;
u16_t l_i_uid_high; /* these 2 fields */
u16_t l_i_gid_high; /* were reserved2[0] */
u32_t l_i_reserved2;
} linux2;
struct {
u8_t h_i_frag; /* Fragment number */
u8_t h_i_fsize; /* Fragment size */
uint8_t h_i_frag; /* Fragment number */
uint8_t h_i_fsize; /* Fragment size */
u16_t h_i_mode_high;
u16_t h_i_uid_high;
u16_t h_i_gid_high;
u32_t h_i_author;
} hurd2;
struct {
u8_t m_i_frag; /* Fragment number */
u8_t m_i_fsize; /* Fragment size */
uint8_t m_i_frag; /* Fragment number */
uint8_t m_i_fsize; /* Fragment size */
u16_t m_pad1;
u32_t m_i_reserved2[2];
} masix2;
+7 -7
View File
@@ -55,7 +55,7 @@ EXTERN struct super_block {
u32_t s_feature_compat; /* compatible feature set */
u32_t s_feature_incompat; /* incompatible feature set */
u32_t s_feature_ro_compat; /* readonly-compatible feature set */
u8_t s_uuid[16]; /* 128-bit uuid for volume */
uint8_t s_uuid[16]; /* 128-bit uuid for volume */
char s_volume_name[16]; /* volume name */
char s_last_mounted[64]; /* directory where last mounted */
u32_t s_algorithm_usage_bitmap; /* For compression */
@@ -63,19 +63,19 @@ EXTERN struct super_block {
* Performance hints. Directory preallocation should only
* happen if the EXT2_COMPAT_PREALLOC flag is on.
*/
u8_t s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
u8_t s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
uint8_t s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
uint8_t s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
u16_t s_padding1;
/*
* Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set.
*/
u8_t s_journal_uuid[16]; /* uuid of journal superblock */
uint8_t s_journal_uuid[16]; /* uuid of journal superblock */
u32_t s_journal_inum; /* inode number of journal file */
u32_t s_journal_dev; /* device number of journal file */
u32_t s_last_orphan; /* start of list of inodes to delete */
u32_t s_hash_seed[4]; /* HTREE hash seed */
u8_t s_def_hash_version; /* Default hash version to use */
u8_t s_reserved_char_pad;
uint8_t s_def_hash_version; /* Default hash version to use */
uint8_t s_reserved_char_pad;
u16_t s_reserved_word_pad;
u32_t s_default_mount_opts;
u32_t s_first_meta_bg; /* First metablock block group */
@@ -87,7 +87,7 @@ EXTERN struct super_block {
u32_t s_gdb_count; /* Number of group descriptor blocks */
u32_t s_desc_per_block; /* Number of group descriptors per block */
u32_t s_groups_count; /* Number of groups in the fs */
u8_t s_blocksize_bits; /* Used to calculate offsets
uint8_t s_blocksize_bits; /* Used to calculate offsets
* (e.g. inode block),
* always s_log_block_size+10.
*/
+8 -8
View File
@@ -36,24 +36,24 @@ typedef struct {
u32_t i_faddr; /* Fragment address */
union {
struct {
u8_t l_i_frag; /* Fragment number */
u8_t l_i_fsize; /* Fragment size */
uint8_t l_i_frag; /* Fragment number */
uint8_t l_i_fsize; /* Fragment size */
u16_t i_pad1;
u16_t l_i_uid_high; /* these 2 fields */
u16_t l_i_gid_high; /* were reserved2[0] */
u32_t l_i_reserved2;
} linux2;
struct {
u8_t h_i_frag; /* Fragment number */
u8_t h_i_fsize; /* Fragment size */
uint8_t h_i_frag; /* Fragment number */
uint8_t h_i_fsize; /* Fragment size */
u16_t h_i_mode_high;
u16_t h_i_uid_high;
u16_t h_i_gid_high;
u32_t h_i_author;
} hurd2;
struct {
u8_t m_i_frag; /* Fragment number */
u8_t m_i_fsize; /* Fragment size */
uint8_t m_i_frag; /* Fragment number */
uint8_t m_i_fsize; /* Fragment size */
u16_t m_pad1;
u32_t m_i_reserved2[2];
} masix2;
@@ -70,8 +70,8 @@ typedef struct {
struct ext2_disk_dir_desc {
u32_t d_ino;
u16_t d_rec_len;
u8_t d_name_len;
u8_t d_file_type;
uint8_t d_name_len;
uint8_t d_file_type;
char d_name[1];
};
+11 -11
View File
@@ -5,18 +5,18 @@ struct iso9660_dir_record {
/*
* ISO standard directory record.
*/
u8_t length; /* The length of the record */
u8_t ext_attr_rec_length;
uint8_t length; /* The length of the record */
uint8_t ext_attr_rec_length;
u32_t loc_extent_l; /* The same data (in this case loc_extent)is */
u32_t loc_extent_m; /* saved in two ways. The first puts the le- */
u32_t data_length_l; /* ast significant byte first, the second */
u32_t data_length_m; /* does the opposite */
u8_t rec_date[7]; /* => recording date */
u8_t file_flags; /* => flags of the file */
u8_t file_unit_size; /* set of blocks in interleave mode */
u8_t inter_gap_size; /* gap between file units in interleave mode */
uint8_t rec_date[7]; /* => recording date */
uint8_t file_flags; /* => flags of the file */
uint8_t file_unit_size; /* set of blocks in interleave mode */
uint8_t inter_gap_size; /* gap between file units in interleave mode */
u32_t vol_seq_number; /* volume sequence number: not used */
u8_t length_file_id; /* Length name file */
uint8_t length_file_id; /* Length name file */
char file_id[ISO9660_MAX_FILE_ID_LEN]; /* file name */
} __attribute__((packed));
@@ -24,10 +24,10 @@ struct rrii_dir_record {
/*
* Rock Ridge directory record extensions.
*/
u8_t mtime[7]; /* stat.st_mtime */
u8_t atime[7]; /* stat.st_atime */
u8_t ctime[7]; /* stat.st_ctime */
u8_t birthtime[7]; /* stat.st_birthtime */
uint8_t mtime[7]; /* stat.st_mtime */
uint8_t atime[7]; /* stat.st_atime */
uint8_t ctime[7]; /* stat.st_ctime */
uint8_t birthtime[7]; /* stat.st_birthtime */
mode_t d_mode; /* file mode */
uid_t uid; /* user ID of the file's owner */
+2 -2
View File
@@ -68,5 +68,5 @@ void free_extent(struct dir_extent *extent);
struct buf* read_extent_block(struct dir_extent *e, size_t block);
size_t get_extent_absolute_block_id(struct dir_extent *e, size_t block);
time_t date7_to_time_t(const u8_t *date);
void* alloc_mem(size_t s);
time_t date7_to_time_t(const uint8_t *date);
void* alloc_mem(size_t s);
+10 -10
View File
@@ -16,16 +16,16 @@ struct iso9660_vol_pri_desc {
* On-disk structure format of the primary volume descriptor,
* 2048 bytes long. See ISO specs for details.
*/
u8_t vd_type;
uint8_t vd_type;
char standard_id[ISO9660_SIZE_STANDARD_ID];
u8_t vd_version;
u8_t pad1;
uint8_t vd_version;
uint8_t pad1;
char system_id[ISO9660_SIZE_SYS_ID];
char volume_id[ISO9660_SIZE_VOLUME_ID];
u8_t pad2[8];
uint8_t pad2[8];
u32_t volume_space_size_l;
u32_t volume_space_size_m;
u8_t pad3[32];
uint8_t pad3[32];
u16_t volume_set_size_l;
u16_t volume_set_size_m;
u16_t volume_sequence_number_l;
@@ -38,7 +38,7 @@ struct iso9660_vol_pri_desc {
u32_t loc_opt_l_occ_path_table;
u32_t loc_m_occ_path_table;
u32_t loc_opt_m_occ_path_table;
u8_t root_directory[34];
uint8_t root_directory[34];
char volume_set_id[ISO9660_SIZE_VOLUME_SET_ID];
char publisher_id[ISO9660_SIZE_PUBLISHER_ID];
char data_preparer_id[ISO9660_SIZE_DATA_PREP_ID];
@@ -50,10 +50,10 @@ struct iso9660_vol_pri_desc {
char volume_mod_date[ISO9660_SIZE_DATE17];
char volume_exp_date[ISO9660_SIZE_DATE17];
char volume_eff_date[ISO9660_SIZE_DATE17];
u8_t file_struct_ver;
u8_t reserved1;
u8_t application_use[512];
u8_t reserved2[652];
uint8_t file_struct_ver;
uint8_t reserved1;
uint8_t application_use[512];
uint8_t reserved2[652];
/* End of the on-disk structure format. */
+6 -6
View File
@@ -12,8 +12,8 @@ int parse_susp(struct rrii_dir_record *dir, char *buffer)
{
/* Parse fundamental SUSP entries */
char susp_signature[2];
u8_t susp_length;
u8_t susp_version;
uint8_t susp_length;
uint8_t susp_version;
u32_t ca_block_nr;
u32_t ca_offset;
u32_t ca_length;
@@ -22,8 +22,8 @@ int parse_susp(struct rrii_dir_record *dir, char *buffer)
susp_signature[0] = buffer[0];
susp_signature[1] = buffer[1];
susp_length = *((u8_t*)buffer + 2);
susp_version = *((u8_t*)buffer + 3);
susp_length = *((uint8_t*)buffer + 2);
susp_version = *((uint8_t*)buffer + 3);
if ((susp_signature[0] == 'C') && (susp_signature[1] == 'E') &&
(susp_length >= 28) && (susp_version >= 1)) {
@@ -88,7 +88,7 @@ void parse_susp_buffer(struct rrii_dir_record *dir, char *buffer, u32_t size)
* routed from here to the relevant handling functions.
*/
char susp_signature[2];
u8_t susp_length;
uint8_t susp_length;
int parser_return;
@@ -99,7 +99,7 @@ void parse_susp_buffer(struct rrii_dir_record *dir, char *buffer, u32_t size)
susp_signature[0] = buffer[0];
susp_signature[1] = buffer[1];
susp_length = *((u8_t*)buffer + 2);
susp_length = *((uint8_t*)buffer + 2);
/* Check if SUSP entry is present. */
if (((susp_signature[0] == 0) && (susp_signature[1] == 0)) ||
+7 -7
View File
@@ -48,11 +48,11 @@ void parse_susp_rock_ridge_sl(struct rrii_dir_record *dir, char *buffer, int len
/* Parse a Rock Ridge SUSP symbolic link entry (SL). */
int offset = 0;
int slink_size;
u8_t flags, component_length;
uint8_t flags, component_length;
while (offset + 2 <= length) {
flags = *((u8_t*)(buffer + offset));
component_length = *((u8_t*)(buffer + offset + 1));
flags = *((uint8_t*)(buffer + offset));
component_length = *((uint8_t*)(buffer + offset + 1));
/* Add directory separator if necessary. */
if (strcmp(dir->slink_rrip, "") != 0 &&
@@ -135,8 +135,8 @@ int parse_susp_rock_ridge(struct rrii_dir_record *dir, char *buffer)
{
/* Parse Rock Ridge SUSP entries for a directory entry. */
char susp_signature[2];
u8_t susp_length;
u8_t susp_version;
uint8_t susp_length;
uint8_t susp_version;
int rrii_name_current_size;
int rrii_name_append_size;
@@ -149,8 +149,8 @@ int parse_susp_rock_ridge(struct rrii_dir_record *dir, char *buffer)
susp_signature[0] = buffer[0];
susp_signature[1] = buffer[1];
susp_length = *((u8_t*)buffer + 2);
susp_version = *((u8_t*)buffer + 3);
susp_length = *((uint8_t*)buffer + 2);
susp_version = *((uint8_t*)buffer + 3);
if ((susp_signature[0] == 'P') && (susp_signature[1] == 'X') &&
(susp_length >= 36) && (susp_version >= 1)) {
+1 -1
View File
@@ -49,7 +49,7 @@ size_t get_extent_absolute_block_id(struct dir_extent *e, size_t block) {
return e->location + block - extent_offset;
}
time_t date7_to_time_t(const u8_t *date) {
time_t date7_to_time_t(const uint8_t *date) {
/*
* This function converts from the ISO 9660 7-byte time format to a
* time_t.
+1 -1
View File
@@ -118,7 +118,7 @@ static void
root_pci(void)
{
u16_t vid, did, subvid, subdid;
u8_t bcr, scr, pifr, rev;
uint8_t bcr, scr, pifr, rev;
char *slot_name, *dev_name;
int r, devind;
static int first = TRUE;
+10 -10
View File
@@ -10,17 +10,17 @@
struct segdesc_s { /* segment descriptor for protected mode */
u16_t limit_low;
u16_t base_low;
u8_t base_middle;
u8_t access; /* |P|DL|1|X|E|R|A| */
u8_t granularity; /* |G|X|0|A|LIMT| */
u8_t base_high;
uint8_t base_middle;
uint8_t access; /* |P|DL|1|X|E|R|A| */
uint8_t granularity; /* |G|X|0|A|LIMT| */
uint8_t base_high;
} __attribute__((packed));
struct gatedesc_s {
u16_t offset_low;
u16_t selector;
u8_t pad; /* |000|XXXXX| ig & trpg, |XXXXXXXX| task g */
u8_t p_dpl_type; /* |P|DL|0|TYPE| */
uint8_t pad; /* |000|XXXXX| ig & trpg, |XXXXXXXX| task g */
uint8_t p_dpl_type; /* |P|DL|0|TYPE| */
u16_t offset_high;
} __attribute__((packed));
@@ -37,10 +37,10 @@ typedef struct segframe {
} segframe_t;
struct cpu_info {
u8_t vendor;
u8_t family;
u8_t model;
u8_t stepping;
uint8_t vendor;
uint8_t family;
uint8_t model;
uint8_t stepping;
u32_t freq; /* in MHz */
u32_t flags[2];
};
+2 -2
View File
@@ -10,7 +10,7 @@
#define _DEVIO_H
#include <minix/sys_config.h> /* needed to include <minix/type.h> */
#include <sys/types.h> /* u8_t, u16_t, u32_t needed */
#include <sys/types.h> /* uint8_t, u16_t, u32_t needed */
typedef u16_t port_t;
@@ -18,7 +18,7 @@ typedef u16_t port_t;
* Also see <ibm/portio.h>, which has functions for bytes, words,
* and longs. Hence, we need different (port,value)-pair types.
*/
typedef struct { u16_t port; u8_t value; } pvb_pair_t;
typedef struct { u16_t port; uint8_t value; } pvb_pair_t;
typedef struct { u16_t port; u16_t value; } pvw_pair_t;
typedef struct { u16_t port; u32_t value; } pvl_pair_t;
+5 -5
View File
@@ -719,7 +719,7 @@ typedef struct {
int fd;
int backlog;
u8_t padding[48];
uint8_t padding[48];
} mess_lc_vfs_listen;
_ASSERT_MSG_SIZE(mess_lc_vfs_listen);
@@ -2387,15 +2387,15 @@ typedef struct {
ino_t ino;
void *block;
u32_t *flags_ptr;
u8_t pages;
u8_t flags;
uint8_t pages;
uint8_t flags;
uint8_t padding[12];
} mess_vmmcp;
_ASSERT_MSG_SIZE(mess_vmmcp);
typedef struct {
void *addr;
u8_t flags;
uint8_t flags;
uint8_t padding[51];
} mess_vmmcp_reply;
_ASSERT_MSG_SIZE(mess_vmmcp_reply);
@@ -2667,7 +2667,7 @@ typedef struct noxfer_message {
mess_vmmcp m_vmmcp;
mess_vmmcp_reply m_vmmcp_reply;
u8_t size[56]; /* message payload may have 56 bytes at most */
uint8_t size[56]; /* message payload may have 56 bytes at most */
};
} message __ALIGNED(16);
+1 -1
View File
@@ -12,7 +12,7 @@ Created: Jan 15, 1992 by Philip Homburg
unsigned inb(u16_t _port);
unsigned inw(u16_t _port);
unsigned inl(u16_t _port);
void outb(u16_t _port, u8_t _value);
void outb(u16_t _port, uint8_t _value);
void outw(u16_t _port, u16_t _value);
void outl(u16_t _port, u32_t _value);
void intr_disable(void);
+4 -4
View File
@@ -232,15 +232,15 @@ int sys_padconf(u32_t padconf, u32_t mask, u32_t value);
void pci_init(void);
int pci_first_dev(int *devindp, u16_t *vidp, u16_t *didp);
int pci_next_dev(int *devindp, u16_t *vidp, u16_t *didp);
int pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp);
int pci_find_dev(uint8_t bus, uint8_t dev, uint8_t func, int *devindp);
void pci_reserve(int devind);
int pci_reserve_ok(int devind);
void pci_ids(int devind, u16_t *vidp, u16_t *didp);
void pci_rescan_bus(u8_t busnr);
u8_t pci_attr_r8(int devind, int port);
void pci_rescan_bus(uint8_t busnr);
uint8_t pci_attr_r8(int devind, int port);
u16_t pci_attr_r16(int devind, int port);
u32_t pci_attr_r32(int devind, int port);
void pci_attr_w8(int devind, int port, u8_t value);
void pci_attr_w8(int devind, int port, uint8_t value);
void pci_attr_w16(int devind, int port, u16_t value);
void pci_attr_w32(int devind, int port, u32_t value);
char *pci_dev_name(u16_t vid, u16_t did);
+8 -8
View File
@@ -32,13 +32,13 @@ struct usb_device_id {
u16_t idProduct;
u32_t bcdDevice;
u8_t bDeviceClass;
u8_t bDeviceSubClass;
u8_t bDeviceProtocol;
uint8_t bDeviceClass;
uint8_t bDeviceSubClass;
uint8_t bDeviceProtocol;
u8_t bInterfaceClass;
u8_t bInterfaceSubClass;
u8_t bInterfaceProtocol;
uint8_t bInterfaceClass;
uint8_t bInterfaceSubClass;
uint8_t bInterfaceProtocol;
};
struct usb_iso_packet_desc {
@@ -96,8 +96,8 @@ struct usb_urb {
};
struct usb_ctrlrequest {
u8_t bRequestType;
u8_t bRequest;
uint8_t bRequestType;
uint8_t bRequest;
u16_t wValue;
u16_t wIndex;
u16_t wLength;
+3 -3
View File
@@ -46,9 +46,9 @@
#include <sys/types.h>
typedef u8_t uByte;
typedef u8_t uWord[2];
typedef u8_t uDWord[4];
typedef uint8_t uByte;
typedef uint8_t uWord[2];
typedef uint8_t uDWord[4];
#define USETW2(w,h,l) ((w)[0] = (u_int8_t)(l), (w)[1] = (u_int8_t)(h))
+7 -7
View File
@@ -37,9 +37,9 @@
/* Feature description */
struct virtio_feature {
const char *name;
u8_t bit;
u8_t host_support;
u8_t guest_support;
uint8_t bit;
uint8_t host_support;
uint8_t guest_support;
};
/* Forward declaration of struct virtio_device.
@@ -117,10 +117,10 @@ int virtio_had_irq(struct virtio_device *dev);
u32_t virtio_read32(struct virtio_device *dev, i32_t offset);
u16_t virtio_read16(struct virtio_device *dev, i32_t offset);
u8_t virtio_read8(struct virtio_device *dev, i32_t offset);
uint8_t virtio_read8(struct virtio_device *dev, i32_t offset);
void virtio_write32(struct virtio_device *dev, i32_t offset, u32_t val);
void virtio_write16(struct virtio_device *dev, i32_t offset, u16_t val);
void virtio_write8(struct virtio_device *dev, i32_t offset, u8_t val);
void virtio_write8(struct virtio_device *dev, i32_t offset, uint8_t val);
/*
@@ -132,9 +132,9 @@ void virtio_write8(struct virtio_device *dev, i32_t offset, u8_t val);
*/
u32_t virtio_sread32(struct virtio_device *dev, i32_t offset);
u16_t virtio_sread16(struct virtio_device *dev, i32_t offset);
u8_t virtio_sread8(struct virtio_device *dev, i32_t offset);
uint8_t virtio_sread8(struct virtio_device *dev, i32_t offset);
void virtio_swrite32(struct virtio_device *dev, i32_t offset, u32_t val);
void virtio_swrite16(struct virtio_device *dev, i32_t offset, u16_t val);
void virtio_swrite8(struct virtio_device *dev, i32_t offset, u8_t val);
void virtio_swrite8(struct virtio_device *dev, i32_t offset, uint8_t val);
#endif /* _MINIX_VIRTIO_H */
+9 -9
View File
@@ -6,10 +6,10 @@
#define __NET__GEN__DHCP_H__
typedef struct dhcp {
u8_t op; /* Message opcode/type. */
u8_t htype; /* Hardware address type. */
u8_t hlen; /* Hardware address length. */
u8_t hops; /* Hop count when relaying. */
uint8_t op; /* Message opcode/type. */
uint8_t htype; /* Hardware address type. */
uint8_t hlen; /* Hardware address length. */
uint8_t hops; /* Hop count when relaying. */
u32_t xid; /* Transaction ID. */
u16_t secs; /* Seconds past since client began. */
u16_t flags; /* Flags. */
@@ -17,11 +17,11 @@ typedef struct dhcp {
ipaddr_t yiaddr; /* "Your" IP address. */
ipaddr_t siaddr; /* Boot server IP address. */
ipaddr_t giaddr; /* Relay agent (gateway) IP address. */
u8_t chaddr[16]; /* Client hardware address. */
u8_t sname[64]; /* Server host name. */
u8_t file[128]; /* Boot file. */
uint8_t chaddr[16]; /* Client hardware address. */
uint8_t sname[64]; /* Server host name. */
uint8_t file[128]; /* Boot file. */
u32_t magic; /* Magic number. */
u8_t options[308]; /* Optional parameters. */
uint8_t options[308]; /* Optional parameters. */
} dhcp_t;
/* DHCP operations and stuff: */
@@ -68,6 +68,6 @@ typedef struct dhcp {
void dhcp_init(dhcp_t *_dp);
int dhcp_settag(dhcp_t *_dp, int _tag, void *_data, size_t _len);
int dhcp_gettag(dhcp_t *_dp, int _searchtag, u8_t **_pdata, size_t *_plen);
int dhcp_gettag(dhcp_t *_dp, int _searchtag, uint8_t **_pdata, size_t *_plen);
#endif /* __NET__GEN__DHCP_H__ */
+6 -6
View File
@@ -18,15 +18,15 @@ typedef struct icmp_ip_id
typedef struct icmp_ram /* RFC 1256 */
{
u8_t iram_na;
u8_t iram_aes;
uint8_t iram_na;
uint8_t iram_aes;
u16_t iram_lt;
} icmp_ram_t;
typedef struct icmp_pp
{
u8_t ipp_ptr;
u8_t ipp_unused[3];
uint8_t ipp_ptr;
uint8_t ipp_unused[3];
} icmp_pp_t;
typedef struct icmp_mtu /* RFC 1191 */
@@ -37,7 +37,7 @@ typedef struct icmp_mtu /* RFC 1191 */
typedef struct icmp_hdr
{
u8_t ih_type, ih_code;
uint8_t ih_type, ih_code;
u16_t ih_chksum;
union
{
@@ -51,7 +51,7 @@ typedef struct icmp_hdr
union
{
icmp_ip_id_t ihd_ipid;
u8_t uhd_data[1];
uint8_t uhd_data[1];
} ih_dun;
} icmp_hdr_t;
+3 -3
View File
@@ -26,11 +26,11 @@ server/ip/gen/in.h
#define IP_MC_ALL_SYSTEMS 0xE0000001 /* 224.0.0.1 */
typedef u32_t ipaddr_t;
typedef u8_t ipproto_t;
typedef uint8_t ipproto_t;
typedef struct ip_hdropt
{
u8_t iho_opt_siz;
u8_t iho_data[IP_MAX_HDR_SIZE-IP_MIN_HDR_SIZE];
uint8_t iho_opt_siz;
uint8_t iho_data[IP_MAX_HDR_SIZE-IP_MIN_HDR_SIZE];
} ip_hdropt_t;
#endif /* __SERVER__IP__GEN__IN_H__ */
+2 -2
View File
@@ -7,12 +7,12 @@ server/ip/gen/ip_hdr.h
typedef struct ip_hdr
{
u8_t ih_vers_ihl,
uint8_t ih_vers_ihl,
ih_tos;
u16_t ih_length,
ih_id,
ih_flags_fragoff;
u8_t ih_ttl,
uint8_t ih_ttl,
ih_proto;
u16_t ih_hdr_chk;
ipaddr_t ih_src,
+3 -3
View File
@@ -31,9 +31,9 @@ typedef struct nwio_ipopt
u32_t nwio_flags;
ipaddr_t nwio_rem;
ip_hdropt_t nwio_hdropt;
u8_t nwio_tos;
u8_t nwio_ttl;
u8_t nwio_df;
uint8_t nwio_tos;
uint8_t nwio_ttl;
uint8_t nwio_df;
ipproto_t nwio_proto;
} nwio_ipopt_t;
+2 -2
View File
@@ -7,8 +7,8 @@ server/ip/gen/psip_hdr.h
typedef struct psip_io_hdr
{
u8_t pih_flags;
u8_t pih_dummy[3];
uint8_t pih_flags;
uint8_t pih_dummy[3];
u32_t pih_nexthop;
} psip_io_hdr_t;
+2 -2
View File
@@ -11,8 +11,8 @@ Created: Aug 16, 1993 by Philip Homburg <philip@cs.vu.nl>
typedef struct rip_hdr
{
u8_t rh_command;
u8_t rh_version;
uint8_t rh_command;
uint8_t rh_version;
u16_t rh_zero;
} rip_hdr_t;
+3 -3
View File
@@ -11,8 +11,8 @@ typedef struct tcp_hdr
tcpport_t th_dstport;
u32_t th_seq_nr;
u32_t th_ack_nr;
u8_t th_data_off;
u8_t th_flags;
uint8_t th_data_off;
uint8_t th_flags;
u16_t th_window;
u16_t th_chksum;
u16_t th_urgptr;
@@ -31,7 +31,7 @@ typedef struct tcp_hdr
typedef struct tcp_hdropt
{
int tho_opt_siz;
u8_t tho_data[TCP_MAX_HDR_SIZE-TCP_MIN_HDR_SIZE];
uint8_t tho_data[TCP_MAX_HDR_SIZE-TCP_MIN_HDR_SIZE];
} tcp_hdropt_t;
#define TCP_OPT_EOL 0
+1 -1
View File
@@ -72,7 +72,7 @@ typedef struct nwio_tcpopt
typedef struct tcp_cookie
{
u32_t tc_ref;
u8_t tc_secret[TC_SECRET_SIZE];
uint8_t tc_secret[TC_SECRET_SIZE];
} tcp_cookie_t;
#endif /* __SERVER__IP__GEN__TCP_IO_H__ */
+11 -11
View File
@@ -44,7 +44,7 @@ static u16_t slp_typb = 0;
static int acpi_check_csum(struct acpi_sdt_header * tb, size_t size)
{
u8_t total = 0;
uint8_t total = 0;
int i;
for (i = 0; i < size; i++)
total += ((unsigned char *)tb)[i];
@@ -149,11 +149,11 @@ static void * acpi_madt_get_typed_item(struct acpi_madt_hdr * hdr,
unsigned char type,
unsigned idx)
{
u8_t * t, * end;
uint8_t * t, * end;
int i;
t = (u8_t *) hdr + sizeof(struct acpi_madt_hdr);
end = (u8_t *) hdr + hdr->hdr.length;
t = (uint8_t *) hdr + sizeof(struct acpi_madt_hdr);
end = (uint8_t *) hdr + hdr->hdr.length;
i = 0;
while(t < end) {
@@ -173,11 +173,11 @@ static void * acpi_madt_get_typed_item(struct acpi_madt_hdr * hdr,
static void * acpi_madt_get_item(struct acpi_madt_hdr * hdr,
unsigned idx)
{
u8_t * t, * end;
uint8_t * t, * end;
int i;
t = (u8_t *) hdr + sizeof(struct acpi_madt_hdr);
end = (u8_t *) hdr + hdr->hdr.length;
t = (uint8_t *) hdr + sizeof(struct acpi_madt_hdr);
end = (uint8_t *) hdr + hdr->hdr.length;
for(i = 0 ; i <= idx && t < end; i++) {
if (i == idx)
@@ -229,9 +229,9 @@ static int get_acpi_rsdp(void)
static void acpi_init_poweroff(void)
{
u8_t *ptr = NULL;
u8_t *start = NULL;
u8_t *end = NULL;
uint8_t *ptr = NULL;
uint8_t *start = NULL;
uint8_t *end = NULL;
struct acpi_fadt_header *fadt_header = NULL;
struct acpi_rsdt * dsdt_header = NULL;
char *msg = NULL;
@@ -255,7 +255,7 @@ static void acpi_init_poweroff(void)
pm1a_cnt_blk = fadt_header->pm1a_cnt_blk;
pm1b_cnt_blk = fadt_header->pm1b_cnt_blk;
ptr = start = (u8_t *) dsdt_header->data;
ptr = start = (uint8_t *) dsdt_header->data;
end = start + dsdt_header->hdr.length - 4;
/* See http://forum.osdev.org/viewtopic.php?t=16990 */
+38 -38
View File
@@ -6,9 +6,9 @@
/* ACPI root system description pointer */
struct acpi_rsdp {
char signature[8]; /* must be "RSD PTR " */
u8_t checksum;
uint8_t checksum;
char oemid[6];
u8_t revision;
uint8_t revision;
u32_t rsdt_addr;
u32_t length;
};
@@ -21,8 +21,8 @@ struct acpi_rsdp {
struct acpi_sdt_header {
char signature[ACPI_SDT_SIGNATURE_LEN];
u32_t length;
u8_t revision;
u8_t checksum;
uint8_t revision;
uint8_t checksum;
char oemid[6];
char oem_table_id[8];
u32_t oem_revision;
@@ -31,10 +31,10 @@ struct acpi_sdt_header {
};
struct acpi_generic_address {
u8_t address_space_id;
u8_t register_bit_width;
u8_t register_bit_offset;
u8_t access_size;
uint8_t address_space_id;
uint8_t register_bit_width;
uint8_t register_bit_offset;
uint8_t access_size;
u64_t address;
};
@@ -43,14 +43,14 @@ struct acpi_fadt_header
struct acpi_sdt_header hdr;
u32_t facs;
u32_t dsdt;
u8_t model;
u8_t preferred_pm_profile;
uint8_t model;
uint8_t preferred_pm_profile;
u16_t sci_int;
u32_t smi_cmd;
u8_t acpi_enable;
u8_t acpi_disable;
u8_t s4bios_req;
u8_t pstate_cnt;
uint8_t acpi_enable;
uint8_t acpi_disable;
uint8_t s4bios_req;
uint8_t pstate_cnt;
u32_t pm1a_evt_blk;
u32_t pm1b_evt_blk;
u32_t pm1a_cnt_blk;
@@ -59,29 +59,29 @@ struct acpi_fadt_header
u32_t pm_tmr_blk;
u32_t gpe0_blk;
u32_t gpe1_blk;
u8_t pm1_evt_len;
u8_t pm1_cnt_len;
u8_t pm2_cnt_len;
u8_t pm_tmr_len;
u8_t gpe0_blk_len;
u8_t gpe1_blk_len;
u8_t gpe1_base;
u8_t cst_cnt;
uint8_t pm1_evt_len;
uint8_t pm1_cnt_len;
uint8_t pm2_cnt_len;
uint8_t pm_tmr_len;
uint8_t gpe0_blk_len;
uint8_t gpe1_blk_len;
uint8_t gpe1_base;
uint8_t cst_cnt;
u16_t p_lvl2_lat;
u16_t p_lvl3_lat;
u16_t flush_size;
u16_t flush_stride;
u8_t duty_offset;
u8_t duty_width;
u8_t day_alrm;
u8_t mon_alrm;
u8_t century;
uint8_t duty_offset;
uint8_t duty_width;
uint8_t day_alrm;
uint8_t mon_alrm;
uint8_t century;
u16_t iapc_boot_arch;
u8_t reserved1;
uint8_t reserved1;
u32_t flags;
struct acpi_generic_address reset_reg;
u8_t reset_value;
u8_t reserved2[3];
uint8_t reset_value;
uint8_t reserved2[3];
u64_t xfacs;
u64_t xdsdt;
struct acpi_generic_address xpm1a_evt_blk;
@@ -113,29 +113,29 @@ struct acpi_madt_hdr {
#define ACPI_MADT_TYPE_Lx2APIC_NMI 10
struct acpi_madt_item_hdr{
u8_t type;
u8_t length;
uint8_t type;
uint8_t length;
};
struct acpi_madt_lapic {
struct acpi_madt_item_hdr hdr;
u8_t acpi_cpu_id;
u8_t apic_id;
uint8_t acpi_cpu_id;
uint8_t apic_id;
u32_t flags;
};
struct acpi_madt_ioapic {
struct acpi_madt_item_hdr hdr;
u8_t id;
u8_t __reserved;
uint8_t id;
uint8_t __reserved;
u32_t address;
u32_t global_int_base;
};
struct acpi_madt_int_src {
struct acpi_madt_item_hdr hdr;
u8_t bus;
u8_t bus_int;
uint8_t bus;
uint8_t bus_int;
u32_t global_int;
u16_t mps_flags;
};
+7 -7
View File
@@ -177,7 +177,7 @@ static u32_t ioapic_read(u32_t ioa_base, u32_t reg)
return *(volatile u32_t *)(ioa_base + IOAPIC_IOWIN);
}
static void ioapic_write(u32_t ioa_base, u8_t reg, u32_t val)
static void ioapic_write(u32_t ioa_base, uint8_t reg, u32_t val)
{
*((volatile u32_t *)(ioa_base + IOAPIC_IOREGSEL)) = reg;
*((volatile u32_t *)(ioa_base + IOAPIC_IOWIN)) = val;
@@ -208,8 +208,8 @@ static void ioapic_redirt_entry_read(void * ioapic_addr,
u32_t *hi,
u32_t *lo)
{
*lo = ioapic_read((u32_t)ioapic_addr, (u8_t) (IOAPIC_REDIR_TABLE + entry * 2));
*hi = ioapic_read((u32_t)ioapic_addr, (u8_t) (IOAPIC_REDIR_TABLE + entry * 2 + 1));
*lo = ioapic_read((u32_t)ioapic_addr, (uint8_t) (IOAPIC_REDIR_TABLE + entry * 2));
*hi = ioapic_read((u32_t)ioapic_addr, (uint8_t) (IOAPIC_REDIR_TABLE + entry * 2 + 1));
}
#endif
@@ -223,8 +223,8 @@ static void ioapic_redirt_entry_write(void * ioapic_addr,
VERBOSE_APIC(printf("IO apic redir entry %3d "
"write 0x%08x 0x%08x\n", entry, hi, lo));
#endif
ioapic_write((u32_t)ioapic_addr, (u8_t) (IOAPIC_REDIR_TABLE + entry * 2 + 1), hi);
ioapic_write((u32_t)ioapic_addr, (u8_t) (IOAPIC_REDIR_TABLE + entry * 2), lo);
ioapic_write((u32_t)ioapic_addr, (uint8_t) (IOAPIC_REDIR_TABLE + entry * 2 + 1), hi);
ioapic_write((u32_t)ioapic_addr, (uint8_t) (IOAPIC_REDIR_TABLE + entry * 2), lo);
}
#define apic_read_tmr_vector(vec) \
@@ -528,7 +528,7 @@ void lapic_set_timer_one_shot(const u32_t usec)
/* sleep in micro seconds */
u32_t lvtt;
u32_t ticks_per_us;
const u8_t cpu = cpuid;
const uint8_t cpu = cpuid;
ticks_per_us = (lapic_bus_freq[cpu] / 1000000) * config_apic_timer_x;
@@ -547,7 +547,7 @@ void lapic_set_timer_periodic(const unsigned freq)
/* sleep in micro seconds */
u32_t lvtt;
u32_t lapic_ticks_per_clock_tick;
const u8_t cpu = cpuid;
const uint8_t cpu = cpuid;
lapic_ticks_per_clock_tick = (lapic_bus_freq[cpu] / freq) * config_apic_timer_x;
+1 -1
View File
@@ -283,7 +283,7 @@ void arch_init(void)
*===========================================================================*/
void do_ser_debug(void)
{
u8_t c, lsr;
uint8_t c, lsr;
#if CONFIG_OXPCIE
{
+1 -1
View File
@@ -192,7 +192,7 @@ struct tss_s {
reg_t ldt;
u16_t trap;
u16_t iobase;
/* u8_t iomap[0]; */
/* uint8_t iomap[0]; */
} __attribute__((packed));
void enable_iop(struct proc *pp);

Some files were not shown because too many files have changed in this diff Show More