summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-09-18 13:30:57 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-09-18 13:30:57 +0000
commitabe096b5a6fa73c396c488a5717f3c30376adf55 (patch)
tree90f3a2e49f3ea254a7c7c8c179c43b0ee9e922d5 /sys/arch/amd64
parentf65b933bba6a8194fa11a08c5f26958c96292870 (diff)
Remove support for building the boot blocks with DEBUGFLAGS=-D_TEST, which is
supposed to create a userland binary in order to test non-boot related functionality. This feature has been bitrotting in a non-compiling state for years, and causes a too-many-ifdefs disease now that there are intrusive EFI changes. No functional change.
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/stand/Makefile.inc5
-rw-r--r--sys/arch/amd64/stand/boot/conf.c3
-rw-r--r--sys/arch/amd64/stand/cdboot/conf.c3
-rw-r--r--sys/arch/amd64/stand/libsa/cmd_i386.c6
-rw-r--r--sys/arch/amd64/stand/libsa/dev_i386.c11
-rw-r--r--sys/arch/amd64/stand/libsa/machdep.c7
-rw-r--r--sys/arch/amd64/stand/libsa/memprobe.c4
-rw-r--r--sys/arch/amd64/stand/pxeboot/conf.c18
8 files changed, 11 insertions, 46 deletions
diff --git a/sys/arch/amd64/stand/Makefile.inc b/sys/arch/amd64/stand/Makefile.inc
index 383290bd8ff..14fc7f6eabf 100644
--- a/sys/arch/amd64/stand/Makefile.inc
+++ b/sys/arch/amd64/stand/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.11 2014/01/22 03:47:22 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.12 2015/09/18 13:30:55 miod Exp $
CFLAGS=${DEBUG} ${COPTS} -Os -Wall -Werror
CFLAGS+= -fno-stack-protector -DMDRANDOM
@@ -11,7 +11,6 @@ DEBUGFLAGS=
# DEBUGFLAGS+=-DBIOS_DEBUG
# DEBUGFLAGS+=-DEXEC_DEBUG
# DEBUGFLAGS+=-DALLOC_TRACE
-# DEBUGFLAGS+=-g -D_TEST
# DEBUGFLAGS+=-DUNIX_DEBUG
# DEBUGFLAGS+=-DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG
# DEBUGFLAGS+=-DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG
@@ -23,9 +22,7 @@ BOOTMAGIC=0xc001d00d
#ROM_SIZE=32768
CLEANFILES+= assym.h machine
-.if empty(DEBUGFLAGS:M-D_TEST)
SACFLAGS+=-nostdinc -fno-builtin -fpack-struct
-.endif
.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(obj)
.BEGIN:
diff --git a/sys/arch/amd64/stand/boot/conf.c b/sys/arch/amd64/stand/boot/conf.c
index 85a8bd55428..1f0b955e1ab 100644
--- a/sys/arch/amd64/stand/boot/conf.c
+++ b/sys/arch/amd64/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.32 2015/09/02 04:09:24 yasuoka Exp $ */
+/* $OpenBSD: conf.c,v 1.33 2015/09/18 13:30:56 miod Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -38,7 +38,6 @@
#include <lib/libsa/tftp.h>
#include <lib/libsa/netif.h>
#endif
-#include <lib/libsa/unixdev.h>
#include <biosdev.h>
#include <dev/cons.h>
diff --git a/sys/arch/amd64/stand/cdboot/conf.c b/sys/arch/amd64/stand/cdboot/conf.c
index b554724b3a5..2401eb15c94 100644
--- a/sys/arch/amd64/stand/cdboot/conf.c
+++ b/sys/arch/amd64/stand/cdboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.27 2015/09/02 04:09:24 yasuoka Exp $ */
+/* $OpenBSD: conf.c,v 1.28 2015/09/18 13:30:56 miod Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -39,7 +39,6 @@
#include <lib/libsa/tftp.h>
#include <lib/libsa/netif.h>
#endif
-#include <lib/libsa/unixdev.h>
#include <biosdev.h>
#include <dev/cons.h>
diff --git a/sys/arch/amd64/stand/libsa/cmd_i386.c b/sys/arch/amd64/stand/libsa/cmd_i386.c
index 9d32c500644..dbd9d6f3d27 100644
--- a/sys/arch/amd64/stand/libsa/cmd_i386.c
+++ b/sys/arch/amd64/stand/libsa/cmd_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd_i386.c,v 1.7 2015/09/02 01:52:26 yasuoka Exp $ */
+/* $OpenBSD: cmd_i386.c,v 1.8 2015/09/18 13:30:56 miod Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -71,9 +71,7 @@ const struct cmd_table cmd_machine[] = {
int
Xdiskinfo(void)
{
-#ifndef _TEST
dump_diskinfo();
-#endif
return 0;
}
@@ -92,7 +90,6 @@ Xboot(void)
#ifdef EFIBOOT
printf("Not supported yet\n");
#else
-#ifndef _TEST
int dev, part, st;
struct diskinfo *dip;
char buf[DEV_BSIZE], *dest = (void *)BOOTBIOS_ADDR;
@@ -150,7 +147,6 @@ Xboot(void)
bad:
printf("Invalid device!\n");
#endif
-#endif
return 0;
}
diff --git a/sys/arch/amd64/stand/libsa/dev_i386.c b/sys/arch/amd64/stand/libsa/dev_i386.c
index b5b8d42f986..3803d63fb71 100644
--- a/sys/arch/amd64/stand/libsa/dev_i386.c
+++ b/sys/arch/amd64/stand/libsa/dev_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev_i386.c,v 1.15 2014/07/13 09:26:08 jasper Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.16 2015/09/18 13:30:56 miod Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
@@ -107,15 +107,6 @@ devboot(dev_t bootdev, char *p)
int sr_boot_vol = -1;
int part_type = FS_UNUSED;
-#ifdef _TEST
- *p++ = '/';
- *p++ = 'd';
- *p++ = 'e';
- *p++ = 'v';
- *p++ = '/';
- *p++ = 'r';
-#endif
-
#ifdef SOFTRAID
/*
* Determine the partition type for the 'a' partition of the
diff --git a/sys/arch/amd64/stand/libsa/machdep.c b/sys/arch/amd64/stand/libsa/machdep.c
index 37beb67c025..c6664ba33a9 100644
--- a/sys/arch/amd64/stand/libsa/machdep.c
+++ b/sys/arch/amd64/stand/libsa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.5 2015/09/02 01:52:26 yasuoka Exp $ */
+/* $OpenBSD: machdep.c,v 1.6 2015/09/18 13:30:56 miod Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -38,7 +38,7 @@
volatile struct BIOS_regs BIOS_regs;
-#if defined(DEBUG) && !defined(_TEST)
+#if defined(DEBUG)
#define CKPT(c) (*(u_int16_t*)0xb8148 = 0x4700 + (c))
#else
#define CKPT(c) /* c */
@@ -67,7 +67,8 @@ machdep(void)
}
}
-int check_skip_conf(void)
+int
+check_skip_conf(void)
{
/* Return non-zero (skip boot.conf) if Control "shift" key down */
#ifndef EFIBOOT
diff --git a/sys/arch/amd64/stand/libsa/memprobe.c b/sys/arch/amd64/stand/libsa/memprobe.c
index eaf48c14c9b..fd49511d7d0 100644
--- a/sys/arch/amd64/stand/libsa/memprobe.c
+++ b/sys/arch/amd64/stand/libsa/memprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: memprobe.c,v 1.14 2015/09/02 01:52:26 yasuoka Exp $ */
+/* $OpenBSD: memprobe.c,v 1.15 2015/09/18 13:30:56 miod Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -296,7 +296,6 @@ badprobe(bios_memmap_t *mp)
return ++mp;
}
-#ifndef _TEST
void
memprobe(void)
{
@@ -376,7 +375,6 @@ memprobe(void)
printf("a20=o%s] ", checkA20()? "n" : "ff!");
}
#endif
-#endif
void
dump_biosmem(bios_memmap_t *tm)
diff --git a/sys/arch/amd64/stand/pxeboot/conf.c b/sys/arch/amd64/stand/pxeboot/conf.c
index e1e1a3839dd..00ad0f77984 100644
--- a/sys/arch/amd64/stand/pxeboot/conf.c
+++ b/sys/arch/amd64/stand/pxeboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.31 2015/09/02 04:09:24 yasuoka Exp $ */
+/* $OpenBSD: conf.c,v 1.32 2015/09/18 13:30:56 miod Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -39,7 +39,6 @@
#include <lib/libsa/nfs.h>
#include <lib/libsa/tftp.h>
#include <lib/libsa/netif.h>
-#include <lib/libsa/unixdev.h>
#include <biosdev.h>
#include <dev/cons.h>
#include "pxeboot.h"
@@ -48,9 +47,6 @@
const char version[] = "3.24";
int debug = 0;
-#undef _TEST
-
-
void (*sa_cleanup)(void) = pxe_shutdown;
@@ -91,19 +87,11 @@ struct fs_ops file_system[] = {
{ cd9660_open, cd9660_close, cd9660_read, cd9660_write, cd9660_seek,
cd9660_stat, cd9660_readdir },
#endif
-#ifdef _TEST
- { null_open, null_close, null_read, null_write, null_seek,
- null_stat, null_readdir }
-#endif
};
int nfsys = nitems(file_system);
struct devsw devsw[] = {
-#ifdef _TEST
- { "UNIX", unixstrategy, unixopen, unixclose, unixioctl },
-#else
{ "BIOS", biosstrategy, biosopen, biosclose, biosioctl },
-#endif
};
int ndevs = nitems(devsw);
@@ -116,12 +104,8 @@ struct netif_driver *netif_drivers[] = {
int n_netif_drivers = nitems(netif_drivers);
struct consdev constab[] = {
-#ifdef _TEST
- { unix_probe, unix_init, unix_getc, unix_putc },
-#else
{ pc_probe, pc_init, pc_getc, pc_putc },
{ com_probe, com_init, com_getc, com_putc },
-#endif
{ NULL }
};
struct consdev *cn_tab = constab;