-/* $OpenBSD: autoconf.c,v 1.7 2017/06/08 11:44:00 visa Exp $ */
+/* $OpenBSD: autoconf.c,v 1.8 2017/06/08 12:02:52 visa Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
*
extern char pmon_bootp[];
-void
-unmap_startup(void)
-{
- extern uint32_t kernel_text[], endboot[];
- uint32_t *word = kernel_text;
-
- /* Cannot unmap kseg0; smash with trap. */
- while (word < endboot)
- *word++ = 0x00000034u; /* TEQ zero, zero */
-}
-
void
cpu_configure(void)
{
-/* $OpenBSD: autoconf.h,v 1.1 2010/01/09 20:33:16 miod Exp $ */
+/* $OpenBSD: autoconf.h,v 1.2 2017/06/08 12:02:52 visa Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
extern struct cpu_hwinfo bootcpu_hwinfo;
+void unmap_startup(void);
+
#endif /* _MIPS64_AUTOCONF_H_ */
-/* $OpenBSD: mips64_machdep.c,v 1.22 2017/05/29 11:46:49 visa Exp $ */
+/* $OpenBSD: mips64_machdep.c,v 1.23 2017/06/08 12:02:52 visa Exp $ */
/*
* Copyright (c) 2009, 2010, 2012 Miodrag Vallat.
return INSNCLASS_NEUTRAL;
}
+
+/*
+ * Smash the startup code. There is no way to really unmap it
+ * because the kernel runs in the kseg0 or xkphys space.
+ */
+void
+unmap_startup(void)
+{
+ extern uint32_t kernel_text[], endboot[];
+ uint32_t *word = kernel_text;
+
+ while (word < endboot)
+ *word++ = 0x00000034u; /* TEQ zero, zero */
+}
-/* $OpenBSD: autoconf.c,v 1.11 2017/06/06 14:35:53 visa Exp $ */
+/* $OpenBSD: autoconf.c,v 1.12 2017/06/08 12:02:52 visa Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
*
enum devclass bootdev_class = DV_DULL;
extern char uboot_rootdev[];
-void
-unmap_startup(void)
-{
- extern uint32_t kernel_text[], endboot[];
- uint32_t *word = kernel_text;
-
- /* Cannot unmap KSEG0; smash with trap. */
- while (word < endboot)
- *word++ = 0x00000034u; /* TEQ zero, zero */
-}
-
void
cpu_configure(void)
{
-/* $OpenBSD: autoconf.c,v 1.41 2017/06/08 11:47:25 visa Exp $ */
+/* $OpenBSD: autoconf.c,v 1.42 2017/06/08 12:02:52 visa Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
*
char osloadpartition[256];
char osloadoptions[129];
-void
-unmap_startup(void)
-{
- extern uint32_t kernel_text[], endboot[];
- uint32_t *word = kernel_text;
-
- /* Cannot unmap kseg0 or xkphys; smash with trap. */
- while (word < endboot)
- *word++ = 0x00000034u; /* TEQ zero, zero */
-}
-
/*
* Configure all devices found that we know about.
* This is done at boot time.