Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/luna68k/stand/boot Use proper signedness and exact-...
details: https://anonhg.NetBSD.org/src/rev/06c3159eb35f
branches: trunk
changeset: 336125:06c3159eb35f
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Feb 14 05:03:09 2015 +0000
description:
Use proper signedness and exact-width interger types.
diffstat:
sys/arch/luna68k/stand/boot/bmd.c | 32 ++--
sys/arch/luna68k/stand/boot/disklabel.c | 22 +-
sys/arch/luna68k/stand/boot/kbd.c | 4 +-
sys/arch/luna68k/stand/boot/rcvbuf.h | 8 +-
sys/arch/luna68k/stand/boot/samachdep.h | 18 +-
sys/arch/luna68k/stand/boot/sc.c | 39 ++--
sys/arch/luna68k/stand/boot/scsi.c | 14 +-
sys/arch/luna68k/stand/boot/scsireg.h | 212 ++++++++++++++--------------
sys/arch/luna68k/stand/boot/scsivar.h | 10 +-
sys/arch/luna68k/stand/boot/sioreg.h | 10 +-
sys/arch/luna68k/stand/boot/ufs_disksubr.c | 4 +-
11 files changed, 187 insertions(+), 186 deletions(-)
diffs (truncated from 807 to 300 lines):
diff -r 60934697bced -r 06c3159eb35f sys/arch/luna68k/stand/boot/bmd.c
--- a/sys/arch/luna68k/stand/boot/bmd.c Sat Feb 14 05:00:23 2015 +0000
+++ b/sys/arch/luna68k/stand/boot/bmd.c Sat Feb 14 05:03:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bmd.c,v 1.4 2014/01/11 15:51:02 tsutsui Exp $ */
+/* $NetBSD: bmd.c,v 1.5 2015/02/14 05:03:09 tsutsui Exp $ */
/*
* Copyright (c) 1992 OMRON Corporation.
@@ -86,8 +86,8 @@
union bmd_rfcnt {
struct {
- short rfc_hcnt;
- short rfc_vcnt;
+ int16_t rfc_hcnt;
+ int16_t rfc_vcnt;
} p;
uint32_t u;
};
@@ -117,9 +117,9 @@
#define SKIP_NEXT_LINE(addr) (addr += (PL_WIDTH - SL_WIDTH))
-void bmd_draw_char(char *, char *, int, int, int);
-void bmd_reverse_char(char *, char *, int, int);
-void bmd_erase_char(char *, char *, int, int);
+void bmd_draw_char(uint8_t *, uint8_t *, int, int, int);
+void bmd_reverse_char(uint8_t *, uint8_t *, int, int);
+void bmd_erase_char(uint8_t *, uint8_t *, int, int);
void bmd_erase_screen(volatile uint32_t *);
void bmd_scroll_screen(volatile uint32_t *, volatile uint32_t *,
int, int, int, int);
@@ -130,13 +130,13 @@
struct bmd_linec *bl_prev;
int bl_col;
int bl_end;
- u_char bl_line[128];
+ uint8_t bl_line[128];
};
struct bmd_softc {
int bc_stat;
- char *bc_raddr;
- char *bc_waddr;
+ uint8_t *bc_raddr;
+ uint8_t *bc_waddr;
int bc_xmin;
int bc_xmax;
int bc_ymin;
@@ -280,7 +280,7 @@
bmdinit(void)
{
volatile uint32_t *bmd_rfcnt = (uint32_t *)0xB1000000;
- volatile long *bmd_bmsel = (long *)0xB1040000;
+ volatile uint32_t *bmd_bmsel = (uint32_t *)0xB1040000;
struct bmd_softc *bp = &bmd_softc;
struct bmd_linec *bq;
int i;
@@ -290,8 +290,8 @@
* adjust plane position
*/
- bp->bc_raddr = (char *)0xB10C0008; /* plane-0 hardware address */
- bp->bc_waddr = (char *)0xB1080008; /* common bitmap hardware address */
+ bp->bc_raddr = (uint8_t *)0xB10C0008; /* plane-0 hardware address */
+ bp->bc_waddr = (uint8_t *)0xB1080008; /* common bitmap hardware address */
rfcnt.p.rfc_hcnt = 7; /* shift left 16 dot */
rfcnt.p.rfc_vcnt = -27; /* shift down 1 dot */
*bmd_rfcnt = rfcnt.u;
@@ -331,7 +331,7 @@
}
void
-bmdadjust(short hcnt, short vcnt)
+bmdadjust(int16_t hcnt, int16_t vcnt)
{
volatile uint32_t *bmd_rfcnt = (uint32_t *)0xB1000000;
union bmd_rfcnt rfcnt;
@@ -462,7 +462,7 @@
*/
void
-bmd_draw_char(char *raddr, char *waddr, int col, int row, int c)
+bmd_draw_char(uint8_t *raddr, uint8_t *waddr, int col, int row, int c)
{
volatile uint16_t *p, *q;
volatile uint32_t *lp, *lq;
@@ -533,7 +533,7 @@
}
void
-bmd_reverse_char(char *raddr, char *waddr, int col, int row)
+bmd_reverse_char(uint8_t *raddr, uint8_t *waddr, int col, int row)
{
volatile uint16_t *p, *q;
volatile uint32_t *lp, *lq;
@@ -595,7 +595,7 @@
}
void
-bmd_erase_char(char *raddr, char *waddr, int col, int row)
+bmd_erase_char(uint8_t *raddr, uint8_t *waddr, int col, int row)
{
bmd_draw_char(raddr, waddr, col, row, 0);
diff -r 60934697bced -r 06c3159eb35f sys/arch/luna68k/stand/boot/disklabel.c
--- a/sys/arch/luna68k/stand/boot/disklabel.c Sat Feb 14 05:00:23 2015 +0000
+++ b/sys/arch/luna68k/stand/boot/disklabel.c Sat Feb 14 05:03:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.c,v 1.6 2015/01/02 19:42:05 christos Exp $ */
+/* $NetBSD: disklabel.c,v 1.7 2015/02/14 05:03:09 tsutsui Exp $ */
/*
* Copyright (c) 1992 OMRON Corporation.
@@ -91,17 +91,17 @@
#define FS_MAGIC FS_UFS1_MAGIC
#define LABEL_SIZE BBSIZE
-u_char lbl_buff[LABEL_SIZE];
+uint8_t lbl_buff[LABEL_SIZE];
#if 0
-u_short
+uint16_t
dkcksum(struct disklabel *lp)
{
- u_short *start, *end;
- u_short sum = 0;
+ uint16_t *start, *end;
+ uint16_t sum = 0;
- start = (u_short *)lp;
- end = (u_short *)&lp->d_partitions[lp->d_npartitions];
+ start = (uint16_t *)lp;
+ end = (uint16_t *)&lp->d_partitions[lp->d_npartitions];
while (start < end)
sum ^= *start++;
return sum;
@@ -114,7 +114,7 @@
struct scd_dk_label *omp = (struct scd_dk_label *) lbl_buff;
struct disklabel *bp = (struct disklabel *)&lbl_buff[LABELOFFSET];
struct fs *fp = (struct fs *) lbl_buff;
- u_short *p;
+ uint16_t *p;
u_long chksum, count;
char *q;
int i, j;
@@ -180,7 +180,7 @@
/* checksum of disk-label */
chksum = 0;
count = sizeof(struct scd_dk_label) / sizeof(short int);
- for (p= (u_short *) lbl_buff; count > 0; count--) {
+ for (p= (uint16_t *)lbl_buff; count > 0; count--) {
if (count == 1)
printf("Check Sum: 0x%lx\n", chksum);
chksum ^= *p++;
@@ -243,7 +243,7 @@
/* restump checksum of OMRON disklabel */
chksum = 0;
count = sizeof(struct scd_dk_label) / sizeof(short int);
- for (p= (u_short *) lbl_buff; count > 1; count--) {
+ for (p= (uint16_t *)lbl_buff; count > 1; count--) {
chksum ^= *p++;
}
printf("chksum: 0x%lx\n", chksum);
@@ -293,7 +293,7 @@
/* restump checksum of OMRON disklabel */
chksum = 0;
count = sizeof(struct scd_dk_label) / sizeof(short int);
- for (p = (u_short *)lbl_buff; count > 1; count--) {
+ for (p = (uint16_t *)lbl_buff; count > 1; count--) {
chksum ^= *p++;
}
omp->dkl_cksum = chksum;
diff -r 60934697bced -r 06c3159eb35f sys/arch/luna68k/stand/boot/kbd.c
--- a/sys/arch/luna68k/stand/boot/kbd.c Sat Feb 14 05:00:23 2015 +0000
+++ b/sys/arch/luna68k/stand/boot/kbd.c Sat Feb 14 05:03:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.2 2014/01/11 15:51:02 tsutsui Exp $ */
+/* $NetBSD: kbd.c,v 1.3 2015/02/14 05:03:09 tsutsui Exp $ */
/*
* Copyright (c) 1992 OMRON Corporation.
@@ -215,7 +215,7 @@
int meta_flag = 0;
int
-kbd_decode(u_char code)
+kbd_decode(uint8_t code)
{
unsigned int c, updown = 0;
diff -r 60934697bced -r 06c3159eb35f sys/arch/luna68k/stand/boot/rcvbuf.h
--- a/sys/arch/luna68k/stand/boot/rcvbuf.h Sat Feb 14 05:00:23 2015 +0000
+++ b/sys/arch/luna68k/stand/boot/rcvbuf.h Sat Feb 14 05:03:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rcvbuf.h,v 1.2 2014/01/11 15:51:02 tsutsui Exp $ */
+/* $NetBSD: rcvbuf.h,v 1.3 2015/02/14 05:03:09 tsutsui Exp $ */
/*
* Copyright (c) 1992 OMRON Corporation.
@@ -78,9 +78,9 @@
#define RBUF_SIZE 128
struct rcvbuf {
- u_char * volatile rb_push;
- u_char * volatile rb_pop;
- u_char rb_buf[RBUF_SIZE + 4];
+ uint8_t * volatile rb_push;
+ uint8_t * volatile rb_pop;
+ uint8_t rb_buf[RBUF_SIZE + 4];
};
#define RBUF_INIT(n) \
diff -r 60934697bced -r 06c3159eb35f sys/arch/luna68k/stand/boot/samachdep.h
--- a/sys/arch/luna68k/stand/boot/samachdep.h Sat Feb 14 05:00:23 2015 +0000
+++ b/sys/arch/luna68k/stand/boot/samachdep.h Sat Feb 14 05:03:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: samachdep.h,v 1.19 2014/04/21 11:06:55 tsutsui Exp $ */
+/* $NetBSD: samachdep.h,v 1.20 2015/02/14 05:03:09 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@@ -65,7 +65,7 @@
/* bmd.c */
void bmdinit(void);
int bmdputc(int);
-void bmdadjust(short, short);
+void bmdadjust(int16_t, int16_t);
void bmdclear(void);
/* boot.c */
@@ -81,7 +81,7 @@
int make_device(const char *, int *, int *, int *, char **);
/* disklabel.c */
-extern u_char lbl_buff[];
+extern uint8_t lbl_buff[];
int disklabel(int, char **);
/* font.c */
@@ -107,7 +107,7 @@
extern int default_unit;
/* kbd.c */
-int kbd_decode(u_char);
+int kbd_decode(uint8_t);
/* lance.c */
void *lance_attach(int, void *, void *, uint8_t *);
@@ -165,18 +165,18 @@
struct scsi_inquiry;
bool scident(uint, uint, uint, struct scsi_inquiry *, uint32_t *);
struct scsi_generic_cdb;
-int scsi_immed_command(int, int, int, struct scsi_generic_cdb *, u_char *,
+int scsi_immed_command(int, int, int, struct scsi_generic_cdb *, uint8_t *,
unsigned int);
-int scsi_request_sense(int, int, int, u_char *, unsigned int);
+int scsi_request_sense(int, int, int, uint8_t *, unsigned int);
int scsi_test_unit_rdy(int, int, int);
int scsi_format_unit(int, int, int);
int scintr(void);
/* scsi.c */
int scsi(int, char **);
-int scsi_read_raw(u_int, u_int, u_int, u_char *, u_int);
-int scsi_read(u_int, u_char *, u_int);
-int scsi_write(u_int, u_char *, u_int);
+int scsi_read_raw(u_int, u_int, u_int, uint8_t *, u_int);
+int scsi_read(u_int, uint8_t *, u_int);
+int scsi_write(u_int, uint8_t *, u_int);
/* screen.c */
int screen(int, char **);
diff -r 60934697bced -r 06c3159eb35f sys/arch/luna68k/stand/boot/sc.c
--- a/sys/arch/luna68k/stand/boot/sc.c Sat Feb 14 05:00:23 2015 +0000
+++ b/sys/arch/luna68k/stand/boot/sc.c Sat Feb 14 05:03:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sc.c,v 1.11 2014/04/16 11:18:00 tsutsui Exp $ */
+/* $NetBSD: sc.c,v 1.12 2015/02/14 05:03:09 tsutsui Exp $ */
/*
* Copyright (c) 1992 OMRON Corporation.
@@ -87,11 +87,11 @@
static void screset(struct scsi_softc *);
static void scprobe(struct scsi_softc *, uint, uint);
-static int issue_select(struct scsidevice *, u_char);
-static void ixfer_start(struct scsidevice *, int, u_char, int);
-static void ixfer_out(struct scsidevice *, int, u_char *);
-static void ixfer_in(struct scsidevice *, int, u_char *);
-static int scrun(int, int, u_char *, int, u_char *, int, volatile int *);
+static int issue_select(struct scsidevice *, uint8_t);
+static void ixfer_start(struct scsidevice *, int, uint8_t, int);
+static void ixfer_out(struct scsidevice *, int, uint8_t *);
+static void ixfer_in(struct scsidevice *, int, uint8_t *);
+static int scrun(int, int, uint8_t *, int, uint8_t *, int, volatile int *);
static int scfinish(int);
static void scabort(struct scsi_softc *);
Home |
Main Index |
Thread Index |
Old Index