diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-09-11 21:48:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-09-11 21:48:57 +0000 |
commit | 5b4dd37e6f15c07d36394cb190004356ed86a06c (patch) | |
tree | 89b5f35664c0529248a8b2191472d3e83e2e2535 /sys/arch/i386 | |
parent | 4b4bcaa5feb947e313b5e6748a028ae519ac1ed2 (diff) |
permit ramdisks to build
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/autoconf.c | 7 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 52 |
2 files changed, 28 insertions, 31 deletions
diff --git a/sys/arch/i386/i386/autoconf.c b/sys/arch/i386/i386/autoconf.c index 67cb620d46f..a6808225333 100644 --- a/sys/arch/i386/i386/autoconf.c +++ b/sys/arch/i386/i386/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.49 2003/09/11 19:46:22 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.50 2003/09/11 21:48:56 deraadt Exp $ */ /* $NetBSD: autoconf.c,v 1.20 1996/05/03 19:41:56 christos Exp $ */ /*- @@ -81,9 +81,12 @@ dev_t bootdev = 0; /* bootdevice, initialized in locore.s */ extern struct timeout viac3_rnd_tmo; extern int viac3_rnd_present; void viac3_rnd(void *); + +#ifdef CRYPTO extern int viac3_crypto_present; void viac3_crypto_setup(void); #endif +#endif /* * Determine i/o configuration for a machine. @@ -130,8 +133,10 @@ cpu_configure() /* * Also, if the chip as crypto available, enable it. */ +#ifdef CRYPTO if (viac3_crypto_present) viac3_crypto_setup(); +#endif /* CRYPTO */ #endif } diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 31c82060847..3244ab2ffc9 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.243 2003/09/11 19:46:22 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.244 2003/09/11 21:48:56 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -101,8 +101,7 @@ #include <sys/msg.h> #endif -#if defined(I686_CPU) -/* YYY move */ +#ifdef CRYPTO #include <crypto/cryptodev.h> #endif @@ -1097,6 +1096,7 @@ viac3_rnd(void *v) splx(s); } +#ifdef CRYPTO struct viac3_session { u_int8_t ses_iv[16]; int ses_klen, ses_used; @@ -1396,41 +1396,30 @@ viac3_crypto(void *cw, void *src, void *dst, void *key, int rep, /* Do the deed */ switch (type) { case VIAC3_CRYPTOP_RNG: - __asm __volatile( - "rep;.byte 0x0F,0xA7,0xC0" - : - : "a" (iv), "b" (key), "c" (rep), "d" (cw), "S" (src), "D" (dst) - : "memory", "cc"); + __asm __volatile("rep;.byte 0x0F,0xA7,0xC0" : + : "a" (iv), "b" (key), "c" (rep), "d" (cw), "S" (src), "D" (dst) + : "memory", "cc"); break; case VIAC3_CRYPTOP_ECB: - __asm __volatile( - "rep;.byte 0x0F,0xA7,0xC8" - : - : "a" (iv), "b" (key), "c" (rep), "d" (cw), "S" (src), "D" (dst) - : "memory", "cc"); + __asm __volatile("rep;.byte 0x0F,0xA7,0xC8" : + : "a" (iv), "b" (key), "c" (rep), "d" (cw), "S" (src), "D" (dst) + : "memory", "cc"); break; case VIAC3_CRYPTOP_CBC: - __asm __volatile( - "rep;.byte 0x0F,0xA7,0xD0" - : - : "a" (iv), "b" (key), "c" (rep), "d" (cw), "S" (src), "D" (dst) - : "memory", "cc"); + __asm __volatile("rep;.byte 0x0F,0xA7,0xD0" : + : "a" (iv), "b" (key), "c" (rep), "d" (cw), "S" (src), "D" (dst) + : "memory", "cc"); break; case VIAC3_CRYPTOP_CFB: - __asm __volatile( - "rep;.byte 0x0F,0xA7,0xE0" - : - : "a" (iv), "b" (key), "c" (rep), "d" (cw), "S" (src), "D" (dst) - : "memory", "cc"); + __asm __volatile("rep;.byte 0x0F,0xA7,0xE0" : + : "a" (iv), "b" (key), "c" (rep), "d" (cw), "S" (src), "D" (dst) + : "memory", "cc"); break; case VIAC3_CRYPTOP_OFB: - __asm __volatile( - "rep;.byte 0x0F,0xA7,0xE8" - : - : "a" (iv), "b" (key), "c" (rep), "d" (cw), "S" (src), "D" (dst) - : "memory", "cc"); + __asm __volatile("rep;.byte 0x0F,0xA7,0xE8" : + : "a" (iv), "b" (key), "c" (rep), "d" (cw), "S" (src), "D" (dst) + : "memory", "cc"); break; - default: } /* XXX - should not be neeeded */ @@ -1439,8 +1428,9 @@ viac3_crypto(void *cw, void *src, void *dst, void *key, int rep, splx(s); } +#endif /* CRYPTO */ -#endif +#endif /* defined(I686_CPU) */ void cyrix3_cpu_setup(cpu_device, model, step) @@ -1501,6 +1491,7 @@ cyrix3_cpu_setup(cpu_device, model, step) printf(" RNG"); } +#ifdef CRYPTO /* Enable AES engine if present and disabled */ if (val & 0x40) { if (!(val & 0x80)) { @@ -1513,6 +1504,7 @@ cyrix3_cpu_setup(cpu_device, model, step) viac3_crypto_present = 1; printf(" AES"); } +#endif printf("\n"); break; } |