Reintegrate head@r272414
Sponsored by: The FreeBSD Foundation
This commit is contained in:
commit
698271d877
@ -336,11 +336,11 @@ XFLAGS+= -B${CROSS_BINUTILS_PREFIX}
|
||||
.else
|
||||
XFLAGS+= -B${WORLDTMP}/usr/bin
|
||||
.endif
|
||||
.if ${TARGET} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${TARGET_ARCH:M*eb*} == ""
|
||||
TARGET_ABI= gnueabi
|
||||
.elif ${TARGET_ARCH} == "armv6hf"
|
||||
.if ${TARGET} == "arm"
|
||||
.if ${TARGET_ARCH:M*hf*} != ""
|
||||
TARGET_ABI= gnueabihf
|
||||
.else
|
||||
TARGET_ABI= gnueabi
|
||||
.endif
|
||||
.endif
|
||||
TARGET_ABI?= unknown
|
||||
|
@ -43,6 +43,9 @@ OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz
|
||||
OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz
|
||||
# 20140917: hv_kvpd rc.d script removed in favor of devd configuration
|
||||
OLD_FILES+=etc/rc.d/hv_kvpd
|
||||
# 20140917: libnv was accidentally being installed to /usr/lib instead of /lib
|
||||
OLD_LIBS+=usr/lib/libnv.a
|
||||
OLD_LIBS+=usr/lib/libnv.so.0
|
||||
# 20140814: libopie version bump
|
||||
OLD_LIBS+=usr/lib/libopie.so.7
|
||||
OLD_LIBS+=usr/lib32/libopie.so.7
|
||||
|
@ -1,7 +1,23 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
base=`basename $0`
|
||||
jail_name_to_jid()
|
||||
{
|
||||
local check_name="$1"
|
||||
(
|
||||
line="$(jls -n 2> /dev/null | grep name=$check_name )"
|
||||
for nv in $line; do
|
||||
local name="${nv%=*}"
|
||||
if [ "${name}" = "jid" ]; then
|
||||
eval $nv
|
||||
echo $jid
|
||||
break
|
||||
fi
|
||||
done
|
||||
)
|
||||
}
|
||||
|
||||
base=pgrep_j_test
|
||||
|
||||
echo "1..3"
|
||||
|
||||
@ -9,21 +25,25 @@ name="pgrep -j <jid>"
|
||||
if [ `id -u` -eq 0 ]; then
|
||||
sleep=$(pwd)/sleep.txt
|
||||
ln -sf /bin/sleep $sleep
|
||||
jail / $base-1 127.0.0.1 $sleep 5 &
|
||||
chpid=$!
|
||||
jail / $base-2 127.0.0.1 $sleep 5 &
|
||||
chpid2=$!
|
||||
$sleep 5 &
|
||||
chpid3=$!
|
||||
sleep 0.5
|
||||
jid=`jls | awk "/127\\.0\\.0\\.1.*${base}-1/ {print \$1}"`
|
||||
pid=`pgrep -f -j $jid $sleep`
|
||||
if [ "$pid" = "$chpid" ]; then
|
||||
jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \
|
||||
command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 &
|
||||
|
||||
jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \
|
||||
command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 &
|
||||
|
||||
jid1=$(jail_name_to_jid ${base}_1_1)
|
||||
jid2=$(jail_name_to_jid ${base}_1_2)
|
||||
jid="${jid1},${jid2}"
|
||||
pid1="$(pgrep -f -x -j $jid "$sleep 5" | sort)"
|
||||
pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \
|
||||
$(cat ${PWD}/${base}_1_2.pid) | sort)
|
||||
if [ "$pid1" = "$pid2" ]; then
|
||||
echo "ok 1 - $name"
|
||||
else
|
||||
echo "not ok 1 - $name"
|
||||
fi
|
||||
kill $chpid $chpid2 $chpid3
|
||||
[ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid)
|
||||
[ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid)
|
||||
rm -f $sleep
|
||||
else
|
||||
echo "ok 1 - $name # skip Test needs uid 0."
|
||||
@ -33,21 +53,23 @@ name="pgrep -j any"
|
||||
if [ `id -u` -eq 0 ]; then
|
||||
sleep=$(pwd)/sleep.txt
|
||||
ln -sf /bin/sleep $sleep
|
||||
jail / $base-1 127.0.0.1 $sleep 5 &
|
||||
chpid=$!
|
||||
jail / $base-2 127.0.0.1 $sleep 5 &
|
||||
chpid2=$!
|
||||
$sleep 5 &
|
||||
chpid3=$!
|
||||
sleep 0.5
|
||||
pids=`pgrep -f -j any $sleep | sort`
|
||||
refpids=`{ echo $chpid; echo $chpid2; } | sort`
|
||||
if [ "$pids" = "$refpids" ]; then
|
||||
jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \
|
||||
command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 &
|
||||
|
||||
jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \
|
||||
command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 &
|
||||
|
||||
sleep 2
|
||||
pid1="$(pgrep -f -x -j any "$sleep 5" | sort)"
|
||||
pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \
|
||||
$(cat ${PWD}/${base}_2_2.pid) | sort)
|
||||
if [ "$pid1" = "$pid2" ]; then
|
||||
echo "ok 2 - $name"
|
||||
else
|
||||
echo "not ok 2 - $name"
|
||||
fi
|
||||
kill $chpid $chpid2 $chpid3
|
||||
[ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid)
|
||||
[ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid)
|
||||
rm -f $sleep
|
||||
else
|
||||
echo "ok 2 - $name # skip Test needs uid 0."
|
||||
@ -57,19 +79,19 @@ name="pgrep -j none"
|
||||
if [ `id -u` -eq 0 ]; then
|
||||
sleep=$(pwd)/sleep.txt
|
||||
ln -sf /bin/sleep $sleep
|
||||
$sleep 5 &
|
||||
chpid=$!
|
||||
jail / $base 127.0.0.1 $sleep 5 &
|
||||
chpid2=$!
|
||||
sleep 0.5
|
||||
pid=`pgrep -f -j none $sleep`
|
||||
if [ "$pid" = "$chpid" ]; then
|
||||
daemon -p ${PWD}/${base}_3_1.pid $sleep 5 &
|
||||
jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \
|
||||
command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 &
|
||||
sleep 2
|
||||
pid="$(pgrep -f -x -j none "$sleep 5")"
|
||||
if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then
|
||||
echo "ok 3 - $name"
|
||||
else
|
||||
echo "not ok 3 - $name"
|
||||
fi
|
||||
kill $chpid $chpid2
|
||||
rm -f $sleep
|
||||
[ -f ${PWD}/${base}_3_1.pid ] && kill $(cat $PWD/${base}_3_1.pid)
|
||||
[ -f ${PWD}/${base}_3_2.pid ] && kill $(cat $PWD/${base}_3_2.pid)
|
||||
else
|
||||
echo "ok 3 - $name # skip Test needs uid 0."
|
||||
fi
|
||||
|
@ -1,7 +1,23 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
base=`basename $0`
|
||||
jail_name_to_jid()
|
||||
{
|
||||
local check_name="$1"
|
||||
(
|
||||
line="$(jls -n 2> /dev/null | grep name=$check_name )"
|
||||
for nv in $line; do
|
||||
local name="${nv%=*}"
|
||||
if [ "${name}" = "jid" ]; then
|
||||
eval $nv
|
||||
echo $jid
|
||||
break
|
||||
fi
|
||||
done
|
||||
)
|
||||
}
|
||||
|
||||
base=pkill_j_test
|
||||
|
||||
echo "1..3"
|
||||
|
||||
@ -9,21 +25,28 @@ name="pkill -j <jid>"
|
||||
if [ `id -u` -eq 0 ]; then
|
||||
sleep=$(pwd)/sleep.txt
|
||||
ln -sf /bin/sleep $sleep
|
||||
jail / $base-1 127.0.0.1 $sleep 5 &
|
||||
chpid=$!
|
||||
jail / $base-2 127.0.0.1 $sleep 5 &
|
||||
chpid2=$!
|
||||
jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \
|
||||
command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 &
|
||||
|
||||
jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \
|
||||
command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 &
|
||||
|
||||
$sleep 5 &
|
||||
chpid3=$!
|
||||
sleep 0.5
|
||||
jid=`jls | awk "/127\\.0\\.0\\.1.*${base}-1/ {print \$1}"`
|
||||
if pkill -f -j $jid $sleep && sleep 0.5 &&
|
||||
! kill $chpid && kill $chpid2 $chpid3; then
|
||||
jid1=$(jail_name_to_jid ${base}_1_1)
|
||||
jid2=$(jail_name_to_jid ${base}_1_2)
|
||||
jid="${jid1},${jid2}"
|
||||
if pkill -f -j "$jid" $sleep && sleep 0.5 &&
|
||||
! -f ${PWD}/${base}_1_1.pid &&
|
||||
! -f ${PWD}/${base}_1_2.pid ; then
|
||||
echo "ok 1 - $name"
|
||||
else
|
||||
echo "not ok 1 - $name"
|
||||
fi 2>/dev/null
|
||||
rm -f $sleep
|
||||
[ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid)
|
||||
[ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid)
|
||||
wait
|
||||
else
|
||||
echo "ok 1 - $name # skip Test needs uid 0."
|
||||
fi
|
||||
@ -32,20 +55,26 @@ name="pkill -j any"
|
||||
if [ `id -u` -eq 0 ]; then
|
||||
sleep=$(pwd)/sleep.txt
|
||||
ln -sf /bin/sleep $sleep
|
||||
jail / $base-1 127.0.0.1 $sleep 5 &
|
||||
chpid=$!
|
||||
jail / $base-2 127.0.0.1 $sleep 5 &
|
||||
chpid2=$!
|
||||
jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \
|
||||
command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 &
|
||||
|
||||
jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \
|
||||
command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 &
|
||||
|
||||
$sleep 5 &
|
||||
chpid3=$!
|
||||
sleep 0.5
|
||||
chpid3=$!
|
||||
if pkill -f -j any $sleep && sleep 0.5 &&
|
||||
! kill $chpid && ! kill $chpid2 && kill $chpid3; then
|
||||
[ ! -f ${PWD}/${base}_2_1.pid -a
|
||||
! -f ${PWD}/${base}_2_2.pid ] && kill $chpid3; then
|
||||
echo "ok 2 - $name"
|
||||
else
|
||||
echo "not ok 2 - $name"
|
||||
fi 2>/dev/null
|
||||
rm -f $sleep
|
||||
[ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid)
|
||||
[ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid)
|
||||
wait
|
||||
else
|
||||
echo "ok 2 - $name # skip Test needs uid 0."
|
||||
fi
|
||||
@ -54,18 +83,20 @@ name="pkill -j none"
|
||||
if [ `id -u` -eq 0 ]; then
|
||||
sleep=$(pwd)/sleep.txt
|
||||
ln -sf /bin/sleep $sleep
|
||||
$sleep 5 &
|
||||
chpid=$!
|
||||
jail / $base 127.0.0.1 $sleep 5 &
|
||||
chpid2=$!
|
||||
sleep 0.5
|
||||
if pkill -f -j none $sleep && sleep 0.5 &&
|
||||
! kill $chpid && kill $chpid2; then
|
||||
daemon -p ${PWD}/${base}_3_1.pid $sleep 5
|
||||
jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \
|
||||
command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 &
|
||||
sleep 1
|
||||
if pkill -f -j none "$sleep 5" && sleep 1 &&
|
||||
[ ! -f ${PWD}/${base}_3_1.pid -a -f ${PWD}/${base}_3_2.pid ] ; then
|
||||
echo "ok 3 - $name"
|
||||
else
|
||||
ls ${PWD}/*.pid
|
||||
echo "not ok 3 - $name"
|
||||
fi 2>/dev/null
|
||||
rm -f $sleep
|
||||
[ -f ${PWD}/${base}_3_1.pid ] && kill $(cat ${base}_3_1.pid)
|
||||
[ -f ${PWD}/${base}_3_2.pid ] && kill $(cat ${base}_3_2.pid)
|
||||
else
|
||||
echo "ok 3 - $name # skip Test needs uid 0."
|
||||
fi
|
||||
|
@ -65,7 +65,23 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x03f0";
|
||||
match "product" "(0x2016|0x2116|0x2216|0x3016|0x3116)";
|
||||
match "product" "(0x2016|0x2116|0x2216)";
|
||||
action "kldload -n uipaq";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x03f0";
|
||||
match "product" "(0x241d|0x251d)";
|
||||
action "kldload -n u3g";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x03f0";
|
||||
match "product" "(0x3016|0x3116)";
|
||||
action "kldload -n uipaq";
|
||||
};
|
||||
|
||||
@ -129,7 +145,7 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x0403";
|
||||
match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)";
|
||||
match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xa6d1|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)";
|
||||
action "kldload -n uftdi";
|
||||
};
|
||||
|
||||
@ -1057,7 +1073,7 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x0586";
|
||||
match "product" "(0x3416|0x341a)";
|
||||
match "product" "(0x3416|0x341a|0x341e)";
|
||||
action "kldload -n if_run";
|
||||
};
|
||||
|
||||
@ -1097,7 +1113,7 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x05ac";
|
||||
match "product" "(0x020d|0x020e|0x020f|0x0215|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)";
|
||||
match "product" "(0x020d|0x020e|0x020f|0x0210|0x0214|0x0215|0x0216|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)";
|
||||
action "kldload -n atp";
|
||||
};
|
||||
|
||||
@ -2353,7 +2369,23 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x0b05";
|
||||
match "product" "(0x17b5|0x17cb)";
|
||||
match "product" "0x17b5";
|
||||
action "kldload -n ng_ubt";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x0b05";
|
||||
match "product" "0x17ba";
|
||||
action "kldload -n if_urtwn";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x0b05";
|
||||
match "product" "0x17cb";
|
||||
action "kldload -n ng_ubt";
|
||||
};
|
||||
|
||||
@ -2481,7 +2513,7 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x0bda";
|
||||
match "product" "(0x018a|0x317f)";
|
||||
match "product" "(0x0179|0x018a|0x317f)";
|
||||
action "kldload -n if_urtwn";
|
||||
};
|
||||
|
||||
@ -2513,7 +2545,7 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x0bda";
|
||||
match "product" "(0x8176|0x8176|0x8177|0x8178|0x817a|0x817b|0x817c|0x817d|0x817e)";
|
||||
match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e)";
|
||||
action "kldload -n if_urtwn";
|
||||
};
|
||||
|
||||
@ -2925,6 +2957,14 @@ nomatch 32 {
|
||||
action "kldload -n if_urtwn";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x0df6";
|
||||
match "product" "0x0072";
|
||||
action "kldload -n if_axge";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
@ -3577,7 +3617,23 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x12d1";
|
||||
match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1803|0x1c05|0x1c0b)";
|
||||
match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521)";
|
||||
action "kldload -n u3g";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x12d1";
|
||||
match "product" "0x155b";
|
||||
action "kldload -n if_cdce";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x12d1";
|
||||
match "product" "(0x1803|0x1c05|0x1c0b)";
|
||||
action "kldload -n u3g";
|
||||
};
|
||||
|
||||
@ -3753,7 +3809,7 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x1410";
|
||||
match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7042)";
|
||||
match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7001|0x7031|0x7042)";
|
||||
action "kldload -n u3g";
|
||||
};
|
||||
|
||||
@ -4553,7 +4609,7 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x1cf1";
|
||||
match "product" "(0x0001|0x0004)";
|
||||
match "product" "(0x0001|0x0004|0x0022)";
|
||||
action "kldload -n uftdi";
|
||||
};
|
||||
|
||||
@ -4565,6 +4621,14 @@ nomatch 32 {
|
||||
action "kldload -n u3g";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x1d34";
|
||||
match "product" "0x0004";
|
||||
action "kldload -n uled";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
@ -4633,7 +4697,7 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x2001";
|
||||
match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d)";
|
||||
match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f)";
|
||||
action "kldload -n if_urtwn";
|
||||
};
|
||||
|
||||
@ -4665,7 +4729,7 @@ nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x2001";
|
||||
match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f)";
|
||||
match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f|0x3c20)";
|
||||
action "kldload -n if_run";
|
||||
};
|
||||
|
||||
@ -4685,6 +4749,14 @@ nomatch 32 {
|
||||
action "kldload -n if_aue";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x2001";
|
||||
match "product" "0x4a00";
|
||||
action "kldload -n if_axge";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
@ -5229,6 +5301,36 @@ nomatch 32 {
|
||||
action "kldload -n ng_ubt";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x12d1";
|
||||
match "intclass" "0xff";
|
||||
match "intsubclass" "0x02";
|
||||
match "intprotocol" "0x16";
|
||||
action "kldload -n if_cdce";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x12d1";
|
||||
match "intclass" "0xff";
|
||||
match "intsubclass" "0x02";
|
||||
match "intprotocol" "0x46";
|
||||
action "kldload -n if_cdce";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
match "vendor" "0x12d1";
|
||||
match "intclass" "0xff";
|
||||
match "intsubclass" "0x02";
|
||||
match "intprotocol" "0x76";
|
||||
action "kldload -n if_cdce";
|
||||
};
|
||||
|
||||
nomatch 32 {
|
||||
match "bus" "uhub[0-9]+";
|
||||
match "mode" "host";
|
||||
@ -5399,5 +5501,5 @@ nomatch 32 {
|
||||
action "kldload -n umass";
|
||||
};
|
||||
|
||||
# 2621 USB entries processed
|
||||
# 2643 USB entries processed
|
||||
|
||||
|
43
etc/rc.subr
43
etc/rc.subr
@ -68,6 +68,39 @@ list_vars()
|
||||
done; }
|
||||
}
|
||||
|
||||
# set_rcvar [var] [defval] [desc]
|
||||
#
|
||||
# Echo or define a rc.conf(5) variable name. Global variable
|
||||
# $rcvars is used.
|
||||
#
|
||||
# If no argument is specified, echo "${name}_enable".
|
||||
#
|
||||
# If only a var is specified, echo "${var}_enable".
|
||||
#
|
||||
# If var and defval are specified, the ${var} is defined as
|
||||
# rc.conf(5) variable and the default value is ${defvar}. An
|
||||
# optional argument $desc can also be specified to add a
|
||||
# description for that.
|
||||
#
|
||||
set_rcvar()
|
||||
{
|
||||
local _var
|
||||
|
||||
case $# in
|
||||
0) echo ${name}_enable ;;
|
||||
1) echo ${1}_enable ;;
|
||||
*)
|
||||
debug "set_rcvar: \$$1=$2 is added" \
|
||||
" as a rc.conf(5) variable."
|
||||
_var=$1
|
||||
rcvars="${rcvars# } $_var"
|
||||
eval ${_var}_defval=\"$2\"
|
||||
shift 2
|
||||
eval ${_var}_desc=\"$*\"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# set_rcvar_obsolete oldvar [newvar] [msg]
|
||||
# Define obsolete variable.
|
||||
# Global variable $rcvars_obsolete is used.
|
||||
@ -76,7 +109,7 @@ set_rcvar_obsolete()
|
||||
{
|
||||
local _var
|
||||
_var=$1
|
||||
debug "rcvar_obsolete: \$$1(old) -> \$$2(new) is defined"
|
||||
debug "set_rcvar_obsolete: \$$1(old) -> \$$2(new) is defined"
|
||||
|
||||
rcvars_obsolete="${rcvars_obsolete# } $1"
|
||||
eval ${1}_newvar=\"$2\"
|
||||
@ -1091,8 +1124,8 @@ $command $rc_flags $command_args"
|
||||
echo ""
|
||||
fi
|
||||
echo "#"
|
||||
# Get unique vars in $rcvar
|
||||
for _v in $rcvar; do
|
||||
# Get unique vars in $rcvar $rcvars
|
||||
for _v in $rcvar $rcvars; do
|
||||
case $v in
|
||||
$_v\ *|\ *$_v|*\ $_v\ *) ;;
|
||||
*) v="${v# } $_v" ;;
|
||||
@ -1238,7 +1271,7 @@ run_rc_script()
|
||||
|
||||
unset name command command_args command_interpreter \
|
||||
extra_commands pidfile procname \
|
||||
rcvar rcvars_obsolete required_dirs required_files \
|
||||
rcvar rcvars rcvars_obsolete required_dirs required_files \
|
||||
required_vars
|
||||
eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd
|
||||
|
||||
@ -1306,7 +1339,7 @@ load_rc_config()
|
||||
done
|
||||
|
||||
# Set defaults if defined.
|
||||
for _var in $rcvar; do
|
||||
for _var in $rcvar $rcvars; do
|
||||
eval _defval=\$${_var}_defval
|
||||
if [ -n "$_defval" ]; then
|
||||
eval : \${$_var:=\$${_var}_defval}
|
||||
|
@ -24,7 +24,7 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \
|
||||
CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG}
|
||||
MKDEP= -DCRT_BEGIN
|
||||
|
||||
.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${TARGET_CPUARCH} == "arm"
|
||||
CFLAGS+= -DTARGET_ARM_EABI
|
||||
.endif
|
||||
|
||||
|
@ -15,7 +15,7 @@ MK_SSP= no
|
||||
|
||||
.include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt"
|
||||
|
||||
.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${TARGET_CPUARCH} == "arm"
|
||||
CFLAGS+= -DTARGET_ARM_EABI
|
||||
.endif
|
||||
|
||||
@ -56,7 +56,7 @@ LIB2FUNCS+= _fixuns${mode}si
|
||||
.endfor
|
||||
|
||||
# Likewise double-word routines.
|
||||
.if ${TARGET_CPUARCH} != "arm" || ${MK_ARM_EABI} == "no"
|
||||
.if ${TARGET_CPUARCH} != "arm"
|
||||
# These are implemented in an ARM specific file but will not be filtered out
|
||||
.for mode in sf df xf tf
|
||||
LIB2FUNCS+= _fix${mode}di _fixuns${mode}di
|
||||
@ -117,14 +117,10 @@ CFLAGS.clang+= -fheinous-gnu-extensions
|
||||
|
||||
LIB1ASMSRC = lib1funcs.asm
|
||||
LIB1ASMFUNCS = _dvmd_tls _bb_init_func
|
||||
.if ${MK_ARM_EABI} != "no"
|
||||
LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c
|
||||
# Some compilers generate __aeabi_ functions libgcc_s is missing
|
||||
DPADD+= ${LIBCOMPILER_RT}
|
||||
LDADD+= -lcompiler_rt
|
||||
.else
|
||||
LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${TARGET_CPUARCH} == mips
|
||||
@ -319,7 +315,7 @@ CLEANFILES += cs-*.h option*
|
||||
SHLIB_MKMAP = ${GCCDIR}/mkmap-symver.awk
|
||||
SHLIB_MKMAP_OPTS =
|
||||
SHLIB_MAPFILES = ${GCCDIR}/libgcc-std.ver
|
||||
.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${TARGET_CPUARCH} == "arm"
|
||||
SHLIB_MAPFILES += ${GCCDIR}/config/arm/libgcc-bpabi.ver
|
||||
.endif
|
||||
VERSION_MAP = libgcc.map
|
||||
|
@ -17,7 +17,7 @@ CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK
|
||||
CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \
|
||||
-I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I.
|
||||
|
||||
.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${TARGET_CPUARCH} == "arm"
|
||||
CFLAGS+= -DTARGET_ARM_EABI
|
||||
.endif
|
||||
|
||||
|
@ -16,9 +16,6 @@ LIB= stdc++
|
||||
SHLIB_MAJOR= 6
|
||||
|
||||
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
|
||||
.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no"
|
||||
CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1
|
||||
.endif
|
||||
CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include
|
||||
CFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I.
|
||||
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
|
||||
@ -596,7 +593,7 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h
|
||||
|
||||
CLEANFILES+= ${THRHDRS}
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${MACHINE_CPUARCH} == "arm"
|
||||
unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
|
||||
.else
|
||||
unwind.h: ${GCCDIR}/unwind-generic.h
|
||||
|
@ -22,9 +22,6 @@ SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
|
||||
SRCS+= cp-demangle.c
|
||||
|
||||
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
|
||||
.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no"
|
||||
CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1
|
||||
.endif
|
||||
CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} -I${GCCDIR}
|
||||
CFLAGS+= -I${.CURDIR}/../libstdc++ -I.
|
||||
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
|
||||
@ -35,7 +32,7 @@ HDRS= exception new typeinfo cxxabi.h exception_defines.h
|
||||
INCS= ${HDRS:S;^;${SRCDIR}/;}
|
||||
INCSDIR=${INCLUDEDIR}/c++/${GCCVER}
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${MACHINE_CPUARCH} == "arm"
|
||||
unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
|
||||
.else
|
||||
unwind.h: ${GCCDIR}/unwind-generic.h
|
||||
|
@ -27,7 +27,7 @@ CSTD?= gnu89
|
||||
CFLAGS+= -DCROSS_DIRECTORY_STRUCTURE
|
||||
.endif
|
||||
|
||||
.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${TARGET_CPUARCH} == "arm"
|
||||
CFLAGS+= -DTARGET_ARM_EABI
|
||||
.endif
|
||||
|
||||
|
@ -51,10 +51,8 @@ TARGET_INC+= ${GCC_CPU}/elf.h
|
||||
.endif
|
||||
.if ${TARGET_CPUARCH} == "arm"
|
||||
TARGET_INC+= ${GCC_CPU}/aout.h
|
||||
.if ${MK_ARM_EABI} != "no"
|
||||
TARGET_INC+= ${GCC_CPU}/bpabi.h
|
||||
.endif
|
||||
.endif
|
||||
.if ${TARGET_ARCH} == "powerpc64"
|
||||
TARGET_INC+= ${GCC_CPU}/biarch64.h
|
||||
TARGET_INC+= ${GCC_CPU}/default64.h
|
||||
@ -352,7 +350,7 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h
|
||||
|
||||
GENSRCS+= gthr-default.h
|
||||
|
||||
.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${TARGET_CPUARCH} == "arm"
|
||||
unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
|
||||
.else
|
||||
unwind.h: ${GCCDIR}/unwind-generic.h
|
||||
|
@ -22,11 +22,10 @@ CFLAGS+= -fno-strict-aliasing
|
||||
TARGET_ARCH?= ${MACHINE_ARCH}
|
||||
BUILD_ARCH?= ${MACHINE_ARCH}
|
||||
|
||||
.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \
|
||||
${MK_ARM_EABI} != "no"
|
||||
TARGET_ABI= gnueabi
|
||||
.elif ${TARGET_ARCH} == "armv6hf"
|
||||
.if ${TARGET_ARCH:Marm*hf*} != ""
|
||||
TARGET_ABI= gnueabihf
|
||||
.elif ${TARGET_ARCH:Marm*} != ""
|
||||
TARGET_ABI= gnueabi
|
||||
.else
|
||||
TARGET_ABI= unknown
|
||||
.endif
|
||||
|
@ -9,14 +9,9 @@ SOFTFLOAT_BITS=32
|
||||
MDSRCS+=machdep_ldisd.c
|
||||
SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol.map
|
||||
|
||||
.if ${MK_ARM_EABI} == "no"
|
||||
# This contains the symbols that were removed when moving to the ARM EABI
|
||||
SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_oabi.map
|
||||
.else
|
||||
.include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc"
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_ARCH} == "armv6hf"
|
||||
.if ${MACHINE_ARCH:Marm*hf*} != ""
|
||||
SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map
|
||||
.endif
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
/*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*
|
||||
* This only needs to contain symbols that are not listed in
|
||||
* symbol maps from other parts of libc (i.e., not found in
|
||||
* stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...)
|
||||
* and are not used in the ARM EABI.
|
||||
*/
|
||||
FBSDprivate_1.0 {
|
||||
__umodsi3;
|
||||
__modsi3;
|
||||
__udivsi3;
|
||||
__divsi3;
|
||||
};
|
@ -5,7 +5,7 @@
|
||||
SRCS+= aeabi_atexit.c \
|
||||
aeabi_unwind_cpp.c \
|
||||
aeabi_unwind_exidx.c
|
||||
.if ${MACHINE_ARCH} != "armv6hf"
|
||||
.if ${MACHINE_ARCH:Marm*hf*} == ""
|
||||
SRCS+= aeabi_double.c \
|
||||
aeabi_float.c
|
||||
.endif
|
||||
|
@ -6,10 +6,6 @@ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \
|
||||
__aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S flt_rounds.c \
|
||||
arm_initfini.c
|
||||
|
||||
.if ${MK_ARM_EABI} == "no"
|
||||
SRCS+= divsi3.S
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_ARCH} == "armv6hf"
|
||||
SRCS+= fpgetmask_vfp.c fpgetround_vfp.c fpgetsticky_vfp.c fpsetmask_vfp.c \
|
||||
fpsetround_vfp.c fpsetsticky_vfp.c
|
||||
|
@ -41,5 +41,6 @@
|
||||
* above branch.
|
||||
*/
|
||||
bl PIC_PLT(CNAME(abort)) /* abort */
|
||||
END(_cts_start)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -58,6 +58,7 @@ ENTRY(_setjmp)
|
||||
stmw %r9,20(%r3)
|
||||
li %r3,0
|
||||
blr
|
||||
END(_setjmp)
|
||||
|
||||
ENTRY(_longjmp)
|
||||
lmw %r9,20(%r3)
|
||||
@ -68,5 +69,6 @@ ENTRY(_longjmp)
|
||||
bnelr
|
||||
li %r3,1
|
||||
blr
|
||||
END(_longjmp)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -29,5 +29,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
ENTRY(__eabi)
|
||||
blr
|
||||
END(__eabi)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -33,5 +33,6 @@ __FBSDID("$FreeBSD$");
|
||||
ENTRY(fabs)
|
||||
fabs %f1,%f1
|
||||
blr
|
||||
END(fabs)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -68,6 +68,7 @@ ENTRY(setjmp)
|
||||
stmw %r9,20(%r6)
|
||||
li %r3,0 /* return (0) */
|
||||
blr
|
||||
END(setjmp)
|
||||
|
||||
WEAK_REFERENCE(CNAME(__longjmp), longjmp)
|
||||
ENTRY(__longjmp)
|
||||
@ -86,5 +87,6 @@ ENTRY(__longjmp)
|
||||
bnelr
|
||||
li %r3,1
|
||||
blr
|
||||
END(__longjmp)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -73,6 +73,7 @@ ENTRY(sigsetjmp)
|
||||
stmw %r9,20(%r6)
|
||||
li %r3,0
|
||||
blr
|
||||
END(sigsetjmp)
|
||||
|
||||
ENTRY(siglongjmp)
|
||||
lmw %r9,20(%r3)
|
||||
@ -94,5 +95,6 @@ ENTRY(siglongjmp)
|
||||
bnelr
|
||||
li %r3,1
|
||||
blr
|
||||
END(siglongjmp)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -71,5 +71,6 @@ ENTRY(brk)
|
||||
|
||||
1:
|
||||
b PIC_PLT(HIDENAME(cerror))
|
||||
END(brk)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -37,5 +37,6 @@ ENTRY(exect)
|
||||
blr
|
||||
1:
|
||||
b PIC_PLT(HIDENAME(cerror))
|
||||
END(exect)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -41,5 +41,6 @@ ENTRY(pipe)
|
||||
blr /* and return 0 */
|
||||
1:
|
||||
b PIC_PLT(HIDENAME(cerror))
|
||||
END(pipe)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -56,5 +56,6 @@ ENTRY(ptrace)
|
||||
blr
|
||||
1:
|
||||
b PIC_PLT(HIDENAME(cerror))
|
||||
END(ptrace)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -68,5 +68,6 @@ ENTRY(sbrk)
|
||||
blr
|
||||
2:
|
||||
b PIC_PLT(HIDENAME(cerror))
|
||||
END(sbrk)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -46,5 +46,6 @@
|
||||
nop
|
||||
bl CNAME(abort) /* abort */
|
||||
nop
|
||||
END(_ctx_start)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -80,6 +80,7 @@ ENTRY(_setjmp)
|
||||
std %r31,40 + 22*8(%r3)
|
||||
li %r3,0
|
||||
blr
|
||||
END(_setjmp)
|
||||
|
||||
ENTRY(_longjmp)
|
||||
ld %r9,40 + 0*8(%r3)
|
||||
@ -113,5 +114,6 @@ ENTRY(_longjmp)
|
||||
bnelr
|
||||
li %r3,1
|
||||
blr
|
||||
END(_longjmp)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -33,5 +33,6 @@ __FBSDID("$FreeBSD$");
|
||||
ENTRY(fabs)
|
||||
fabs %f1,%f1
|
||||
blr
|
||||
END(fabs)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -92,6 +92,7 @@ ENTRY(setjmp)
|
||||
|
||||
li %r3,0 /* return (0) */
|
||||
blr
|
||||
END(setjmp)
|
||||
|
||||
WEAK_REFERENCE(__longjmp, longjmp)
|
||||
ENTRY(__longjmp)
|
||||
@ -132,5 +133,6 @@ ENTRY(__longjmp)
|
||||
bnelr
|
||||
li %r3,1
|
||||
blr
|
||||
END(__longjmp)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -97,6 +97,7 @@ ENTRY(sigsetjmp)
|
||||
|
||||
li %r3,0
|
||||
blr
|
||||
END(sigsetjmp)
|
||||
|
||||
ENTRY(siglongjmp)
|
||||
ld %r9,40 + 0*8(%r3)
|
||||
@ -141,5 +142,6 @@ ENTRY(siglongjmp)
|
||||
bnelr
|
||||
li %r3,1
|
||||
blr
|
||||
END(siglongjmp)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -69,5 +69,6 @@ ENTRY(brk)
|
||||
ld %r0,16(%r1)
|
||||
mtlr %r0
|
||||
blr
|
||||
END(brk)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -45,5 +45,6 @@ ENTRY(exect)
|
||||
ld %r0,16(%r1)
|
||||
mtlr %r0
|
||||
blr
|
||||
END(exect)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -49,5 +49,6 @@ ENTRY(pipe)
|
||||
ld %r0,16(%r1)
|
||||
mtlr %r0
|
||||
blr
|
||||
END(pipe)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -63,5 +63,6 @@ ENTRY(ptrace)
|
||||
ld %r0,16(%r1)
|
||||
mtlr %r0
|
||||
blr
|
||||
END(ptrace)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -64,5 +64,6 @@ ENTRY(sbrk)
|
||||
ld %r0,16(%r1)
|
||||
mtlr %r0
|
||||
blr
|
||||
END(sbrk)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
SRCS+= cmpdi2.c divdi3.c moddi3.c qdivrem.c ucmpdi2.c udivdi3.c umoddi3.c
|
||||
|
||||
.elif ${LIBC_ARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.elif ${LIBC_ARCH} == "arm"
|
||||
|
||||
SRCS+= adddi3.c anddi3.c floatunsdidf.c iordi3.c lshldi3.c notdi2.c \
|
||||
qdivrem.c subdi3.c xordi3.c
|
||||
|
@ -55,10 +55,32 @@ __FBSDID("$FreeBSD$");
|
||||
#include "un-namespace.h"
|
||||
#include "libc_private.h"
|
||||
#include "timelocal.h"
|
||||
#include "tzfile.h"
|
||||
|
||||
static char * _strptime(const char *, const char *, struct tm *, int *, locale_t);
|
||||
|
||||
#define asizeof(a) (sizeof (a) / sizeof ((a)[0]))
|
||||
#define asizeof(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
#define FLAG_NONE (1 << 0)
|
||||
#define FLAG_YEAR (1 << 1)
|
||||
#define FLAG_MONTH (1 << 2)
|
||||
#define FLAG_YDAY (1 << 3)
|
||||
#define FLAG_MDAY (1 << 4)
|
||||
#define FLAG_WDAY (1 << 5)
|
||||
|
||||
/*
|
||||
* Calculate the week day of the first day of a year. Valid for
|
||||
* the Gregorian calendar, which began Sept 14, 1752 in the UK
|
||||
* and its colonies. Ref:
|
||||
* http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week
|
||||
*/
|
||||
|
||||
static int
|
||||
first_wday_of(int year)
|
||||
{
|
||||
return (((2 * (3 - (year / 100) % 4)) + (year % 100) +
|
||||
((year % 100) / 4) + (isleap(year) ? 6 : 0) + 1) % 7);
|
||||
}
|
||||
|
||||
static char *
|
||||
_strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
@ -66,9 +88,18 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
{
|
||||
char c;
|
||||
const char *ptr;
|
||||
int day_offset = -1, wday_offset;
|
||||
int week_offset;
|
||||
int i, len;
|
||||
int flags;
|
||||
int Ealternative, Oalternative;
|
||||
struct lc_time_T *tptr = __get_current_time_locale(locale);
|
||||
const struct lc_time_T *tptr = __get_current_time_locale(locale);
|
||||
static int start_of_month[2][13] = {
|
||||
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365},
|
||||
{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366}
|
||||
};
|
||||
|
||||
flags = FLAG_NONE;
|
||||
|
||||
ptr = fmt;
|
||||
while (*ptr != 0) {
|
||||
@ -102,6 +133,7 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale);
|
||||
if (buf == NULL)
|
||||
return (NULL);
|
||||
flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | FLAG_YEAR;
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
@ -119,19 +151,23 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
if (i < 19)
|
||||
return (NULL);
|
||||
|
||||
tm->tm_year = i * 100 - 1900;
|
||||
tm->tm_year = i * 100 - TM_YEAR_BASE;
|
||||
flags |= FLAG_YEAR;
|
||||
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale);
|
||||
if (buf == NULL)
|
||||
return (NULL);
|
||||
flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | FLAG_YEAR;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale);
|
||||
if (buf == NULL)
|
||||
return (NULL);
|
||||
flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR;
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
@ -150,6 +186,7 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale);
|
||||
if (buf == NULL)
|
||||
return (NULL);
|
||||
flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR;
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
@ -180,6 +217,7 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale);
|
||||
if (buf == NULL)
|
||||
return (NULL);
|
||||
flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR;
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
@ -197,6 +235,8 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
return (NULL);
|
||||
|
||||
tm->tm_yday = i - 1;
|
||||
flags |= FLAG_YDAY;
|
||||
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
@ -302,8 +342,9 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
if (i == asizeof(tptr->weekday))
|
||||
return (NULL);
|
||||
|
||||
tm->tm_wday = i;
|
||||
buf += len;
|
||||
tm->tm_wday = i;
|
||||
flags |= FLAG_WDAY;
|
||||
break;
|
||||
|
||||
case 'U':
|
||||
@ -327,6 +368,14 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
if (i > 53)
|
||||
return (NULL);
|
||||
|
||||
if (c == 'U')
|
||||
day_offset = TM_SUNDAY;
|
||||
else
|
||||
day_offset = TM_MONDAY;
|
||||
|
||||
|
||||
week_offset = i;
|
||||
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
@ -338,6 +387,7 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
return (NULL);
|
||||
|
||||
tm->tm_wday = i;
|
||||
flags |= FLAG_WDAY;
|
||||
|
||||
break;
|
||||
|
||||
@ -374,6 +424,7 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
return (NULL);
|
||||
|
||||
tm->tm_mday = i;
|
||||
flags |= FLAG_MDAY;
|
||||
|
||||
break;
|
||||
|
||||
@ -413,6 +464,8 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
|
||||
tm->tm_mon = i;
|
||||
buf += len;
|
||||
flags |= FLAG_MONTH;
|
||||
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
@ -430,6 +483,7 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
return (NULL);
|
||||
|
||||
tm->tm_mon = i - 1;
|
||||
flags |= FLAG_MONTH;
|
||||
|
||||
break;
|
||||
|
||||
@ -471,13 +525,14 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
len--;
|
||||
}
|
||||
if (c == 'Y')
|
||||
i -= 1900;
|
||||
i -= TM_YEAR_BASE;
|
||||
if (c == 'y' && i < 69)
|
||||
i += 100;
|
||||
if (i < 0)
|
||||
return (NULL);
|
||||
|
||||
tm->tm_year = i;
|
||||
flags |= FLAG_YEAR;
|
||||
|
||||
break;
|
||||
|
||||
@ -543,10 +598,67 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(flags & FLAG_YDAY) && (flags & FLAG_YEAR)) {
|
||||
if ((flags & (FLAG_MONTH | FLAG_MDAY)) ==
|
||||
(FLAG_MONTH | FLAG_MDAY)) {
|
||||
tm->tm_yday = start_of_month[isleap(tm->tm_year +
|
||||
TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1);
|
||||
flags |= FLAG_YDAY;
|
||||
} else if (day_offset != -1) {
|
||||
/* Set the date to the first Sunday (or Monday)
|
||||
* of the specified week of the year.
|
||||
*/
|
||||
if (!(flags & FLAG_WDAY)) {
|
||||
tm->tm_wday = day_offset;
|
||||
flags |= FLAG_WDAY;
|
||||
}
|
||||
tm->tm_yday = (7 -
|
||||
first_wday_of(tm->tm_year + TM_YEAR_BASE) +
|
||||
day_offset) % 7 + (week_offset - 1) * 7 +
|
||||
tm->tm_wday - day_offset;
|
||||
flags |= FLAG_YDAY;
|
||||
}
|
||||
}
|
||||
|
||||
if ((flags & (FLAG_YEAR | FLAG_YDAY)) == (FLAG_YEAR | FLAG_YDAY)) {
|
||||
if (!(flags & FLAG_MONTH)) {
|
||||
i = 0;
|
||||
while (tm->tm_yday >=
|
||||
start_of_month[isleap(tm->tm_year +
|
||||
TM_YEAR_BASE)][i])
|
||||
i++;
|
||||
if (i > 12) {
|
||||
i = 1;
|
||||
tm->tm_yday -=
|
||||
start_of_month[isleap(tm->tm_year +
|
||||
TM_YEAR_BASE)][12];
|
||||
tm->tm_year++;
|
||||
}
|
||||
tm->tm_mon = i - 1;
|
||||
flags |= FLAG_MONTH;
|
||||
}
|
||||
if (!(flags & FLAG_MDAY)) {
|
||||
tm->tm_mday = tm->tm_yday -
|
||||
start_of_month[isleap(tm->tm_year + TM_YEAR_BASE)]
|
||||
[tm->tm_mon] + 1;
|
||||
flags |= FLAG_MDAY;
|
||||
}
|
||||
if (!(flags & FLAG_WDAY)) {
|
||||
i = 0;
|
||||
wday_offset = first_wday_of(tm->tm_year);
|
||||
while (i++ <= tm->tm_yday) {
|
||||
if (wday_offset++ >= 6)
|
||||
wday_offset = 0;
|
||||
}
|
||||
tm->tm_wday = wday_offset;
|
||||
flags |= FLAG_WDAY;
|
||||
}
|
||||
}
|
||||
|
||||
return ((char *)buf);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
strptime_l(const char * __restrict buf, const char * __restrict fmt,
|
||||
struct tm * __restrict tm, locale_t loc)
|
||||
@ -564,6 +676,7 @@ strptime_l(const char * __restrict buf, const char * __restrict fmt,
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
char *
|
||||
strptime(const char * __restrict buf, const char * __restrict fmt,
|
||||
struct tm * __restrict tm)
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" @(#)connect.2 8.1 (Berkeley) 6/4/93
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd June 26, 2014
|
||||
.Dd September 29, 2014
|
||||
.Dt CONNECT 2
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -160,6 +160,8 @@ Search permission is denied for a component of the path prefix.
|
||||
Write access to the named socket is denied.
|
||||
.It Bq Er ELOOP
|
||||
Too many symbolic links were encountered in translating the pathname.
|
||||
.It Bq Er EPERM
|
||||
Write access to the named socket is denied.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr accept 2 ,
|
||||
|
@ -144,8 +144,7 @@ SRCF+= adddf3 \
|
||||
truncdfsf2
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_CPUARCH} != "mips" && \
|
||||
(${MACHINE_CPUARCH} != "arm" || ${MK_ARM_EABI} != "no")
|
||||
.if ${MACHINE_CPUARCH} != "mips"
|
||||
SRCF+= divsi3 \
|
||||
modsi3 \
|
||||
udivsi3 \
|
||||
@ -165,16 +164,16 @@ SRCF+= stdatomic
|
||||
.endif
|
||||
|
||||
.for file in ${SRCF}
|
||||
. if ${MACHINE_ARCH} == "armv6hf" && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
|
||||
. if ${MACHINE_ARCH:Marm*hf*} != "" && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
|
||||
SRCS+= ${file}vfp.S
|
||||
. elif (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH} == "armv6hf") && exists(${CRTSRC}/${CRTARCH}/${file}.S)
|
||||
. elif !(${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH:Marm*hf*} == "") && exists(${CRTSRC}/${CRTARCH}/${file}.S)
|
||||
SRCS+= ${file}.S
|
||||
. else
|
||||
SRCS+= ${file}.c
|
||||
. endif
|
||||
.endfor
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${MACHINE_CPUARCH} == "arm"
|
||||
SRCS+= aeabi_idivmod.S \
|
||||
aeabi_ldivmod.S \
|
||||
aeabi_memcmp.S \
|
||||
|
@ -85,17 +85,21 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused,
|
||||
if (login_access(user, rhost) != 0)
|
||||
return (PAM_SUCCESS);
|
||||
PAM_VERBOSE_ERROR("%s is not allowed to log in from %s",
|
||||
user, rhost);
|
||||
(const char *)user, (const char *)rhost);
|
||||
} else if (tty != NULL && *(const char *)tty != '\0') {
|
||||
PAM_LOG("Checking login.access for user %s on tty %s",
|
||||
(const char *)user, (const char *)tty);
|
||||
if (login_access(user, tty) != 0)
|
||||
return (PAM_SUCCESS);
|
||||
PAM_VERBOSE_ERROR("%s is not allowed to log in on %s",
|
||||
user, tty);
|
||||
(const char *)user, (const char *)tty);
|
||||
} else {
|
||||
PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required");
|
||||
return (PAM_AUTHINFO_UNAVAIL);
|
||||
PAM_LOG("Checking login.access for user %s",
|
||||
(const char *)user);
|
||||
if (login_access(user, "***unknown***") != 0)
|
||||
return (PAM_SUCCESS);
|
||||
PAM_VERBOSE_ERROR("%s is not allowed to log in",
|
||||
(const char *)user);
|
||||
}
|
||||
|
||||
return (PAM_AUTH_ERR);
|
||||
|
@ -64,9 +64,6 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
|
||||
.if ${MACHINE_CPUARCH} == "arm"
|
||||
.PATH: ${.CURDIR}/../libc/arm/gen
|
||||
|
||||
.if ${MK_ARM_EABI} == "no"
|
||||
SRCS+= divsi3.S
|
||||
.else
|
||||
# Compiler support functions
|
||||
.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/
|
||||
# __clzsi2 and ctzsi2 for various builtin functions
|
||||
@ -78,7 +75,6 @@ SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c
|
||||
.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm/
|
||||
SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S
|
||||
SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S
|
||||
.endif
|
||||
|
||||
.endif
|
||||
.if ${MACHINE_CPUARCH} == "powerpc"
|
||||
|
@ -46,7 +46,7 @@ LDFLAGS+= -shared -Wl,-Bsymbolic
|
||||
DPADD= ${LIBC_PIC}
|
||||
LDADD= -lc_pic
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
|
||||
.if ${MACHINE_CPUARCH} == "arm"
|
||||
# Some of the required math functions (div & mod) are implemented in
|
||||
# libcompiler_rt on ARM. The library also needs to be placed first to be
|
||||
# correctly linked. As some of the functions are used before we have
|
||||
|
@ -137,7 +137,6 @@ CRUNCH_ALIAS_bsdlabel= disklabel
|
||||
.endif
|
||||
|
||||
.if ${MACHINE} == "pc98"
|
||||
CRUNCH_PROGS_sbin+= bsdlabel
|
||||
CRUNCH_SRCDIR_fdisk= $(.CURDIR)/../../sbin/fdisk_pc98
|
||||
.endif
|
||||
|
||||
|
@ -7,7 +7,7 @@ MAN= fdisk.8
|
||||
|
||||
.PATH: ${.CURDIR}/../../sys/geom
|
||||
|
||||
DPADD += ${LIBGEOM}
|
||||
LDADD += -lgeom
|
||||
DPADD+= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
|
||||
LDADD+= -lgeom -lbsdxml -lsbuf
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd September 9, 2014
|
||||
.Dd October 1, 2014
|
||||
.Dt IFCONFIG 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -679,7 +679,7 @@ Set a flag to enable Neighbor Unreachability Detection.
|
||||
Clear a flag
|
||||
.Cm nud .
|
||||
.It Cm no_prefer_iface
|
||||
Set a flag to not honor rule 5 of source address selection in RFC 3484.
|
||||
Set a flag to not honor rule 5 of source address selection in RFC 3484.
|
||||
In practice this means the address on the outgoing interface will not be
|
||||
preferred, effectively yielding the decision to the address selection
|
||||
policy table, configurable with
|
||||
@ -2331,9 +2331,16 @@ Remove the interface named by
|
||||
from the aggregation interface.
|
||||
.It Cm laggproto Ar proto
|
||||
Set the aggregation protocol.
|
||||
The default is failover.
|
||||
The available options are failover, lacp, loadbalance, roundrobin, broadcast
|
||||
and none.
|
||||
The default is
|
||||
.Li failover .
|
||||
The available options are
|
||||
.Li failover ,
|
||||
.Li lacp ,
|
||||
.Li loadbalance ,
|
||||
.Li roundrobin ,
|
||||
.Li broadcast
|
||||
and
|
||||
.Li none .
|
||||
.It Cm lagghash Ar option Ns Oo , Ns Ar option Oc
|
||||
Set the packet layers to hash for aggregation protocols which load balance.
|
||||
The default is
|
||||
@ -2348,6 +2355,34 @@ src/dst address for IPv4 or IPv6.
|
||||
.It Cm l4
|
||||
src/dst port for TCP/UDP/SCTP.
|
||||
.El
|
||||
.It Cm use_flowid
|
||||
Enable local hash computation for RSS hash on the interface.
|
||||
The
|
||||
.Li loadbalance
|
||||
and
|
||||
.Li lacp
|
||||
modes will use the RSS hash from the network card if available
|
||||
to avoid computing one, this may give poor traffic distribution
|
||||
if the hash is invalid or uses less of the protocol header information.
|
||||
.Cm use_flowid
|
||||
disables use of RSS hash from the network card.
|
||||
The default value can be set via the
|
||||
.Va net.link.lagg.default_use_flowid
|
||||
.Xr sysctl 8
|
||||
variable.
|
||||
.Li 0
|
||||
means
|
||||
.Dq disabled
|
||||
and
|
||||
.Li 1
|
||||
means
|
||||
.Dq enabled .
|
||||
.It Cm -use_flowid
|
||||
Disable local hash computation for RSS hash on the interface.
|
||||
.It Cm flowid_shift Ar number
|
||||
Set a shift parameter for RSS local hash computation.
|
||||
Hash is calculated by using flowid bits in a packet header mbuf
|
||||
which are shifted by the number of this parameter.
|
||||
.El
|
||||
.Pp
|
||||
The following parameters are specific to IP tunnel interfaces,
|
||||
|
@ -903,7 +903,7 @@ unsetifdescr(const char *val, int value, int s, const struct afswtch *afp)
|
||||
"\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \
|
||||
"\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \
|
||||
"\17TOE4\20TOE6\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \
|
||||
"\26RXCSUM_IPV6\27TXCSUM_IPV6"
|
||||
"\26RXCSUM_IPV6\27TXCSUM_IPV6\30HWSTATS"
|
||||
|
||||
/*
|
||||
* Print the status of the interface. If an address family was
|
||||
|
@ -68,7 +68,7 @@ setlaggproto(const char *val, int d, int s, const struct afswtch *afp)
|
||||
bzero(&ra, sizeof(ra));
|
||||
ra.ra_proto = LAGG_PROTO_MAX;
|
||||
|
||||
for (i = 0; i < (sizeof(lpr) / sizeof(lpr[0])); i++) {
|
||||
for (i = 0; i < nitems(lpr); i++) {
|
||||
if (strcmp(val, lpr[i].lpr_name) == 0) {
|
||||
ra.ra_proto = lpr[i].lpr_proto;
|
||||
break;
|
||||
@ -82,6 +82,48 @@ setlaggproto(const char *val, int d, int s, const struct afswtch *afp)
|
||||
err(1, "SIOCSLAGG");
|
||||
}
|
||||
|
||||
static void
|
||||
setlaggflowidshift(const char *val, int d, int s, const struct afswtch *afp)
|
||||
{
|
||||
struct lagg_reqall ra;
|
||||
|
||||
bzero(&ra, sizeof(ra));
|
||||
ra.ra_opts = LAGG_OPT_FLOWIDSHIFT;
|
||||
strlcpy(ra.ra_ifname, name, sizeof(ra.ra_ifname));
|
||||
ra.ra_flowid_shift = (int)strtol(val, NULL, 10);
|
||||
if (ra.ra_flowid_shift & ~LAGG_OPT_FLOWIDSHIFT_MASK)
|
||||
errx(1, "Invalid flowid_shift option: %s", val);
|
||||
|
||||
if (ioctl(s, SIOCSLAGG, &ra) != 0)
|
||||
err(1, "SIOCSLAGG");
|
||||
}
|
||||
|
||||
static void
|
||||
setlaggsetopt(const char *val, int d, int s, const struct afswtch *afp)
|
||||
{
|
||||
struct lagg_reqall ra;
|
||||
|
||||
bzero(&ra, sizeof(ra));
|
||||
ra.ra_opts = d;
|
||||
switch (ra.ra_opts) {
|
||||
case LAGG_OPT_USE_FLOWID:
|
||||
case -LAGG_OPT_USE_FLOWID:
|
||||
case LAGG_OPT_LACP_STRICT:
|
||||
case -LAGG_OPT_LACP_STRICT:
|
||||
case LAGG_OPT_LACP_TXTEST:
|
||||
case -LAGG_OPT_LACP_TXTEST:
|
||||
case LAGG_OPT_LACP_RXTEST:
|
||||
case -LAGG_OPT_LACP_RXTEST:
|
||||
break;
|
||||
default:
|
||||
err(1, "Invalid lagg option");
|
||||
}
|
||||
strlcpy(ra.ra_ifname, name, sizeof(ra.ra_ifname));
|
||||
|
||||
if (ioctl(s, SIOCSLAGG, &ra) != 0)
|
||||
err(1, "SIOCSLAGG");
|
||||
}
|
||||
|
||||
static void
|
||||
setlagghash(const char *val, int d, int s, const struct afswtch *afp)
|
||||
{
|
||||
@ -169,7 +211,7 @@ lagg_status(int s)
|
||||
if (ioctl(s, SIOCGLAGG, &ra) == 0) {
|
||||
lp = (struct lacp_opreq *)&ra.ra_lacpreq;
|
||||
|
||||
for (i = 0; i < (sizeof(lpr) / sizeof(lpr[0])); i++) {
|
||||
for (i = 0; i < nitems(lpr); i++) {
|
||||
if (ra.ra_proto == lpr[i].lpr_proto) {
|
||||
proto = lpr[i].lpr_name;
|
||||
break;
|
||||
@ -197,9 +239,28 @@ lagg_status(int s)
|
||||
if (isport)
|
||||
printf(" laggdev %s", rp.rp_ifname);
|
||||
putchar('\n');
|
||||
if (verbose && ra.ra_proto == LAGG_PROTO_LACP)
|
||||
printf("\tlag id: %s\n",
|
||||
lacp_format_peer(lp, "\n\t\t "));
|
||||
if (verbose) {
|
||||
printf("\tlagg options:\n");
|
||||
printf("\t\tuse_flowid: %d\n",
|
||||
(ra.ra_opts & LAGG_OPT_USE_FLOWID) ? 1 : 0);
|
||||
printf("\t\tflowid_shift: %d\n", ra.ra_flowid_shift);
|
||||
switch (ra.ra_proto) {
|
||||
case LAGG_PROTO_LACP:
|
||||
printf("\t\tlacp_strict: %d\n",
|
||||
(ra.ra_opts & LAGG_OPT_LACP_STRICT) ? 1 : 0);
|
||||
printf("\t\tlacp_rxtest: %d\n",
|
||||
(ra.ra_opts & LAGG_OPT_LACP_RXTEST) ? 1 : 0);
|
||||
printf("\t\tlacp_txtest: %d\n",
|
||||
(ra.ra_opts & LAGG_OPT_LACP_TXTEST) ? 1 : 0);
|
||||
}
|
||||
printf("\tlagg statistics:\n");
|
||||
printf("\t\tactive ports: %d\n", ra.ra_active);
|
||||
printf("\t\tflapping: %u\n", ra.ra_flapping);
|
||||
if (ra.ra_proto == LAGG_PROTO_LACP) {
|
||||
printf("\tlag id: %s\n",
|
||||
lacp_format_peer(lp, "\n\t\t "));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ra.ra_ports; i++) {
|
||||
lp = (struct lacp_opreq *)&rpbuf[i].rp_lacpreq;
|
||||
@ -226,6 +287,15 @@ static struct cmd lagg_cmds[] = {
|
||||
DEF_CMD_ARG("-laggport", unsetlaggport),
|
||||
DEF_CMD_ARG("laggproto", setlaggproto),
|
||||
DEF_CMD_ARG("lagghash", setlagghash),
|
||||
DEF_CMD("use_flowid", LAGG_OPT_USE_FLOWID, setlaggsetopt),
|
||||
DEF_CMD("-use_flowid", -LAGG_OPT_USE_FLOWID, setlaggsetopt),
|
||||
DEF_CMD("lacp_strict", LAGG_OPT_LACP_STRICT, setlaggsetopt),
|
||||
DEF_CMD("-lacp_strict", -LAGG_OPT_LACP_STRICT, setlaggsetopt),
|
||||
DEF_CMD("lacp_txtest", LAGG_OPT_LACP_TXTEST, setlaggsetopt),
|
||||
DEF_CMD("-lacp_txtest", -LAGG_OPT_LACP_TXTEST, setlaggsetopt),
|
||||
DEF_CMD("lacp_rxtest", LAGG_OPT_LACP_RXTEST, setlaggsetopt),
|
||||
DEF_CMD("-lacp_rxtest", -LAGG_OPT_LACP_RXTEST, setlaggsetopt),
|
||||
DEF_CMD_ARG("flowid_shift", setlaggflowidshift),
|
||||
};
|
||||
static struct afswtch af_lagg = {
|
||||
.af_name = "af_lagg",
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" @(#)icmp.4 8.1 (Berkeley) 6/5/93
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd February 9, 2007
|
||||
.Dd September 30, 2014
|
||||
.Dt ICMP 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -216,6 +216,10 @@ instead of the possibly different return path.
|
||||
Number of bytes from original packet to quote in ICMP reply.
|
||||
This number is internally enforced to be at least 8 bytes (per RFC792)
|
||||
and at most the maximal space left in the ICMP reply mbuf.
|
||||
.It Va tstamprepl
|
||||
.Pq Vt boolean
|
||||
Enable/disable replies to ICMP Timestamp packets.
|
||||
Defaults to true.
|
||||
.El
|
||||
.Sh ERRORS
|
||||
A socket operation may fail with one of the following errors returned:
|
||||
|
@ -27,12 +27,12 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd September 25, 2014
|
||||
.Dd September 30, 2014
|
||||
.Dt IPHETH 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm ipheth
|
||||
.Nd "USB Apple iPhone/iPad Ethernet driver"
|
||||
.Nd "USB Apple iPhone/iPad tethered Ethernet driver"
|
||||
.Sh SYNOPSIS
|
||||
To load the driver as a module at boot time, place the
|
||||
following line in
|
||||
@ -61,6 +61,7 @@ In most cases this must be explicitly enabled on the device first.
|
||||
.Pp
|
||||
For more information on configuring this device, see
|
||||
.Xr ifconfig 8 .
|
||||
The device does not support different media types or options.
|
||||
.Sh HARDWARE
|
||||
The following devices are supported by the
|
||||
.Nm
|
||||
@ -68,9 +69,9 @@ driver:
|
||||
.Pp
|
||||
.Bl -bullet -compact
|
||||
.It
|
||||
Apple iPhone (all models)
|
||||
Apple iPhone tethering (all models)
|
||||
.It
|
||||
Apple iPad (all models)
|
||||
Apple iPad tethering (all models)
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr arp 4 ,
|
||||
@ -80,6 +81,7 @@ Apple iPad (all models)
|
||||
.Xr urndis 4 ,
|
||||
.Xr usb 4 ,
|
||||
.Xr ifconfig 8
|
||||
.Xr usbconfig 8
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
@ -91,3 +93,14 @@ The
|
||||
.Nm
|
||||
driver was written by
|
||||
.An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org .
|
||||
.Sh BUGS
|
||||
Some devices may need to be manually configured to use an alternative
|
||||
configuration with the
|
||||
.Xr usbconfig 8
|
||||
utility.
|
||||
A command similar to
|
||||
.Dl usbconfig -u 1 -a 2 set_config 3
|
||||
may be required if the device is not recognised automatically by
|
||||
.Nm
|
||||
after it is connected.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd February 23, 2012
|
||||
.Dd October 1, 2014
|
||||
.Dt LAGG 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -143,9 +143,9 @@ modes will use the RSS hash from the network card if available to avoid
|
||||
computing one, this may give poor traffic distribution if the hash is invalid
|
||||
or uses less of the protocol header information.
|
||||
Local hash computation can be forced per interface by setting the
|
||||
.Va net.link.lagg.X.use_flowid
|
||||
.Xr sysctl 8
|
||||
variable to zero where X is the interface number.
|
||||
.Cm use_flowid
|
||||
.Xr ifconfig 8
|
||||
flag.
|
||||
The default for new interfaces is set via the
|
||||
.Va net.link.lagg.default_use_flowid
|
||||
.Xr sysctl 8 .
|
||||
|
@ -24,7 +24,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd February 8, 2012
|
||||
.Dd September 30, 2014
|
||||
.Dt SFXGE 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -76,6 +76,39 @@ The
|
||||
.Nm
|
||||
driver supports all 10Gb Ethernet adapters based on Solarflare SFC9000
|
||||
family controllers.
|
||||
.Sh LOADER TUNABLES
|
||||
Tunables can be set at the
|
||||
.Xr loader 8
|
||||
prompt before booting the kernel or stored in
|
||||
.Xr loader.conf 5 .
|
||||
Actual values can be obtained using
|
||||
.Xr sysctl 8 .
|
||||
.Bl -tag -width indent
|
||||
.It Va hw.sfxge.rx_ring
|
||||
The maximum number of descriptors in a receive queue ring.
|
||||
Supported values are: 512, 1024, 2048 and 4096.
|
||||
.It Va hw.sfxge.tx_ring
|
||||
The maximum number of descriptors in a transmit queue ring.
|
||||
Supported values are: 512, 1024, 2048 and 4096.
|
||||
.It Va hw.sfxge.tx_dpl_get_max
|
||||
The maximum length of the deferred packet
|
||||
.Dq get-list
|
||||
for queued transmit
|
||||
packets, used only if the transmit queue lock can be acquired.
|
||||
If a packet is dropped, the
|
||||
.Va tx_early_drops
|
||||
counter is incremented and the local sender receives ENOBUFS.
|
||||
The value must be greater than 0.
|
||||
.It Va hw.sfxge.tx_dpl_put_max
|
||||
The maximum length of the deferred packet
|
||||
.Dq put-list
|
||||
for queued transmit
|
||||
packets, used if the transmit queue lock cannot be acquired.
|
||||
If a packet is dropped, the
|
||||
.Va tx_early_drops
|
||||
counter is incremented and the local sender receives ENOBUFS.
|
||||
The value must be greater than or equal to 0.
|
||||
.El
|
||||
.Sh SUPPORT
|
||||
For general information and support,
|
||||
go to the Solarflare support website at:
|
||||
|
@ -24,7 +24,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd April 7, 2014
|
||||
.Dd October 1, 2014
|
||||
.Dt UDPLITE 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -55,16 +55,16 @@ and tested with
|
||||
.Bl -tag -width ".Dv UDPLITE_SEND_CSCOV"
|
||||
.It Dv UDPLITE_SEND_CSCOV
|
||||
This option sets the sender checksum coverage.
|
||||
A value of zero indicates that the entire packet
|
||||
is covered by the checksum.
|
||||
A value of 1 to 7 must be discarded by the receiver.
|
||||
A value of zero indicates that all sent packets will have
|
||||
full checksum coverage.
|
||||
A value of 8 to 65535 limits the checksum coverage of all sent packets
|
||||
to the value given.
|
||||
.It Dv UDPLITE_RECV_CSCOV
|
||||
This option is the receiver-side analogue.
|
||||
It is truly optional, i.e. not required to enable traffic
|
||||
with partial checksum coverage.
|
||||
Its function is that of a traffic filter:
|
||||
when enabled, it instructs the kernel to drop
|
||||
all packets which have a coverage less than this value.
|
||||
A value of zero instructs the kernel to drop all received packets
|
||||
not having full checksum coverage.
|
||||
A value of 8 to 65535 instructs the kernel to drop all received
|
||||
packets with a partial checksum coverage smaller than the value specified.
|
||||
.El
|
||||
.Sh ERRORS
|
||||
A socket operation may fail with one of the following errors returned:
|
||||
|
@ -19,7 +19,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm urtwn
|
||||
.Nd Realtek RTL8188CU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n wireless network device
|
||||
.Nd Realtek RTL8188CU/RTL8188RU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n wireless network device
|
||||
.Sh SYNOPSIS
|
||||
To compile this driver into the kernel,
|
||||
place the following lines in your
|
||||
@ -82,10 +82,11 @@ firmware license
|
||||
.Sh HARDWARE
|
||||
The
|
||||
.Nm
|
||||
driver supports Realtek RTL8188CU/RTL8188EU/RTL8192CU based USB
|
||||
driver supports Realtek RTL8188CU/RTL8188RU/RTL8188EU/RTL8192CU based USB
|
||||
IEEE 802.11b/g/n wireless network adapters, including:
|
||||
.Pp
|
||||
.Bl -tag -width Ds -offset indent -compact
|
||||
.It Alfa AWUS036NHR v2
|
||||
.It ASUS USB-N10 NANO
|
||||
.It Belkin F7D1102 Surf Wireless Micro
|
||||
.It D-Link DWA-125 rev D1
|
||||
|
@ -123,8 +123,8 @@ ${_YC:R}.o: ${_YC}
|
||||
# DTrace probe definitions
|
||||
# libelf is currently needed for drti.o
|
||||
.if ${SRCS:M*.d}
|
||||
LDFLAGS+= -lelf
|
||||
LDADD+= ${LIBELF}
|
||||
LDADD+= -lelf
|
||||
DPADD+= ${LIBELF}
|
||||
CFLAGS+= -I${.OBJDIR}
|
||||
.endif
|
||||
.for _DSRC in ${SRCS:M*.d:N*/*}
|
||||
|
@ -2,16 +2,13 @@
|
||||
|
||||
.if ${MACHINE_ARCH} == "amd64" || \
|
||||
${MACHINE_ARCH} == "i386" || \
|
||||
${MACHINE_ARCH} == "arm" || \
|
||||
${MACHINE_ARCH} == "armv6" || \
|
||||
${MACHINE_ARCH} == "armv6hf" || \
|
||||
(${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} == "") || \
|
||||
${MACHINE_ARCH:Mmips*el} != ""
|
||||
TARGET_ENDIANNESS= 1234
|
||||
.elif ${MACHINE_ARCH} == "powerpc" || \
|
||||
${MACHINE_ARCH} == "powerpc64" || \
|
||||
${MACHINE_ARCH} == "sparc64" || \
|
||||
${MACHINE_ARCH} == "armeb" || \
|
||||
${MACHINE_ARCH} == "armv6eb" || \
|
||||
(${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} != "") || \
|
||||
${MACHINE_ARCH:Mmips*} != ""
|
||||
TARGET_ENDIANNESS= 4321
|
||||
.endif
|
||||
|
@ -1,6 +1,18 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTSDIR?= /usr/ports
|
||||
.if !defined(PORTSDIR)
|
||||
# Autodetect if the command is being run in a ports tree that's not rooted
|
||||
# in the default /usr/ports. The ../../.. case is in case ports ever grows
|
||||
# a third level.
|
||||
.for RELPATH in . .. ../.. ../../..
|
||||
.if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk)
|
||||
_PORTSDIR= ${.CURDIR}/${RELPATH}
|
||||
.endif
|
||||
.endfor
|
||||
_PORTSDIR?= /usr/ports
|
||||
PORTSDIR!= realpath ${_PORTSDIR}
|
||||
.endif
|
||||
|
||||
BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk
|
||||
|
||||
# Needed to keep bsd.own.mk from reading in /etc/src.conf
|
||||
|
@ -1,6 +1,18 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTSDIR?= /usr/ports
|
||||
.if !defined(PORTSDIR)
|
||||
# Autodetect if the command is being run in a ports tree that's not rooted
|
||||
# in the default /usr/ports. The ../../.. case is in case ports ever grows
|
||||
# a third level.
|
||||
.for RELPATH in . .. ../.. ../../..
|
||||
.if !defined(_PORTSDIR) && exists(${.CURDIR}/${RELPATH}/Mk/bsd.port.mk)
|
||||
_PORTSDIR= ${.CURDIR}/${RELPATH}
|
||||
.endif
|
||||
.endfor
|
||||
_PORTSDIR?= /usr/ports
|
||||
PORTSDIR!= realpath ${_PORTSDIR}
|
||||
.endif
|
||||
|
||||
BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk
|
||||
|
||||
.include "${BSDPORTSUBDIRMK}"
|
||||
|
@ -48,7 +48,6 @@ __DEFAULT_YES_OPTIONS = \
|
||||
ACPI \
|
||||
AMD \
|
||||
APM \
|
||||
ARM_EABI \
|
||||
AT \
|
||||
ATM \
|
||||
AUDIT \
|
||||
@ -194,7 +193,7 @@ __TT=${MACHINE}
|
||||
# Clang is only for x86, powerpc and little-endian arm right now, by default.
|
||||
.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*}
|
||||
__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL CLANG_BOOTSTRAP
|
||||
.elif ${__T} == "arm" || ${__T} == "armv6" || ${__T} == "armv6hf"
|
||||
.elif ${__TT} == "arm" && ${__T:Marm*eb*} == ""
|
||||
__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP
|
||||
# GCC is unable to build the full clang on arm, disable it by default.
|
||||
__DEFAULT_NO_OPTIONS+=CLANG_FULL
|
||||
@ -202,8 +201,8 @@ __DEFAULT_NO_OPTIONS+=CLANG_FULL
|
||||
__DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL CLANG_BOOTSTRAP
|
||||
.endif
|
||||
# Clang the default system compiler only on little-endian arm and x86.
|
||||
.if ${__T} == "amd64" || ${__T} == "arm" || ${__T} == "armv6" || \
|
||||
${__T} == "armv6hf" || ${__T} == "i386"
|
||||
.if ${__T} == "amd64" || (${__TT} == "arm" && ${__T:Marm*eb*} == "") || \
|
||||
${__T} == "i386"
|
||||
__DEFAULT_YES_OPTIONS+=CLANG_IS_CC
|
||||
__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
|
||||
.else
|
||||
|
@ -177,6 +177,7 @@ struct init_ops init_ops = {
|
||||
.mp_bootaddress = mp_bootaddress,
|
||||
.start_all_aps = native_start_all_aps,
|
||||
#endif
|
||||
.msi_init = msi_init,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -94,23 +94,18 @@ __FBSDID("$FreeBSD$");
|
||||
#define PROCBASED_CTLS2_ONE_SETTING PROCBASED2_ENABLE_EPT
|
||||
#define PROCBASED_CTLS2_ZERO_SETTING 0
|
||||
|
||||
#define VM_EXIT_CTLS_ONE_SETTING_NO_PAT \
|
||||
#define VM_EXIT_CTLS_ONE_SETTING \
|
||||
(VM_EXIT_HOST_LMA | \
|
||||
VM_EXIT_SAVE_EFER | \
|
||||
VM_EXIT_LOAD_EFER)
|
||||
|
||||
#define VM_EXIT_CTLS_ONE_SETTING \
|
||||
(VM_EXIT_CTLS_ONE_SETTING_NO_PAT | \
|
||||
VM_EXIT_LOAD_EFER | \
|
||||
VM_EXIT_ACKNOWLEDGE_INTERRUPT | \
|
||||
VM_EXIT_SAVE_PAT | \
|
||||
VM_EXIT_LOAD_PAT)
|
||||
|
||||
#define VM_EXIT_CTLS_ZERO_SETTING VM_EXIT_SAVE_DEBUG_CONTROLS
|
||||
|
||||
#define VM_ENTRY_CTLS_ONE_SETTING_NO_PAT VM_ENTRY_LOAD_EFER
|
||||
#define VM_ENTRY_CTLS_ONE_SETTING (VM_ENTRY_LOAD_EFER | VM_ENTRY_LOAD_PAT)
|
||||
|
||||
#define VM_ENTRY_CTLS_ONE_SETTING \
|
||||
(VM_ENTRY_CTLS_ONE_SETTING_NO_PAT | \
|
||||
VM_ENTRY_LOAD_PAT)
|
||||
#define VM_ENTRY_CTLS_ZERO_SETTING \
|
||||
(VM_ENTRY_LOAD_DEBUG_CONTROLS | \
|
||||
VM_ENTRY_INTO_SMM | \
|
||||
@ -152,10 +147,6 @@ SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, initialized, CTLFLAG_RD,
|
||||
*/
|
||||
static SYSCTL_NODE(_hw_vmm_vmx, OID_AUTO, cap, CTLFLAG_RW, NULL, NULL);
|
||||
|
||||
static int vmx_patmsr;
|
||||
SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, patmsr, CTLFLAG_RD, &vmx_patmsr, 0,
|
||||
"PAT MSR saved and restored in VCMS");
|
||||
|
||||
static int cap_halt_exit;
|
||||
SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, halt_exit, CTLFLAG_RD, &cap_halt_exit, 0,
|
||||
"HLT triggers a VM-exit");
|
||||
@ -615,48 +606,24 @@ vmx_init(int ipinum)
|
||||
}
|
||||
|
||||
/* Check support for VM-exit controls */
|
||||
vmx_patmsr = 1;
|
||||
error = vmx_set_ctlreg(MSR_VMX_EXIT_CTLS, MSR_VMX_TRUE_EXIT_CTLS,
|
||||
VM_EXIT_CTLS_ONE_SETTING,
|
||||
VM_EXIT_CTLS_ZERO_SETTING,
|
||||
&exit_ctls);
|
||||
if (error) {
|
||||
/* Try again without the PAT MSR bits */
|
||||
error = vmx_set_ctlreg(MSR_VMX_EXIT_CTLS,
|
||||
MSR_VMX_TRUE_EXIT_CTLS,
|
||||
VM_EXIT_CTLS_ONE_SETTING_NO_PAT,
|
||||
VM_EXIT_CTLS_ZERO_SETTING,
|
||||
&exit_ctls);
|
||||
if (error) {
|
||||
printf("vmx_init: processor does not support desired "
|
||||
"exit controls\n");
|
||||
return (error);
|
||||
} else {
|
||||
if (bootverbose)
|
||||
printf("vmm: PAT MSR access not supported\n");
|
||||
vmx_patmsr = 0;
|
||||
}
|
||||
printf("vmx_init: processor does not support desired "
|
||||
"exit controls\n");
|
||||
return (error);
|
||||
}
|
||||
|
||||
/* Check support for VM-entry controls */
|
||||
if (vmx_patmsr) {
|
||||
error = vmx_set_ctlreg(MSR_VMX_ENTRY_CTLS,
|
||||
MSR_VMX_TRUE_ENTRY_CTLS,
|
||||
VM_ENTRY_CTLS_ONE_SETTING,
|
||||
VM_ENTRY_CTLS_ZERO_SETTING,
|
||||
&entry_ctls);
|
||||
} else {
|
||||
error = vmx_set_ctlreg(MSR_VMX_ENTRY_CTLS,
|
||||
MSR_VMX_TRUE_ENTRY_CTLS,
|
||||
VM_ENTRY_CTLS_ONE_SETTING_NO_PAT,
|
||||
VM_ENTRY_CTLS_ZERO_SETTING,
|
||||
&entry_ctls);
|
||||
}
|
||||
|
||||
error = vmx_set_ctlreg(MSR_VMX_ENTRY_CTLS, MSR_VMX_TRUE_ENTRY_CTLS,
|
||||
VM_ENTRY_CTLS_ONE_SETTING, VM_ENTRY_CTLS_ZERO_SETTING,
|
||||
&entry_ctls);
|
||||
if (error) {
|
||||
printf("vmx_init: processor does not support desired "
|
||||
"entry controls\n");
|
||||
return (error);
|
||||
"entry controls\n");
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -889,6 +856,10 @@ vmx_vminit(struct vm *vm, pmap_t pmap)
|
||||
* VM exit and entry respectively. It is also restored from the
|
||||
* host VMCS area on a VM exit.
|
||||
*
|
||||
* MSR_PAT is saved and restored in the guest VMCS are on a VM exit
|
||||
* and entry respectively. It is also restored from the host VMCS
|
||||
* area on a VM exit.
|
||||
*
|
||||
* The TSC MSR is exposed read-only. Writes are disallowed as that
|
||||
* will impact the host TSC.
|
||||
* XXX Writes would be implemented with a wrmsr trap, and
|
||||
@ -900,19 +871,10 @@ vmx_vminit(struct vm *vm, pmap_t pmap)
|
||||
guest_msr_rw(vmx, MSR_SYSENTER_ESP_MSR) ||
|
||||
guest_msr_rw(vmx, MSR_SYSENTER_EIP_MSR) ||
|
||||
guest_msr_rw(vmx, MSR_EFER) ||
|
||||
guest_msr_rw(vmx, MSR_PAT) ||
|
||||
guest_msr_ro(vmx, MSR_TSC))
|
||||
panic("vmx_vminit: error setting guest msr access");
|
||||
|
||||
/*
|
||||
* MSR_PAT is saved and restored in the guest VMCS are on a VM exit
|
||||
* and entry respectively. It is also restored from the host VMCS
|
||||
* area on a VM exit. However, if running on a system with no
|
||||
* MSR_PAT save/restore support, leave access disabled so accesses
|
||||
* will be trapped.
|
||||
*/
|
||||
if (vmx_patmsr && guest_msr_rw(vmx, MSR_PAT))
|
||||
panic("vmx_vminit: error setting guest pat msr access");
|
||||
|
||||
vpid_alloc(vpid, VM_MAXCPU);
|
||||
|
||||
if (virtual_interrupt_delivery) {
|
||||
|
@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define TIMER_ENABLE (1<<0)
|
||||
#define TIMER_AUTORELOAD (1<<1)
|
||||
#define TIMER_OSC24M (1<<2) /* oscillator = 24mhz */
|
||||
#define TIMER_PRESCALAR (4<<4) /* prescalar = 16 */
|
||||
#define TIMER_PRESCALAR (0<<4) /* prescalar = 1 */
|
||||
|
||||
#define SYS_TIMER_CLKSRC 24000000 /* clock source */
|
||||
|
||||
|
@ -168,6 +168,12 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags)
|
||||
end = hwp->size + start;
|
||||
realmem += arm32_btop(end - start);
|
||||
for (exi = 0, exp = exregions; exi < excnt; ++exi, ++exp) {
|
||||
/*
|
||||
* If the excluded region does not match given flags,
|
||||
* continue checking with the next excluded region.
|
||||
*/
|
||||
if ((exp->flags & exflags) == 0)
|
||||
continue;
|
||||
xstart = exp->addr;
|
||||
xend = exp->size + xstart;
|
||||
/*
|
||||
|
196
sys/arm/arm/syscall.c
Normal file
196
sys/arm/arm/syscall.c
Normal file
@ -0,0 +1,196 @@
|
||||
/* $NetBSD: fault.c,v 1.45 2003/11/20 14:44:36 scw Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright 2004 Olivier Houchard
|
||||
* Copyright 2003 Wasabi Systems, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Steve C. Woodford for Wasabi Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the NetBSD Project by
|
||||
* Wasabi Systems, Inc.
|
||||
* 4. The name of Wasabi Systems, Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*-
|
||||
* Copyright (c) 1994-1997 Mark Brinicombe.
|
||||
* Copyright (c) 1994 Brini.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software written for Brini by Mark Brinicombe
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Brini.
|
||||
* 4. The name of the company nor the name of the author may be used to
|
||||
* endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* RiscBSD kernel project
|
||||
*
|
||||
* fault.c
|
||||
*
|
||||
* Fault handlers
|
||||
*
|
||||
* Created : 28/11/94
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/pioctl.h>
|
||||
|
||||
#include <machine/frame.h>
|
||||
|
||||
void swi_handler(struct trapframe *);
|
||||
|
||||
static __inline void
|
||||
call_trapsignal(struct thread *td, int sig, u_long code)
|
||||
{
|
||||
ksiginfo_t ksi;
|
||||
|
||||
ksiginfo_init_trap(&ksi);
|
||||
ksi.ksi_signo = sig;
|
||||
ksi.ksi_code = (int)code;
|
||||
trapsignal(td, &ksi);
|
||||
}
|
||||
|
||||
int
|
||||
cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
|
||||
{
|
||||
struct proc *p;
|
||||
register_t *ap;
|
||||
int error;
|
||||
|
||||
sa->code = td->td_frame->tf_r7;
|
||||
ap = &td->td_frame->tf_r0;
|
||||
if (sa->code == SYS_syscall) {
|
||||
sa->code = *ap++;
|
||||
sa->nap--;
|
||||
} else if (sa->code == SYS___syscall) {
|
||||
sa->code = ap[_QUAD_LOWWORD];
|
||||
sa->nap -= 2;
|
||||
ap += 2;
|
||||
}
|
||||
p = td->td_proc;
|
||||
if (p->p_sysent->sv_mask)
|
||||
sa->code &= p->p_sysent->sv_mask;
|
||||
if (sa->code >= p->p_sysent->sv_size)
|
||||
sa->callp = &p->p_sysent->sv_table[0];
|
||||
else
|
||||
sa->callp = &p->p_sysent->sv_table[sa->code];
|
||||
sa->narg = sa->callp->sy_narg;
|
||||
error = 0;
|
||||
memcpy(sa->args, ap, sa->nap * sizeof(register_t));
|
||||
if (sa->narg > sa->nap) {
|
||||
error = copyin((void *)td->td_frame->tf_usr_sp, sa->args +
|
||||
sa->nap, (sa->narg - sa->nap) * sizeof(register_t));
|
||||
}
|
||||
if (error == 0) {
|
||||
td->td_retval[0] = 0;
|
||||
td->td_retval[1] = 0;
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
#include "../../kern/subr_syscall.c"
|
||||
|
||||
static void
|
||||
syscall(struct thread *td, struct trapframe *frame)
|
||||
{
|
||||
struct syscall_args sa;
|
||||
int error;
|
||||
|
||||
sa.nap = 4;
|
||||
|
||||
error = syscallenter(td, &sa);
|
||||
KASSERT(error != 0 || td->td_ar == NULL,
|
||||
("returning from syscall with td_ar set!"));
|
||||
syscallret(td, error, &sa);
|
||||
}
|
||||
|
||||
void
|
||||
swi_handler(struct trapframe *frame)
|
||||
{
|
||||
struct thread *td = curthread;
|
||||
|
||||
td->td_frame = frame;
|
||||
|
||||
td->td_pticks = 0;
|
||||
/*
|
||||
* Make sure the program counter is correctly aligned so we
|
||||
* don't take an alignment fault trying to read the opcode.
|
||||
* XXX: Fix for Thumb mode
|
||||
*/
|
||||
if (__predict_false(((frame->tf_pc - INSN_SIZE) & 3) != 0)) {
|
||||
call_trapsignal(td, SIGILL, 0);
|
||||
userret(td, frame);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* Enable interrupts if they were enabled before the exception.
|
||||
* Since all syscalls *should* come from user mode it will always
|
||||
* be safe to enable them, but check anyway.
|
||||
*/
|
||||
if (td->td_md.md_spinlock_count == 0) {
|
||||
if (__predict_true(frame->tf_spsr & PSR_I) == 0)
|
||||
enable_interrupts(PSR_I);
|
||||
if (__predict_true(frame->tf_spsr & PSR_F) == 0)
|
||||
enable_interrupts(PSR_F);
|
||||
}
|
||||
|
||||
syscall(td, frame);
|
||||
}
|
@ -79,28 +79,15 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/ktr.h>
|
||||
#ifdef KTRACE
|
||||
#include <sys/uio.h>
|
||||
#include <sys/ktrace.h>
|
||||
#endif
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/pioctl.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/pmap.h>
|
||||
@ -108,28 +95,16 @@ __FBSDID("$FreeBSD$");
|
||||
#include <vm/vm_map.h>
|
||||
#include <vm/vm_extern.h>
|
||||
|
||||
#include <machine/armreg.h>
|
||||
#include <machine/cpuconf.h>
|
||||
#include <machine/vmparam.h>
|
||||
#include <machine/frame.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/intr.h>
|
||||
#include <machine/frame.h>
|
||||
#include <machine/machdep.h>
|
||||
#include <machine/pcb.h>
|
||||
#include <machine/proc.h>
|
||||
#include <machine/swi.h>
|
||||
|
||||
#include <security/audit/audit.h>
|
||||
#include <machine/vmparam.h>
|
||||
|
||||
#ifdef KDB
|
||||
#include <sys/kdb.h>
|
||||
#endif
|
||||
|
||||
|
||||
void swi_handler(struct trapframe *);
|
||||
|
||||
#include <machine/disassem.h>
|
||||
#include <machine/machdep.h>
|
||||
|
||||
extern char fusubailout[];
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -775,106 +750,4 @@ badaddr_read(void *addr, size_t size, void *rptr)
|
||||
|
||||
/* Return EFAULT if the address was invalid, else zero */
|
||||
return (rv);
|
||||
}
|
||||
|
||||
int
|
||||
cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
|
||||
{
|
||||
struct proc *p;
|
||||
register_t *ap;
|
||||
int error;
|
||||
|
||||
#ifdef __ARM_EABI__
|
||||
sa->code = td->td_frame->tf_r7;
|
||||
#else
|
||||
sa->code = sa->insn & 0x000fffff;
|
||||
#endif
|
||||
ap = &td->td_frame->tf_r0;
|
||||
if (sa->code == SYS_syscall) {
|
||||
sa->code = *ap++;
|
||||
sa->nap--;
|
||||
} else if (sa->code == SYS___syscall) {
|
||||
sa->code = ap[_QUAD_LOWWORD];
|
||||
sa->nap -= 2;
|
||||
ap += 2;
|
||||
}
|
||||
p = td->td_proc;
|
||||
if (p->p_sysent->sv_mask)
|
||||
sa->code &= p->p_sysent->sv_mask;
|
||||
if (sa->code >= p->p_sysent->sv_size)
|
||||
sa->callp = &p->p_sysent->sv_table[0];
|
||||
else
|
||||
sa->callp = &p->p_sysent->sv_table[sa->code];
|
||||
sa->narg = sa->callp->sy_narg;
|
||||
error = 0;
|
||||
memcpy(sa->args, ap, sa->nap * sizeof(register_t));
|
||||
if (sa->narg > sa->nap) {
|
||||
error = copyin((void *)td->td_frame->tf_usr_sp, sa->args +
|
||||
sa->nap, (sa->narg - sa->nap) * sizeof(register_t));
|
||||
}
|
||||
if (error == 0) {
|
||||
td->td_retval[0] = 0;
|
||||
td->td_retval[1] = 0;
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
#include "../../kern/subr_syscall.c"
|
||||
|
||||
static void
|
||||
syscall(struct thread *td, struct trapframe *frame)
|
||||
{
|
||||
struct syscall_args sa;
|
||||
int error;
|
||||
|
||||
#ifndef __ARM_EABI__
|
||||
sa.insn = *(uint32_t *)(frame->tf_pc - INSN_SIZE);
|
||||
switch (sa.insn & SWI_OS_MASK) {
|
||||
case 0: /* XXX: we need our own one. */
|
||||
break;
|
||||
default:
|
||||
call_trapsignal(td, SIGILL, 0);
|
||||
userret(td, frame);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
sa.nap = 4;
|
||||
|
||||
error = syscallenter(td, &sa);
|
||||
KASSERT(error != 0 || td->td_ar == NULL,
|
||||
("returning from syscall with td_ar set!"));
|
||||
syscallret(td, error, &sa);
|
||||
}
|
||||
|
||||
void
|
||||
swi_handler(struct trapframe *frame)
|
||||
{
|
||||
struct thread *td = curthread;
|
||||
|
||||
td->td_frame = frame;
|
||||
|
||||
td->td_pticks = 0;
|
||||
/*
|
||||
* Make sure the program counter is correctly aligned so we
|
||||
* don't take an alignment fault trying to read the opcode.
|
||||
*/
|
||||
if (__predict_false(((frame->tf_pc - INSN_SIZE) & 3) != 0)) {
|
||||
call_trapsignal(td, SIGILL, 0);
|
||||
userret(td, frame);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* Enable interrupts if they were enabled before the exception.
|
||||
* Since all syscalls *should* come from user mode it will always
|
||||
* be safe to enable them, but check anyway.
|
||||
*/
|
||||
if (td->td_md.md_spinlock_count == 0) {
|
||||
if (__predict_true(frame->tf_spsr & PSR_I) == 0)
|
||||
enable_interrupts(PSR_I);
|
||||
if (__predict_true(frame->tf_spsr & PSR_F) == 0)
|
||||
enable_interrupts(PSR_F);
|
||||
}
|
||||
|
||||
syscall(td, frame);
|
||||
}
|
||||
|
||||
}
|
@ -34,6 +34,8 @@
|
||||
#ifndef MACHINE_SYSREG_H
|
||||
#define MACHINE_SYSREG_H
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
|
||||
/*
|
||||
* CP15 C0 registers
|
||||
*/
|
||||
|
@ -1,4 +1,3 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# Blank, to override Makefile.i386 since Makefile.$MACHINE is included before
|
||||
# Makefile.$MACHINE_ARCH
|
||||
SUBDIR+= libstand32
|
||||
|
@ -17,9 +17,7 @@ FILES=${P}
|
||||
SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:tl}_board.c
|
||||
SRCS+=memchr.c memcmp.c memcpy.c memmem.c memset.c printf.c strcmp.c strcpy.c
|
||||
SRCS+=strlen.c ashldi3.c divsi3.S muldi3.c
|
||||
.if ${MK_ARM_EABI} != "no"
|
||||
SRCS+=aeabi_unwind.c
|
||||
.endif
|
||||
MAN=
|
||||
|
||||
KERNPHYSADDR=0x180000
|
||||
|
@ -37,7 +37,7 @@ CFLAGS= -Os \
|
||||
-Wall -Waggregate-return -Wbad-function-cast -Wcast-align \
|
||||
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
|
||||
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
|
||||
-Winline \
|
||||
-Winline
|
||||
|
||||
CFLAGS.gcc+= -fno-guess-branch-probability \
|
||||
-fno-unit-at-a-time \
|
||||
|
@ -67,9 +67,6 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
|
||||
.if ${MACHINE_CPUARCH} == "arm"
|
||||
.PATH: ${LIBC}/arm/gen
|
||||
|
||||
.if ${MK_ARM_EABI} == "no"
|
||||
SRCS+= divsi3.S
|
||||
.else
|
||||
# Compiler support functions
|
||||
.PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/
|
||||
# __clzsi2 and ctzsi2 for various builtin functions
|
||||
@ -81,7 +78,6 @@ SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c
|
||||
.PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/arm/
|
||||
SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S
|
||||
SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S
|
||||
.endif
|
||||
|
||||
.endif
|
||||
.if ${MACHINE_CPUARCH} == "powerpc"
|
||||
|
@ -2,10 +2,6 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
# XXX: clang can compile the boot code just fine, but boot2 gets too big
|
||||
#CC:= gcc
|
||||
#COMPILER_TYPE:= gcc
|
||||
|
||||
FILES= boot boot1 boot2
|
||||
|
||||
NM?= nm
|
||||
@ -114,4 +110,5 @@ boot2.h: boot1.out
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
# XXX: clang integrated-as doesn't grok .codeNN directives yet
|
||||
CFLAGS+= ${CLANG_NO_IAS}
|
||||
CFLAGS.boot1.S= ${CLANG_NO_IAS}
|
||||
CFLAGS+= ${CFLAGS.${.IMPSRC:T}}
|
||||
|
@ -11,9 +11,6 @@
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the author nor the names of any co-contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
|
@ -44,4 +44,7 @@ CFLAGS+= -I${.CURDIR}/../../common \
|
||||
# the location of libstand
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
|
||||
# Suppress warning from clang for FreeBSD %b and %D formats
|
||||
CFLAGS+= -fformat-extensions
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
@ -56,6 +56,8 @@ LDFLAGS= -static -Ttext 0x0
|
||||
LIBPC98= ${.OBJDIR}/../libpc98/libpc98.a
|
||||
CFLAGS+= -I${.CURDIR}/..
|
||||
|
||||
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
|
||||
|
||||
# BTX components
|
||||
CFLAGS+= -I${.CURDIR}/../btx/lib
|
||||
|
||||
|
@ -10480,7 +10480,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio)
|
||||
struct ctl_softc *ctl_softc;
|
||||
struct ctl_lun *lun;
|
||||
char *val;
|
||||
uint32_t alloc_len;
|
||||
uint32_t alloc_len, data_len;
|
||||
ctl_port_type port_type;
|
||||
|
||||
ctl_softc = control_softc;
|
||||
@ -10504,16 +10504,17 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio)
|
||||
* in. If the user only asks for less, we'll give him
|
||||
* that much.
|
||||
*/
|
||||
ctsio->kern_data_ptr = malloc(sizeof(*inq_ptr), M_CTL, M_WAITOK | M_ZERO);
|
||||
data_len = offsetof(struct scsi_inquiry_data, vendor_specific1);
|
||||
ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO);
|
||||
inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr;
|
||||
ctsio->kern_sg_entries = 0;
|
||||
ctsio->kern_data_resid = 0;
|
||||
ctsio->kern_rel_offset = 0;
|
||||
|
||||
if (sizeof(*inq_ptr) < alloc_len) {
|
||||
ctsio->residual = alloc_len - sizeof(*inq_ptr);
|
||||
ctsio->kern_data_len = sizeof(*inq_ptr);
|
||||
ctsio->kern_total_len = sizeof(*inq_ptr);
|
||||
if (data_len < alloc_len) {
|
||||
ctsio->residual = alloc_len - data_len;
|
||||
ctsio->kern_data_len = data_len;
|
||||
ctsio->kern_total_len = data_len;
|
||||
} else {
|
||||
ctsio->residual = 0;
|
||||
ctsio->kern_data_len = alloc_len;
|
||||
@ -10593,8 +10594,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio)
|
||||
*/
|
||||
inq_ptr->response_format = SID_HiSup | 2;
|
||||
|
||||
inq_ptr->additional_length =
|
||||
offsetof(struct scsi_inquiry_data, vendor_specific1) -
|
||||
inq_ptr->additional_length = data_len -
|
||||
(offsetof(struct scsi_inquiry_data, additional_length) + 1);
|
||||
CTL_DEBUG_PRINT(("additional_length = %d\n",
|
||||
inq_ptr->additional_length));
|
||||
|
@ -1812,6 +1812,7 @@ tpc_create_token(struct ctl_lun *lun, struct ctl_port *port, off_t len,
|
||||
static int id = 0;
|
||||
struct scsi_vpd_id_descriptor *idd = NULL;
|
||||
struct scsi_ec_cscd_id *cscd;
|
||||
struct scsi_read_capacity_data_long *dtsd;
|
||||
int targid_len;
|
||||
|
||||
scsi_ulto4b(ROD_TYPE_AUR, token->type);
|
||||
@ -1830,9 +1831,19 @@ tpc_create_token(struct ctl_lun *lun, struct ctl_port *port, off_t len,
|
||||
cscd->type_code = EC_CSCD_ID;
|
||||
cscd->luidt_pdt = T_DIRECT;
|
||||
memcpy(&cscd->codeset, idd, 4 + idd->length);
|
||||
scsi_ulto3b(lun->be_lun->blocksize, cscd->dtsp.block_length);
|
||||
}
|
||||
scsi_u64to8b(0, &token->body[40]);
|
||||
scsi_u64to8b(0, &token->body[40]); /* XXX: Should be 128bit value. */
|
||||
scsi_u64to8b(len, &token->body[48]);
|
||||
|
||||
/* ROD token device type specific data (RC16 without first field) */
|
||||
dtsd = (struct scsi_read_capacity_data_long *)&token->body[88 - 8];
|
||||
scsi_ulto4b(lun->be_lun->blocksize, dtsd->length);
|
||||
dtsd->prot_lbppbe = lun->be_lun->pblockexp & SRC16_LBPPBE;
|
||||
scsi_ulto2b(lun->be_lun->pblockoff & SRC16_LALBA_A, dtsd->lalba_lbp);
|
||||
if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP)
|
||||
dtsd->lalba_lbp[0] |= SRC16_LBPME | SRC16_LBPRZ;
|
||||
|
||||
if (port->target_devid) {
|
||||
targid_len = port->target_devid->len;
|
||||
memcpy(&token->body[120], port->target_devid->data, targid_len);
|
||||
@ -1938,6 +1949,8 @@ ctl_populate_token(struct ctl_scsiio *ctsio)
|
||||
token->range = &data->desc[0];
|
||||
token->nrange = scsi_2btoul(data->range_descriptor_length) /
|
||||
sizeof(struct scsi_range_desc);
|
||||
list->cursectors = tpc_ranges_length(token->range, token->nrange);
|
||||
list->curbytes = (off_t)list->cursectors * lun->be_lun->blocksize;
|
||||
tpc_create_token(lun, port, list->curbytes,
|
||||
(struct scsi_token *)token->token);
|
||||
token->active = 0;
|
||||
@ -1954,8 +1967,6 @@ ctl_populate_token(struct ctl_scsiio *ctsio)
|
||||
}
|
||||
memcpy(list->res_token, token->token, sizeof(list->res_token));
|
||||
list->res_token_valid = 1;
|
||||
list->cursectors = tpc_ranges_length(token->range, token->nrange);
|
||||
list->curbytes = (off_t)list->cursectors * lun->be_lun->blocksize;
|
||||
list->curseg = 0;
|
||||
list->completed = 1;
|
||||
list->last_active = time_uptime;
|
||||
|
@ -1135,6 +1135,7 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
u_int8_t periph_qual;
|
||||
|
||||
path->device->flags |= CAM_DEV_INQUIRY_DATA_VALID;
|
||||
scsi_find_quirk(path->device);
|
||||
inq_buf = &path->device->inq_data;
|
||||
|
||||
periph_qual = SID_QUAL(inq_buf);
|
||||
@ -1163,8 +1164,6 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
goto out;
|
||||
}
|
||||
|
||||
scsi_find_quirk(path->device);
|
||||
|
||||
scsi_devise_transport(path);
|
||||
|
||||
if (path->device->lun_id == 0 &&
|
||||
@ -1192,15 +1191,9 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
xpt_schedule(periph, priority);
|
||||
goto out;
|
||||
} else if (path->device->lun_id == 0 &&
|
||||
SID_ANSI_REV(inq_buf) > SCSI_REV_SPC2 &&
|
||||
SID_ANSI_REV(inq_buf) >= SCSI_REV_SPC2 &&
|
||||
(SCSI_QUIRK(path->device)->quirks &
|
||||
CAM_QUIRK_NORPTLUNS) == 0) {
|
||||
if (path->device->flags &
|
||||
CAM_DEV_UNCONFIGURED) {
|
||||
path->device->flags &=
|
||||
~CAM_DEV_UNCONFIGURED;
|
||||
xpt_acquire_device(path->device);
|
||||
}
|
||||
PROBE_SET_ACTION(softc, PROBE_REPORT_LUNS);
|
||||
periph->path->target->rpl_size = 16;
|
||||
xpt_release_ccb(done_ccb);
|
||||
@ -1213,10 +1206,13 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
: SF_RETRY_UA,
|
||||
&softc->saved_ccb) == ERESTART) {
|
||||
goto outr;
|
||||
} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
|
||||
/* Don't wedge the queue */
|
||||
xpt_release_devq(done_ccb->ccb_h.path, /*count*/1,
|
||||
/*run_queue*/TRUE);
|
||||
} else {
|
||||
if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
|
||||
/* Don't wedge the queue */
|
||||
xpt_release_devq(done_ccb->ccb_h.path,
|
||||
/*count*/1, /*run_queue*/TRUE);
|
||||
}
|
||||
path->device->flags &= ~CAM_DEV_INQUIRY_DATA_VALID;
|
||||
}
|
||||
/*
|
||||
* If we get to this point, we got an error status back
|
||||
@ -1308,14 +1304,6 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
tlun, 8);
|
||||
CAM_DEBUG(path, CAM_DEBUG_PROBE,
|
||||
("lun 0 in position %u\n", idx));
|
||||
} else {
|
||||
/*
|
||||
* There is no lun 0 in our list. Destroy
|
||||
* the validity of the inquiry data so we
|
||||
* bail here and now.
|
||||
*/
|
||||
path->device->flags &=
|
||||
~CAM_DEV_INQUIRY_DATA_VALID;
|
||||
}
|
||||
}
|
||||
/*
|
||||
@ -1328,7 +1316,8 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
probe_purge_old(path, lp, softc->flags);
|
||||
lp = NULL;
|
||||
}
|
||||
if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID) {
|
||||
if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID &&
|
||||
SID_QUAL(&path->device->inq_data) == SID_QUAL_LU_CONNECTED) {
|
||||
struct scsi_inquiry_data *inq_buf;
|
||||
inq_buf = &path->device->inq_data;
|
||||
if (INQ_DATA_TQ_ENABLED(inq_buf))
|
||||
@ -1343,6 +1332,8 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
if (lp) {
|
||||
free(lp, M_CAMXPT);
|
||||
}
|
||||
PROBE_SET_ACTION(softc, PROBE_INVALID);
|
||||
xpt_release_ccb(done_ccb);
|
||||
break;
|
||||
}
|
||||
case PROBE_MODE_SENSE:
|
||||
@ -1975,7 +1966,7 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
|
||||
struct cam_path *path, *oldpath;
|
||||
scsi_scan_bus_info *scan_info;
|
||||
struct cam_et *target;
|
||||
struct cam_ed *device;
|
||||
struct cam_ed *device, *nextdev;
|
||||
int next_target;
|
||||
path_id_t path_id;
|
||||
target_id_t target_id;
|
||||
@ -1984,18 +1975,10 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
|
||||
oldpath = request_ccb->ccb_h.path;
|
||||
|
||||
status = cam_ccb_status(request_ccb);
|
||||
/* Reuse the same CCB to query if a device was really found */
|
||||
scan_info = (scsi_scan_bus_info *)request_ccb->ccb_h.ppriv_ptr0;
|
||||
xpt_setup_ccb(&request_ccb->ccb_h, request_ccb->ccb_h.path,
|
||||
request_ccb->ccb_h.pinfo.priority);
|
||||
request_ccb->ccb_h.func_code = XPT_GDEV_TYPE;
|
||||
|
||||
|
||||
path_id = request_ccb->ccb_h.path_id;
|
||||
target_id = request_ccb->ccb_h.target_id;
|
||||
lun_id = request_ccb->ccb_h.target_lun;
|
||||
xpt_action(request_ccb);
|
||||
|
||||
target = request_ccb->ccb_h.path->target;
|
||||
next_target = 1;
|
||||
|
||||
@ -2068,56 +2051,39 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mtx_unlock(&target->luns_mtx);
|
||||
if (request_ccb->ccb_h.status != CAM_REQ_CMP) {
|
||||
int phl;
|
||||
|
||||
/*
|
||||
* If we already probed lun 0 successfully, or
|
||||
* we have additional configured luns on this
|
||||
* target that might have "gone away", go onto
|
||||
* the next lun.
|
||||
*/
|
||||
/*
|
||||
* We may touch devices that we don't
|
||||
* hold references too, so ensure they
|
||||
* don't disappear out from under us.
|
||||
* The target above is referenced by the
|
||||
* path in the request ccb.
|
||||
*/
|
||||
phl = 0;
|
||||
device = TAILQ_FIRST(&target->ed_entries);
|
||||
if (device != NULL) {
|
||||
phl = CAN_SRCH_HI_SPARSE(device);
|
||||
if (device->lun_id == 0)
|
||||
device = TAILQ_NEXT(device, links);
|
||||
}
|
||||
if ((lun_id != 0) || (device != NULL)) {
|
||||
if (lun_id < (CAM_SCSI2_MAXLUN-1) || phl) {
|
||||
lun_id++;
|
||||
next_target = 0;
|
||||
}
|
||||
}
|
||||
if (lun_id == request_ccb->ccb_h.target_lun
|
||||
|| lun_id > scan_info->cpi->max_lun)
|
||||
next_target = 1;
|
||||
} else {
|
||||
|
||||
mtx_unlock(&target->luns_mtx);
|
||||
device = request_ccb->ccb_h.path->device;
|
||||
|
||||
if ((SCSI_QUIRK(device)->quirks &
|
||||
CAM_QUIRK_NOLUNS) == 0) {
|
||||
/* Try the next lun */
|
||||
if (lun_id < (CAM_SCSI2_MAXLUN-1)
|
||||
|| CAN_SRCH_HI_DENSE(device)) {
|
||||
lun_id++;
|
||||
next_target = 0;
|
||||
}
|
||||
}
|
||||
if (lun_id == request_ccb->ccb_h.target_lun
|
||||
|| lun_id > scan_info->cpi->max_lun)
|
||||
/* Continue sequential LUN scan if: */
|
||||
/* -- we have more LUNs that need recheck */
|
||||
mtx_lock(&target->bus->eb_mtx);
|
||||
nextdev = device;
|
||||
while ((nextdev = TAILQ_NEXT(nextdev, links)) != NULL)
|
||||
if ((nextdev->flags & CAM_DEV_UNCONFIGURED) == 0)
|
||||
break;
|
||||
mtx_unlock(&target->bus->eb_mtx);
|
||||
if (nextdev != NULL) {
|
||||
next_target = 0;
|
||||
/* -- stop if CAM_QUIRK_NOLUNS is set. */
|
||||
} else if (SCSI_QUIRK(device)->quirks & CAM_QUIRK_NOLUNS) {
|
||||
next_target = 1;
|
||||
}
|
||||
/* -- this LUN is connected and its SCSI version
|
||||
* allows more LUNs. */
|
||||
} else if ((device->flags & CAM_DEV_UNCONFIGURED) == 0) {
|
||||
if (lun_id < (CAM_SCSI2_MAXLUN-1) ||
|
||||
CAN_SRCH_HI_DENSE(device))
|
||||
next_target = 0;
|
||||
/* -- this LUN is disconnected, its SCSI version
|
||||
* allows more LUNs and we guess they may be. */
|
||||
} else if ((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0) {
|
||||
if (lun_id < (CAM_SCSI2_MAXLUN-1) ||
|
||||
CAN_SRCH_HI_SPARSE(device))
|
||||
next_target = 0;
|
||||
}
|
||||
if (next_target == 0) {
|
||||
lun_id++;
|
||||
if (lun_id > scan_info->cpi->max_lun)
|
||||
next_target = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -82,6 +82,17 @@ lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int dum
|
||||
*/
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unaligned memory access is automatically enabled for "common" CPU,
|
||||
* such as x86. For others CPU, the compiler will be more cautious, and
|
||||
* insert extra code to ensure aligned access is respected. If you know
|
||||
* your target CPU supports unaligned memory access, you may want to
|
||||
* force this option manually to improve performance
|
||||
*/
|
||||
#if defined(__ARM_FEATURE_UNALIGNED)
|
||||
#define LZ4_FORCE_UNALIGNED_ACCESS 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compiler Options
|
||||
*/
|
||||
@ -113,6 +124,10 @@ lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int dum
|
||||
#define S32 int32_t
|
||||
#define U64 uint64_t
|
||||
|
||||
#ifndef LZ4_FORCE_UNALIGNED_ACCESS
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
typedef struct _U16_S {
|
||||
U16 v;
|
||||
} U16_S;
|
||||
@ -123,6 +138,10 @@ typedef struct _U64_S {
|
||||
U64 v;
|
||||
} U64_S;
|
||||
|
||||
#ifndef LZ4_FORCE_UNALIGNED_ACCESS
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#define A64(x) (((U64_S *)(x))->v)
|
||||
#define A32(x) (((U32_S *)(x))->v)
|
||||
#define A16(x) (((U16_S *)(x))->v)
|
||||
|
@ -3550,7 +3550,12 @@ zfs_ioc_destroy_snaps(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
|
||||
|
||||
for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL;
|
||||
pair = nvlist_next_nvpair(snaps, pair)) {
|
||||
(void) zfs_unmount_snap(nvpair_name(pair));
|
||||
const char *name = nvpair_name(pair);
|
||||
|
||||
(void) zfs_unmount_snap(name);
|
||||
#if defined(__FreeBSD__)
|
||||
(void) zvol_remove_minor(name);
|
||||
#endif
|
||||
}
|
||||
|
||||
return (dsl_destroy_snapshots_nvl(snaps, defer, outnvl));
|
||||
@ -3644,7 +3649,6 @@ zfs_ioc_destroy_bookmarks(const char *poolname, nvlist_t *innvl,
|
||||
if (strncmp(name, poolname, poollen) != 0 ||
|
||||
(name[poollen] != '/' && name[poollen] != '#'))
|
||||
return (SET_ERROR(EXDEV));
|
||||
(void) zvol_remove_minor(name);
|
||||
}
|
||||
|
||||
error = dsl_bookmark_destroy(innvl, outnvl);
|
||||
|
@ -870,6 +870,17 @@ zfsvfs_create(const char *osname, zfsvfs_t **zfvp)
|
||||
int i, error;
|
||||
uint64_t sa_obj;
|
||||
|
||||
/*
|
||||
* XXX: Fix struct statfs so this isn't necessary!
|
||||
*
|
||||
* The 'osname' is used as the filesystem's special node, which means
|
||||
* it must fit in statfs.f_mntfromname, or else it can't be
|
||||
* enumerated, so libzfs_mnttab_find() returns NULL, which causes
|
||||
* 'zfs unmount' to think it's not mounted when it is.
|
||||
*/
|
||||
if (strlen(osname) >= MNAMELEN)
|
||||
return (SET_ERROR(ENAMETOOLONG));
|
||||
|
||||
zfsvfs = kmem_zalloc(sizeof (zfsvfs_t), KM_SLEEP);
|
||||
|
||||
/*
|
||||
|
@ -42,11 +42,7 @@ STRIP_FLAGS = -S
|
||||
# We don't support gcc's thump interwork stuff, so disable it
|
||||
CFLAGS.gcc += -mno-thumb-interwork
|
||||
|
||||
.if empty(DDB_ENABLED)
|
||||
.if ${MK_ARM_EABI} == "no"
|
||||
CFLAGS.gcc += -mno-apcs-frame
|
||||
.endif
|
||||
.elif ${MK_ARM_EABI} != "no"
|
||||
.if !empty(DDB_ENABLED)
|
||||
CFLAGS += -funwind-tables
|
||||
# clang requires us to tell it to emit assembly with unwind information
|
||||
CFLAGS.clang += -mllvm -arm-enable-ehabi
|
||||
|
@ -2638,6 +2638,9 @@ dev/xen/netfront/netfront.c optional xen | xenhvm
|
||||
dev/xen/xenpci/xenpci.c optional xenpci
|
||||
dev/xen/timer/timer.c optional xen | xenhvm
|
||||
dev/xen/pvcpu/pvcpu.c optional xen | xenhvm
|
||||
dev/xen/xenstore/xenstore.c optional xen | xenhvm
|
||||
dev/xen/xenstore/xenstore_dev.c optional xen | xenhvm
|
||||
dev/xen/xenstore/xenstored_dev.c optional xen | xenhvm
|
||||
dev/xl/if_xl.c optional xl pci
|
||||
dev/xl/xlphy.c optional xl pci
|
||||
fs/autofs/autofs.c optional autofs
|
||||
@ -3976,8 +3979,6 @@ xen/xenbus/xenbusb_if.m optional xen | xenhvm
|
||||
xen/xenbus/xenbusb.c optional xen | xenhvm
|
||||
xen/xenbus/xenbusb_front.c optional xen | xenhvm
|
||||
xen/xenbus/xenbusb_back.c optional xen | xenhvm
|
||||
xen/xenstore/xenstore.c optional xen | xenhvm
|
||||
xen/xenstore/xenstore_dev.c optional xen | xenhvm
|
||||
xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
|
||||
xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
|
||||
xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
|
||||
|
@ -582,3 +582,5 @@ x86/xen/pvcpu_enum.c optional xenhvm
|
||||
x86/xen/xen_apic.c optional xenhvm
|
||||
x86/xen/xenpv.c optional xenhvm
|
||||
x86/xen/xen_nexus.c optional xenhvm
|
||||
x86/xen/xen_msi.c optional xenhvm
|
||||
x86/xen/xen_pci.c optional xenhvm
|
||||
|
@ -49,6 +49,7 @@ arm/arm/stdatomic.c standard \
|
||||
arm/arm/support.S standard
|
||||
arm/arm/swtch.S standard
|
||||
arm/arm/sys_machdep.c standard
|
||||
arm/arm/syscall.c standard
|
||||
arm/arm/trap.c standard
|
||||
arm/arm/uio_machdep.c standard
|
||||
arm/arm/undefined.c standard
|
||||
|
@ -599,3 +599,4 @@ x86/xen/xen_intr.c optional xen | xenhvm
|
||||
x86/xen/xen_apic.c optional xenhvm
|
||||
x86/xen/xenpv.c optional xen | xenhvm
|
||||
x86/xen/xen_nexus.c optional xen | xenhvm
|
||||
x86/xen/xen_msi.c optional xen | xenhvm
|
||||
|
@ -23,7 +23,6 @@
|
||||
# src tree.
|
||||
|
||||
__DEFAULT_YES_OPTIONS = \
|
||||
ARM_EABI \
|
||||
BLUETOOTH \
|
||||
CDDL \
|
||||
CRYPT \
|
||||
|
@ -1181,10 +1181,11 @@ struct ath_hal;
|
||||
|
||||
extern struct ath_hal_9300 * ar9300_new_state(u_int16_t devid,
|
||||
HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata,
|
||||
HAL_OPS_CONFIG *ah_config,
|
||||
HAL_STATUS *status);
|
||||
extern struct ath_hal * ar9300_attach(u_int16_t devid,
|
||||
HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata,
|
||||
HAL_STATUS *status);
|
||||
HAL_OPS_CONFIG *ah_config, HAL_STATUS *status);
|
||||
extern void ar9300_detach(struct ath_hal *ah);
|
||||
extern void ar9300_read_revisions(struct ath_hal *ah);
|
||||
extern HAL_BOOL ar9300_chip_test(struct ath_hal *ah);
|
||||
|
@ -618,7 +618,8 @@ ar9300_read_revisions(struct ath_hal *ah)
|
||||
*/
|
||||
struct ath_hal *
|
||||
ar9300_attach(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st,
|
||||
HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_STATUS *status)
|
||||
HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_OPS_CONFIG *ah_config,
|
||||
HAL_STATUS *status)
|
||||
{
|
||||
struct ath_hal_9300 *ahp;
|
||||
struct ath_hal *ah;
|
||||
@ -628,7 +629,7 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st,
|
||||
HAL_NO_INTERSPERSED_READS;
|
||||
|
||||
/* NB: memory is returned zero'd */
|
||||
ahp = ar9300_new_state(devid, sc, st, sh, eepromdata, status);
|
||||
ahp = ar9300_new_state(devid, sc, st, sh, eepromdata, ah_config, status);
|
||||
if (ahp == AH_NULL) {
|
||||
return AH_NULL;
|
||||
}
|
||||
@ -654,12 +655,6 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st,
|
||||
/* XXX FreeBSD: enable RX mitigation */
|
||||
ah->ah_config.ath_hal_intr_mitigation_rx = 1;
|
||||
|
||||
/*
|
||||
* XXX what's this do? Check in the qcamain driver code
|
||||
* as to what it does.
|
||||
*/
|
||||
ah->ah_config.ath_hal_ext_atten_margin_cfg = 0;
|
||||
|
||||
/* interrupt mitigation */
|
||||
#ifdef AR5416_INT_MITIGATION
|
||||
if (ah->ah_config.ath_hal_intr_mitigation_rx != 0) {
|
||||
@ -2378,7 +2373,9 @@ ar9300_detach(struct ath_hal *ah)
|
||||
struct ath_hal_9300 *
|
||||
ar9300_new_state(u_int16_t devid, HAL_SOFTC sc,
|
||||
HAL_BUS_TAG st, HAL_BUS_HANDLE sh,
|
||||
uint16_t *eepromdata, HAL_STATUS *status)
|
||||
uint16_t *eepromdata,
|
||||
HAL_OPS_CONFIG *ah_config,
|
||||
HAL_STATUS *status)
|
||||
{
|
||||
static const u_int8_t defbssidmask[IEEE80211_ADDR_LEN] =
|
||||
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
@ -2430,7 +2427,7 @@ ar9300_new_state(u_int16_t devid, HAL_SOFTC sc,
|
||||
** Initialize factory defaults in the private space
|
||||
*/
|
||||
// ath_hal_factory_defaults(AH_PRIVATE(ah), hal_conf_parm);
|
||||
ar9300_config_defaults_freebsd(ah);
|
||||
ar9300_config_defaults_freebsd(ah, ah_config);
|
||||
|
||||
/* XXX FreeBSD: cal is always in EEPROM */
|
||||
#if 0
|
||||
@ -2456,6 +2453,7 @@ ar9300_new_state(u_int16_t devid, HAL_SOFTC sc,
|
||||
AH_PRIVATE(ah)->ah_tpScale = HAL_TP_SCALE_MAX; /* no scaling */
|
||||
|
||||
ahp->ah_atim_window = 0; /* [0..1000] */
|
||||
|
||||
ahp->ah_diversity_control =
|
||||
ah->ah_config.ath_hal_diversity_control;
|
||||
ahp->ah_antenna_switch_swap =
|
||||
@ -3835,6 +3833,11 @@ ar9300_ant_div_comb_get_config(struct ath_hal *ah,
|
||||
} else {
|
||||
div_comb_conf->antdiv_configgroup = DEFAULT_ANTDIV_CONFIG_GROUP;
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX TODO: allow the HAL to override the rssithres and fast_div_bias
|
||||
* values (eg CUS198.)
|
||||
*/
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1606,6 +1606,7 @@ HAL_BOOL ar9300_ant_ctrl_apply(struct ath_hal *ah, HAL_BOOL is_2ghz)
|
||||
if ( AR_SREV_POSEIDON(ah) && (ahp->ah_lna_div_use_bt_ant_enable == TRUE) ) {
|
||||
value &= ~AR_SWITCH_TABLE_COM2_ALL;
|
||||
value |= ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable;
|
||||
HALDEBUG(ah, HAL_DEBUG_RESET, "%s: com2=0x%08x\n", __func__, value)
|
||||
}
|
||||
#endif /* ATH_ANT_DIV_COMB */
|
||||
OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM_2, AR_SWITCH_TABLE_COM2_ALL, value);
|
||||
@ -1711,6 +1712,8 @@ HAL_BOOL ar9300_ant_ctrl_apply(struct ath_hal *ah, HAL_BOOL is_2ghz)
|
||||
/* For WB225, need to swith ANT2 from BT to Wifi
|
||||
* This will not affect HB125 LNA diversity feature.
|
||||
*/
|
||||
HALDEBUG(ah, HAL_DEBUG_RESET, "%s: com2=0x%08x\n", __func__,
|
||||
ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable)
|
||||
OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM_2, AR_SWITCH_TABLE_COM2_ALL,
|
||||
ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable);
|
||||
break;
|
||||
@ -1776,6 +1779,7 @@ ar9300_attenuation_margin_chain_get(struct ath_hal *ah, int chain,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
HAL_BOOL ar9300_attenuation_apply(struct ath_hal *ah, u_int16_t channel)
|
||||
{
|
||||
u_int32_t value;
|
||||
@ -1814,6 +1818,75 @@ HAL_BOOL ar9300_attenuation_apply(struct ath_hal *ah, u_int16_t channel)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
HAL_BOOL
|
||||
ar9300_attenuation_apply(struct ath_hal *ah, u_int16_t channel)
|
||||
{
|
||||
int i;
|
||||
uint32_t value;
|
||||
uint32_t ext_atten_reg[3] = {
|
||||
AR_PHY_EXT_ATTEN_CTL_0,
|
||||
AR_PHY_EXT_ATTEN_CTL_1,
|
||||
AR_PHY_EXT_ATTEN_CTL_2
|
||||
};
|
||||
|
||||
/*
|
||||
* If it's an AR9462 and we're receiving on the second
|
||||
* chain only, set the chain 0 details from chain 1
|
||||
* calibration.
|
||||
*
|
||||
* This is from ath9k.
|
||||
*/
|
||||
if (AR_SREV_JUPITER(ah) && (AH9300(ah)->ah_rx_chainmask == 0x2)) {
|
||||
value = ar9300_attenuation_chain_get(ah, 1, channel);
|
||||
OS_REG_RMW_FIELD(ah, ext_atten_reg[0],
|
||||
AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, value);
|
||||
value = ar9300_attenuation_margin_chain_get(ah, 1, channel);
|
||||
OS_REG_RMW_FIELD(ah, ext_atten_reg[0],
|
||||
AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now, loop over the configured transmit chains and
|
||||
* load in the attenuation/margin settings as appropriate.
|
||||
*/
|
||||
for (i = 0; i < 3; i++) {
|
||||
if ((AH9300(ah)->ah_tx_chainmask & (1 << i)) == 0)
|
||||
continue;
|
||||
|
||||
value = ar9300_attenuation_chain_get(ah, i, channel);
|
||||
OS_REG_RMW_FIELD(ah, ext_atten_reg[i],
|
||||
AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB,
|
||||
value);
|
||||
|
||||
if (AR_SREV_POSEIDON(ah) &&
|
||||
(ar9300_rx_gain_index_get(ah) == 0) &&
|
||||
ah->ah_config.ath_hal_ext_atten_margin_cfg) {
|
||||
value = 5;
|
||||
} else {
|
||||
value = ar9300_attenuation_margin_chain_get(ah, 0,
|
||||
channel);
|
||||
}
|
||||
|
||||
/*
|
||||
* I'm not sure why it's loading in this setting into
|
||||
* the chain 0 margin regardless of the current chain.
|
||||
*/
|
||||
if (ah->ah_config.ath_hal_min_gainidx)
|
||||
OS_REG_RMW_FIELD(ah,
|
||||
AR_PHY_EXT_ATTEN_CTL_0,
|
||||
AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN,
|
||||
value);
|
||||
|
||||
OS_REG_RMW_FIELD(ah,
|
||||
ext_atten_reg[i],
|
||||
AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN,
|
||||
value);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
static u_int16_t ar9300_quick_drop_get(struct ath_hal *ah,
|
||||
int chain, u_int16_t channel)
|
||||
|
@ -252,9 +252,6 @@ ar9300_attach_freebsd_ops(struct ath_hal *ah)
|
||||
/* LNA diversity functions */
|
||||
ah->ah_divLnaConfGet = ar9300_ant_div_comb_get_config;
|
||||
ah->ah_divLnaConfSet = ar9300_ant_div_comb_set_config;
|
||||
|
||||
/* Setup HAL configuration defaults */
|
||||
ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable = 0x000bbb88;
|
||||
}
|
||||
|
||||
HAL_BOOL
|
||||
@ -338,9 +335,11 @@ ar9300_ani_poll_freebsd(struct ath_hal *ah,
|
||||
* wants.
|
||||
*/
|
||||
void
|
||||
ar9300_config_defaults_freebsd(struct ath_hal *ah)
|
||||
ar9300_config_defaults_freebsd(struct ath_hal *ah, HAL_OPS_CONFIG *ah_config)
|
||||
{
|
||||
|
||||
/* Until FreeBSD's HAL does this by default - just copy */
|
||||
OS_MEMCPY(&ah->ah_config, ah_config, sizeof(HAL_OPS_CONFIG));
|
||||
ah->ah_config.ath_hal_enable_ani = AH_TRUE;
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,8 @@ extern HAL_STATUS ar9300_eeprom_get_freebsd(struct ath_hal *, int param,
|
||||
extern HAL_BOOL ar9300_stop_tx_dma_freebsd(struct ath_hal *ah, u_int q);
|
||||
extern void ar9300_ani_poll_freebsd(struct ath_hal *ah,
|
||||
const struct ieee80211_channel *chan);
|
||||
extern void ar9300_config_defaults_freebsd(struct ath_hal *ah);
|
||||
extern void ar9300_config_defaults_freebsd(struct ath_hal *ah,
|
||||
HAL_OPS_CONFIG *ah_config);
|
||||
extern HAL_BOOL ar9300_stop_dma_receive_freebsd(struct ath_hal *ah);
|
||||
extern HAL_BOOL ar9300_get_pending_interrupts_freebsd(struct ath_hal *ah,
|
||||
HAL_INT *masked);
|
||||
|
@ -6151,6 +6151,7 @@ ar9300_ant_ctrl_set_lna_div_use_bt_ant(struct ath_hal *ah, HAL_BOOL enable, cons
|
||||
value &= ~AR_SWITCH_TABLE_COM2_ALL;
|
||||
value |= ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable;
|
||||
}
|
||||
HALDEBUG(ah, HAL_DEBUG_RESET, "%s: com2=0x%08x\n", __func__, value);
|
||||
OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM_2, AR_SWITCH_TABLE_COM2_ALL, value);
|
||||
|
||||
value = ar9300_eeprom_get(ahp, EEP_ANTDIV_control);
|
||||
|
@ -59,6 +59,13 @@ static int acpi_max_tasks = ACPI_MAX_TASKS;
|
||||
SYSCTL_INT(_debug_acpi, OID_AUTO, max_tasks, CTLFLAG_RDTUN, &acpi_max_tasks,
|
||||
0, "Maximum acpi tasks");
|
||||
|
||||
/*
|
||||
* Track and report the system's demand for task slots.
|
||||
*/
|
||||
static int acpi_tasks_hiwater;
|
||||
SYSCTL_INT(_debug_acpi, OID_AUTO, tasks_hiwater, CTLFLAG_RD,
|
||||
&acpi_tasks_hiwater, 1, "Peak demand for ACPI event task slots.");
|
||||
|
||||
/*
|
||||
* Allow the user to tune the number of task threads we start. It seems
|
||||
* some systems have problems with increased parallelism.
|
||||
@ -151,6 +158,10 @@ acpi_task_enqueue(int priority, ACPI_OSD_EXEC_CALLBACK Function, void *Context)
|
||||
acpi_task_count++;
|
||||
break;
|
||||
}
|
||||
|
||||
if (i > acpi_tasks_hiwater)
|
||||
atomic_cmpset_int(&acpi_tasks_hiwater, acpi_tasks_hiwater, i);
|
||||
|
||||
if (at == NULL) {
|
||||
printf("AcpiOsExecute: failed to enqueue task, consider increasing "
|
||||
"the debug.acpi.max_tasks tunable\n");
|
||||
|
@ -282,7 +282,7 @@ acpi_pci_probe(device_t dev)
|
||||
if (acpi_get_handle(dev) == NULL)
|
||||
return (ENXIO);
|
||||
device_set_desc(dev, "ACPI PCI bus");
|
||||
return (0);
|
||||
return (BUS_PROBE_DEFAULT);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -55,7 +55,9 @@ ath_hal_probe(uint16_t vendorid, uint16_t devid)
|
||||
*/
|
||||
struct ath_hal*
|
||||
ath_hal_attach(uint16_t devid, HAL_SOFTC sc,
|
||||
HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_STATUS *error)
|
||||
HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata,
|
||||
HAL_OPS_CONFIG *ah_config,
|
||||
HAL_STATUS *error)
|
||||
{
|
||||
struct ath_hal_chip * const *pchip;
|
||||
|
||||
@ -66,7 +68,8 @@ ath_hal_attach(uint16_t devid, HAL_SOFTC sc,
|
||||
/* XXX don't have vendorid, assume atheros one works */
|
||||
if (chip->probe(ATHEROS_VENDOR_ID, devid) == AH_NULL)
|
||||
continue;
|
||||
ah = chip->attach(devid, sc, st, sh, eepromdata, error);
|
||||
ah = chip->attach(devid, sc, st, sh, eepromdata, ah_config,
|
||||
error);
|
||||
if (ah != AH_NULL) {
|
||||
/* copy back private state to public area */
|
||||
ah->ah_devid = AH_PRIVATE(ah)->ah_devid;
|
||||
|
@ -1264,6 +1264,7 @@ typedef struct
|
||||
int ath_hal_show_bb_panic;
|
||||
int ath_hal_ant_ctrl_comm2g_switch_enable;
|
||||
int ath_hal_ext_atten_margin_cfg;
|
||||
int ath_hal_min_gainidx;
|
||||
int ath_hal_war70c;
|
||||
uint32_t ath_hal_mci_config;
|
||||
} HAL_OPS_CONFIG;
|
||||
@ -1616,7 +1617,8 @@ extern const char *__ahdecl ath_hal_probe(uint16_t vendorid, uint16_t devid);
|
||||
* be returned if the status parameter is non-zero.
|
||||
*/
|
||||
extern struct ath_hal * __ahdecl ath_hal_attach(uint16_t devid, HAL_SOFTC,
|
||||
HAL_BUS_TAG, HAL_BUS_HANDLE, uint16_t *eepromdata, HAL_STATUS* status);
|
||||
HAL_BUS_TAG, HAL_BUS_HANDLE, uint16_t *eepromdata,
|
||||
HAL_OPS_CONFIG *ah_config, HAL_STATUS* status);
|
||||
|
||||
extern const char *ath_hal_mac_name(struct ath_hal *);
|
||||
extern const char *ath_hal_rf_name(struct ath_hal *);
|
||||
|
@ -91,6 +91,7 @@ struct ath_hal_chip {
|
||||
const char *(*probe)(uint16_t vendorid, uint16_t devid);
|
||||
struct ath_hal *(*attach)(uint16_t devid, HAL_SOFTC,
|
||||
HAL_BUS_TAG, HAL_BUS_HANDLE, uint16_t *eepromdata,
|
||||
HAL_OPS_CONFIG *ah,
|
||||
HAL_STATUS *error);
|
||||
};
|
||||
#ifndef AH_CHIP
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user