Create a gist now

Instantly share code, notes, and snippets.

@nullnilaki /distrib.diff Secret
Last active Feb 6, 2017

distrib.diff
--- /usr/src/etc/etc.ofppc/MAKEDEV.conf.orig 2016-12-25 17:29:57.000000000 +0000
+++ /usr/src/etc/etc.ofppc/MAKEDEV.conf 2016-12-25 16:22:52.000000000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: MAKEDEV.conf,v 1.8 2011/09/06 14:40:11 apb Exp $
+# $NetBSD: MAKEDEV.conf,v 1.9 2012/08/16 13:31:26 abs Exp $
all_md)
makedev wscons sd0 sd1 sd2 st0 st1 cd0 cd1 wd0 wd1 fd0 fd1
@@ -48,6 +48,6 @@
;;
ramdisk)
+ makedev std bpf
makedev md0 floppy
;;
-
--- /usr/src/distrib/ofppc/ramdisks/common/Makefile.ramdisk.org 2016-11-03 12:44:03.000000000 +0000
+++ /usr/src/distrib/ofppc/ramdisks/common/Makefile.ramdisk 2016-11-03 16:26:25.000000000 +0000
@@ -18,6 +18,7 @@
LISTS+= ${OFPPCCOMMON}/list.ramdisk
MTREECONF= ${DISTRIBDIR}/common/mtree.common ${.CURDIR}/../common/mtree.ramdisk
+IMAGEENDIAN= be
+MAKEDEVTARGETS= ramdisk
IMAGEDEPENDS+= ${CRUNCHBIN} \
dot.profile \
${DESTDIR}/usr/mdec/ofwboot \
--- /usr/src/distrib/ofppc/ramdisks/ramdisk/Makefile.orig 2016-11-03 12:44:03.000000000 +0000
+++ /usr/src/distrib/ofppc/ramdisks/ramdisk/Makefile 2016-11-03 16:24:47.000000000 +0000
@@ -2,7 +2,7 @@
IMAGE= ramdisk.fs
IMAGESIZE= 5000k
-USE_SYSINST= yes
+#USE_SYSINST= yes
SMALLPROG_INET6=1
.include "${.CURDIR}/../common/Makefile.ramdisk"
--- /usr/src/sys/arch/ofppc/conf/std.ofppc.org 2017-02-06 13:45:26.000000000 +0000
+++ std.ofppc 2017-02-06 13:45:32.000000000 +0000
@@ -5,7 +5,7 @@
machine ofppc powerpc
include "conf/std" # MI standard options
-options PPC_OEA
+#options PPC_OEA
options PPC_OEA64_BRIDGE
makeoptions PPCDIR="oea" # Tell Makefile.powerpc what dir to use
↓でバグる(マクロの二重定義?)if (iosrtable[i] & SR601_T) {は正しいのか再考
/* PMAP_OEA64_BRIDGE does support these instructions */
#if defined (PMAP_OEA) || defined (PMAP_OEA64_BRIDGE)
for (i = 0; i < 16; i++) {
moge("moe");
//#if defined(PPC_OEA601)
// /* XXX wedges for segment register 0xf , so set later */
// if ((iosrtable[i] & SR601_T) && ((MFPVR() >> 16) == MPC601))
// continue;
//#endif
pmap_kernel()->pm_sr[i] = KERNELN_SEGMENT(i)|SR_PRKEY;
__asm volatile ("mtsrin %0,%1"
:: "r"(KERNELN_SEGMENT(i)|SR_PRKEY), "r"(i << ADDR_SR_SHFT));
}
pmap_kernel()->pm_sr[KERNEL_SR] = KERNEL_SEGMENT|SR_SUKEY|SR_PRKEY;
__asm volatile ("mtsr %0,%1"
:: "n"(KERNEL_SR), "r"(KERNEL_SEGMENT));
#ifdef KERNEL2_SR
pmap_kernel()->pm_sr[KERNEL2_SR] = KERNEL2_SEGMENT|SR_SUKEY|SR_PRKEY;
__asm volatile ("mtsr %0,%1"
:: "n"(KERNEL2_SR), "r"(KERNEL2_SEGMENT));
#endif
#endif /* PMAP_OEA || PMAP_OEA64_BRIDGE */
#if defined (PMAP_OEA)
hoge("hoge");
for (i = 0; i < 16; i++) {
if (iosrtable[i] & SR601_T) {
pmap_kernel()->pm_sr[i] = iosrtable[i];
__asm volatile ("mtsrin %0,%1"
:: "r"(iosrtable[i]), "r"(i << ADDR_SR_SHFT));
}
}
__asm volatile ("sync; mtsdr1 %0; isync"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment