summaryrefslogtreecommitdiff
path: root/stand/mips
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-12-02 00:07:31 +0000
committerWarner Losh <imp@FreeBSD.org>2017-12-02 00:07:31 +0000
commit0979948fe2d54d0614b76bc4f194536e39f1c538 (patch)
treeb0d43469c55c9a89ffe41dc0e3901951ff856d3d /stand/mips
parent59d395e06258cc846e3634304c3b66e67f1564b5 (diff)
downloadsrc-test2-0979948fe2d54d0614b76bc4f194536e39f1c538.tar.gz
src-test2-0979948fe2d54d0614b76bc4f194536e39f1c538.zip
Notes
Diffstat (limited to 'stand/mips')
-rw-r--r--stand/mips/beri/boot2/Makefile4
-rw-r--r--stand/mips/beri/boot2/boot2.c2
-rw-r--r--stand/mips/beri/common/altera_jtag_uart.c7
-rw-r--r--stand/mips/beri/loader/Makefile2
-rw-r--r--stand/mips/beri/loader/devicename.c6
-rw-r--r--stand/mips/beri/loader/exec.c2
-rw-r--r--stand/mips/beri/loader/loader.h1
7 files changed, 9 insertions, 15 deletions
diff --git a/stand/mips/beri/boot2/Makefile b/stand/mips/beri/boot2/Makefile
index c247aa8f6be6..4b1654f8d9da 100644
--- a/stand/mips/beri/boot2/Makefile
+++ b/stand/mips/beri/boot2/Makefile
@@ -47,9 +47,7 @@ MAN=
AFLAGS= -G0
-CFLAGS+= -I${.CURDIR} \
- -I${LDRSRC} \
- -D_KERNEL \
+CFLAGS+= -I${LDRSRC} \
-Wall \
-G0 \
-fno-pic -mno-abicalls \
diff --git a/stand/mips/beri/boot2/boot2.c b/stand/mips/beri/boot2/boot2.c
index 3db33c4ea0b0..8dba05012715 100644
--- a/stand/mips/beri/boot2/boot2.c
+++ b/stand/mips/beri/boot2/boot2.c
@@ -500,7 +500,7 @@ parse()
*/
unit = q[len-1];
if (unit < '0' || unit > '9') {
- printf("Invalid device: invalid unit\n", q,
+ printf("Invalid device: invalid unit %c\n",
unit);
return (-1);
}
diff --git a/stand/mips/beri/common/altera_jtag_uart.c b/stand/mips/beri/common/altera_jtag_uart.c
index 7edb45191c6a..e8230fe556c5 100644
--- a/stand/mips/beri/common/altera_jtag_uart.c
+++ b/stand/mips/beri/common/altera_jtag_uart.c
@@ -131,13 +131,6 @@ uart_control_write(uint32_t v)
}
static int
-uart_writable(void)
-{
-
- return ((uart_control_read() & ALTERA_JTAG_UART_CONTROL_WSPACE) != 0);
-}
-
-static int
uart_readable(void)
{
uint32_t v;
diff --git a/stand/mips/beri/loader/Makefile b/stand/mips/beri/loader/Makefile
index f2324891edc3..cbd1ecd334e4 100644
--- a/stand/mips/beri/loader/Makefile
+++ b/stand/mips/beri/loader/Makefile
@@ -67,7 +67,7 @@ SRCS+= altera_jtag_uart.c \
# Since we don't have a backward compatibility issue, default to this on BERI.
CFLAGS+= -DBOOT_PROMPT_123
-HELP_FILES+= help.mips
+HELP_FILES+= ${.CURDIR}/help.mips
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
diff --git a/stand/mips/beri/loader/devicename.c b/stand/mips/beri/loader/devicename.c
index 4a2c273992a9..968c946e82d8 100644
--- a/stand/mips/beri/loader/devicename.c
+++ b/stand/mips/beri/loader/devicename.c
@@ -88,7 +88,7 @@ beri_arch_parsedev(struct disk_devdesc **dev, const char *devspec,
struct disk_devdesc *idev;
struct devsw *dv;
int i, unit, err;
- const char *cp;
+ char *cp;
const char *np;
/* minimum length check */
@@ -130,8 +130,10 @@ beri_arch_parsedev(struct disk_devdesc **dev, const char *devspec,
goto fail;
}
} else {
- cp = np;
+ err = EUNIT;
+ goto fail;
}
+
if (*cp && (*cp != ':')) {
err = EINVAL;
goto fail;
diff --git a/stand/mips/beri/loader/exec.c b/stand/mips/beri/loader/exec.c
index 382b6a1c8723..68e149d5cb01 100644
--- a/stand/mips/beri/loader/exec.c
+++ b/stand/mips/beri/loader/exec.c
@@ -119,7 +119,7 @@ beri_elf64_exec(struct preloaded_file *fp)
* least bootinfop.
*/
(*entry)(boot2_argc, (register_t)boot2_argv, (register_t)boot2_envv,
- &bootinfo);
+ (register_t)&bootinfo);
panic("exec returned");
}
diff --git a/stand/mips/beri/loader/loader.h b/stand/mips/beri/loader/loader.h
index e4152e72df92..4005caa0eebc 100644
--- a/stand/mips/beri/loader/loader.h
+++ b/stand/mips/beri/loader/loader.h
@@ -41,6 +41,7 @@ extern struct devsw beri_cfi_disk;
extern struct devsw beri_sdcard_disk;
/* devicename.c */
+struct env_var;
int beri_arch_setcurrdev(struct env_var *, int, const void *);
char *beri_arch_fmtdev(void *);
int beri_arch_getdev(void **, const char *, const char **);