Prefer uintXX_t to u_intXX_t

A foolish consistency is the hobgoblin of little minds, adored by
little statesmen and philosophers and divines. With consistency a
great soul has simply nothing to do. -- Ralph Waldo Emerson
This commit is contained in:
Warner Losh 2018-03-13 16:33:00 +00:00
parent 011bbaa513
commit 56e53cb8ef
47 changed files with 286 additions and 286 deletions

View File

@ -150,7 +150,7 @@ void pnp_addident(struct pnpinfo *pi, char *ident);
struct pnpinfo *pnp_allocinfo(void); struct pnpinfo *pnp_allocinfo(void);
void pnp_freeinfo(struct pnpinfo *pi); void pnp_freeinfo(struct pnpinfo *pi);
void pnp_addinfo(struct pnpinfo *pi); void pnp_addinfo(struct pnpinfo *pi);
char *pnp_eisaformat(u_int8_t *data); char *pnp_eisaformat(uint8_t *data);
/* /*
* < 0 - No ISA in system * < 0 - No ISA in system
@ -168,7 +168,7 @@ extern int isapnp_readport;
struct file_metadata struct file_metadata
{ {
size_t md_size; size_t md_size;
u_int16_t md_type; uint16_t md_type;
struct file_metadata *md_next; struct file_metadata *md_next;
char md_data[1]; /* data are immediately appended */ char md_data[1]; /* data are immediately appended */
}; };
@ -210,7 +210,7 @@ struct preloaded_file
struct file_format struct file_format
{ {
/* Load function must return EFTYPE if it can't handle the module supplied */ /* Load function must return EFTYPE if it can't handle the module supplied */
int (* l_load)(char *filename, u_int64_t dest, struct preloaded_file **result); int (* l_load)(char *filename, uint64_t dest, struct preloaded_file **result);
/* Only a loader that will load a kernel (first module) should have an exec handler */ /* Only a loader that will load a kernel (first module) should have an exec handler */
int (* l_exec)(struct preloaded_file *mp); int (* l_exec)(struct preloaded_file *mp);
}; };
@ -239,20 +239,20 @@ void file_removemetadata(struct preloaded_file *fp);
#define ELF_RELOC_RELA 2 #define ELF_RELOC_RELA 2
/* Relocation offset for some architectures */ /* Relocation offset for some architectures */
extern u_int64_t __elfN(relocation_offset); extern uint64_t __elfN(relocation_offset);
struct elf_file; struct elf_file;
typedef Elf_Addr (symaddr_fn)(struct elf_file *ef, Elf_Size symidx); typedef Elf_Addr (symaddr_fn)(struct elf_file *ef, Elf_Size symidx);
int __elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result); int __elfN(loadfile)(char *filename, uint64_t dest, struct preloaded_file **result);
int __elfN(obj_loadfile)(char *filename, u_int64_t dest, int __elfN(obj_loadfile)(char *filename, uint64_t dest,
struct preloaded_file **result); struct preloaded_file **result);
int __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, int __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr,
const void *reldata, int reltype, Elf_Addr relbase, const void *reldata, int reltype, Elf_Addr relbase,
Elf_Addr dataaddr, void *data, size_t len); Elf_Addr dataaddr, void *data, size_t len);
int __elfN(loadfile_raw)(char *filename, u_int64_t dest, int __elfN(loadfile_raw)(char *filename, uint64_t dest,
struct preloaded_file **result, int multiboot); struct preloaded_file **result, int multiboot);
int __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest); int __elfN(load_modmetadata)(struct preloaded_file *fp, uint64_t dest);
#endif #endif
/* /*

View File

@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
static void isapnp_write(int d, int r); static void isapnp_write(int d, int r);
static void isapnp_send_Initiation_LFSR(void); static void isapnp_send_Initiation_LFSR(void);
static int isapnp_get_serial(u_int8_t *p); static int isapnp_get_serial(uint8_t *p);
static int isapnp_isolation_protocol(void); static int isapnp_isolation_protocol(void);
static void isapnp_enumerate(void); static void isapnp_enumerate(void);
@ -90,7 +90,7 @@ isapnp_send_Initiation_LFSR(void)
* Get the device's serial number. Returns 1 if the serial is valid. * Get the device's serial number. Returns 1 if the serial is valid.
*/ */
static int static int
isapnp_get_serial(u_int8_t *data) isapnp_get_serial(uint8_t *data)
{ {
int i, bit, valid = 0, sum = 0x6a; int i, bit, valid = 0, sum = 0x6a;
@ -123,7 +123,7 @@ isapnp_get_serial(u_int8_t *data)
* Returns nonzero if the device fails to report * Returns nonzero if the device fails to report
*/ */
static int static int
isapnp_get_resource_info(u_int8_t *buffer, int len) isapnp_get_resource_info(uint8_t *buffer, int len)
{ {
int i, j; int i, j;
u_char temp; u_char temp;
@ -229,7 +229,7 @@ isapnp_isolation_protocol(void)
{ {
int csn; int csn;
struct pnpinfo *pi; struct pnpinfo *pi;
u_int8_t cardid[_PNP_ID_LEN]; uint8_t cardid[_PNP_ID_LEN];
int ndevs; int ndevs;
isapnp_send_Initiation_LFSR(); isapnp_send_Initiation_LFSR();

View File

@ -70,11 +70,11 @@ typedef struct elf_file {
caddr_t firstpage; caddr_t firstpage;
size_t firstlen; size_t firstlen;
int kernel; int kernel;
u_int64_t off; uint64_t off;
} *elf_file_t; } *elf_file_t;
static int __elfN(loadimage)(struct preloaded_file *mp, elf_file_t ef, static int __elfN(loadimage)(struct preloaded_file *mp, elf_file_t ef,
u_int64_t loadaddr); uint64_t loadaddr);
static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef,
const char* name, Elf_Sym* sym); const char* name, Elf_Sym* sym);
static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef,
@ -87,7 +87,7 @@ static char *fake_modname(const char *name);
const char *__elfN(kerneltype) = "elf kernel"; const char *__elfN(kerneltype) = "elf kernel";
const char *__elfN(moduletype) = "elf module"; const char *__elfN(moduletype) = "elf module";
u_int64_t __elfN(relocation_offset) = 0; uint64_t __elfN(relocation_offset) = 0;
extern void elf_wrong_field_size(void); extern void elf_wrong_field_size(void);
#define CONVERT_FIELD(b, f, e) \ #define CONVERT_FIELD(b, f, e) \
@ -265,13 +265,13 @@ __elfN(load_elf_header)(char *filename, elf_file_t ef)
* will be saved in (result). * will be saved in (result).
*/ */
int int
__elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result) __elfN(loadfile)(char *filename, uint64_t dest, struct preloaded_file **result)
{ {
return (__elfN(loadfile_raw)(filename, dest, result, 0)); return (__elfN(loadfile_raw)(filename, dest, result, 0));
} }
int int
__elfN(loadfile_raw)(char *filename, u_int64_t dest, __elfN(loadfile_raw)(char *filename, uint64_t dest,
struct preloaded_file **result, int multiboot) struct preloaded_file **result, int multiboot)
{ {
struct preloaded_file *fp, *kfp; struct preloaded_file *fp, *kfp;
@ -419,7 +419,7 @@ __elfN(loadfile_raw)(char *filename, u_int64_t dest,
* the Elf header, load the image at (off) * the Elf header, load the image at (off)
*/ */
static int static int
__elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off) __elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off)
{ {
int i; int i;
u_int j; u_int j;
@ -883,21 +883,21 @@ fake_modname(const char *name)
struct mod_metadata64 { struct mod_metadata64 {
int md_version; /* structure version MDTV_* */ int md_version; /* structure version MDTV_* */
int md_type; /* type of entry MDT_* */ int md_type; /* type of entry MDT_* */
u_int64_t md_data; /* specific data */ uint64_t md_data; /* specific data */
u_int64_t md_cval; /* common string label */ uint64_t md_cval; /* common string label */
}; };
#endif #endif
#if defined(__amd64__) && __ELF_WORD_SIZE == 32 #if defined(__amd64__) && __ELF_WORD_SIZE == 32
struct mod_metadata32 { struct mod_metadata32 {
int md_version; /* structure version MDTV_* */ int md_version; /* structure version MDTV_* */
int md_type; /* type of entry MDT_* */ int md_type; /* type of entry MDT_* */
u_int32_t md_data; /* specific data */ uint32_t md_data; /* specific data */
u_int32_t md_cval; /* common string label */ uint32_t md_cval; /* common string label */
}; };
#endif #endif
int int
__elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest) __elfN(load_modmetadata)(struct preloaded_file *fp, uint64_t dest)
{ {
struct elf_file ef; struct elf_file ef;
int err, i, j; int err, i, j;

View File

@ -63,7 +63,7 @@ typedef struct elf_file {
} *elf_file_t; } *elf_file_t;
static int __elfN(obj_loadimage)(struct preloaded_file *mp, elf_file_t ef, static int __elfN(obj_loadimage)(struct preloaded_file *mp, elf_file_t ef,
u_int64_t loadaddr); uint64_t loadaddr);
static int __elfN(obj_lookup_set)(struct preloaded_file *mp, elf_file_t ef, static int __elfN(obj_lookup_set)(struct preloaded_file *mp, elf_file_t ef,
const char *name, Elf_Addr *startp, Elf_Addr *stopp, int *countp); const char *name, Elf_Addr *startp, Elf_Addr *stopp, int *countp);
static int __elfN(obj_reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, static int __elfN(obj_reloc_ptr)(struct preloaded_file *mp, elf_file_t ef,
@ -81,7 +81,7 @@ const char *__elfN(obj_moduletype) = "elf obj module";
* will be saved in (result). * will be saved in (result).
*/ */
int int
__elfN(obj_loadfile)(char *filename, u_int64_t dest, __elfN(obj_loadfile)(char *filename, uint64_t dest,
struct preloaded_file **result) struct preloaded_file **result)
{ {
struct preloaded_file *fp, *kfp; struct preloaded_file *fp, *kfp;
@ -186,7 +186,7 @@ __elfN(obj_loadfile)(char *filename, u_int64_t dest,
* the Elf header, load the image at (off) * the Elf header, load the image at (off)
*/ */
static int static int
__elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off) __elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off)
{ {
Elf_Ehdr *hdr; Elf_Ehdr *hdr;
Elf_Shdr *shdr, *cshdr, *lshdr; Elf_Shdr *shdr, *cshdr, *lshdr;
@ -349,8 +349,8 @@ __elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off)
struct mod_metadata64 { struct mod_metadata64 {
int md_version; /* structure version MDTV_* */ int md_version; /* structure version MDTV_* */
int md_type; /* type of entry MDT_* */ int md_type; /* type of entry MDT_* */
u_int64_t md_data; /* specific data */ uint64_t md_data; /* specific data */
u_int64_t md_cval; /* common string label */ uint64_t md_cval; /* common string label */
}; };
#endif #endif

View File

@ -217,7 +217,7 @@ md_copyenv(vm_offset_t addr)
static int align; static int align;
#define COPY32(v, a, c) { \ #define COPY32(v, a, c) { \
u_int32_t x = (v); \ uint32_t x = (v); \
if (c) \ if (c) \
archsw.arch_copyin(&x, a, sizeof(x)); \ archsw.arch_copyin(&x, a, sizeof(x)); \
a += sizeof(x); \ a += sizeof(x); \

View File

@ -185,7 +185,7 @@ hexdump(caddr_t region, size_t len)
for (x = 0; x < 16; x++) { for (x = 0; x < 16; x++) {
if ((line + x) < (region + len)) { if ((line + x) < (region + len)) {
emit("%02x ", *(u_int8_t *)(line + x)); emit("%02x ", *(uint8_t *)(line + x));
} else { } else {
emit("-- "); emit("-- ");
} }
@ -195,7 +195,7 @@ hexdump(caddr_t region, size_t len)
emit(" |"); emit(" |");
for (x = 0; x < 16; x++) { for (x = 0; x < 16; x++) {
if ((line + x) < (region + len)) { if ((line + x) < (region + len)) {
c = *(u_int8_t *)(line + x); c = *(uint8_t *)(line + x);
if ((c < ' ') || (c > '~')) /* !isprint(c) */ if ((c < ' ') || (c > '~')) /* !isprint(c) */
c = '.'; c = '.';
emit("%c", c); emit("%c", c);

View File

@ -169,7 +169,7 @@ pnp_addinfo(struct pnpinfo *pi)
* where 'AAA' is the EISA vendor ID, II is the product ID and RR the revision ID. * where 'AAA' is the EISA vendor ID, II is the product ID and RR the revision ID.
*/ */
char * char *
pnp_eisaformat(u_int8_t *data) pnp_eisaformat(uint8_t *data)
{ {
static char idbuf[8]; static char idbuf[8];
const char hextoascii[] = "0123456789abcdef"; const char hextoascii[] = "0123456789abcdef";

View File

@ -44,7 +44,7 @@ static dev_info_t *devinfo;
static dev_info_t *devices; static dev_info_t *devices;
static int static int
dskread(void *buf, u_int64_t lba, int nblk) dskread(void *buf, uint64_t lba, int nblk)
{ {
int size; int size;
EFI_STATUS status; EFI_STATUS status;

View File

@ -47,7 +47,7 @@ extern vm_offset_t md_load(char *, vm_offset_t *);
extern int bi_load(char *, vm_offset_t *, vm_offset_t *); extern int bi_load(char *, vm_offset_t *, vm_offset_t *);
static int static int
__elfN(arm_load)(char *filename, u_int64_t dest, __elfN(arm_load)(char *filename, uint64_t dest,
struct preloaded_file **result) struct preloaded_file **result)
{ {
int r; int r;

View File

@ -25,12 +25,12 @@
DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
{ {
DPUNS q; DPUNS q;
u_int64_t qx; uint64_t qx;
qx = (u_int64_t)x * (u_int64_t) y; qx = (uint64_t)x * (uint64_t) y;
q.hi = (u_int32_t)( qx >> 32 ); q.hi = (uint32_t)( qx >> 32 );
q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
return q; return q;
} }
@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
{ {
UNSQR result; UNSQR result;
u_int64_t qx, qh; uint64_t qx, qh;
qh = q.hi; qh = q.hi;
qx = (qh << 32) | q.lo; qx = (qh << 32) | q.lo;

View File

@ -25,12 +25,12 @@
DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
{ {
DPUNS q; DPUNS q;
u_int64_t qx; uint64_t qx;
qx = (u_int64_t)x * (u_int64_t) y; qx = (uint64_t)x * (uint64_t) y;
q.hi = (u_int32_t)( qx >> 32 ); q.hi = (uint32_t)( qx >> 32 );
q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
return q; return q;
} }
@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
{ {
UNSQR result; UNSQR result;
u_int64_t qx, qh; uint64_t qx, qh;
qh = q.hi; qh = q.hi;
qx = (qh << 32) | q.lo; qx = (qh << 32) | q.lo;

View File

@ -25,12 +25,12 @@
DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
{ {
DPUNS q; DPUNS q;
u_int64_t qx; uint64_t qx;
qx = (u_int64_t)x * (u_int64_t) y; qx = (uint64_t)x * (uint64_t) y;
q.hi = (u_int32_t)( qx >> 32 ); q.hi = (uint32_t)( qx >> 32 );
q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
return q; return q;
} }
@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
{ {
UNSQR result; UNSQR result;
u_int64_t qx, qh; uint64_t qx, qh;
qh = q.hi; qh = q.hi;
qx = (qh << 32) | q.lo; qx = (qh << 32) | q.lo;

View File

@ -28,12 +28,12 @@
DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
{ {
DPUNS q; DPUNS q;
u_int64_t qx; uint64_t qx;
qx = (u_int64_t)x * (u_int64_t) y; qx = (uint64_t)x * (uint64_t) y;
q.hi = (u_int32_t)( qx >> 32 ); q.hi = (uint32_t)( qx >> 32 );
q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
return q; return q;
} }
@ -41,7 +41,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
{ {
UNSQR result; UNSQR result;
u_int64_t qx, qh; uint64_t qx, qh;
qh = q.hi; qh = q.hi;
qx = (qh << 32) | q.lo; qx = (qh << 32) | q.lo;
@ -89,7 +89,7 @@ void
ficlOutb(FICL_VM *pVM) ficlOutb(FICL_VM *pVM)
{ {
u_char c; u_char c;
u_int32_t port; uint32_t port;
port=stackPopUNS(pVM->pStack); port=stackPopUNS(pVM->pStack);
c=(u_char)stackPopINT(pVM->pStack); c=(u_char)stackPopINT(pVM->pStack);
@ -104,7 +104,7 @@ void
ficlInb(FICL_VM *pVM) ficlInb(FICL_VM *pVM)
{ {
u_char c; u_char c;
u_int32_t port; uint32_t port;
port=stackPopUNS(pVM->pStack); port=stackPopUNS(pVM->pStack);
c=inb(port); c=inb(port);

View File

@ -25,12 +25,12 @@
DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
{ {
DPUNS q; DPUNS q;
u_int64_t qx; uint64_t qx;
qx = (u_int64_t)x * (u_int64_t) y; qx = (uint64_t)x * (uint64_t) y;
q.hi = (u_int32_t)( qx >> 32 ); q.hi = (uint32_t)( qx >> 32 );
q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
return q; return q;
} }
@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
{ {
UNSQR result; UNSQR result;
u_int64_t qx, qh; uint64_t qx, qh;
qh = q.hi; qh = q.hi;
qx = (qh << 32) | q.lo; qx = (qh << 32) | q.lo;

View File

@ -25,12 +25,12 @@
DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
{ {
DPUNS q; DPUNS q;
u_int64_t qx; uint64_t qx;
qx = (u_int64_t)x * (u_int64_t) y; qx = (uint64_t)x * (uint64_t) y;
q.hi = (u_int32_t)( qx >> 32 ); q.hi = (uint32_t)( qx >> 32 );
q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
return q; return q;
} }
@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
{ {
UNSQR result; UNSQR result;
u_int64_t qx, qh; uint64_t qx, qh;
qh = q.hi; qh = q.hi;
qx = (qh << 32) | q.lo; qx = (qh << 32) | q.lo;

View File

@ -25,12 +25,12 @@
DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
{ {
DPUNS q; DPUNS q;
u_int64_t qx; uint64_t qx;
qx = (u_int64_t)x * (u_int64_t) y; qx = (uint64_t)x * (uint64_t) y;
q.hi = (u_int32_t)( qx >> 32 ); q.hi = (uint32_t)( qx >> 32 );
q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
return q; return q;
} }
@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
{ {
UNSQR result; UNSQR result;
u_int64_t qx, qh; uint64_t qx, qh;
qh = q.hi; qh = q.hi;
qx = (qh << 32) | q.lo; qx = (qh << 32) | q.lo;

View File

@ -25,12 +25,12 @@
DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
{ {
DPUNS q; DPUNS q;
u_int64_t qx; uint64_t qx;
qx = (u_int64_t)x * (u_int64_t) y; qx = (uint64_t)x * (uint64_t) y;
q.hi = (u_int32_t)( qx >> 32 ); q.hi = (uint32_t)( qx >> 32 );
q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
return q; return q;
} }
@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
{ {
UNSQR result; UNSQR result;
u_int64_t qx, qh; uint64_t qx, qh;
qh = q.hi; qh = q.hi;
qx = (qh << 32) | q.lo; qx = (qh << 32) | q.lo;

View File

@ -25,12 +25,12 @@
DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
{ {
DPUNS q; DPUNS q;
u_int64_t qx; uint64_t qx;
qx = (u_int64_t)x * (u_int64_t) y; qx = (uint64_t)x * (uint64_t) y;
q.hi = (u_int32_t)( qx >> 32 ); q.hi = (uint32_t)( qx >> 32 );
q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
return q; return q;
} }
@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
{ {
UNSQR result; UNSQR result;
u_int64_t qx, qh; uint64_t qx, qh;
qh = q.hi; qh = q.hi;
qx = (qh << 32) | q.lo; qx = (qh << 32) | q.lo;

View File

@ -58,13 +58,13 @@ void __v86int(void);
#define v86 __v86 #define v86 __v86
#define v86int __v86int #define v86int __v86int
extern u_int32_t __base; extern uint32_t __base;
extern u_int32_t __args; extern uint32_t __args;
#define PTOV(pa) ((caddr_t)(pa) - __base) #define PTOV(pa) ((caddr_t)(pa) - __base)
#define VTOP(va) ((vm_offset_t)(va) + __base) #define VTOP(va) ((vm_offset_t)(va) + __base)
#define VTOPSEG(va) (u_int16_t)(VTOP((caddr_t)va) >> 4) #define VTOPSEG(va) (uint16_t)(VTOP((caddr_t)va) >> 4)
#define VTOPOFF(va) (u_int16_t)(VTOP((caddr_t)va) & 0xf) #define VTOPOFF(va) (uint16_t)(VTOP((caddr_t)va) & 0xf)
#define V86_CY(x) ((x) & PSL_C) #define V86_CY(x) ((x) & PSL_C)
#define V86_ZR(x) ((x) & PSL_Z) #define V86_ZR(x) ((x) & PSL_Z)

View File

@ -122,7 +122,7 @@ static ACPI_TABLE_RSDP *
biosacpi_search_rsdp(char *base, int length) biosacpi_search_rsdp(char *base, int length)
{ {
ACPI_TABLE_RSDP *rsdp; ACPI_TABLE_RSDP *rsdp;
u_int8_t *cp, sum; uint8_t *cp, sum;
int ofs, idx; int ofs, idx;
/* search on 16-byte boundaries */ /* search on 16-byte boundaries */
@ -131,7 +131,7 @@ biosacpi_search_rsdp(char *base, int length)
/* compare signature, validate checksum */ /* compare signature, validate checksum */
if (!strncmp(rsdp->Signature, ACPI_SIG_RSDP, strlen(ACPI_SIG_RSDP))) { if (!strncmp(rsdp->Signature, ACPI_SIG_RSDP, strlen(ACPI_SIG_RSDP))) {
cp = (u_int8_t *)rsdp; cp = (uint8_t *)rsdp;
sum = 0; sum = 0;
for (idx = 0; idx < RSDP_CHECKSUM_LENGTH; idx++) for (idx = 0; idx < RSDP_CHECKSUM_LENGTH; idx++)
sum += *(cp + idx); sum += *(cp + idx);

View File

@ -916,7 +916,7 @@ bd_write(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest)
* disk. And, incidentally, what is returned is not the geometry as * disk. And, incidentally, what is returned is not the geometry as
* such but the highest valid cylinder, head, and sector numbers. * such but the highest valid cylinder, head, and sector numbers.
*/ */
u_int32_t uint32_t
bd_getbigeom(int bunit) bd_getbigeom(int bunit)
{ {

View File

@ -49,49 +49,49 @@ struct pnphandler biospnphandler =
struct pnp_ICstructure struct pnp_ICstructure
{ {
u_int8_t pnp_signature[4]; uint8_t pnp_signature[4];
u_int8_t pnp_version; uint8_t pnp_version;
u_int8_t pnp_length; uint8_t pnp_length;
u_int16_t pnp_BIOScontrol; uint16_t pnp_BIOScontrol;
u_int8_t pnp_checksum; uint8_t pnp_checksum;
u_int32_t pnp_eventflag; uint32_t pnp_eventflag;
u_int16_t pnp_rmip; uint16_t pnp_rmip;
u_int16_t pnp_rmcs; uint16_t pnp_rmcs;
u_int16_t pnp_pmip; uint16_t pnp_pmip;
u_int32_t pnp_pmcs; uint32_t pnp_pmcs;
u_int8_t pnp_OEMdev[4]; uint8_t pnp_OEMdev[4];
u_int16_t pnp_rmds; uint16_t pnp_rmds;
u_int32_t pnp_pmds; uint32_t pnp_pmds;
} __packed; } __packed;
struct pnp_devNode struct pnp_devNode
{ {
u_int16_t dn_size; uint16_t dn_size;
u_int8_t dn_handle; uint8_t dn_handle;
u_int8_t dn_id[4]; uint8_t dn_id[4];
u_int8_t dn_type[3]; uint8_t dn_type[3];
u_int16_t dn_attrib; uint16_t dn_attrib;
u_int8_t dn_data[1]; uint8_t dn_data[1];
} __packed; } __packed;
struct pnp_isaConfiguration struct pnp_isaConfiguration
{ {
u_int8_t ic_revision; uint8_t ic_revision;
u_int8_t ic_nCSN; uint8_t ic_nCSN;
u_int16_t ic_rdport; uint16_t ic_rdport;
u_int16_t ic_reserved; uint16_t ic_reserved;
} __packed; } __packed;
static struct pnp_ICstructure *pnp_Icheck = NULL; static struct pnp_ICstructure *pnp_Icheck = NULL;
static u_int16_t pnp_NumNodes; static uint16_t pnp_NumNodes;
static u_int16_t pnp_NodeSize; static uint16_t pnp_NodeSize;
static void biospnp_scanresdata(struct pnpinfo *pi, struct pnp_devNode *dn); static void biospnp_scanresdata(struct pnpinfo *pi, struct pnp_devNode *dn);
static int biospnp_call(int func, const char *fmt, ...); static int biospnp_call(int func, const char *fmt, ...);
#define vsegofs(vptr) (((u_int32_t)VTOPSEG(vptr) << 16) + VTOPOFF(vptr)) #define vsegofs(vptr) (((uint32_t)VTOPSEG(vptr) << 16) + VTOPOFF(vptr))
typedef void v86bios_t(u_int32_t, u_int32_t, u_int32_t, u_int32_t); typedef void v86bios_t(uint32_t, uint32_t, uint32_t, uint32_t);
v86bios_t *v86bios = (v86bios_t *)v86int; v86bios_t *v86bios = (v86bios_t *)v86int;
#define biospnp_f00(NumNodes, NodeSize) biospnp_call(0x00, "ll", NumNodes, NodeSize) #define biospnp_f00(NumNodes, NodeSize) biospnp_call(0x00, "ll", NumNodes, NodeSize)
@ -155,7 +155,7 @@ biospnp_init(void)
static void static void
biospnp_enumerate(void) biospnp_enumerate(void)
{ {
u_int8_t Node; uint8_t Node;
struct pnp_devNode *devNodeBuffer; struct pnp_devNode *devNodeBuffer;
int result; int result;
struct pnpinfo *pi; struct pnpinfo *pi;
@ -189,11 +189,11 @@ static void
biospnp_scanresdata(struct pnpinfo *pi, struct pnp_devNode *dn) biospnp_scanresdata(struct pnpinfo *pi, struct pnp_devNode *dn)
{ {
u_int tag, i, rlen, dlen; u_int tag, i, rlen, dlen;
u_int8_t *p; uint8_t *p;
char *str; char *str;
p = dn->dn_data; /* point to resource data */ p = dn->dn_data; /* point to resource data */
dlen = dn->dn_size - (p - (u_int8_t *)dn); /* length of resource data */ dlen = dn->dn_size - (p - (uint8_t *)dn); /* length of resource data */
for (i = 0; i < dlen; i+= rlen) { for (i = 0; i < dlen; i+= rlen) {
tag = p[i]; tag = p[i];
@ -213,8 +213,8 @@ biospnp_scanresdata(struct pnpinfo *pi, struct pnp_devNode *dn)
} }
} else { } else {
/* large resource */ /* large resource */
rlen = *(u_int16_t *)(p + i); rlen = *(uint16_t *)(p + i);
i += sizeof(u_int16_t); i += sizeof(uint16_t);
switch(PNP_LRES_NUM(tag)) { switch(PNP_LRES_NUM(tag)) {
@ -249,14 +249,14 @@ biospnp_call(int func, const char *fmt, ...)
{ {
va_list ap; va_list ap;
const char *p; const char *p;
u_int8_t *argp; uint8_t *argp;
u_int32_t args[4]; uint32_t args[4];
u_int32_t i; uint32_t i;
/* function number first */ /* function number first */
argp = (u_int8_t *)args; argp = (uint8_t *)args;
*(u_int16_t *)argp = func; *(uint16_t *)argp = func;
argp += sizeof(u_int16_t); argp += sizeof(uint16_t);
/* take args according to format */ /* take args according to format */
va_start(ap, fmt); va_start(ap, fmt);
@ -265,26 +265,26 @@ biospnp_call(int func, const char *fmt, ...)
case 'w': case 'w':
i = va_arg(ap, u_int); i = va_arg(ap, u_int);
*(u_int16_t *)argp = i; *(uint16_t *)argp = i;
argp += sizeof(u_int16_t); argp += sizeof(uint16_t);
break; break;
case 'l': case 'l':
i = va_arg(ap, u_int32_t); i = va_arg(ap, uint32_t);
*(u_int32_t *)argp = i; *(uint32_t *)argp = i;
argp += sizeof(u_int32_t); argp += sizeof(uint32_t);
break; break;
} }
} }
va_end(ap); va_end(ap);
/* BIOS segment last */ /* BIOS segment last */
*(u_int16_t *)argp = pnp_Icheck->pnp_rmds; *(uint16_t *)argp = pnp_Icheck->pnp_rmds;
argp += sizeof(u_int16_t); argp += sizeof(uint16_t);
/* prepare for call */ /* prepare for call */
v86.ctl = V86_ADDR | V86_CALLF; v86.ctl = V86_ADDR | V86_CALLF;
v86.addr = ((u_int32_t)pnp_Icheck->pnp_rmcs << 16) + pnp_Icheck->pnp_rmip; v86.addr = ((uint32_t)pnp_Icheck->pnp_rmcs << 16) + pnp_Icheck->pnp_rmip;
/* call with packed stack and return */ /* call with packed stack and return */
v86bios(args[0], args[1], args[2], args[3]); v86bios(args[0], args[1], args[2], args[3]);

View File

@ -63,7 +63,7 @@ static struct bootinfo bi;
* MOD_METADATA (variable) type-specific metadata * MOD_METADATA (variable) type-specific metadata
*/ */
#define COPY32(v, a, c) { \ #define COPY32(v, a, c) { \
u_int32_t x = (v); \ uint32_t x = (v); \
if (c) \ if (c) \
i386_copyin(&x, a, sizeof(x)); \ i386_copyin(&x, a, sizeof(x)); \
a += sizeof(x); \ a += sizeof(x); \

View File

@ -64,7 +64,7 @@ static const size_t keybuf_size = sizeof(struct keybuf) +
* MOD_METADATA (variable) type-specific metadata * MOD_METADATA (variable) type-specific metadata
*/ */
#define COPY32(v, a, c) { \ #define COPY32(v, a, c) { \
u_int32_t x = (v); \ uint32_t x = (v); \
if (c) \ if (c) \
i386_copyin(&x, a, sizeof(x)); \ i386_copyin(&x, a, sizeof(x)); \
a += sizeof(x); \ a += sizeof(x); \
@ -75,7 +75,7 @@ static const size_t keybuf_size = sizeof(struct keybuf) +
COPY32(strlen(s) + 1, a, c); \ COPY32(strlen(s) + 1, a, c); \
if (c) \ if (c) \
i386_copyin(s, a, strlen(s) + 1); \ i386_copyin(s, a, strlen(s) + 1); \
a += roundup(strlen(s) + 1, sizeof(u_int64_t));\ a += roundup(strlen(s) + 1, sizeof(uint64_t));\
} }
#define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c) #define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c)
@ -87,7 +87,7 @@ static const size_t keybuf_size = sizeof(struct keybuf) +
COPY32(sizeof(s), a, c); \ COPY32(sizeof(s), a, c); \
if (c) \ if (c) \
i386_copyin(&s, a, sizeof(s)); \ i386_copyin(&s, a, sizeof(s)); \
a += roundup(sizeof(s), sizeof(u_int64_t)); \ a += roundup(sizeof(s), sizeof(uint64_t)); \
} }
#define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c) #define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c)
@ -98,7 +98,7 @@ static const size_t keybuf_size = sizeof(struct keybuf) +
COPY32(mm->md_size, a, c); \ COPY32(mm->md_size, a, c); \
if (c) \ if (c) \
i386_copyin(mm->md_data, a, mm->md_size); \ i386_copyin(mm->md_data, a, mm->md_size); \
a += roundup(mm->md_size, sizeof(u_int64_t));\ a += roundup(mm->md_size, sizeof(uint64_t));\
} }
#define MOD_END(a, c) { \ #define MOD_END(a, c) { \
@ -112,7 +112,7 @@ bi_copymodules64(vm_offset_t addr)
struct preloaded_file *fp; struct preloaded_file *fp;
struct file_metadata *md; struct file_metadata *md;
int c; int c;
u_int64_t v; uint64_t v;
c = addr != 0; c = addr != 0;
/* start with the first module on the list, should be the kernel */ /* start with the first module on the list, should be the kernel */
@ -190,9 +190,9 @@ bi_load64(char *args, vm_offset_t addr, vm_offset_t *modulep,
struct preloaded_file *xp, *kfp; struct preloaded_file *xp, *kfp;
struct i386_devdesc *rootdev; struct i386_devdesc *rootdev;
struct file_metadata *md; struct file_metadata *md;
u_int64_t kernend; uint64_t kernend;
u_int64_t envp; uint64_t envp;
u_int64_t module; uint64_t module;
vm_offset_t size; vm_offset_t size;
char *rootdevname; char *rootdevname;
int howto; int howto;

View File

@ -51,15 +51,15 @@ struct file_format amd64_elf_obj = { elf64_obj_loadfile, elf64_obj_exec };
#define PG_U 0x004 #define PG_U 0x004
#define PG_PS 0x080 #define PG_PS 0x080
typedef u_int64_t p4_entry_t; typedef uint64_t p4_entry_t;
typedef u_int64_t p3_entry_t; typedef uint64_t p3_entry_t;
typedef u_int64_t p2_entry_t; typedef uint64_t p2_entry_t;
extern p4_entry_t PT4[]; extern p4_entry_t PT4[];
extern p3_entry_t PT3[]; extern p3_entry_t PT3[];
extern p2_entry_t PT2[]; extern p2_entry_t PT2[];
u_int32_t entry_hi; uint32_t entry_hi;
u_int32_t entry_lo; uint32_t entry_lo;
extern void amd64_tramp(); extern void amd64_tramp();

View File

@ -61,16 +61,16 @@ __FBSDID("$FreeBSD$");
#define METADATA_RESV_SIZE(mod_num) \ #define METADATA_RESV_SIZE(mod_num) \
roundup(METADATA_FIXED_SIZE + METADATA_MODULE_SIZE * mod_num, PAGE_SIZE) roundup(METADATA_FIXED_SIZE + METADATA_MODULE_SIZE * mod_num, PAGE_SIZE)
extern int elf32_loadfile_raw(char *filename, u_int64_t dest, extern int elf32_loadfile_raw(char *filename, uint64_t dest,
struct preloaded_file **result, int multiboot); struct preloaded_file **result, int multiboot);
extern int elf64_load_modmetadata(struct preloaded_file *fp, u_int64_t dest); extern int elf64_load_modmetadata(struct preloaded_file *fp, uint64_t dest);
extern int elf64_obj_loadfile(char *filename, u_int64_t dest, extern int elf64_obj_loadfile(char *filename, uint64_t dest,
struct preloaded_file **result); struct preloaded_file **result);
static int multiboot_loadfile(char *, u_int64_t, struct preloaded_file **); static int multiboot_loadfile(char *, uint64_t, struct preloaded_file **);
static int multiboot_exec(struct preloaded_file *); static int multiboot_exec(struct preloaded_file *);
static int multiboot_obj_loadfile(char *, u_int64_t, struct preloaded_file **); static int multiboot_obj_loadfile(char *, uint64_t, struct preloaded_file **);
static int multiboot_obj_exec(struct preloaded_file *fp); static int multiboot_obj_exec(struct preloaded_file *fp);
struct file_format multiboot = { multiboot_loadfile, multiboot_exec }; struct file_format multiboot = { multiboot_loadfile, multiboot_exec };
@ -108,7 +108,7 @@ max_addr(void)
} }
static int static int
multiboot_loadfile(char *filename, u_int64_t dest, multiboot_loadfile(char *filename, uint64_t dest,
struct preloaded_file **result) struct preloaded_file **result)
{ {
uint32_t *magic; uint32_t *magic;
@ -394,7 +394,7 @@ multiboot_exec(struct preloaded_file *fp)
} }
static int static int
multiboot_obj_loadfile(char *filename, u_int64_t dest, multiboot_obj_loadfile(char *filename, uint64_t dest,
struct preloaded_file **result) struct preloaded_file **result)
{ {
struct preloaded_file *mfp, *kfp, *rfp; struct preloaded_file *mfp, *kfp, *rfp;

View File

@ -85,11 +85,11 @@ static ssize_t pxe_netif_put(struct iodesc *desc, void *pkt, size_t len);
static void pxe_netif_end(struct netif *nif); static void pxe_netif_end(struct netif *nif);
extern struct netif_stats pxe_st[]; extern struct netif_stats pxe_st[];
extern u_int16_t __bangpxeseg; extern uint16_t __bangpxeseg;
extern u_int16_t __bangpxeoff; extern uint16_t __bangpxeoff;
extern void __bangpxeentry(void); extern void __bangpxeentry(void);
extern u_int16_t __pxenvseg; extern uint16_t __pxenvseg;
extern u_int16_t __pxenvoff; extern uint16_t __pxenvoff;
extern void __pxenventry(void); extern void __pxenventry(void);
struct netif_dif pxe_ifs[] = { struct netif_dif pxe_ifs[] = {

View File

@ -60,8 +60,8 @@ CTASSERT(offsetof(struct bootinfo, bi_size) == BI_SIZE);
/* Arguments passed in from the boot1/boot2 loader */ /* Arguments passed in from the boot1/boot2 loader */
static struct bootargs *kargs; static struct bootargs *kargs;
static u_int32_t initial_howto; static uint32_t initial_howto;
static u_int32_t initial_bootdev; static uint32_t initial_bootdev;
static struct bootinfo *initial_bootinfo; static struct bootinfo *initial_bootinfo;
struct arch_switch archsw; /* MI/MD interface boundary */ struct arch_switch archsw; /* MI/MD interface boundary */

View File

@ -164,7 +164,7 @@ arprecv(struct iodesc *d, void **pkt, void **payload, time_t tleft, void *extra)
{ {
ssize_t n; ssize_t n;
struct ether_arp *ah; struct ether_arp *ah;
u_int16_t etype; /* host order */ uint16_t etype; /* host order */
void *ptr; void *ptr;
#ifdef ARP_DEBUG #ifdef ARP_DEBUG

View File

@ -190,7 +190,7 @@ bootp(int sock)
#ifdef SUPPORT_DHCP #ifdef SUPPORT_DHCP
if(dhcp_ok) { if(dhcp_ok) {
u_int32_t leasetime; uint32_t leasetime;
bp->bp_vend[6] = DHCPREQUEST; bp->bp_vend[6] = DHCPREQUEST;
bp->bp_vend[7] = TAG_REQ_ADDR; bp->bp_vend[7] = TAG_REQ_ADDR;
bp->bp_vend[8] = 4; bp->bp_vend[8] = 4;

View File

@ -77,7 +77,7 @@ n_short bp_server_port; /* net order */
* (Note, really four ints, NOT chars. Blech.) * (Note, really four ints, NOT chars. Blech.)
*/ */
struct xdr_inaddr { struct xdr_inaddr {
u_int32_t atype; uint32_t atype;
int32_t addr[4]; int32_t addr[4];
}; };
@ -108,16 +108,16 @@ bp_whoami(int sockfd)
{ {
/* RPC structures for PMAPPROC_CALLIT */ /* RPC structures for PMAPPROC_CALLIT */
struct args { struct args {
u_int32_t prog; uint32_t prog;
u_int32_t vers; uint32_t vers;
u_int32_t proc; uint32_t proc;
u_int32_t arglen; uint32_t arglen;
struct xdr_inaddr xina; struct xdr_inaddr xina;
} *args; } *args;
struct repl { struct repl {
u_int16_t _pad; uint16_t _pad;
u_int16_t port; uint16_t port;
u_int32_t encap_len; uint32_t encap_len;
/* encapsulated data here */ /* encapsulated data here */
n_long capsule[64]; n_long capsule[64];
} *repl; } *repl;

View File

@ -47,12 +47,12 @@
* Macros to convert DOS-format 16-bit and 32-bit quantities * Macros to convert DOS-format 16-bit and 32-bit quantities
*/ */
#define cv2(p) ((u_int16_t)(p)[0] | \ #define cv2(p) ((uint16_t)(p)[0] | \
((u_int16_t)(p)[1] << 010)) ((uint16_t)(p)[1] << 010))
#define cv4(p) ((u_int32_t)(p)[0] | \ #define cv4(p) ((uint32_t)(p)[0] | \
((u_int32_t)(p)[1] << 010) | \ ((uint32_t)(p)[1] << 010) | \
((u_int32_t)(p)[2] << 020) | \ ((uint32_t)(p)[2] << 020) | \
((u_int32_t)(p)[3] << 030)) ((uint32_t)(p)[3] << 030))
/* /*
* Directory, filesystem, and file structures. * Directory, filesystem, and file structures.

View File

@ -152,7 +152,7 @@ struct fs_ops ext2fs_fsops = {
#define ino_to_bo(fs, ino) (ino_to_bgo(fs, ino) % (fs)->fs_ipb) #define ino_to_bo(fs, ino) (ino_to_bgo(fs, ino) % (fs)->fs_ipb)
#define nindir(fs) \ #define nindir(fs) \
((fs)->fs_bsize / sizeof(u_int32_t)) ((fs)->fs_bsize / sizeof(uint32_t))
#define lblkno(fs, loc) /* loc / bsize */ \ #define lblkno(fs, loc) /* loc / bsize */ \
((loc) >> (fs)->fs_bshift) ((loc) >> (fs)->fs_bshift)
#define smalllblktosize(fs, blk) /* blk * bsize */ \ #define smalllblktosize(fs, blk) /* blk * bsize */ \
@ -170,45 +170,45 @@ struct fs_ops ext2fs_fsops = {
* superblock describing ext2fs * superblock describing ext2fs
*/ */
struct ext2fs_disk { struct ext2fs_disk {
u_int32_t fd_inodes; /* # of inodes */ uint32_t fd_inodes; /* # of inodes */
u_int32_t fd_blocks; /* # of blocks */ uint32_t fd_blocks; /* # of blocks */
u_int32_t fd_resblk; /* # of reserved blocks */ uint32_t fd_resblk; /* # of reserved blocks */
u_int32_t fd_freeblk; /* # of free blocks */ uint32_t fd_freeblk; /* # of free blocks */
u_int32_t fd_freeino; /* # of free inodes */ uint32_t fd_freeino; /* # of free inodes */
u_int32_t fd_firstblk; /* first data block */ uint32_t fd_firstblk; /* first data block */
u_int32_t fd_bsize; /* block size */ uint32_t fd_bsize; /* block size */
u_int32_t fd_fsize; /* frag size */ uint32_t fd_fsize; /* frag size */
u_int32_t fd_bpg; /* blocks per group */ uint32_t fd_bpg; /* blocks per group */
u_int32_t fd_fpg; /* frags per group */ uint32_t fd_fpg; /* frags per group */
u_int32_t fd_ipg; /* inodes per group */ uint32_t fd_ipg; /* inodes per group */
u_int32_t fd_mtime; /* mount time */ uint32_t fd_mtime; /* mount time */
u_int32_t fd_wtime; /* write time */ uint32_t fd_wtime; /* write time */
u_int16_t fd_mount; /* # of mounts */ uint16_t fd_mount; /* # of mounts */
int16_t fd_maxmount; /* max # of mounts */ int16_t fd_maxmount; /* max # of mounts */
u_int16_t fd_magic; /* magic number */ uint16_t fd_magic; /* magic number */
u_int16_t fd_state; /* state */ uint16_t fd_state; /* state */
u_int16_t fd_eflag; /* error flags */ uint16_t fd_eflag; /* error flags */
u_int16_t fd_mnrrev; /* minor revision */ uint16_t fd_mnrrev; /* minor revision */
u_int32_t fd_lastchk; /* last check */ uint32_t fd_lastchk; /* last check */
u_int32_t fd_chkintvl; /* maximum check interval */ uint32_t fd_chkintvl; /* maximum check interval */
u_int32_t fd_os; /* os */ uint32_t fd_os; /* os */
u_int32_t fd_revision; /* revision */ uint32_t fd_revision; /* revision */
u_int16_t fd_uid; /* uid for reserved blocks */ uint16_t fd_uid; /* uid for reserved blocks */
u_int16_t fd_gid; /* gid for reserved blocks */ uint16_t fd_gid; /* gid for reserved blocks */
u_int32_t fd_firstino; /* first non-reserved inode */ uint32_t fd_firstino; /* first non-reserved inode */
u_int16_t fd_isize; /* inode size */ uint16_t fd_isize; /* inode size */
u_int16_t fd_nblkgrp; /* block group # of superblock */ uint16_t fd_nblkgrp; /* block group # of superblock */
u_int32_t fd_fcompat; /* compatible features */ uint32_t fd_fcompat; /* compatible features */
u_int32_t fd_fincompat; /* incompatible features */ uint32_t fd_fincompat; /* incompatible features */
u_int32_t fd_frocompat; /* read-only compatibilties */ uint32_t fd_frocompat; /* read-only compatibilties */
u_int8_t fd_uuid[16]; /* volume uuid */ uint8_t fd_uuid[16]; /* volume uuid */
char fd_volname[16]; /* volume name */ char fd_volname[16]; /* volume name */
char fd_fsmnt[64]; /* name last mounted on */ char fd_fsmnt[64]; /* name last mounted on */
u_int32_t fd_bitmap; /* compression bitmap */ uint32_t fd_bitmap; /* compression bitmap */
u_int8_t fd_nblkpa; /* # of blocks to preallocate */ uint8_t fd_nblkpa; /* # of blocks to preallocate */
u_int8_t fd_ndblkpa; /* # of dir blocks to preallocate */ uint8_t fd_ndblkpa; /* # of dir blocks to preallocate */
}; };
struct ext2fs_core { struct ext2fs_core {
@ -251,39 +251,39 @@ struct ext2fs {
}; };
struct ext2blkgrp { struct ext2blkgrp {
u_int32_t bg_blkmap; /* block bitmap */ uint32_t bg_blkmap; /* block bitmap */
u_int32_t bg_inomap; /* inode bitmap */ uint32_t bg_inomap; /* inode bitmap */
u_int32_t bg_inotbl; /* inode table */ uint32_t bg_inotbl; /* inode table */
u_int16_t bg_nfblk; /* # of free blocks */ uint16_t bg_nfblk; /* # of free blocks */
u_int16_t bg_nfino; /* # of free inodes */ uint16_t bg_nfino; /* # of free inodes */
u_int16_t bg_ndirs; /* # of dirs */ uint16_t bg_ndirs; /* # of dirs */
char bg_pad[14]; char bg_pad[14];
}; };
struct ext2dinode { struct ext2dinode {
u_int16_t di_mode; /* mode */ uint16_t di_mode; /* mode */
u_int16_t di_uid; /* uid */ uint16_t di_uid; /* uid */
u_int32_t di_size; /* byte size */ uint32_t di_size; /* byte size */
u_int32_t di_atime; /* access time */ uint32_t di_atime; /* access time */
u_int32_t di_ctime; /* creation time */ uint32_t di_ctime; /* creation time */
u_int32_t di_mtime; /* modification time */ uint32_t di_mtime; /* modification time */
u_int32_t di_dtime; /* deletion time */ uint32_t di_dtime; /* deletion time */
u_int16_t di_gid; /* gid */ uint16_t di_gid; /* gid */
u_int16_t di_nlink; /* link count */ uint16_t di_nlink; /* link count */
u_int32_t di_nblk; /* block count */ uint32_t di_nblk; /* block count */
u_int32_t di_flags; /* file flags */ uint32_t di_flags; /* file flags */
u_int32_t di_osdep1; /* os dependent stuff */ uint32_t di_osdep1; /* os dependent stuff */
u_int32_t di_db[EXT2_NDADDR]; /* direct blocks */ uint32_t di_db[EXT2_NDADDR]; /* direct blocks */
u_int32_t di_ib[EXT2_NIADDR]; /* indirect blocks */ uint32_t di_ib[EXT2_NIADDR]; /* indirect blocks */
u_int32_t di_version; /* version */ uint32_t di_version; /* version */
u_int32_t di_facl; /* file acl */ uint32_t di_facl; /* file acl */
u_int32_t di_dacl; /* dir acl */ uint32_t di_dacl; /* dir acl */
u_int32_t di_faddr; /* fragment addr */ uint32_t di_faddr; /* fragment addr */
u_int8_t di_frag; /* fragment number */ uint8_t di_frag; /* fragment number */
u_int8_t di_fsize; /* fragment size */ uint8_t di_fsize; /* fragment size */
char di_pad[10]; char di_pad[10];
@ -293,10 +293,10 @@ struct ext2dinode {
#define EXT2_MAXNAMLEN 255 #define EXT2_MAXNAMLEN 255
struct ext2dirent { struct ext2dirent {
u_int32_t d_ino; /* inode */ uint32_t d_ino; /* inode */
u_int16_t d_reclen; /* directory entry length */ uint16_t d_reclen; /* directory entry length */
u_int8_t d_namlen; /* name length */ uint8_t d_namlen; /* name length */
u_int8_t d_type; /* file type */ uint8_t d_type; /* file type */
char d_name[EXT2_MAXNAMLEN]; char d_name[EXT2_MAXNAMLEN];
}; };

View File

@ -40,7 +40,7 @@
#define _STAND_NET_H #define _STAND_NET_H
#ifndef _KERNEL /* XXX - see <netinet/in.h> */ #ifndef _KERNEL /* XXX - see <netinet/in.h> */
#undef __IPADDR #undef __IPADDR
#define __IPADDR(x) htonl((u_int32_t)(x)) #define __IPADDR(x) htonl((uint32_t)(x))
#endif #endif
#include "iodesc.h" #include "iodesc.h"

View File

@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$");
struct auth_info { struct auth_info {
int32_t authtype; /* auth type */ int32_t authtype; /* auth type */
u_int32_t authlen; /* auth length */ uint32_t authlen; /* auth length */
}; };
struct auth_unix { struct auth_unix {
@ -75,23 +75,23 @@ struct auth_unix {
}; };
struct rpc_call { struct rpc_call {
u_int32_t rp_xid; /* request transaction id */ uint32_t rp_xid; /* request transaction id */
int32_t rp_direction; /* call direction (0) */ int32_t rp_direction; /* call direction (0) */
u_int32_t rp_rpcvers; /* rpc version (2) */ uint32_t rp_rpcvers; /* rpc version (2) */
u_int32_t rp_prog; /* program */ uint32_t rp_prog; /* program */
u_int32_t rp_vers; /* version */ uint32_t rp_vers; /* version */
u_int32_t rp_proc; /* procedure */ uint32_t rp_proc; /* procedure */
}; };
struct rpc_reply { struct rpc_reply {
u_int32_t rp_xid; /* request transaction id */ uint32_t rp_xid; /* request transaction id */
int32_t rp_direction; /* call direction (1) */ int32_t rp_direction; /* call direction (1) */
int32_t rp_astatus; /* accept status (0: accepted) */ int32_t rp_astatus; /* accept status (0: accepted) */
union { union {
u_int32_t rpu_errno; uint32_t rpu_errno;
struct { struct {
struct auth_info rok_auth; struct auth_info rok_auth;
u_int32_t rok_status; uint32_t rok_status;
} rpu_rok; } rpu_rok;
} rp_u; } rp_u;
}; };
@ -283,10 +283,10 @@ rpc_fromaddr(void *pkt, struct in_addr *addr, u_short *port)
n_long ip_src; n_long ip_src;
n_long ip_dst; n_long ip_dst;
/* UDP header: */ /* UDP header: */
u_int16_t uh_sport; /* source port */ uint16_t uh_sport; /* source port */
u_int16_t uh_dport; /* destination port */ uint16_t uh_dport; /* destination port */
int16_t uh_ulen; /* udp length */ int16_t uh_ulen; /* udp length */
u_int16_t uh_sum; /* udp checksum */ uint16_t uh_sum; /* udp checksum */
/* RPC reply header: */ /* RPC reply header: */
struct rpc_reply rpc; struct rpc_reply rpc;
} *hhdr; } *hhdr;

View File

@ -598,7 +598,7 @@ OF_write(ihandle_t instance, void *addr, int len)
/* Seek to a position. */ /* Seek to a position. */
int int
OF_seek(ihandle_t instance, u_int64_t pos) OF_seek(ihandle_t instance, uint64_t pos)
{ {
static struct { static struct {
cell_t name; cell_t name;

View File

@ -54,7 +54,7 @@ int main(int ac, char **av);
static void exit(int) __dead2; static void exit(int) __dead2;
static void load(const char *); static void load(const char *);
static int dskread(void *, u_int64_t, int); static int dskread(void *, uint64_t, int);
static void usage(void); static void usage(void);
@ -79,8 +79,8 @@ static char *__ultoa(char *buf, u_long val, int base);
/* /*
* Open Firmware interface functions * Open Firmware interface functions
*/ */
typedef u_int32_t ofwcell_t; typedef uint32_t ofwcell_t;
typedef u_int32_t u_ofwh_t; typedef uint32_t u_ofwh_t;
typedef int (*ofwfp_t)(void *); typedef int (*ofwfp_t)(void *);
ofwfp_t ofw; /* the prom Open Firmware entry */ ofwfp_t ofw; /* the prom Open Firmware entry */
ofwh_t chosenh; ofwh_t chosenh;
@ -94,7 +94,7 @@ static int ofw_setprop(ofwh_t, const char *, void *, size_t);
static int ofw_read(ofwh_t, void *, size_t); static int ofw_read(ofwh_t, void *, size_t);
static int ofw_write(ofwh_t, const void *, size_t); static int ofw_write(ofwh_t, const void *, size_t);
static int ofw_claim(void *virt, size_t len, u_int align); static int ofw_claim(void *virt, size_t len, u_int align);
static int ofw_seek(ofwh_t, u_int64_t); static int ofw_seek(ofwh_t, uint64_t);
static void ofw_exit(void) __dead2; static void ofw_exit(void) __dead2;
ofwh_t bootdevh; ofwh_t bootdevh;
@ -322,7 +322,7 @@ ofw_write(ofwh_t devh, const void *buf, size_t len)
} }
static int static int
ofw_seek(ofwh_t devh, u_int64_t off) ofw_seek(ofwh_t devh, uint64_t off)
{ {
ofwcell_t args[] = { ofwcell_t args[] = {
(ofwcell_t)"seek", (ofwcell_t)"seek",
@ -541,7 +541,7 @@ load(const char *fname)
} }
static int static int
dskread(void *buf, u_int64_t lba, int nblk) dskread(void *buf, uint64_t lba, int nblk)
{ {
/* /*
* The Open Firmware should open the correct partition for us. * The Open Firmware should open the correct partition for us.

View File

@ -57,7 +57,7 @@ struct trampoline_data {
vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb); vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb);
int int
ppc64_elf_loadfile(char *filename, u_int64_t dest, ppc64_elf_loadfile(char *filename, uint64_t dest,
struct preloaded_file **result) struct preloaded_file **result)
{ {
int r; int r;

View File

@ -46,7 +46,7 @@ extern char end[];
extern vm_offset_t reloc; /* From <arch>/conf.c */ extern vm_offset_t reloc; /* From <arch>/conf.c */
int int
__elfN(ofw_loadfile)(char *filename, u_int64_t dest, __elfN(ofw_loadfile)(char *filename, uint64_t dest,
struct preloaded_file **result) struct preloaded_file **result)
{ {
int r; int r;

View File

@ -40,7 +40,7 @@ struct arch_switch archsw; /* MI/MD interface boundary */
extern char end[]; extern char end[];
extern char bootprog_info[]; extern char bootprog_info[];
u_int32_t acells, scells; uint32_t acells, scells;
static char bootargs[128]; static char bootargs[128];
@ -73,7 +73,7 @@ memsize(void)
phandle_t memoryp; phandle_t memoryp;
cell_t reg[24]; cell_t reg[24];
int i, sz; int i, sz;
u_int64_t memsz; uint64_t memsz;
memsz = 0; memsz = 0;
memoryp = OF_instance_to_package(memory); memoryp = OF_instance_to_package(memory);

View File

@ -46,7 +46,7 @@ extern char end[];
extern vm_offset_t reloc; /* From <arch>/conf.c */ extern vm_offset_t reloc; /* From <arch>/conf.c */
int int
ppc64_ofw_elf_loadfile(char *filename, u_int64_t dest, ppc64_ofw_elf_loadfile(char *filename, uint64_t dest,
struct preloaded_file **result) struct preloaded_file **result)
{ {
int r; int r;

View File

@ -61,7 +61,7 @@ static void bcopy(const void *src, void *dst, size_t len);
static void bzero(void *b, size_t len); static void bzero(void *b, size_t len);
static int domount(const char *device); static int domount(const char *device);
static int dskread(void *buf, u_int64_t lba, int nblk); static int dskread(void *buf, uint64_t lba, int nblk);
static void panic(const char *fmt, ...) __dead2; static void panic(const char *fmt, ...) __dead2;
static int printf(const char *fmt, ...); static int printf(const char *fmt, ...);
@ -78,8 +78,8 @@ static char *__ultoa(char *buf, u_long val, int base);
/* /*
* Open Firmware interface functions * Open Firmware interface functions
*/ */
typedef u_int64_t ofwcell_t; typedef uint64_t ofwcell_t;
typedef u_int32_t u_ofwh_t; typedef uint32_t u_ofwh_t;
typedef int (*ofwfp_t)(ofwcell_t []); typedef int (*ofwfp_t)(ofwcell_t []);
static ofwfp_t ofw; /* the PROM Open Firmware entry */ static ofwfp_t ofw; /* the PROM Open Firmware entry */
@ -89,7 +89,7 @@ static ofwh_t ofw_open(const char *);
static int ofw_getprop(ofwh_t, const char *, void *, size_t); static int ofw_getprop(ofwh_t, const char *, void *, size_t);
static int ofw_read(ofwh_t, void *, size_t); static int ofw_read(ofwh_t, void *, size_t);
static int ofw_write(ofwh_t, const void *, size_t); static int ofw_write(ofwh_t, const void *, size_t);
static int ofw_seek(ofwh_t, u_int64_t); static int ofw_seek(ofwh_t, uint64_t);
static void ofw_exit(void) __dead2; static void ofw_exit(void) __dead2;
static ofwh_t stdinh, stdouth; static ofwh_t stdinh, stdouth;
@ -251,7 +251,7 @@ ofw_write(ofwh_t devh, const void *buf, size_t len)
} }
static int static int
ofw_seek(ofwh_t devh, u_int64_t off) ofw_seek(ofwh_t devh, uint64_t off)
{ {
ofwcell_t args[] = { ofwcell_t args[] = {
(ofwcell_t)"seek", (ofwcell_t)"seek",
@ -515,7 +515,7 @@ domount(const char *device)
} }
static int static int
dskread(void *buf, u_int64_t lba, int nblk) dskread(void *buf, uint64_t lba, int nblk)
{ {
/* /*

View File

@ -117,7 +117,7 @@ uint32_t cpu_get_mid_sun4u(void);
static void tlb_init_sun4u(void); static void tlb_init_sun4u(void);
#ifdef LOADER_DEBUG #ifdef LOADER_DEBUG
typedef u_int64_t tte_t; typedef uint64_t tte_t;
static void pmap_print_tlb_sun4u(void); static void pmap_print_tlb_sun4u(void);
static void pmap_print_tte_sun4u(tte_t, tte_t); static void pmap_print_tte_sun4u(tte_t, tte_t);

View File

@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
extern vm_offset_t md_load(char *, vm_offset_t *, vm_offset_t *); extern vm_offset_t md_load(char *, vm_offset_t *, vm_offset_t *);
int int
__elfN(uboot_load)(char *filename, u_int64_t dest, __elfN(uboot_load)(char *filename, uint64_t dest,
struct preloaded_file **result) struct preloaded_file **result)
{ {
int r; int r;

View File

@ -55,7 +55,7 @@ static struct bootinfo bi;
* MOD_METADATA (variable) type-specific metadata * MOD_METADATA (variable) type-specific metadata
*/ */
#define COPY32(v, a, c) { \ #define COPY32(v, a, c) { \
u_int32_t x = (v); \ uint32_t x = (v); \
if (c) \ if (c) \
CALLBACK(copyin, &x, a, sizeof(x)); \ CALLBACK(copyin, &x, a, sizeof(x)); \
a += sizeof(x); \ a += sizeof(x); \

View File

@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
* MOD_METADATA (variable) type-specific metadata * MOD_METADATA (variable) type-specific metadata
*/ */
#define COPY32(v, a, c) { \ #define COPY32(v, a, c) { \
u_int32_t x = (v); \ uint32_t x = (v); \
if (c) \ if (c) \
CALLBACK(copyin, &x, a, sizeof(x)); \ CALLBACK(copyin, &x, a, sizeof(x)); \
a += sizeof(x); \ a += sizeof(x); \
@ -67,7 +67,7 @@ __FBSDID("$FreeBSD$");
COPY32(strlen(s) + 1, a, c); \ COPY32(strlen(s) + 1, a, c); \
if (c) \ if (c) \
CALLBACK(copyin, s, a, strlen(s) + 1); \ CALLBACK(copyin, s, a, strlen(s) + 1); \
a += roundup(strlen(s) + 1, sizeof(u_int64_t));\ a += roundup(strlen(s) + 1, sizeof(uint64_t));\
} }
#define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c) #define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c)
@ -79,7 +79,7 @@ __FBSDID("$FreeBSD$");
COPY32(sizeof(s), a, c); \ COPY32(sizeof(s), a, c); \
if (c) \ if (c) \
CALLBACK(copyin, &s, a, sizeof(s)); \ CALLBACK(copyin, &s, a, sizeof(s)); \
a += roundup(sizeof(s), sizeof(u_int64_t)); \ a += roundup(sizeof(s), sizeof(uint64_t)); \
} }
#define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c) #define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c)
@ -90,7 +90,7 @@ __FBSDID("$FreeBSD$");
COPY32(mm->md_size, a, c); \ COPY32(mm->md_size, a, c); \
if (c) \ if (c) \
CALLBACK(copyin, mm->md_data, a, mm->md_size); \ CALLBACK(copyin, mm->md_data, a, mm->md_size); \
a += roundup(mm->md_size, sizeof(u_int64_t));\ a += roundup(mm->md_size, sizeof(uint64_t));\
} }
#define MOD_END(a, c) { \ #define MOD_END(a, c) { \
@ -104,7 +104,7 @@ bi_copymodules64(vm_offset_t addr)
struct preloaded_file *fp; struct preloaded_file *fp;
struct file_metadata *md; struct file_metadata *md;
int c; int c;
u_int64_t v; uint64_t v;
c = addr != 0; c = addr != 0;
/* start with the first module on the list, should be the kernel */ /* start with the first module on the list, should be the kernel */
@ -185,8 +185,8 @@ bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernendp)
struct userboot_devdesc *rootdev; struct userboot_devdesc *rootdev;
struct file_metadata *md; struct file_metadata *md;
vm_offset_t addr; vm_offset_t addr;
u_int64_t kernend; uint64_t kernend;
u_int64_t envp; uint64_t envp;
vm_offset_t size; vm_offset_t size;
char *rootdevname; char *rootdevname;
int howto; int howto;

View File

@ -60,9 +60,9 @@ struct file_format amd64_elf_obj = { elf64_obj_loadfile, elf64_obj_exec };
#define PG_U 0x004 #define PG_U 0x004
#define PG_PS 0x080 #define PG_PS 0x080
typedef u_int64_t p4_entry_t; typedef uint64_t p4_entry_t;
typedef u_int64_t p3_entry_t; typedef uint64_t p3_entry_t;
typedef u_int64_t p2_entry_t; typedef uint64_t p2_entry_t;
#define GUEST_NULL_SEL 0 #define GUEST_NULL_SEL 0
#define GUEST_CODE_SEL 1 #define GUEST_CODE_SEL 1