MFhead @ r291038
This commit is contained in:
commit
b923a91e2c
@ -59,7 +59,6 @@ contrib/llvm dim Pre-commit review preferred.
|
||||
contrib/llvm/tools/lldb emaste Pre-commit review preferred.
|
||||
atf freebsd-testing,jmmv,ngie Pre-commit review requested.
|
||||
contrib/netbsd-tests freebsd-testing,ngie Pre-commit review requested.
|
||||
contrib/pf kp,glebius Pre-commit review recommended.
|
||||
contrib/pjdfstest freebsd-testing,ngie,pjd Pre-commit review requested.
|
||||
share/mk/*.test.mk freebsd-testing,ngie (same list as share/mk too) Pre-commit review requested.
|
||||
tests freebsd-testing,ngie Pre-commit review requested.
|
||||
@ -69,7 +68,12 @@ sys/compat/linuxkpi hselasky If in doubt, ask.
|
||||
sys/dev/e1000 erj Pre-commit phabricator review requested.
|
||||
sys/dev/ixgbe erj Pre-commit phabricator review requested.
|
||||
sys/dev/ixl erj Pre-commit phabricator review requested.
|
||||
sys/netinet/ip_carp.c glebius Pre-commit review recommended.
|
||||
sys/netpfil/pf kp,glebius Pre-commit review recommended.
|
||||
usr.sbin/pkg pkg@ Please coordinate behavior or flag changes with pkg team.
|
||||
lpr gad Pre-commit review requested, particularly for
|
||||
lpd/recvjob.c and lpd/printjob.c.
|
||||
nis(8), yp(8) araujo Pre-commit review requested.
|
||||
---- OLD ----
|
||||
libc/posix1e rwatson Pre-commit review requested.
|
||||
POSIX.1e ACLs rwatson Pre-commit review requested.
|
||||
@ -100,8 +104,6 @@ etc/mail gshapiro Pre-commit review requested.
|
||||
Keep in sync with -STABLE.
|
||||
etc/sendmail gshapiro Pre-commit review requested.
|
||||
Keep in sync with -STABLE.
|
||||
lpr gad Pre-commit review requested, particularly for
|
||||
lpd/recvjob.c and lpd/printjob.c.
|
||||
nvi peter Try not to break it.
|
||||
libz peter Try not to break it.
|
||||
groff ru Recommends pre-commit review.
|
||||
|
@ -1458,9 +1458,6 @@ ${_bt}-usr.bin/mandoc: ${_bt}-lib/libopenbsd ${_bt}-lib/libsqlite3
|
||||
_makewhatis=usr.bin/makewhatis
|
||||
.endif
|
||||
|
||||
# Rebuild up-to-date libmd for xinstall
|
||||
${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd
|
||||
|
||||
bootstrap-tools: .PHONY
|
||||
|
||||
# Please document (add comment) why something is in 'bootstrap-tools'.
|
||||
@ -1483,7 +1480,6 @@ bootstrap-tools: .PHONY
|
||||
${_yacc} \
|
||||
${_m4} \
|
||||
${_lex} \
|
||||
lib/libmd \
|
||||
usr.bin/xinstall \
|
||||
${_gensnmptree} \
|
||||
usr.sbin/config \
|
||||
|
@ -49,41 +49,6 @@ OLD_FILES+=usr/share/locale/zh_TW.UTF-8/zh_Hant_TW.UTF-8
|
||||
# 20151107: String collation improvements
|
||||
OLD_FILES+=usr/share/locale/UTF-8/LC_CTYPE
|
||||
OLD_DIRS+=usr/share/locale/UTF-8
|
||||
OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_NUMERIC
|
||||
OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_MESSAGES
|
||||
OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_TIME
|
||||
OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_CTYPE
|
||||
OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_COLLATE
|
||||
OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_MONETARY
|
||||
OLD_DIRS+=usr/share/locale/en_CA.ISO8859-15
|
||||
OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_COLLATE
|
||||
OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_CTYPE
|
||||
OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_MESSAGES
|
||||
OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_TIME
|
||||
OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_NUMERIC
|
||||
OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_MONETARY
|
||||
OLD_DIRS+=usr/share/locale/en_AU.ISO8859-15
|
||||
OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_CTYPE
|
||||
OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_MESSAGES
|
||||
OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_COLLATE
|
||||
OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_TIME
|
||||
OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_MONETARY
|
||||
OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_NUMERIC
|
||||
OLD_DIRS+=usr/share/locale/en_US.ISO8859-15
|
||||
OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_MESSAGES
|
||||
OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_COLLATE
|
||||
OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_TIME
|
||||
OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_MONETARY
|
||||
OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_NUMERIC
|
||||
OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_CTYPE
|
||||
OLD_DIRS+=usr/share/locale/en_NZ.ISO8859-15
|
||||
OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_COLLATE
|
||||
OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_MESSAGES
|
||||
OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_CTYPE
|
||||
OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_TIME
|
||||
OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_NUMERIC
|
||||
OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_MONETARY
|
||||
OLD_DIRS+=usr/share/locale/fr_CA.ISO8859-15
|
||||
OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_COLLATE
|
||||
OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_CTYPE
|
||||
OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_MESSAGES
|
||||
|
9
UPDATING
9
UPDATING
@ -39,6 +39,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
|
||||
Databases administrators will need to reindex their databases given
|
||||
collation results will be different.
|
||||
|
||||
Due to a bug in install(1) it is recommended to remove the ancient
|
||||
locales before running make installworld.
|
||||
|
||||
rm -rf /usr/share/locale/*
|
||||
|
||||
20151030:
|
||||
The OpenSSL has been upgraded to 1.0.2d. Any binaries requiring
|
||||
libcrypto.so.7 or libssl.so.7 must be recompiled.
|
||||
@ -191,12 +196,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
|
||||
like it always used to, and the difference will be irrelevant.
|
||||
|
||||
If you remove 'device random', you get *NO* kernel-processed
|
||||
entopy at all. This may be acceptable to folks building
|
||||
entropy at all. This may be acceptable to folks building
|
||||
embedded systems, but has complications. Carry on reading,
|
||||
and it is assumed you know what you need.
|
||||
|
||||
*PLEASE* read random(4) and random(9) if you are in the
|
||||
habit of tweeking kernel configs, and/or if you are a member
|
||||
habit of tweaking kernel configs, and/or if you are a member
|
||||
of the embedded community, wanting specific and not-usual
|
||||
behaviour from your security subsystems.
|
||||
|
||||
|
@ -249,7 +249,8 @@ argstr(char *p, int flag)
|
||||
case CTLQUOTEMARK:
|
||||
lit_quoted = 1;
|
||||
/* "$@" syntax adherence hack */
|
||||
if (p[0] == CTLVAR && p[2] == '@' && p[3] == '=')
|
||||
if (p[0] == CTLVAR && (p[1] & VSQUOTE) != 0 &&
|
||||
p[2] == '@' && p[3] == '=')
|
||||
break;
|
||||
if ((flag & EXP_FULL) != 0)
|
||||
USTPUTC(c, expdest);
|
||||
|
31
bin/sh/tests/parameters/positional8.0
Normal file
31
bin/sh/tests/parameters/positional8.0
Normal file
@ -0,0 +1,31 @@
|
||||
# $FreeBSD$
|
||||
|
||||
failures=''
|
||||
ok=''
|
||||
|
||||
testcase() {
|
||||
code="$1"
|
||||
expected="$2"
|
||||
oIFS="$IFS"
|
||||
eval "$code"
|
||||
IFS='|'
|
||||
result="$#|$*"
|
||||
IFS="$oIFS"
|
||||
if [ "x$result" = "x$expected" ]; then
|
||||
ok=x$ok
|
||||
else
|
||||
failures=x$failures
|
||||
echo "For $code, expected $expected actual $result"
|
||||
fi
|
||||
}
|
||||
|
||||
testcase 'shift $#; set -- ""$*' '1|'
|
||||
testcase 'shift $#; set -- $*""' '1|'
|
||||
testcase 'shift $#; set -- ""$@' '1|'
|
||||
testcase 'shift $#; set -- $@""' '1|'
|
||||
testcase 'shift $#; set -- """$*"' '1|'
|
||||
testcase 'shift $#; set -- "$*"""' '1|'
|
||||
testcase 'shift $#; set -- """$@"' '1|'
|
||||
testcase 'shift $#; set -- "$@"""' '1|'
|
||||
|
||||
test "x$failures" = x
|
@ -20,7 +20,7 @@ EVP_CIPHER_CTX_set_padding, EVP_enc_null, EVP_des_cbc, EVP_des_ecb,
|
||||
EVP_des_cfb, EVP_des_ofb, EVP_des_ede_cbc, EVP_des_ede, EVP_des_ede_ofb,
|
||||
EVP_des_ede_cfb, EVP_des_ede3_cbc, EVP_des_ede3, EVP_des_ede3_ofb,
|
||||
EVP_des_ede3_cfb, EVP_desx_cbc, EVP_rc4, EVP_rc4_40, EVP_idea_cbc,
|
||||
EVP_idea_ecb, EVP_idea_cfb, EVP_idea_ofb, EVP_idea_cbc, EVP_rc2_cbc,
|
||||
EVP_idea_ecb, EVP_idea_cfb, EVP_idea_ofb, EVP_rc2_cbc,
|
||||
EVP_rc2_ecb, EVP_rc2_cfb, EVP_rc2_ofb, EVP_rc2_40_cbc, EVP_rc2_64_cbc,
|
||||
EVP_bf_cbc, EVP_bf_ecb, EVP_bf_cfb, EVP_bf_ofb, EVP_cast5_cbc,
|
||||
EVP_cast5_ecb, EVP_cast5_cfb, EVP_cast5_ofb, EVP_rc5_32_12_16_cbc,
|
||||
@ -315,7 +315,7 @@ RC4 stream cipher. This is a variable key length cipher with default key length
|
||||
RC4 stream cipher with 40 bit key length. This is obsolete and new code should use EVP_rc4()
|
||||
and the EVP_CIPHER_CTX_set_key_length() function.
|
||||
|
||||
=item EVP_idea_cbc() EVP_idea_ecb(void), EVP_idea_cfb(void), EVP_idea_ofb(void), EVP_idea_cbc(void)
|
||||
=item EVP_idea_cbc() EVP_idea_ecb(void), EVP_idea_cfb(void), EVP_idea_ofb(void)
|
||||
|
||||
IDEA encryption algorithm in CBC, ECB, CFB and OFB modes respectively.
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
EVP_PKEY_CTX_ctrl, EVP_PKEY_CTX_ctrl_str, EVP_PKEY_get_default_digest_nid,
|
||||
EVP_PKEY_CTX_ctrl, EVP_PKEY_CTX_ctrl_str,
|
||||
EVP_PKEY_CTX_set_signature_md, EVP_PKEY_CTX_set_rsa_padding,
|
||||
EVP_PKEY_CTX_set_rsa_pss_saltlen, EVP_PKEY_CTX_set_rsa_rsa_keygen_bits,
|
||||
EVP_PKEY_CTX_set_rsa_keygen_pubexp, EVP_PKEY_CTX_set_dsa_paramgen_bits,
|
||||
@ -19,8 +19,6 @@ EVP_PKEY_CTX_set_ec_paramgen_curve_nid - algorithm specific control operations
|
||||
int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
|
||||
const char *value);
|
||||
|
||||
int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
|
||||
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
||||
|
@ -337,10 +337,10 @@ MTREE_FILTER= sed -e 's,\([gu]\)name=,\1id=,g' \
|
||||
-e 's,\(gid=\)[^ ]*$$,\1${_gid},'
|
||||
.else
|
||||
MTREE_FILTER= cat
|
||||
.endif
|
||||
.if !defined(NO_FSCHG)
|
||||
MTREE_FSCHG= -i
|
||||
.endif
|
||||
.endif
|
||||
|
||||
MTREES= mtree/BSD.root.dist / \
|
||||
mtree/BSD.var.dist /var \
|
||||
|
@ -515,6 +515,8 @@
|
||||
locale
|
||||
af_ZA.ISO8859-1
|
||||
..
|
||||
af_ZA.ISO8859-15
|
||||
..
|
||||
af_ZA.UTF-8
|
||||
..
|
||||
ar_AE.UTF-8
|
||||
@ -601,12 +603,16 @@
|
||||
..
|
||||
en_AU.ISO8859-1
|
||||
..
|
||||
en_AU.ISO8859-15
|
||||
..
|
||||
en_AU.US-ASCII
|
||||
..
|
||||
en_AU.UTF-8
|
||||
..
|
||||
en_CA.ISO8859-1
|
||||
..
|
||||
en_CA.ISO8859-15
|
||||
..
|
||||
en_CA.US-ASCII
|
||||
..
|
||||
en_CA.UTF-8
|
||||
@ -631,6 +637,8 @@
|
||||
..
|
||||
en_NZ.ISO8859-1
|
||||
..
|
||||
en_NZ.ISO8859-15
|
||||
..
|
||||
en_NZ.US-ASCII
|
||||
..
|
||||
en_NZ.UTF-8
|
||||
@ -643,12 +651,16 @@
|
||||
..
|
||||
en_US.ISO8859-1
|
||||
..
|
||||
en_US.ISO8859-15
|
||||
..
|
||||
en_US.US-ASCII
|
||||
..
|
||||
en_US.UTF-8
|
||||
..
|
||||
en_ZA.ISO8859-1
|
||||
..
|
||||
en_ZA.ISO8859-15
|
||||
..
|
||||
en_ZA.US-ASCII
|
||||
..
|
||||
en_ZA.UTF-8
|
||||
@ -695,6 +707,8 @@
|
||||
..
|
||||
fr_CA.ISO8859-1
|
||||
..
|
||||
fr_CA.ISO8859-15
|
||||
..
|
||||
fr_CA.UTF-8
|
||||
..
|
||||
fr_CH.ISO8859-1
|
||||
|
@ -376,7 +376,7 @@ symlinks:
|
||||
@touch ${.OBJDIR}/${.TARGET}
|
||||
.endif
|
||||
|
||||
.if ${MACHINE} == "host"
|
||||
.if ${MACHINE} == "host" && !defined(_SKIP_BUILD)
|
||||
# we're here because we are building a sysroot...
|
||||
# we need MACHINE et al set correctly
|
||||
HOST_MACHINE!= uname -m
|
||||
|
@ -1,12 +1,12 @@
|
||||
# $FreeBSD$
|
||||
|
||||
ATF_TESTS_C+= crypt_tests
|
||||
|
||||
NETBSD_ATF_TESTS_C+= crypt_test
|
||||
|
||||
CFLAGS+= -I${.CURDIR:H}
|
||||
LIBADD= crypt
|
||||
|
||||
#ATF_TESTS_C+= crypt_tests
|
||||
#
|
||||
#NETBSD_ATF_TESTS_C+= crypt_test
|
||||
#
|
||||
#CFLAGS+= -I${.CURDIR:H}
|
||||
#LIBADD= crypt
|
||||
#
|
||||
.include <netbsd-tests.test.mk>
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -37,14 +37,15 @@
|
||||
* Driver statistics.
|
||||
*/
|
||||
struct pmc_driverstats {
|
||||
int pm_intr_ignored; /* #interrupts ignored */
|
||||
int pm_intr_processed; /* #interrupts processed */
|
||||
int pm_intr_bufferfull; /* #interrupts with ENOSPC */
|
||||
int pm_syscalls; /* #syscalls */
|
||||
int pm_syscall_errors; /* #syscalls with errors */
|
||||
int pm_buffer_requests; /* #buffer requests */
|
||||
int pm_buffer_requests_failed; /* #failed buffer requests */
|
||||
int pm_log_sweeps; /* #sample buffer processing passes */
|
||||
unsigned int pm_intr_ignored; /* #interrupts ignored */
|
||||
unsigned int pm_intr_processed; /* #interrupts processed */
|
||||
unsigned int pm_intr_bufferfull; /* #interrupts with ENOSPC */
|
||||
unsigned int pm_syscalls; /* #syscalls */
|
||||
unsigned int pm_syscall_errors; /* #syscalls with errors */
|
||||
unsigned int pm_buffer_requests; /* #buffer requests */
|
||||
unsigned int pm_buffer_requests_failed; /* #failed buffer requests */
|
||||
unsigned int pm_log_sweeps; /* #sample buffer processing
|
||||
passes */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -70,66 +70,26 @@ SUBDIR=adjkerntz \
|
||||
tunefs \
|
||||
umount
|
||||
|
||||
.if ${MK_ATM} != "no"
|
||||
SUBDIR+= atm
|
||||
.endif
|
||||
SUBDIR.${MK_ATM}+= atm
|
||||
SUBDIR.${MK_CASPER}+= casperd
|
||||
SUBDIR.${MK_CCD}+= ccdconfig
|
||||
SUBDIR.${MK_CXX}+= devd
|
||||
SUBDIR.${MK_HAST}+= hastctl
|
||||
SUBDIR.${MK_HAST}+= hastd
|
||||
SUBDIR.${MK_INET6}+= ping6
|
||||
SUBDIR.${MK_INET6}+= rtsol
|
||||
SUBDIR.${MK_IPFILTER}+= ipf
|
||||
SUBDIR.${MK_IPFW}+= ipfw
|
||||
SUBDIR.${MK_IPFW}+= natd
|
||||
SUBDIR.${MK_ISCSI}+= iscontrol
|
||||
SUBDIR.${MK_NAND}+= nandfs
|
||||
SUBDIR.${MK_NAND}+= newfs_nandfs
|
||||
SUBDIR.${MK_PF}+= pfctl
|
||||
SUBDIR.${MK_PF}+= pflogd
|
||||
SUBDIR.${MK_QUOTAS}+= quotacheck
|
||||
SUBDIR.${MK_ROUTED}+= routed
|
||||
|
||||
.if ${MK_CASPER} != "no"
|
||||
SUBDIR+= casperd
|
||||
.endif
|
||||
|
||||
.if ${MK_CCD} != "no"
|
||||
SUBDIR+= ccdconfig
|
||||
.endif
|
||||
|
||||
.if ${MK_CXX} != "no"
|
||||
SUBDIR+= devd
|
||||
.endif
|
||||
|
||||
.if ${MK_HAST} != "no"
|
||||
SUBDIR+= hastctl
|
||||
SUBDIR+= hastd
|
||||
.endif
|
||||
|
||||
.if ${MK_INET6} != "no"
|
||||
SUBDIR+= ping6
|
||||
SUBDIR+= rtsol
|
||||
.endif
|
||||
|
||||
.if ${MK_IPFILTER} != "no"
|
||||
SUBDIR+= ipf
|
||||
.endif
|
||||
|
||||
.if ${MK_IPFW} != "no"
|
||||
SUBDIR+= ipfw
|
||||
SUBDIR+= natd
|
||||
.endif
|
||||
|
||||
.if ${MK_ISCSI} != "no"
|
||||
SUBDIR+= iscontrol
|
||||
.endif
|
||||
|
||||
.if ${MK_NAND} != "no"
|
||||
SUBDIR+= nandfs
|
||||
SUBDIR+= newfs_nandfs
|
||||
.endif
|
||||
|
||||
.if ${MK_PF} != "no"
|
||||
SUBDIR+= pfctl
|
||||
SUBDIR+= pflogd
|
||||
.endif
|
||||
|
||||
.if ${MK_QUOTAS} != "no"
|
||||
SUBDIR+= quotacheck
|
||||
.endif
|
||||
|
||||
.if ${MK_ROUTED} != "no"
|
||||
SUBDIR+= routed
|
||||
.endif
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
SUBDIR.${MK_TESTS}+= tests
|
||||
|
||||
.include <bsd.arch.inc.mk>
|
||||
|
||||
|
@ -45,7 +45,7 @@ MANDIR= ${SHAREDIR}/openssl/man/man
|
||||
|
||||
.if defined(LIB)
|
||||
_docs= ${LIB}
|
||||
_skip= des_modes
|
||||
_skip= SSLeay_version des_modes
|
||||
_sec= 3
|
||||
.else
|
||||
_docs= apps
|
||||
@ -72,13 +72,13 @@ man-makefile-update:
|
||||
${.CURDIR}/Makefile.man
|
||||
for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" != "${_skip}" ]; then \
|
||||
if ! echo '${_skip}' | grep -qw "$$fn"; then \
|
||||
${ECHO} "MAN+= $$fn.${_sec}" >> ${.CURDIR}/Makefile.man; \
|
||||
fi; \
|
||||
done
|
||||
for i in ${LCRYPTO_DOC}/${_docs}/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" != "${_skip}" ]; then \
|
||||
if ! echo '${_skip}' | grep -qw "$$fn"; then \
|
||||
perl ${LCRYPTO_SRC}/util/extract-names.pl < $$i | \
|
||||
awk "/^$$fn\$$/ { next; } \
|
||||
{ print \"MLINKS+= $$fn.${_sec} \" \$$1 \".${_sec}\" }" >> \
|
||||
|
@ -160,7 +160,6 @@ MAN+= SMIME_read_CMS.3
|
||||
MAN+= SMIME_read_PKCS7.3
|
||||
MAN+= SMIME_write_CMS.3
|
||||
MAN+= SMIME_write_PKCS7.3
|
||||
MAN+= SSLeay_version.3
|
||||
MAN+= X509_NAME_ENTRY_get_object.3
|
||||
MAN+= X509_NAME_add_entry_by_txt.3
|
||||
MAN+= X509_NAME_get_index_by_NID.3
|
||||
@ -695,7 +694,6 @@ MLINKS+= EVP_EncryptInit.3 EVP_idea_cbc.3
|
||||
MLINKS+= EVP_EncryptInit.3 EVP_idea_ecb.3
|
||||
MLINKS+= EVP_EncryptInit.3 EVP_idea_cfb.3
|
||||
MLINKS+= EVP_EncryptInit.3 EVP_idea_ofb.3
|
||||
MLINKS+= EVP_EncryptInit.3 EVP_idea_cbc.3
|
||||
MLINKS+= EVP_EncryptInit.3 EVP_rc2_cbc.3
|
||||
MLINKS+= EVP_EncryptInit.3 EVP_rc2_ecb.3
|
||||
MLINKS+= EVP_EncryptInit.3 EVP_rc2_cfb.3
|
||||
@ -723,7 +721,6 @@ MLINKS+= EVP_EncryptInit.3 EVP_aes_256_ccm.3
|
||||
MLINKS+= EVP_OpenInit.3 EVP_OpenUpdate.3
|
||||
MLINKS+= EVP_OpenInit.3 EVP_OpenFinal.3
|
||||
MLINKS+= EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_ctrl_str.3
|
||||
MLINKS+= EVP_PKEY_CTX_ctrl.3 EVP_PKEY_get_default_digest_nid.3
|
||||
MLINKS+= EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_set_signature_md.3
|
||||
MLINKS+= EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_set_rsa_padding.3
|
||||
MLINKS+= EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_set_rsa_pss_saltlen.3
|
||||
|
@ -157,7 +157,7 @@ EVP_CIPHER_CTX_set_padding, EVP_enc_null, EVP_des_cbc, EVP_des_ecb,
|
||||
EVP_des_cfb, EVP_des_ofb, EVP_des_ede_cbc, EVP_des_ede, EVP_des_ede_ofb,
|
||||
EVP_des_ede_cfb, EVP_des_ede3_cbc, EVP_des_ede3, EVP_des_ede3_ofb,
|
||||
EVP_des_ede3_cfb, EVP_desx_cbc, EVP_rc4, EVP_rc4_40, EVP_idea_cbc,
|
||||
EVP_idea_ecb, EVP_idea_cfb, EVP_idea_ofb, EVP_idea_cbc, EVP_rc2_cbc,
|
||||
EVP_idea_ecb, EVP_idea_cfb, EVP_idea_ofb, EVP_rc2_cbc,
|
||||
EVP_rc2_ecb, EVP_rc2_cfb, EVP_rc2_ofb, EVP_rc2_40_cbc, EVP_rc2_64_cbc,
|
||||
EVP_bf_cbc, EVP_bf_ecb, EVP_bf_cfb, EVP_bf_ofb, EVP_cast5_cbc,
|
||||
EVP_cast5_ecb, EVP_cast5_cfb, EVP_cast5_ofb, EVP_rc5_32_12_16_cbc,
|
||||
@ -440,8 +440,8 @@ Three key triple \s-1DES\s0 in \s-1CBC, ECB, CFB\s0 and \s-1OFB\s0 modes respect
|
||||
.IX Item "EVP_rc4_40(void)"
|
||||
\&\s-1RC4\s0 stream cipher with 40 bit key length. This is obsolete and new code should use \fIEVP_rc4()\fR
|
||||
and the \fIEVP_CIPHER_CTX_set_key_length()\fR function.
|
||||
.IP "\fIEVP_idea_cbc()\fR EVP_idea_ecb(void), EVP_idea_cfb(void), EVP_idea_ofb(void), EVP_idea_cbc(void)" 4
|
||||
.IX Item "EVP_idea_cbc() EVP_idea_ecb(void), EVP_idea_cfb(void), EVP_idea_ofb(void), EVP_idea_cbc(void)"
|
||||
.IP "\fIEVP_idea_cbc()\fR EVP_idea_ecb(void), EVP_idea_cfb(void), EVP_idea_ofb(void)" 4
|
||||
.IX Item "EVP_idea_cbc() EVP_idea_ecb(void), EVP_idea_cfb(void), EVP_idea_ofb(void)"
|
||||
\&\s-1IDEA\s0 encryption algorithm in \s-1CBC, ECB, CFB\s0 and \s-1OFB\s0 modes respectively.
|
||||
.IP "EVP_rc2_cbc(void), EVP_rc2_ecb(void), EVP_rc2_cfb(void), EVP_rc2_ofb(void)" 4
|
||||
.IX Item "EVP_rc2_cbc(void), EVP_rc2_ecb(void), EVP_rc2_cfb(void), EVP_rc2_ofb(void)"
|
||||
|
@ -139,7 +139,7 @@
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
EVP_PKEY_CTX_ctrl, EVP_PKEY_CTX_ctrl_str, EVP_PKEY_get_default_digest_nid,
|
||||
EVP_PKEY_CTX_ctrl, EVP_PKEY_CTX_ctrl_str,
|
||||
EVP_PKEY_CTX_set_signature_md, EVP_PKEY_CTX_set_rsa_padding,
|
||||
EVP_PKEY_CTX_set_rsa_pss_saltlen, EVP_PKEY_CTX_set_rsa_rsa_keygen_bits,
|
||||
EVP_PKEY_CTX_set_rsa_keygen_pubexp, EVP_PKEY_CTX_set_dsa_paramgen_bits,
|
||||
@ -156,8 +156,6 @@ EVP_PKEY_CTX_set_ec_paramgen_curve_nid \- algorithm specific control operations
|
||||
\& int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
|
||||
\& const char *value);
|
||||
\&
|
||||
\& int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
|
||||
\&
|
||||
\& #include <openssl/rsa.h>
|
||||
\&
|
||||
\& int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
||||
|
@ -1,192 +0,0 @@
|
||||
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.30)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.\"
|
||||
.\" Avoid warning from groff about undefined register 'F'.
|
||||
.de IX
|
||||
..
|
||||
.nr rF 0
|
||||
.if \n(.g .if rF .nr rF 1
|
||||
.if (\n(rF:(\n(.g==0)) \{
|
||||
. if \nF \{
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. if !\nF==2 \{
|
||||
. nr % 0
|
||||
. nr F 2
|
||||
. \}
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "SSLeay_version 3"
|
||||
.TH SSLeay_version 3 "2015-07-09" "1.0.2d" "OpenSSL"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
SSLeay_version \- retrieve version/build information about OpenSSL library
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/crypto.h>
|
||||
\&
|
||||
\& const char *SSLeay_version(int type);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fISSLeay_version()\fR returns a pointer to a constant string describing the
|
||||
version of the OpenSSL library or giving information about the library
|
||||
build.
|
||||
.PP
|
||||
The following \fBtype\fR values are supported:
|
||||
.IP "\s-1SSLEAY_VERSION\s0" 4
|
||||
.IX Item "SSLEAY_VERSION"
|
||||
The version of the OpenSSL library including the release date.
|
||||
.IP "\s-1SSLEAY_CFLAGS\s0" 4
|
||||
.IX Item "SSLEAY_CFLAGS"
|
||||
The compiler flags set for the compilation process in the form
|
||||
\&\*(L"compiler: ...\*(R" if available or \*(L"compiler: information not available\*(R"
|
||||
otherwise.
|
||||
.IP "\s-1SSLEAY_BUILT_ON\s0" 4
|
||||
.IX Item "SSLEAY_BUILT_ON"
|
||||
The date of the build process in the form \*(L"built on: ...\*(R" if available
|
||||
or \*(L"built on: date not available\*(R" otherwise.
|
||||
.IP "\s-1SSLEAY_PLATFORM\s0" 4
|
||||
.IX Item "SSLEAY_PLATFORM"
|
||||
The \*(L"Configure\*(R" target of the library build in the form \*(L"platform: ...\*(R"
|
||||
if available or \*(L"platform: information not available\*(R" otherwise.
|
||||
.IP "\s-1SSLEAY_DIR\s0" 4
|
||||
.IX Item "SSLEAY_DIR"
|
||||
The \*(L"\s-1OPENSSLDIR\*(R"\s0 setting of the library build in the form \*(L"\s-1OPENSSLDIR: \*(R"..."\*(L"\s0
|
||||
if available or \*(R"\s-1OPENSSLDIR: N/A"\s0 otherwise.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
The following return values can occur:
|
||||
.ie n .IP """not available""" 4
|
||||
.el .IP "``not available''" 4
|
||||
.IX Item "not available"
|
||||
An invalid value for \fBtype\fR was given.
|
||||
.IP "Pointer to constant string" 4
|
||||
.IX Item "Pointer to constant string"
|
||||
Textual description.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fIcrypto\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.IX Header "HISTORY"
|
||||
\&\fB\s-1SSLEAY_DIR\s0\fR was added in OpenSSL 0.9.7.
|
@ -47,6 +47,7 @@ LOCALES+= uk_UA.UTF-8
|
||||
LOCALES+= zh_Hans_CN.UTF-8
|
||||
LOCALES+= zh_Hant_TW.UTF-8
|
||||
|
||||
SAME+= af_ZA.UTF-8:af_ZA.ISO8859-15
|
||||
SAME+= af_ZA.UTF-8:af_ZA.ISO8859-1
|
||||
SAME+= ar_SA.UTF-8:ar_QA.UTF-8
|
||||
SAME+= ar_SA.UTF-8:ar_MA.UTF-8
|
||||
@ -108,6 +109,7 @@ SAME+= en_US.UTF-8:fr_CH.UTF-8
|
||||
SAME+= en_US.UTF-8:fr_CH.ISO8859-15
|
||||
SAME+= en_US.UTF-8:fr_CH.ISO8859-1
|
||||
SAME+= en_US.UTF-8:fr_CA.UTF-8
|
||||
SAME+= en_US.UTF-8:fr_CA.ISO8859-15
|
||||
SAME+= en_US.UTF-8:fr_CA.ISO8859-1
|
||||
SAME+= en_US.UTF-8:fr_BE.UTF-8
|
||||
SAME+= en_US.UTF-8:fr_BE.ISO8859-15
|
||||
@ -117,14 +119,17 @@ SAME+= en_US.UTF-8:eu_ES.ISO8859-15
|
||||
SAME+= en_US.UTF-8:eu_ES.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_ZA.UTF-8
|
||||
SAME+= en_US.UTF-8:en_ZA.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_ZA.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_ZA.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_US.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_US.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_US.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_SG.UTF-8
|
||||
SAME+= en_US.UTF-8:en_SG.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_PH.UTF-8
|
||||
SAME+= en_US.UTF-8:en_NZ.UTF-8
|
||||
SAME+= en_US.UTF-8:en_NZ.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_NZ.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_NZ.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_IE.UTF-8
|
||||
SAME+= en_US.UTF-8:en_IE.ISO8859-15
|
||||
@ -137,9 +142,11 @@ SAME+= en_US.UTF-8:en_GB.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_GB.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_CA.UTF-8
|
||||
SAME+= en_US.UTF-8:en_CA.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_CA.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_CA.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_AU.UTF-8
|
||||
SAME+= en_US.UTF-8:en_AU.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_AU.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_AU.ISO8859-1
|
||||
SAME+= en_US.UTF-8:de_DE.UTF-8
|
||||
SAME+= en_US.UTF-8:de_DE.ISO8859-15
|
||||
|
@ -16,8 +16,8 @@ LOCALES+= be_BY.CP1131
|
||||
LOCALES+= ca_IT.ISO8859-1
|
||||
LOCALES+= ca_IT.ISO8859-15
|
||||
LOCALES+= el_GR.ISO8859-7
|
||||
LOCALES+= en_GB.ISO8859-15
|
||||
LOCALES+= en_US.ISO8859-1
|
||||
LOCALES+= en_US.ISO8859-15
|
||||
LOCALES+= en_US.US-ASCII
|
||||
LOCALES+= en_US.UTF-8
|
||||
LOCALES+= hi_IN.ISCII-DEV
|
||||
@ -152,6 +152,35 @@ SAME+= en_US.ISO8859-1:de_CH.ISO8859-1
|
||||
SAME+= en_US.ISO8859-1:de_AT.ISO8859-1
|
||||
SAME+= en_US.ISO8859-1:da_DK.ISO8859-1
|
||||
SAME+= en_US.ISO8859-1:af_ZA.ISO8859-1
|
||||
SAME+= en_US.ISO8859-15:en_GB.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:sv_SE.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:sv_FI.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:pt_PT.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:nn_NO.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:nl_NL.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:nl_BE.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:nb_NO.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:it_IT.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:it_CH.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:is_IS.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:fr_FR.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:fr_CH.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:fr_CA.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:fr_BE.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:fi_FI.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:eu_ES.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:et_EE.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:es_ES.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:en_ZA.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:en_NZ.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:en_IE.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:en_CA.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:en_AU.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:de_DE.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:de_CH.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:de_AT.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:da_DK.ISO8859-15
|
||||
SAME+= en_US.ISO8859-15:af_ZA.ISO8859-15
|
||||
SAME+= ru_RU.CP1251:bg_BG.CP1251
|
||||
SAME+= ru_RU.CP1251:be_BY.CP1251
|
||||
SAME+= ru_RU.ISO8859-5:sr_Cyrl_RS.ISO8859-5
|
||||
@ -169,28 +198,6 @@ SAME+= sr_Latn_RS.ISO8859-2:pl_PL.ISO8859-2
|
||||
SAME+= sr_Latn_RS.ISO8859-2:hu_HU.ISO8859-2
|
||||
SAME+= sr_Latn_RS.ISO8859-2:hr_HR.ISO8859-2
|
||||
SAME+= sr_Latn_RS.ISO8859-2:cs_CZ.ISO8859-2
|
||||
SAME+= en_GB.ISO8859-15:sv_SE.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:sv_FI.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:pt_PT.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:nn_NO.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:nl_NL.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:nl_BE.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:nb_NO.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:it_IT.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:it_CH.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:is_IS.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:fr_FR.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:fr_CH.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:fr_BE.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:fi_FI.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:eu_ES.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:et_EE.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:es_ES.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:en_IE.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:de_DE.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:de_CH.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:de_AT.ISO8859-15
|
||||
SAME+= en_GB.ISO8859-15:da_DK.ISO8859-15
|
||||
SAME+= en_US.US-ASCII:en_ZA.US-ASCII
|
||||
SAME+= en_US.US-ASCII:en_NZ.US-ASCII
|
||||
SAME+= en_US.US-ASCII:en_GB.US-ASCII
|
||||
@ -222,11 +229,11 @@ SYMPAIRS+= zh_Hans_CN.eucCN.src:zh_Hans_CN.GB18030.src
|
||||
SYMPAIRS+= zh_Hans_CN.eucCN.src:zh_Hans_CN.GB2312.src
|
||||
SYMPAIRS+= zh_Hans_CN.eucCN.src:zh_Hans_CN.GBK.src
|
||||
SYMPAIRS+= zh_Hant_HK.Big5HKSCS.src:zh_Hant_TW.Big5.src
|
||||
SYMPAIRS+= en_GB.ISO8859-15.src:en_US.ISO8859-1.src
|
||||
SYMPAIRS+= en_GB.ISO8859-15.src:en_US.US-ASCII.src
|
||||
SYMPAIRS+= en_GB.ISO8859-15.src:lv_LV.ISO8859-13.src
|
||||
SYMPAIRS+= en_GB.ISO8859-15.src:sr_Latn_RS.ISO8859-2.src
|
||||
SYMPAIRS+= en_GB.ISO8859-15.src:tr_TR.ISO8859-9.src
|
||||
SYMPAIRS+= en_US.ISO8859-1.src:en_US.ISO8859-15.src
|
||||
SYMPAIRS+= en_US.ISO8859-1.src:en_US.US-ASCII.src
|
||||
SYMPAIRS+= en_US.ISO8859-1.src:lv_LV.ISO8859-13.src
|
||||
SYMPAIRS+= en_US.ISO8859-1.src:sr_Latn_RS.ISO8859-2.src
|
||||
SYMPAIRS+= en_US.ISO8859-1.src:tr_TR.ISO8859-9.src
|
||||
SYMPAIRS+= ja_JP.eucJP.src:ja_JP.SJIS.src
|
||||
|
||||
.for PAIR in ${SYMPAIRS}
|
||||
|
@ -8,6 +8,7 @@ ALIASES= zh_Hans_CN.GB18030 zh_CN.GB18030 \
|
||||
zh_Hans_CN.GB2312 zh_CN.GB2312 \
|
||||
zh_Hans_CN.GBK zh_CN.GBK \
|
||||
zh_Hans_CN.eucCN zh_CN.eucCN \
|
||||
zh_Hans_CN.UTF-8 zh_CN.UTF-8 \
|
||||
zh_Hant_HK.Big5HKSCS zh_HK.Big5HKSCS \
|
||||
zh_Hant_HK.UTF-8 zh_HK.UTF-8 \
|
||||
zh_Hant_TW.Big5 zh_TW.Big5 \
|
||||
|
@ -1,5 +1,5 @@
|
||||
# $FreeBSD$
|
||||
# $Id: dirdeps.mk,v 1.54 2015/06/08 20:55:11 sjg Exp $
|
||||
# $Id: dirdeps.mk,v 1.55 2015/10/20 22:04:53 sjg Exp $
|
||||
|
||||
# Copyright (c) 2010-2013, Juniper Networks, Inc.
|
||||
# All rights reserved.
|
||||
@ -243,6 +243,21 @@ DEP_${TARGET_SPEC_VARS:[$i]} := ${_tspec:[$i]}
|
||||
DEP_MACHINE := ${_DEP_TARGET_SPEC}
|
||||
.endif
|
||||
|
||||
.if ${MAKEFILE:T} == ${.PARSEFILE} && empty(DIRDEPS) && ${.TARGETS:Uall:M*/*} != ""
|
||||
# This little trick let's us do
|
||||
#
|
||||
# mk -f dirdeps.mk some/dir.${TARGET_SPEC}
|
||||
#
|
||||
all:
|
||||
${.TARGETS:Nall}: all
|
||||
DIRDEPS := ${.TARGETS:M*/*}
|
||||
# so that -DNO_DIRDEPS works
|
||||
DEP_RELDIR := ${DIRDEPS:R:[1]}
|
||||
# disable DIRDEPS_CACHE as it does not like this trick
|
||||
MK_DIRDEPS_CACHE = no
|
||||
.endif
|
||||
|
||||
|
||||
# pickup customizations
|
||||
# as below you can use !target(_DIRDEP_USE) to protect things
|
||||
# which should only be done once.
|
||||
|
@ -6,6 +6,7 @@ GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}';
|
||||
# supress optional/auto dependecies
|
||||
# local.dirdeps.mk will put them in if necessary
|
||||
GENDIRDEPS_FILTER+= \
|
||||
Nbin/cat.host \
|
||||
Ngnu/lib/libssp/libssp_nonshared \
|
||||
Ncddl/usr.bin/ctf* \
|
||||
Nlib/clang/include \
|
||||
|
@ -19,13 +19,12 @@ MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm
|
||||
|
||||
# Some options we need now
|
||||
__DEFAULT_NO_OPTIONS= \
|
||||
DIRDEPS_CACHE \
|
||||
DIRDEPS_BUILD \
|
||||
META_MODE \
|
||||
|
||||
DIRDEPS_CACHE
|
||||
|
||||
__DEFAULT_DEPENDENT_OPTIONS= \
|
||||
AUTO_OBJ/DIRDEPS_BUILD \
|
||||
META_MODE/DIRDEPS_BUILD \
|
||||
STAGING/DIRDEPS_BUILD \
|
||||
SYSROOT/DIRDEPS_BUILD
|
||||
|
||||
|
@ -40,13 +40,13 @@ LOCALES+= en_NZ.UTF-8
|
||||
LOCALES+= en_PH.UTF-8
|
||||
LOCALES+= en_SG.UTF-8
|
||||
LOCALES+= en_US.UTF-8
|
||||
LOCALES+= en_ZA.ISO8859-1
|
||||
LOCALES+= en_ZA.ISO8859-15
|
||||
LOCALES+= en_ZA.US-ASCII
|
||||
LOCALES+= en_ZA.UTF-8
|
||||
LOCALES+= es_AR.UTF-8
|
||||
LOCALES+= es_CR.UTF-8
|
||||
LOCALES+= es_MX.UTF-8
|
||||
LOCALES+= fr_CA.ISO8859-1
|
||||
LOCALES+= fr_CA.ISO8859-15
|
||||
LOCALES+= fr_CA.UTF-8
|
||||
LOCALES+= fr_CH.ISO8859-15
|
||||
LOCALES+= fr_CH.UTF-8
|
||||
@ -109,7 +109,9 @@ LOCALES+= zh_Hant_HK.UTF-8
|
||||
LOCALES+= zh_Hant_TW.Big5
|
||||
LOCALES+= zh_Hant_TW.UTF-8
|
||||
|
||||
SAME+= en_ZA.ISO8859-1:af_ZA.ISO8859-1
|
||||
SAME+= en_ZA.ISO8859-15:en_ZA.ISO8859-1
|
||||
SAME+= en_ZA.ISO8859-15:af_ZA.ISO8859-15
|
||||
SAME+= en_ZA.ISO8859-15:af_ZA.ISO8859-1
|
||||
SAME+= en_ZA.UTF-8:af_ZA.UTF-8
|
||||
SAME+= sl_SI.ISO8859-2:nl_BE.ISO8859-1
|
||||
SAME+= sl_SI.ISO8859-2:it_IT.ISO8859-1
|
||||
@ -150,17 +152,21 @@ SAME+= it_CH.UTF-8:de_CH.UTF-8
|
||||
SAME+= it_CH.UTF-8:de_CH.ISO8859-15
|
||||
SAME+= it_CH.UTF-8:de_CH.ISO8859-1
|
||||
SAME+= en_AU.UTF-8:en_AU.US-ASCII
|
||||
SAME+= en_AU.UTF-8:en_AU.ISO8859-15
|
||||
SAME+= en_AU.UTF-8:en_AU.ISO8859-1
|
||||
SAME+= en_CA.UTF-8:en_CA.US-ASCII
|
||||
SAME+= en_CA.UTF-8:en_CA.ISO8859-15
|
||||
SAME+= en_CA.UTF-8:en_CA.ISO8859-1
|
||||
SAME+= en_GB.ISO8859-15:en_GB.ISO8859-1
|
||||
SAME+= zh_Hant_HK.UTF-8:zh_Hant_HK.Big5HKSCS
|
||||
SAME+= zh_Hant_HK.UTF-8:en_HK.UTF-8
|
||||
SAME+= zh_Hant_HK.UTF-8:en_HK.ISO8859-1
|
||||
SAME+= en_NZ.UTF-8:en_NZ.US-ASCII
|
||||
SAME+= en_NZ.UTF-8:en_NZ.ISO8859-15
|
||||
SAME+= en_NZ.UTF-8:en_NZ.ISO8859-1
|
||||
SAME+= en_SG.UTF-8:en_SG.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_US.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_US.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_US.ISO8859-1
|
||||
SAME+= es_AR.UTF-8:es_AR.ISO8859-1
|
||||
SAME+= es_MX.UTF-8:es_MX.ISO8859-1
|
||||
@ -180,6 +186,7 @@ SAME+= sk_SK.UTF-8:et_EE.UTF-8
|
||||
SAME+= sv_FI.UTF-8:se_FI.UTF-8
|
||||
SAME+= sv_FI.UTF-8:lt_LT.UTF-8
|
||||
SAME+= sv_FI.UTF-8:fi_FI.UTF-8
|
||||
SAME+= fr_CA.ISO8859-15:fr_CA.ISO8859-1
|
||||
SAME+= fr_CH.ISO8859-15:fr_CH.ISO8859-1
|
||||
SAME+= hr_HR.UTF-8:hr_HR.ISO8859-2
|
||||
SAME+= is_IS.UTF-8:is_IS.ISO8859-15
|
||||
|
@ -89,6 +89,7 @@ SAME+= nl_NL.UTF-8:nl_BE.UTF-8
|
||||
SAME+= nl_NL.UTF-8:nl_BE.ISO8859-15
|
||||
SAME+= nl_NL.UTF-8:nl_BE.ISO8859-1
|
||||
SAME+= nl_NL.UTF-8:af_ZA.UTF-8
|
||||
SAME+= nl_NL.UTF-8:af_ZA.ISO8859-15
|
||||
SAME+= nl_NL.UTF-8:af_ZA.ISO8859-1
|
||||
SAME+= ar_SA.UTF-8:ar_QA.UTF-8
|
||||
SAME+= ar_SA.UTF-8:ar_MA.UTF-8
|
||||
@ -132,14 +133,17 @@ SAME+= de_DE.UTF-8:de_AT.ISO8859-15
|
||||
SAME+= de_DE.UTF-8:de_AT.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_ZA.UTF-8
|
||||
SAME+= en_US.UTF-8:en_ZA.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_ZA.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_ZA.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_US.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_US.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_US.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_SG.UTF-8
|
||||
SAME+= en_US.UTF-8:en_SG.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_PH.UTF-8
|
||||
SAME+= en_US.UTF-8:en_NZ.UTF-8
|
||||
SAME+= en_US.UTF-8:en_NZ.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_NZ.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_NZ.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_IE.UTF-8
|
||||
SAME+= en_US.UTF-8:en_IE.ISO8859-15
|
||||
@ -152,9 +156,11 @@ SAME+= en_US.UTF-8:en_GB.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_GB.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_CA.UTF-8
|
||||
SAME+= en_US.UTF-8:en_CA.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_CA.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_CA.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_AU.UTF-8
|
||||
SAME+= en_US.UTF-8:en_AU.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_AU.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_AU.ISO8859-1
|
||||
SAME+= et_EE.UTF-8:et_EE.ISO8859-15
|
||||
SAME+= et_EE.UTF-8:et_EE.ISO8859-1
|
||||
@ -167,6 +173,7 @@ SAME+= fr_FR.UTF-8:fr_CH.UTF-8
|
||||
SAME+= fr_FR.UTF-8:fr_CH.ISO8859-15
|
||||
SAME+= fr_FR.UTF-8:fr_CH.ISO8859-1
|
||||
SAME+= fr_FR.UTF-8:fr_CA.UTF-8
|
||||
SAME+= fr_FR.UTF-8:fr_CA.ISO8859-15
|
||||
SAME+= fr_FR.UTF-8:fr_CA.ISO8859-1
|
||||
SAME+= fr_FR.UTF-8:fr_BE.UTF-8
|
||||
SAME+= fr_FR.UTF-8:fr_BE.ISO8859-15
|
||||
|
@ -47,16 +47,19 @@ SAME+= uk_UA.ISO8859-5:lt_LT.ISO8859-13
|
||||
SAME+= uk_UA.ISO8859-5:hu_HU.ISO8859-2
|
||||
SAME+= uk_UA.ISO8859-5:fr_FR.ISO8859-15
|
||||
SAME+= uk_UA.ISO8859-5:fr_FR.ISO8859-1
|
||||
SAME+= uk_UA.ISO8859-5:fr_CA.ISO8859-15
|
||||
SAME+= uk_UA.ISO8859-5:fr_CA.ISO8859-1
|
||||
SAME+= uk_UA.ISO8859-5:fi_FI.ISO8859-15
|
||||
SAME+= uk_UA.ISO8859-5:fi_FI.ISO8859-1
|
||||
SAME+= uk_UA.ISO8859-5:et_EE.ISO8859-15
|
||||
SAME+= uk_UA.ISO8859-5:et_EE.ISO8859-1
|
||||
SAME+= uk_UA.ISO8859-5:en_ZA.ISO8859-15
|
||||
SAME+= uk_UA.ISO8859-5:en_ZA.ISO8859-1
|
||||
SAME+= uk_UA.ISO8859-5:cs_CZ.ISO8859-2
|
||||
SAME+= uk_UA.ISO8859-5:bg_BG.CP1251
|
||||
SAME+= uk_UA.ISO8859-5:be_BY.ISO8859-5
|
||||
SAME+= uk_UA.ISO8859-5:be_BY.CP1251
|
||||
SAME+= uk_UA.ISO8859-5:af_ZA.ISO8859-15
|
||||
SAME+= uk_UA.ISO8859-5:af_ZA.ISO8859-1
|
||||
SAME+= uk_UA.UTF-8:sv_SE.UTF-8
|
||||
SAME+= uk_UA.UTF-8:sv_FI.UTF-8
|
||||
@ -97,12 +100,14 @@ SAME+= en_US.UTF-8:he_IL.UTF-8
|
||||
SAME+= en_US.UTF-8:es_MX.UTF-8
|
||||
SAME+= en_US.UTF-8:es_MX.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_US.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_US.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_US.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_SG.UTF-8
|
||||
SAME+= en_US.UTF-8:en_SG.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_PH.UTF-8
|
||||
SAME+= en_US.UTF-8:en_NZ.UTF-8
|
||||
SAME+= en_US.UTF-8:en_NZ.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_NZ.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_NZ.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_IE.UTF-8
|
||||
SAME+= en_US.UTF-8:en_IE.ISO8859-15
|
||||
@ -115,9 +120,11 @@ SAME+= en_US.UTF-8:en_GB.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_GB.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_CA.UTF-8
|
||||
SAME+= en_US.UTF-8:en_CA.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_CA.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_CA.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_AU.UTF-8
|
||||
SAME+= en_US.UTF-8:en_AU.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_AU.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_AU.ISO8859-1
|
||||
SAME+= en_US.UTF-8:am_ET.UTF-8
|
||||
SAME+= ar_SA.UTF-8:ar_QA.UTF-8
|
||||
|
@ -53,7 +53,7 @@ LOCALES+= fi_FI.ISO8859-15
|
||||
LOCALES+= fi_FI.UTF-8
|
||||
LOCALES+= fr_BE.ISO8859-15
|
||||
LOCALES+= fr_BE.UTF-8
|
||||
LOCALES+= fr_CA.ISO8859-1
|
||||
LOCALES+= fr_CA.ISO8859-15
|
||||
LOCALES+= fr_CA.UTF-8
|
||||
LOCALES+= fr_CH.ISO8859-15
|
||||
LOCALES+= fr_CH.UTF-8
|
||||
@ -132,6 +132,7 @@ LOCALES+= zh_Hant_HK.UTF-8
|
||||
LOCALES+= zh_Hant_TW.Big5
|
||||
LOCALES+= zh_Hant_TW.UTF-8
|
||||
|
||||
SAME+= af_ZA.UTF-8:af_ZA.ISO8859-15
|
||||
SAME+= af_ZA.UTF-8:af_ZA.ISO8859-1
|
||||
SAME+= ar_SA.UTF-8:ar_QA.UTF-8
|
||||
SAME+= ar_SA.UTF-8:ar_EG.UTF-8
|
||||
@ -155,8 +156,10 @@ SAME+= de_DE.UTF-8:de_CH.UTF-8
|
||||
SAME+= en_HK.UTF-8:en_HK.ISO8859-1
|
||||
SAME+= en_HK.UTF-8:en_AU.UTF-8
|
||||
SAME+= en_HK.UTF-8:en_AU.US-ASCII
|
||||
SAME+= en_HK.UTF-8:en_AU.ISO8859-15
|
||||
SAME+= en_HK.UTF-8:en_AU.ISO8859-1
|
||||
SAME+= en_CA.UTF-8:en_CA.US-ASCII
|
||||
SAME+= en_CA.UTF-8:en_CA.ISO8859-15
|
||||
SAME+= en_CA.UTF-8:en_CA.ISO8859-1
|
||||
SAME+= en_GB.UTF-8:en_GB.US-ASCII
|
||||
SAME+= en_GB.UTF-8:en_GB.ISO8859-15
|
||||
@ -166,10 +169,13 @@ SAME+= en_IE.UTF-8:en_IE.ISO8859-1
|
||||
SAME+= en_SG.UTF-8:en_SG.ISO8859-1
|
||||
SAME+= en_SG.UTF-8:en_NZ.UTF-8
|
||||
SAME+= en_SG.UTF-8:en_NZ.US-ASCII
|
||||
SAME+= en_SG.UTF-8:en_NZ.ISO8859-15
|
||||
SAME+= en_SG.UTF-8:en_NZ.ISO8859-1
|
||||
SAME+= en_US.UTF-8:en_US.US-ASCII
|
||||
SAME+= en_US.UTF-8:en_US.ISO8859-15
|
||||
SAME+= en_US.UTF-8:en_US.ISO8859-1
|
||||
SAME+= en_ZA.UTF-8:en_ZA.US-ASCII
|
||||
SAME+= en_ZA.UTF-8:en_ZA.ISO8859-15
|
||||
SAME+= en_ZA.UTF-8:en_ZA.ISO8859-1
|
||||
SAME+= es_CR.UTF-8:es_AR.UTF-8
|
||||
SAME+= es_ES.ISO8859-15:es_ES.ISO8859-1
|
||||
@ -178,6 +184,7 @@ SAME+= eu_ES.UTF-8:eu_ES.ISO8859-15
|
||||
SAME+= eu_ES.UTF-8:eu_ES.ISO8859-1
|
||||
SAME+= fi_FI.ISO8859-15:fi_FI.ISO8859-1
|
||||
SAME+= fr_BE.ISO8859-15:fr_BE.ISO8859-1
|
||||
SAME+= fr_CA.ISO8859-15:fr_CA.ISO8859-1
|
||||
SAME+= fr_CH.ISO8859-15:fr_CH.ISO8859-1
|
||||
SAME+= fr_FR.ISO8859-15:fr_FR.ISO8859-1
|
||||
SAME+= is_IS.ISO8859-15:is_IS.ISO8859-1
|
||||
|
@ -117,8 +117,8 @@ struct bounce_page {
|
||||
|
||||
struct sync_list {
|
||||
vm_offset_t vaddr; /* kva of client data */
|
||||
bus_addr_t paddr; /* physical address */
|
||||
vm_page_t pages; /* starting page of client data */
|
||||
vm_offset_t dataoffs; /* page offset of client data */
|
||||
bus_size_t datacount; /* client data count */
|
||||
};
|
||||
|
||||
@ -1076,17 +1076,19 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
|
||||
sgsize);
|
||||
} else {
|
||||
if (map->sync_count > 0)
|
||||
sl_end = VM_PAGE_TO_PHYS(sl->pages) +
|
||||
sl->dataoffs + sl->datacount;
|
||||
sl_end = sl->paddr + sl->datacount;
|
||||
|
||||
if (map->sync_count == 0 || curaddr != sl_end) {
|
||||
if (++map->sync_count > dmat->nsegments)
|
||||
break;
|
||||
sl++;
|
||||
sl->vaddr = 0;
|
||||
sl->paddr = curaddr;
|
||||
sl->datacount = sgsize;
|
||||
sl->pages = PHYS_TO_VM_PAGE(curaddr);
|
||||
sl->dataoffs = curaddr & PAGE_MASK;
|
||||
KASSERT(sl->pages != NULL,
|
||||
("%s: page at PA:0x%08lx is not in "
|
||||
"vm_page_array", __func__, curaddr));
|
||||
} else
|
||||
sl->datacount += sgsize;
|
||||
}
|
||||
@ -1188,8 +1190,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
|
||||
sgsize);
|
||||
} else {
|
||||
if (map->sync_count > 0) {
|
||||
sl_pend = VM_PAGE_TO_PHYS(sl->pages) +
|
||||
sl->dataoffs + sl->datacount;
|
||||
sl_pend = sl->paddr + sl->datacount;
|
||||
sl_vend = sl->vaddr + sl->datacount;
|
||||
}
|
||||
|
||||
@ -1201,9 +1202,17 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
|
||||
goto cleanup;
|
||||
sl++;
|
||||
sl->vaddr = kvaddr;
|
||||
sl->paddr = curaddr;
|
||||
if (kvaddr != 0) {
|
||||
sl->pages = NULL;
|
||||
} else {
|
||||
sl->pages = PHYS_TO_VM_PAGE(curaddr);
|
||||
KASSERT(sl->pages != NULL,
|
||||
("%s: page at PA:0x%08lx is not "
|
||||
"in vm_page_array", __func__,
|
||||
curaddr));
|
||||
}
|
||||
sl->datacount = sgsize;
|
||||
sl->pages = PHYS_TO_VM_PAGE(curaddr);
|
||||
sl->dataoffs = curaddr & PAGE_MASK;
|
||||
} else
|
||||
sl->datacount += sgsize;
|
||||
}
|
||||
@ -1299,10 +1308,10 @@ dma_dcache_sync(struct sync_list *sl, bus_dmasync_op_t op)
|
||||
vm_offset_t va, tempva;
|
||||
bus_size_t size;
|
||||
|
||||
offset = sl->dataoffs;
|
||||
offset = sl->paddr & PAGE_MASK;
|
||||
m = sl->pages;
|
||||
size = sl->datacount;
|
||||
pa = VM_PAGE_TO_PHYS(m) | offset;
|
||||
pa = sl->paddr;
|
||||
|
||||
for ( ; size != 0; size -= len, pa += len, offset = 0, ++m) {
|
||||
tempva = 0;
|
||||
@ -1310,13 +1319,13 @@ dma_dcache_sync(struct sync_list *sl, bus_dmasync_op_t op)
|
||||
len = min(PAGE_SIZE - offset, size);
|
||||
tempva = pmap_quick_enter_page(m);
|
||||
va = tempva | offset;
|
||||
KASSERT(pa == (VM_PAGE_TO_PHYS(m) | offset),
|
||||
("unexpected vm_page_t phys: 0x%08x != 0x%08x",
|
||||
VM_PAGE_TO_PHYS(m) | offset, pa));
|
||||
} else {
|
||||
len = sl->datacount;
|
||||
va = sl->vaddr;
|
||||
}
|
||||
KASSERT(pa == (VM_PAGE_TO_PHYS(m) | offset),
|
||||
("unexpected vm_page_t phys: 0x%08x != 0x%08x",
|
||||
VM_PAGE_TO_PHYS(m) | offset, pa));
|
||||
|
||||
switch (op) {
|
||||
case BUS_DMASYNC_PREWRITE:
|
||||
|
@ -90,7 +90,7 @@ static struct ofw_compat_data compat_data[] = {
|
||||
{NULL, false}
|
||||
};
|
||||
|
||||
void
|
||||
static void
|
||||
pl310_print_config(struct pl310_softc *sc)
|
||||
{
|
||||
uint32_t aux, prefetch;
|
||||
|
@ -52,14 +52,17 @@ struct pcb {
|
||||
#define PCB_OWNFPU 0x00000001
|
||||
#define PCB_NOALIGNFLT 0x00000002
|
||||
caddr_t pcb_onfault; /* On fault handler */
|
||||
#ifdef ARM_NEW_PMAP
|
||||
uint32_t pcb_pagedir; /* TTB0 value */
|
||||
#else
|
||||
vm_offset_t pcb_pagedir; /* PT hooks */
|
||||
vm_offset_t pcb_pagedir; /* TTB0 value */
|
||||
/*
|
||||
* XXX:
|
||||
* Variables pcb_pl1vec, pcb_l1vec, pcb_dacr are used solely
|
||||
* by old PMAP. Keep them here for PCB binary compatibility
|
||||
* between old and new PMAP.
|
||||
*/
|
||||
uint32_t *pcb_pl1vec; /* PTR to vector_base L1 entry*/
|
||||
uint32_t pcb_l1vec; /* Value to stuff on ctx sw */
|
||||
u_int pcb_dacr; /* Domain Access Control Reg */
|
||||
#endif
|
||||
|
||||
struct vfp_state pcb_vfpstate; /* VP/NEON state */
|
||||
u_int pcb_vfpcpu; /* VP/NEON last cpu */
|
||||
} __aligned(8); /*
|
||||
|
@ -177,7 +177,6 @@ pl310_write4(struct pl310_softc *sc, bus_size_t off, uint32_t val)
|
||||
bus_write_4(sc->sc_mem_res, off, val);
|
||||
}
|
||||
|
||||
void pl310_print_config(struct pl310_softc *sc);
|
||||
void pl310_set_ram_latency(struct pl310_softc *sc, uint32_t which_reg,
|
||||
uint32_t read, uint32_t write, uint32_t setup);
|
||||
|
||||
|
@ -122,7 +122,7 @@ static device_method_t ehci_methods[] = {
|
||||
static driver_t ehci_driver = {
|
||||
"ehci",
|
||||
ehci_methods,
|
||||
sizeof(ehci_softc_t)
|
||||
sizeof(struct exynos_ehci_softc)
|
||||
};
|
||||
|
||||
static devclass_t ehci_devclass;
|
||||
|
@ -24,7 +24,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd July 25, 2015
|
||||
.Dd November 18, 2015
|
||||
.Dt LOADER 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -471,6 +471,14 @@ userland output (e.g.\& from
|
||||
.It Va currdev
|
||||
Selects the default device.
|
||||
Syntax for devices is odd.
|
||||
.It Va dumpdev
|
||||
Sets the device for kernel dumps.
|
||||
This can be used to ensure that a device is configured before the corresponding
|
||||
.Va dumpdev
|
||||
directive from
|
||||
.Xr rc.conf 5
|
||||
has been processed, allowing kernel panics that happen during the early stages
|
||||
of boot to be captured.
|
||||
.It Va init_chroot
|
||||
If set to a valid directory in the root file system, it causes
|
||||
.Xr init 8
|
||||
|
@ -74,7 +74,7 @@ dev/syscons/scvtb.c optional sc
|
||||
dev/tsec/if_tsec.c optional tsec
|
||||
dev/tsec/if_tsec_fdt.c optional tsec fdt
|
||||
dev/uart/uart_cpu_powerpc.c optional uart
|
||||
dev/usb/controller/ehci_fsl.c optional ehci mpc85xx
|
||||
dev/usb/controller/ehci_fsl.c optional ehci mpc85xx | ehci qoriq_dpaa
|
||||
dev/vt/hw/ofwfb/ofwfb.c optional vt aim
|
||||
kern/kern_clocksource.c standard
|
||||
kern/subr_dummy_vdso_tc.c standard
|
||||
@ -133,15 +133,15 @@ powerpc/mikrotik/platform_rb.c optional mikrotik
|
||||
powerpc/mpc85xx/atpic.c optional mpc85xx isa
|
||||
powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt
|
||||
powerpc/mpc85xx/ds1553_core.c optional ds1553
|
||||
powerpc/mpc85xx/fsl_sdhc.c optional mpc85xx sdhc
|
||||
powerpc/mpc85xx/fsl_sdhc.c optional mpc85xx sdhc | qoriq_dpaa sdhc
|
||||
powerpc/mpc85xx/i2c.c optional iicbus fdt
|
||||
powerpc/mpc85xx/isa.c optional mpc85xx isa
|
||||
powerpc/mpc85xx/lbc.c optional mpc85xx
|
||||
powerpc/mpc85xx/mpc85xx.c optional mpc85xx
|
||||
powerpc/mpc85xx/lbc.c optional mpc85xx | qoriq_dpaa
|
||||
powerpc/mpc85xx/mpc85xx.c optional mpc85xx | qoriq_dpaa
|
||||
powerpc/mpc85xx/mpc85xx_gpio.c optional mpc85xx gpio
|
||||
powerpc/mpc85xx/platform_mpc85xx.c optional mpc85xx
|
||||
powerpc/mpc85xx/pci_mpc85xx.c optional pci mpc85xx
|
||||
powerpc/mpc85xx/pci_mpc85xx_pcib.c optional pci mpc85xx
|
||||
powerpc/mpc85xx/platform_mpc85xx.c optional mpc85xx | qoriq_dpaa
|
||||
powerpc/mpc85xx/pci_mpc85xx.c optional pci mpc85xx | pci qoriq_dpaa
|
||||
powerpc/mpc85xx/pci_mpc85xx_pcib.c optional pci mpc85xx | pci qoriq_dpaa
|
||||
powerpc/ofw/ofw_machdep.c standard
|
||||
powerpc/ofw/ofw_pci.c optional pci
|
||||
powerpc/ofw/ofw_pcibus.c optional pci
|
||||
|
@ -157,15 +157,15 @@ DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/uts/intel -I$S/cddl/dev/dtrace/x86
|
||||
.endif
|
||||
DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/common/util -I$S -DDIS_MEM -DSMP
|
||||
DTRACE_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${DTRACE_CFLAGS}
|
||||
DTRACE_C= ${CC} -c ${DTRACE_CFLAGS} ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
|
||||
DTRACE_S= ${CC} -c ${DTRACE_ASM_CFLAGS} ${CDDL_CFLAGS} ${WERROR} ${.IMPSRC}
|
||||
DTRACE_C= ${CC} -c ${DTRACE_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
|
||||
DTRACE_S= ${CC} -c ${DTRACE_ASM_CFLAGS} ${WERROR} ${.IMPSRC}
|
||||
|
||||
# Special flags for managing the compat compiles for DTrace/FBT
|
||||
FBT_CFLAGS= -DBUILDING_DTRACE -nostdinc -I$S/cddl/dev/fbt/${MACHINE_CPUARCH} -I$S/cddl/dev/fbt -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common -I$S ${CDDL_CFLAGS}
|
||||
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
||||
FBT_CFLAGS+= -I$S/cddl/dev/fbt/x86
|
||||
.endif
|
||||
FBT_C= ${CC} -c ${FBT_CFLAGS} ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
|
||||
FBT_C= ${CC} -c ${FBT_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
|
||||
|
||||
.if ${MK_CTF} != "no"
|
||||
NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
|
||||
|
@ -650,6 +650,7 @@ BKTR_NEW_MSP34XX_DRIVER opt_bktr.h
|
||||
# Options for uart(4)
|
||||
UART_PPS_ON_CTS opt_uart.h
|
||||
UART_POLL_FREQ opt_uart.h
|
||||
UART_DEV_TOLERANCE_PCT opt_uart.h
|
||||
|
||||
# options for bus/device framework
|
||||
BUS_DEBUG opt_bus.h
|
||||
|
@ -21,6 +21,7 @@ GFB_NO_MODE_CHANGE opt_gfb.h
|
||||
MPC85XX opt_platform.h
|
||||
POWERMAC opt_platform.h
|
||||
PS3 opt_platform.h
|
||||
QORIQ_DPAA opt_platform.h
|
||||
MAMBO
|
||||
PSERIES
|
||||
PSIM
|
||||
|
@ -1282,8 +1282,16 @@ pmc_process_csw_in(struct thread *td)
|
||||
*/
|
||||
if (PMC_TO_MODE(pm) == PMC_MODE_TS) {
|
||||
mtx_pool_lock_spin(pmc_mtxpool, pm);
|
||||
|
||||
/*
|
||||
* Use the saved value calculated after the most recent
|
||||
* thread switch out to start this counter. Reset
|
||||
* the saved count in case another thread from this
|
||||
* process switches in before any threads switch out.
|
||||
*/
|
||||
newvalue = PMC_PCPU_SAVED(cpu,ri) =
|
||||
pp->pp_pmcs[ri].pp_pmcval;
|
||||
pp->pp_pmcs[ri].pp_pmcval = pm->pm_sc.pm_reloadcount;
|
||||
mtx_pool_unlock_spin(pmc_mtxpool, pm);
|
||||
} else {
|
||||
KASSERT(PMC_TO_MODE(pm) == PMC_MODE_TC,
|
||||
@ -1431,31 +1439,43 @@ pmc_process_csw_out(struct thread *td)
|
||||
|
||||
pcd->pcd_read_pmc(cpu, adjri, &newvalue);
|
||||
|
||||
tmp = newvalue - PMC_PCPU_SAVED(cpu,ri);
|
||||
|
||||
PMCDBG3(CSW,SWO,1,"cpu=%d ri=%d tmp=%jd", cpu, ri,
|
||||
tmp);
|
||||
|
||||
if (mode == PMC_MODE_TS) {
|
||||
PMCDBG3(CSW,SWO,1,"cpu=%d ri=%d tmp=%jd (samp)",
|
||||
cpu, ri, PMC_PCPU_SAVED(cpu,ri) - newvalue);
|
||||
|
||||
/*
|
||||
* For sampling process-virtual PMCs,
|
||||
* we expect the count to be
|
||||
* decreasing as the 'value'
|
||||
* programmed into the PMC is the
|
||||
* number of events to be seen till
|
||||
* the next sampling interrupt.
|
||||
* newvalue is the number of events to be seen
|
||||
* until the next sampling interrupt.
|
||||
* We can just add the events left from this
|
||||
* invocation to the counter, then adjust
|
||||
* in case we overflow our range.
|
||||
*
|
||||
* (Recall that we reload the counter every
|
||||
* time we use it.)
|
||||
*/
|
||||
if (tmp < 0)
|
||||
tmp += pm->pm_sc.pm_reloadcount;
|
||||
mtx_pool_lock_spin(pmc_mtxpool, pm);
|
||||
pp->pp_pmcs[ri].pp_pmcval -= tmp;
|
||||
if ((int64_t) pp->pp_pmcs[ri].pp_pmcval <= 0)
|
||||
pp->pp_pmcs[ri].pp_pmcval +=
|
||||
|
||||
pp->pp_pmcs[ri].pp_pmcval += newvalue;
|
||||
if (pp->pp_pmcs[ri].pp_pmcval >
|
||||
pm->pm_sc.pm_reloadcount)
|
||||
pp->pp_pmcs[ri].pp_pmcval -=
|
||||
pm->pm_sc.pm_reloadcount;
|
||||
KASSERT(pp->pp_pmcs[ri].pp_pmcval > 0 &&
|
||||
pp->pp_pmcs[ri].pp_pmcval <=
|
||||
pm->pm_sc.pm_reloadcount,
|
||||
("[pmc,%d] pp_pmcval outside of expected "
|
||||
"range cpu=%d ri=%d pp_pmcval=%jx "
|
||||
"pm_reloadcount=%jx", __LINE__, cpu, ri,
|
||||
pp->pp_pmcs[ri].pp_pmcval,
|
||||
pm->pm_sc.pm_reloadcount));
|
||||
mtx_pool_unlock_spin(pmc_mtxpool, pm);
|
||||
|
||||
} else {
|
||||
tmp = newvalue - PMC_PCPU_SAVED(cpu,ri);
|
||||
|
||||
PMCDBG3(CSW,SWO,1,"cpu=%d ri=%d tmp=%jd (count)",
|
||||
cpu, ri, tmp);
|
||||
|
||||
/*
|
||||
* For counting process-virtual PMCs,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -604,7 +604,7 @@ ispioctl(struct cdev *dev, u_long c, caddr_t addr, int flags, struct thread *td)
|
||||
{
|
||||
int needmarker;
|
||||
struct isp_fc_tsk_mgmt *fct = (struct isp_fc_tsk_mgmt *) addr;
|
||||
uint16_t loopid;
|
||||
uint16_t nphdl;
|
||||
mbreg_t mbs;
|
||||
|
||||
if (IS_SCSI(isp)) {
|
||||
@ -618,7 +618,7 @@ ispioctl(struct cdev *dev, u_long c, caddr_t addr, int flags, struct thread *td)
|
||||
}
|
||||
|
||||
needmarker = retval = 0;
|
||||
loopid = fct->loopid;
|
||||
nphdl = fct->loopid;
|
||||
ISP_LOCK(isp);
|
||||
if (IS_24XX(isp)) {
|
||||
uint8_t local[QENTRY_LEN];
|
||||
@ -630,7 +630,7 @@ ispioctl(struct cdev *dev, u_long c, caddr_t addr, int flags, struct thread *td)
|
||||
|
||||
for (i = 0; i < MAX_FC_TARG; i++) {
|
||||
lp = &fcp->portdb[i];
|
||||
if (lp->handle == loopid) {
|
||||
if (lp->handle == nphdl) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -714,34 +714,34 @@ ispioctl(struct cdev *dev, u_long c, caddr_t addr, int flags, struct thread *td)
|
||||
} else {
|
||||
MBSINIT(&mbs, 0, MBLOGALL, 0);
|
||||
if (ISP_CAP_2KLOGIN(isp) == 0) {
|
||||
loopid <<= 8;
|
||||
nphdl <<= 8;
|
||||
}
|
||||
switch (fct->action) {
|
||||
case IPT_CLEAR_ACA:
|
||||
mbs.param[0] = MBOX_CLEAR_ACA;
|
||||
mbs.param[1] = loopid;
|
||||
mbs.param[1] = nphdl;
|
||||
mbs.param[2] = fct->lun;
|
||||
break;
|
||||
case IPT_TARGET_RESET:
|
||||
mbs.param[0] = MBOX_TARGET_RESET;
|
||||
mbs.param[1] = loopid;
|
||||
mbs.param[1] = nphdl;
|
||||
needmarker = 1;
|
||||
break;
|
||||
case IPT_LUN_RESET:
|
||||
mbs.param[0] = MBOX_LUN_RESET;
|
||||
mbs.param[1] = loopid;
|
||||
mbs.param[1] = nphdl;
|
||||
mbs.param[2] = fct->lun;
|
||||
needmarker = 1;
|
||||
break;
|
||||
case IPT_CLEAR_TASK_SET:
|
||||
mbs.param[0] = MBOX_CLEAR_TASK_SET;
|
||||
mbs.param[1] = loopid;
|
||||
mbs.param[1] = nphdl;
|
||||
mbs.param[2] = fct->lun;
|
||||
needmarker = 1;
|
||||
break;
|
||||
case IPT_ABORT_TASK_SET:
|
||||
mbs.param[0] = MBOX_ABORT_TASK_SET;
|
||||
mbs.param[1] = loopid;
|
||||
mbs.param[1] = nphdl;
|
||||
mbs.param[2] = fct->lun;
|
||||
needmarker = 1;
|
||||
break;
|
||||
@ -1107,7 +1107,7 @@ isp_dump_atpd(ispsoftc_t *isp, tstate_t *tptr)
|
||||
const char *states[8] = { "Free", "ATIO", "CAM", "CTIO", "LAST_CTIO", "PDON", "?6", "7" };
|
||||
|
||||
for (atp = tptr->atpool; atp < &tptr->atpool[ATPDPSIZE]; atp++) {
|
||||
xpt_print(tptr->owner, "ATP: [0x%x] origdlen %u bytes_xfrd %u lun %u nphdl 0x%04x s_id 0x%06x d_id 0x%06x oxid 0x%04x state %s\n",
|
||||
xpt_print(tptr->owner, "ATP: [0x%x] origdlen %u bytes_xfrd %u lun %x nphdl 0x%04x s_id 0x%06x d_id 0x%06x oxid 0x%04x state %s\n",
|
||||
atp->tag, atp->orig_datalen, atp->bytes_xfered, atp->lun, atp->nphdl, atp->sid, atp->portid, atp->oxid, states[atp->state & 0x7]);
|
||||
}
|
||||
}
|
||||
@ -2295,7 +2295,7 @@ isp_handle_platform_atio(ispsoftc_t *isp, at_entry_t *aep)
|
||||
* should, in fact, get this, is in the case that we've
|
||||
* run out of ATIOS.
|
||||
*/
|
||||
xpt_print(tptr->owner, "no %s for lun %d from initiator %d\n", (atp == NULL && atiop == NULL)? "ATIOs *or* ATPS" :
|
||||
xpt_print(tptr->owner, "no %s for lun %x from initiator %d\n", (atp == NULL && atiop == NULL)? "ATIOs *or* ATPS" :
|
||||
((atp == NULL)? "ATPs" : "ATIOs"), aep->at_lun, aep->at_iid);
|
||||
isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0);
|
||||
if (atp) {
|
||||
@ -2347,7 +2347,7 @@ isp_handle_platform_atio(ispsoftc_t *isp, at_entry_t *aep)
|
||||
atp->cdb0 = atiop->cdb_io.cdb_bytes[0];
|
||||
atp->tattr = aep->at_tag_type;
|
||||
atp->state = ATPD_STATE_CAM;
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "ATIO[0x%x] CDB=0x%x lun %d", aep->at_tag_val, atp->cdb0, atp->lun);
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "ATIO[0x%x] CDB=0x%x lun %x", aep->at_tag_val, atp->cdb0, atp->lun);
|
||||
rls_lun_statep(isp, tptr);
|
||||
}
|
||||
|
||||
@ -3103,8 +3103,8 @@ isp_handle_platform_notify_fc(ispsoftc_t *isp, in_fcentry_t *inp)
|
||||
case IN_ABORT_TASK:
|
||||
{
|
||||
tstate_t *tptr;
|
||||
uint16_t lun;
|
||||
uint32_t loopid, sid;
|
||||
uint16_t nphdl, lun;
|
||||
uint32_t sid;
|
||||
uint64_t wwn;
|
||||
atio_private_data_t *atp;
|
||||
fcportdb_t *lp;
|
||||
@ -3119,11 +3119,11 @@ isp_handle_platform_notify_fc(ispsoftc_t *isp, in_fcentry_t *inp)
|
||||
lun = inp->in_lun;
|
||||
}
|
||||
if (ISP_CAP_2KLOGIN(isp)) {
|
||||
loopid = ((in_fcentry_e_t *)inp)->in_iid;
|
||||
nphdl = ((in_fcentry_e_t *)inp)->in_iid;
|
||||
} else {
|
||||
loopid = inp->in_iid;
|
||||
nphdl = inp->in_iid;
|
||||
}
|
||||
if (isp_find_pdb_by_handle(isp, 0, loopid, &lp)) {
|
||||
if (isp_find_pdb_by_handle(isp, 0, nphdl, &lp)) {
|
||||
wwn = lp->port_wwn;
|
||||
sid = lp->portid;
|
||||
} else {
|
||||
@ -3134,7 +3134,7 @@ isp_handle_platform_notify_fc(ispsoftc_t *isp, in_fcentry_t *inp)
|
||||
if (tptr == NULL) {
|
||||
tptr = get_lun_statep(isp, 0, CAM_LUN_WILDCARD);
|
||||
if (tptr == NULL) {
|
||||
isp_prt(isp, ISP_LOGWARN, "ABORT TASK for lun %u- but no tstate", lun);
|
||||
isp_prt(isp, ISP_LOGWARN, "ABORT TASK for lun %x, but no tstate", lun);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -3159,7 +3159,7 @@ isp_handle_platform_notify_fc(ispsoftc_t *isp, in_fcentry_t *inp)
|
||||
nt->nt_hba = isp;
|
||||
nt->nt_tgt = FCPARAM(isp, 0)->isp_wwpn;
|
||||
nt->nt_wwn = wwn;
|
||||
nt->nt_nphdl = loopid;
|
||||
nt->nt_nphdl = nphdl;
|
||||
nt->nt_sid = sid;
|
||||
nt->nt_did = PORT_ANY;
|
||||
nt->nt_lun = lun;
|
||||
|
@ -400,31 +400,24 @@ isp_fc_runstate(ispsoftc_t *isp, int chan, int tval)
|
||||
if (fcp->role == ISP_ROLE_NONE) {
|
||||
return (0);
|
||||
}
|
||||
if (fcp->isp_fwstate < FW_READY || fcp->isp_loopstate < LOOP_PDB_RCVD) {
|
||||
if (isp_control(isp, ISPCTL_FCLINK_TEST, chan, tval) != 0) {
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: linktest failed for channel %d", chan);
|
||||
return (-1);
|
||||
}
|
||||
if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate < LOOP_PDB_RCVD) {
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: f/w not ready for channel %d", chan);
|
||||
return (-1);
|
||||
}
|
||||
if (isp_control(isp, ISPCTL_FCLINK_TEST, chan, tval) != 0) {
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: linktest failed for channel %d", chan);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (isp_control(isp, ISPCTL_SCAN_LOOP, chan) != 0) {
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan loop fails on channel %d", chan);
|
||||
return (LOOP_PDB_RCVD);
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan loop failed on channel %d", chan);
|
||||
return (LOOP_LTEST_DONE);
|
||||
}
|
||||
if (isp_control(isp, ISPCTL_SCAN_FABRIC, chan) != 0) {
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan fabric fails on channel %d", chan);
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan fabric failed on channel %d", chan);
|
||||
return (LOOP_LSCAN_DONE);
|
||||
}
|
||||
if (isp_control(isp, ISPCTL_PDB_SYNC, chan) != 0) {
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: pdb_sync fails on channel %d", chan);
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: pdb_sync failed on channel %d", chan);
|
||||
return (LOOP_FSCAN_DONE);
|
||||
}
|
||||
if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate != LOOP_READY) {
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: f/w not ready again on channel %d", chan);
|
||||
if (fcp->isp_loopstate != LOOP_READY) {
|
||||
isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: not ready again on channel %d", chan);
|
||||
return (-1);
|
||||
}
|
||||
return (0);
|
||||
@ -536,7 +529,7 @@ isp_fc_fw_statename(int state)
|
||||
{
|
||||
switch (state) {
|
||||
case FW_CONFIG_WAIT: return "Config Wait";
|
||||
case FW_WAIT_AL_PA: return "Waiting for AL_PA";
|
||||
case FW_WAIT_LINK: return "Wait Link";
|
||||
case FW_WAIT_LOGIN: return "Wait Login";
|
||||
case FW_READY: return "Ready";
|
||||
case FW_LOSS_OF_SYNC: return "Loss Of Sync";
|
||||
@ -552,9 +545,9 @@ isp_fc_loop_statename(int state)
|
||||
{
|
||||
switch (state) {
|
||||
case LOOP_NIL: return "NIL";
|
||||
case LOOP_LIP_RCVD: return "LIP Received";
|
||||
case LOOP_PDB_RCVD: return "PDB Received";
|
||||
case LOOP_SCANNING_LOOP: return "Scanning";
|
||||
case LOOP_TESTING_LINK: return "Testing Link";
|
||||
case LOOP_LTEST_DONE: return "Link Test Done";
|
||||
case LOOP_SCANNING_LOOP: return "Scanning Loop";
|
||||
case LOOP_LSCAN_DONE: return "Loop Scan Done";
|
||||
case LOOP_SCANNING_FABRIC: return "Scanning Fabric";
|
||||
case LOOP_FSCAN_DONE: return "Fabric Scan Done";
|
||||
@ -568,7 +561,7 @@ const char *
|
||||
isp_fc_toponame(fcparam *fcp)
|
||||
{
|
||||
|
||||
if (fcp->isp_fwstate != FW_READY) {
|
||||
if (fcp->isp_loopstate < LOOP_LTEST_DONE) {
|
||||
return "Unavailable";
|
||||
}
|
||||
switch (fcp->isp_topo) {
|
||||
@ -604,7 +597,8 @@ isp_fc_enable_vp(ispsoftc_t *isp, int chan)
|
||||
vp->vp_mod_cnt = 1;
|
||||
vp->vp_mod_idx0 = chan;
|
||||
vp->vp_mod_cmd = VP_MODIFY_ENA;
|
||||
vp->vp_mod_ports[0].options = ICB2400_VPOPT_ENABLED;
|
||||
vp->vp_mod_ports[0].options = ICB2400_VPOPT_ENABLED |
|
||||
ICB2400_VPOPT_ENA_SNSLOGIN;
|
||||
if (fcp->role & ISP_ROLE_INITIATOR) {
|
||||
vp->vp_mod_ports[0].options |= ICB2400_VPOPT_INI_ENABLE;
|
||||
}
|
||||
@ -1733,6 +1727,10 @@ isp_get_ridacq(ispsoftc_t *isp, isp_ridacq_t *src, isp_ridacq_t *dst)
|
||||
int i;
|
||||
isp_get_hdr(isp, &src->ridacq_hdr, &dst->ridacq_hdr);
|
||||
ISP_IOXGET_32(isp, &src->ridacq_handle, dst->ridacq_handle);
|
||||
ISP_IOXGET_8(isp, &src->ridacq_vp_acquired, dst->ridacq_vp_acquired);
|
||||
ISP_IOXGET_8(isp, &src->ridacq_vp_setup, dst->ridacq_vp_setup);
|
||||
ISP_IOXGET_8(isp, &src->ridacq_vp_index, dst->ridacq_vp_index);
|
||||
ISP_IOXGET_8(isp, &src->ridacq_vp_status, dst->ridacq_vp_status);
|
||||
ISP_IOXGET_16(isp, &src->ridacq_vp_port_lo, dst->ridacq_vp_port_lo);
|
||||
ISP_IOXGET_8(isp, &src->ridacq_vp_port_hi, dst->ridacq_vp_port_hi);
|
||||
ISP_IOXGET_8(isp, &src->ridacq_format, dst->ridacq_format);
|
||||
@ -1742,17 +1740,6 @@ isp_get_ridacq(ispsoftc_t *isp, isp_ridacq_t *src, isp_ridacq_t *dst)
|
||||
for (i = 0; i < sizeof (src->ridacq_reserved1) / sizeof (src->ridacq_reserved1[0]); i++) {
|
||||
ISP_IOXGET_16(isp, &src->ridacq_reserved1[i], dst->ridacq_reserved1[i]);
|
||||
}
|
||||
if (dst->ridacq_format == 0) {
|
||||
ISP_IOXGET_8(isp, &src->un.type0.ridacq_vp_acquired, dst->un.type0.ridacq_vp_acquired);
|
||||
ISP_IOXGET_8(isp, &src->un.type0.ridacq_vp_setup, dst->un.type0.ridacq_vp_setup);
|
||||
ISP_IOXGET_16(isp, &src->un.type0.ridacq_reserved0, dst->un.type0.ridacq_reserved0);
|
||||
} else if (dst->ridacq_format == 1) {
|
||||
ISP_IOXGET_16(isp, &src->un.type1.ridacq_vp_count, dst->un.type1.ridacq_vp_count);
|
||||
ISP_IOXGET_8(isp, &src->un.type1.ridacq_vp_index, dst->un.type1.ridacq_vp_index);
|
||||
ISP_IOXGET_8(isp, &src->un.type1.ridacq_vp_status, dst->un.type1.ridacq_vp_status);
|
||||
} else {
|
||||
ISP_MEMZERO(&dst->un, sizeof (dst->un));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2169,6 +2156,20 @@ isp_put_rft_id(ispsoftc_t *isp, rft_id_t *src, rft_id_t *dst)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
isp_put_rff_id(ispsoftc_t *isp, rff_id_t *src, rff_id_t *dst)
|
||||
{
|
||||
int i;
|
||||
|
||||
isp_put_ct_hdr(isp, &src->rffid_hdr, &dst->rffid_hdr);
|
||||
ISP_IOZPUT_8(isp, src->rffid_reserved, &dst->rffid_reserved);
|
||||
for (i = 0; i < 3; i++)
|
||||
ISP_IOZPUT_8(isp, src->rffid_portid[i], &dst->rffid_portid[i]);
|
||||
ISP_IOZPUT_16(isp, src->rffid_reserved2, &dst->rffid_reserved2);
|
||||
ISP_IOZPUT_8(isp, src->rffid_fc4features, &dst->rffid_fc4features);
|
||||
ISP_IOZPUT_8(isp, src->rffid_fc4type, &dst->rffid_fc4type);
|
||||
}
|
||||
|
||||
void
|
||||
isp_get_ct_hdr(ispsoftc_t *isp, ct_hdr_t *src, ct_hdr_t *dst)
|
||||
{
|
||||
@ -2482,7 +2483,7 @@ isp_find_pdb_by_wwn(ispsoftc_t *isp, int chan, uint64_t wwn, fcportdb_t **lptr)
|
||||
#ifdef ISP_TARGET_MODE
|
||||
|
||||
int
|
||||
isp_find_pdb_by_handle(ispsoftc_t *isp, int chan, uint32_t handle, fcportdb_t **lptr)
|
||||
isp_find_pdb_by_handle(ispsoftc_t *isp, int chan, uint16_t handle, fcportdb_t **lptr)
|
||||
{
|
||||
fcparam *fcp;
|
||||
int i;
|
||||
@ -2533,7 +2534,8 @@ isp_find_chan_by_did(ispsoftc_t *isp, uint32_t did, uint16_t *cp)
|
||||
*cp = ISP_NOCHAN;
|
||||
for (chan = 0; chan < isp->isp_nchan; chan++) {
|
||||
fcparam *fcp = FCPARAM(isp, chan);
|
||||
if ((fcp->role & ISP_ROLE_TARGET) == 0 || fcp->isp_fwstate != FW_READY || fcp->isp_loopstate < LOOP_PDB_RCVD) {
|
||||
if ((fcp->role & ISP_ROLE_TARGET) == 0 ||
|
||||
fcp->isp_loopstate < LOOP_LTEST_DONE) {
|
||||
continue;
|
||||
}
|
||||
if (fcp->isp_portid == did) {
|
||||
|
@ -148,6 +148,7 @@ void isp_get_fc_hdr(ispsoftc_t *, fc_hdr_t *, fc_hdr_t *);
|
||||
void isp_put_fc_hdr(ispsoftc_t *, fc_hdr_t *, fc_hdr_t *);
|
||||
void isp_get_fcp_cmnd_iu(ispsoftc_t *, fcp_cmnd_iu_t *, fcp_cmnd_iu_t *);
|
||||
void isp_put_rft_id(ispsoftc_t *, rft_id_t *, rft_id_t *);
|
||||
void isp_put_rff_id(ispsoftc_t *, rff_id_t *, rff_id_t *);
|
||||
void isp_get_ct_hdr(ispsoftc_t *isp, ct_hdr_t *, ct_hdr_t *);
|
||||
void isp_put_ct_hdr(ispsoftc_t *isp, ct_hdr_t *, ct_hdr_t *);
|
||||
void isp_put_fcp_rsp_iu(ispsoftc_t *isp, fcp_rsp_iu_t *, fcp_rsp_iu_t *);
|
||||
@ -172,7 +173,7 @@ void isp_destroy_tgt_handle(ispsoftc_t *, uint32_t);
|
||||
#endif
|
||||
int isp_find_pdb_by_wwn(ispsoftc_t *, int, uint64_t, fcportdb_t **);
|
||||
#ifdef ISP_TARGET_MODE
|
||||
int isp_find_pdb_by_handle(ispsoftc_t *, int, uint32_t, fcportdb_t **);
|
||||
int isp_find_pdb_by_handle(ispsoftc_t *, int, uint16_t, fcportdb_t **);
|
||||
int isp_find_pdb_by_sid(ispsoftc_t *, int, uint32_t, fcportdb_t **);
|
||||
void isp_find_chan_by_did(ispsoftc_t *, uint32_t, uint16_t *);
|
||||
void isp_add_wwn_entry(ispsoftc_t *, int, uint64_t, uint64_t, uint16_t, uint32_t, uint16_t);
|
||||
|
@ -138,6 +138,20 @@ typedef struct {
|
||||
uint32_t rftid_fc4types[8];
|
||||
} rft_id_t;
|
||||
|
||||
/*
|
||||
* RFF_ID Requet CT_IU
|
||||
*
|
||||
* Source: INCITS 463-2010 Generic Services 6 Section 5.2.5.34
|
||||
*/
|
||||
typedef struct {
|
||||
ct_hdr_t rffid_hdr;
|
||||
uint8_t rffid_reserved;
|
||||
uint8_t rffid_portid[3];
|
||||
uint16_t rffid_reserved2;
|
||||
uint8_t rffid_fc4features;
|
||||
uint8_t rffid_fc4type;
|
||||
} rff_id_t;
|
||||
|
||||
/*
|
||||
* FCP Response IU and bits of interest
|
||||
* Source: NCITS T10, Project 1828D, Revision 02b (aka FCP4r02b)
|
||||
|
@ -52,8 +52,8 @@ __FBSDID("$FreeBSD$");
|
||||
#endif
|
||||
|
||||
#ifdef ISP_TARGET_MODE
|
||||
static const char atiocope[] = "ATIO returned for lun %d because it was in the middle of Bus Device Reset on bus %d";
|
||||
static const char atior[] = "ATIO returned on for lun %d on from loopid %d because a Bus Reset occurred on bus %d";
|
||||
static const char atiocope[] = "ATIO returned for LUN %x because it was in the middle of Bus Device Reset on bus %d";
|
||||
static const char atior[] = "ATIO returned for LUN %x from handle 0x%x because a Bus Reset occurred on bus %d";
|
||||
static const char rqo[] = "%s: Request Queue Overflow";
|
||||
|
||||
static void isp_got_msg(ispsoftc_t *, in_entry_t *);
|
||||
@ -931,20 +931,20 @@ static void
|
||||
isp_got_msg_fc(ispsoftc_t *isp, in_fcentry_t *inp)
|
||||
{
|
||||
isp_notify_t notify;
|
||||
static const char f1[] = "%s from N-port handle 0x%x lun %d seq 0x%x";
|
||||
static const char f2[] = "unknown %s 0x%x lun %d N-Port handle 0x%x task flags 0x%x seq 0x%x\n";
|
||||
uint16_t seqid, loopid;
|
||||
static const char f1[] = "%s from N-port handle 0x%x lun %x seq 0x%x";
|
||||
static const char f2[] = "unknown %s 0x%x lun %x N-Port handle 0x%x task flags 0x%x seq 0x%x\n";
|
||||
uint16_t seqid, nphdl;
|
||||
|
||||
ISP_MEMZERO(¬ify, sizeof (isp_notify_t));
|
||||
notify.nt_hba = isp;
|
||||
notify.nt_wwn = INI_ANY;
|
||||
if (ISP_CAP_2KLOGIN(isp)) {
|
||||
notify.nt_nphdl = ((in_fcentry_e_t *)inp)->in_iid;
|
||||
loopid = ((in_fcentry_e_t *)inp)->in_iid;
|
||||
nphdl = ((in_fcentry_e_t *)inp)->in_iid;
|
||||
seqid = ((in_fcentry_e_t *)inp)->in_seqid;
|
||||
} else {
|
||||
notify.nt_nphdl = inp->in_iid;
|
||||
loopid = inp->in_iid;
|
||||
nphdl = inp->in_iid;
|
||||
seqid = inp->in_seqid;
|
||||
}
|
||||
notify.nt_sid = PORT_ANY;
|
||||
@ -965,28 +965,28 @@ isp_got_msg_fc(ispsoftc_t *isp, in_fcentry_t *inp)
|
||||
notify.nt_lreserved = inp;
|
||||
|
||||
if (inp->in_status != IN_MSG_RECEIVED) {
|
||||
isp_prt(isp, ISP_LOGINFO, f2, "immediate notify status", inp->in_status, notify.nt_lun, loopid, inp->in_task_flags, inp->in_seqid);
|
||||
isp_prt(isp, ISP_LOGINFO, f2, "immediate notify status", inp->in_status, notify.nt_lun, nphdl, inp->in_task_flags, inp->in_seqid);
|
||||
isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inp);
|
||||
return;
|
||||
}
|
||||
|
||||
if (inp->in_task_flags & TASK_FLAGS_ABORT_TASK_SET) {
|
||||
isp_prt(isp, ISP_LOGINFO, f1, "ABORT TASK SET", loopid, notify.nt_lun, inp->in_seqid);
|
||||
isp_prt(isp, ISP_LOGINFO, f1, "ABORT TASK SET", nphdl, notify.nt_lun, inp->in_seqid);
|
||||
notify.nt_ncode = NT_ABORT_TASK_SET;
|
||||
} else if (inp->in_task_flags & TASK_FLAGS_CLEAR_TASK_SET) {
|
||||
isp_prt(isp, ISP_LOGINFO, f1, "CLEAR TASK SET", loopid, notify.nt_lun, inp->in_seqid);
|
||||
isp_prt(isp, ISP_LOGINFO, f1, "CLEAR TASK SET", nphdl, notify.nt_lun, inp->in_seqid);
|
||||
notify.nt_ncode = NT_CLEAR_TASK_SET;
|
||||
} else if (inp->in_task_flags & TASK_FLAGS_LUN_RESET) {
|
||||
isp_prt(isp, ISP_LOGINFO, f1, "LUN RESET", loopid, notify.nt_lun, inp->in_seqid);
|
||||
isp_prt(isp, ISP_LOGINFO, f1, "LUN RESET", nphdl, notify.nt_lun, inp->in_seqid);
|
||||
notify.nt_ncode = NT_LUN_RESET;
|
||||
} else if (inp->in_task_flags & TASK_FLAGS_TARGET_RESET) {
|
||||
isp_prt(isp, ISP_LOGINFO, f1, "TARGET RESET", loopid, notify.nt_lun, inp->in_seqid);
|
||||
isp_prt(isp, ISP_LOGINFO, f1, "TARGET RESET", nphdl, notify.nt_lun, inp->in_seqid);
|
||||
notify.nt_ncode = NT_TARGET_RESET;
|
||||
} else if (inp->in_task_flags & TASK_FLAGS_CLEAR_ACA) {
|
||||
isp_prt(isp, ISP_LOGINFO, f1, "CLEAR ACA", loopid, notify.nt_lun, inp->in_seqid);
|
||||
isp_prt(isp, ISP_LOGINFO, f1, "CLEAR ACA", nphdl, notify.nt_lun, inp->in_seqid);
|
||||
notify.nt_ncode = NT_CLEAR_ACA;
|
||||
} else {
|
||||
isp_prt(isp, ISP_LOGWARN, f2, "task flag", inp->in_status, notify.nt_lun, loopid, inp->in_task_flags, inp->in_seqid);
|
||||
isp_prt(isp, ISP_LOGWARN, f2, "task flag", inp->in_status, notify.nt_lun, nphdl, inp->in_task_flags, inp->in_seqid);
|
||||
isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inp);
|
||||
return;
|
||||
}
|
||||
@ -997,8 +997,8 @@ static void
|
||||
isp_got_tmf_24xx(ispsoftc_t *isp, at7_entry_t *aep)
|
||||
{
|
||||
isp_notify_t notify;
|
||||
static const char f1[] = "%s from PortID 0x%06x lun %d seq 0x%08x";
|
||||
static const char f2[] = "unknown Task Flag 0x%x lun %d PortID 0x%x tag 0x%08x";
|
||||
static const char f1[] = "%s from PortID 0x%06x lun %x seq 0x%08x";
|
||||
static const char f2[] = "unknown Task Flag 0x%x lun %x PortID 0x%x tag 0x%08x";
|
||||
uint16_t chan;
|
||||
uint32_t sid, did;
|
||||
|
||||
@ -1146,7 +1146,7 @@ isp_notify_ack(ispsoftc_t *isp, void *arg)
|
||||
} else {
|
||||
isp_put_notify_ack_fc(isp, na, (na_fcentry_t *)outp);
|
||||
}
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "notify ack loopid %u seqid %x flags %x tflags %x response %x", iid, na->na_seqid,
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "notify ack handle %x seqid %x flags %x tflags %x response %x", iid, na->na_seqid,
|
||||
na->na_flags, na->na_task_flags, na->na_response);
|
||||
} else {
|
||||
na_entry_t *na = (na_entry_t *) storage;
|
||||
@ -1166,7 +1166,7 @@ isp_notify_ack(ispsoftc_t *isp, void *arg)
|
||||
na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK;
|
||||
na->na_header.rqs_entry_count = 1;
|
||||
isp_put_notify_ack(isp, na, (na_entry_t *)outp);
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "notify ack loopid %u lun %u tgt %u seqid %x event %x", na->na_iid, na->na_lun, na->na_tgt, na->na_seqid, na->na_event);
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "notify ack handle %x lun %x tgt %u seqid %x event %x", na->na_iid, na->na_lun, na->na_tgt, na->na_seqid, na->na_event);
|
||||
}
|
||||
ISP_TDQE(isp, "isp_notify_ack", isp->isp_reqidx, storage);
|
||||
ISP_SYNC_REQUEST(isp);
|
||||
@ -1274,7 +1274,7 @@ isp_handle_atio(ispsoftc_t *isp, at_entry_t *aep)
|
||||
/*
|
||||
* ATIO rejected by the firmware due to disabled lun.
|
||||
*/
|
||||
isp_prt(isp, ISP_LOGERR, "rejected ATIO for disabled lun %d", lun);
|
||||
isp_prt(isp, ISP_LOGERR, "rejected ATIO for disabled lun %x", lun);
|
||||
break;
|
||||
case AT_NOCAP:
|
||||
/*
|
||||
@ -1282,7 +1282,7 @@ isp_handle_atio(ispsoftc_t *isp, at_entry_t *aep)
|
||||
* We sent an ATIO that overflowed the firmware's
|
||||
* command resource count.
|
||||
*/
|
||||
isp_prt(isp, ISP_LOGERR, "rejected ATIO for lun %d because of command count overflow", lun);
|
||||
isp_prt(isp, ISP_LOGERR, "rejected ATIO for lun %x because of command count overflow", lun);
|
||||
break;
|
||||
|
||||
case AT_BDR_MSG:
|
||||
@ -1320,7 +1320,7 @@ isp_handle_atio(ispsoftc_t *isp, at_entry_t *aep)
|
||||
|
||||
|
||||
default:
|
||||
isp_prt(isp, ISP_LOGERR, "Unknown ATIO status 0x%x from loopid %d for lun %d", aep->at_status, aep->at_iid, lun);
|
||||
isp_prt(isp, ISP_LOGERR, "Unknown ATIO status 0x%x from handle %x for lun %x", aep->at_status, aep->at_iid, lun);
|
||||
(void) isp_target_put_atio(isp, aep);
|
||||
break;
|
||||
}
|
||||
@ -1408,7 +1408,7 @@ isp_handle_atio2(ispsoftc_t *isp, at2_entry_t *aep)
|
||||
|
||||
|
||||
default:
|
||||
isp_prt(isp, ISP_LOGERR, "Unknown ATIO2 status 0x%x from loopid %d for lun %x", aep->at_status, iid, lun);
|
||||
isp_prt(isp, ISP_LOGERR, "Unknown ATIO2 status 0x%x from handle %d for lun %x", aep->at_status, iid, lun);
|
||||
(void) isp_target_put_atio(isp, aep);
|
||||
break;
|
||||
}
|
||||
@ -1483,7 +1483,7 @@ isp_handle_ctio(ispsoftc_t *isp, ct_entry_t *ct)
|
||||
* CTIO rejected by the firmware due to disabled lun.
|
||||
* "Cannot Happen".
|
||||
*/
|
||||
isp_prt(isp, ISP_LOGERR, "Firmware rejected CTIO for disabled lun %d", ct->ct_lun);
|
||||
isp_prt(isp, ISP_LOGERR, "Firmware rejected CTIO for disabled lun %x", ct->ct_lun);
|
||||
break;
|
||||
|
||||
case CT_NOPATH:
|
||||
@ -1493,7 +1493,7 @@ isp_handle_ctio(ispsoftc_t *isp, ct_entry_t *ct)
|
||||
* we tried to access the bus while a non-disconnecting
|
||||
* command is in process.
|
||||
*/
|
||||
isp_prt(isp, ISP_LOGERR, "Firmware rejected CTIO for bad nexus %d/%d/%d", ct->ct_iid, ct->ct_tgt, ct->ct_lun);
|
||||
isp_prt(isp, ISP_LOGERR, "Firmware rejected CTIO for bad nexus %d/%d/%x", ct->ct_iid, ct->ct_tgt, ct->ct_lun);
|
||||
break;
|
||||
|
||||
case CT_RSELTMO:
|
||||
|
@ -1485,18 +1485,10 @@ typedef struct {
|
||||
typedef struct {
|
||||
isphdr_t ridacq_hdr;
|
||||
uint32_t ridacq_handle;
|
||||
union {
|
||||
struct {
|
||||
uint8_t ridacq_vp_acquired;
|
||||
uint8_t ridacq_vp_setup;
|
||||
uint16_t ridacq_reserved0;
|
||||
} type0; /* type 0 */
|
||||
struct {
|
||||
uint16_t ridacq_vp_count;
|
||||
uint8_t ridacq_vp_index;
|
||||
uint8_t ridacq_vp_status;
|
||||
} type1; /* type 1 */
|
||||
} un;
|
||||
uint8_t ridacq_vp_acquired;
|
||||
uint8_t ridacq_vp_setup;
|
||||
uint8_t ridacq_vp_index;
|
||||
uint8_t ridacq_vp_status;
|
||||
uint16_t ridacq_vp_port_lo;
|
||||
uint8_t ridacq_vp_port_hi;
|
||||
uint8_t ridacq_format; /* 0 or 1 */
|
||||
@ -1506,8 +1498,11 @@ typedef struct {
|
||||
|
||||
#define RIDACQ_STS_COMPLETE 0
|
||||
#define RIDACQ_STS_UNACQUIRED 1
|
||||
#define RIDACQ_STS_CHANGED 20
|
||||
|
||||
#define RIDACQ_STS_CHANGED 2
|
||||
#define RIDACQ_STS_SNS_TIMEOUT 3
|
||||
#define RIDACQ_STS_SNS_REJECTED 4
|
||||
#define RIDACQ_STS_SCR_TIMEOUT 5
|
||||
#define RIDACQ_STS_SCR_REJECTED 6
|
||||
|
||||
/*
|
||||
* Simple Name Server Data Structures
|
||||
@ -1518,6 +1513,7 @@ typedef struct {
|
||||
#define SNS_GFF_ID 0x11F
|
||||
#define SNS_GID_FT 0x171
|
||||
#define SNS_RFT_ID 0x217
|
||||
#define SNS_RFF_ID 0x21F
|
||||
typedef struct {
|
||||
uint16_t snscb_rblen; /* response buffer length (words) */
|
||||
uint16_t snscb_reserved0;
|
||||
|
@ -482,7 +482,7 @@ typedef struct {
|
||||
} fcparam;
|
||||
|
||||
#define FW_CONFIG_WAIT 0
|
||||
#define FW_WAIT_AL_PA 1
|
||||
#define FW_WAIT_LINK 1
|
||||
#define FW_WAIT_LOGIN 2
|
||||
#define FW_READY 3
|
||||
#define FW_LOSS_OF_SYNC 4
|
||||
@ -491,8 +491,8 @@ typedef struct {
|
||||
#define FW_NON_PART 7
|
||||
|
||||
#define LOOP_NIL 0
|
||||
#define LOOP_LIP_RCVD 1
|
||||
#define LOOP_PDB_RCVD 2
|
||||
#define LOOP_TESTING_LINK 1
|
||||
#define LOOP_LTEST_DONE 2
|
||||
#define LOOP_SCANNING_LOOP 3
|
||||
#define LOOP_LSCAN_DONE 4
|
||||
#define LOOP_SCANNING_FABRIC 5
|
||||
@ -861,10 +861,10 @@ void isp_done(XS_T *);
|
||||
* Update any operating parameters (speed, etc.)
|
||||
* ... ISPCTL_FCLINK_TEST, int channel);
|
||||
* Test FC link status on this channel
|
||||
* ... ISPCTL_SCAN_FABRIC, int channel);
|
||||
* Scan fabric on this channel
|
||||
* ... ISPCTL_SCAN_LOOP, int channel);
|
||||
* Scan local loop on this channel
|
||||
* ... ISPCTL_SCAN_FABRIC, int channel);
|
||||
* Scan fabric on this channel
|
||||
* ... ISPCTL_PDB_SYNC, int channel);
|
||||
* Synchronize port database on this channel
|
||||
* ... ISPCTL_SEND_LIP, int channel);
|
||||
@ -881,12 +881,11 @@ void isp_done(XS_T *);
|
||||
* Change role of specified channel
|
||||
*
|
||||
* ISPCTL_PDB_SYNC is somewhat misnamed. It actually is the final step, in
|
||||
* order, of ISPCTL_FCLINK_TEST, ISPCTL_SCAN_FABRIC, and ISPCTL_SCAN_LOOP.
|
||||
* order, of ISPCTL_FCLINK_TEST, ISPCTL_SCAN_LOOP, and ISPCTL_SCAN_FABRIC.
|
||||
* The main purpose of ISPCTL_PDB_SYNC is to complete management of logging
|
||||
* and logging out of fabric devices (if one is on a fabric) and then marking
|
||||
* the 'loop state' as being ready to now be used for sending commands to
|
||||
* devices. Originally fabric name server and local loop scanning were
|
||||
* part of this function. It's now been separated to allow for finer control.
|
||||
* devices.
|
||||
*/
|
||||
typedef enum {
|
||||
ISPCTL_RESET_BUS,
|
||||
|
@ -116,7 +116,7 @@ SYSCTL_UINT(_hw_if_ntb, OID_AUTO, max_num_clients, CTLFLAG_RDTUN,
|
||||
|
||||
STAILQ_HEAD(ntb_queue_list, ntb_queue_entry);
|
||||
|
||||
typedef unsigned ntb_q_idx_t;
|
||||
typedef uint32_t ntb_q_idx_t;
|
||||
|
||||
struct ntb_queue_entry {
|
||||
/* ntb_queue list reference */
|
||||
@ -125,8 +125,8 @@ struct ntb_queue_entry {
|
||||
/* info on data to be transferred */
|
||||
void *cb_data;
|
||||
void *buf;
|
||||
unsigned len;
|
||||
unsigned flags;
|
||||
uint32_t len;
|
||||
uint32_t flags;
|
||||
|
||||
struct ntb_transport_qp *qp;
|
||||
struct ntb_payload_header *x_hdr;
|
||||
@ -164,7 +164,6 @@ struct ntb_transport_qp {
|
||||
void *data, int len);
|
||||
struct ntb_queue_list rx_post_q;
|
||||
struct ntb_queue_list rx_pend_q;
|
||||
struct ntb_queue_list rx_free_q;
|
||||
/* ntb_rx_q_lock: synchronize access to rx_XXXX_q */
|
||||
struct mtx ntb_rx_q_lock;
|
||||
struct task rx_completion_task;
|
||||
@ -207,6 +206,7 @@ struct ntb_transport_mw {
|
||||
size_t phys_size;
|
||||
size_t xlat_align;
|
||||
size_t xlat_align_size;
|
||||
bus_addr_t addr_limit;
|
||||
/* Tx buff is off vbase / phys_addr */
|
||||
caddr_t vbase;
|
||||
size_t xlat_size;
|
||||
@ -245,9 +245,9 @@ enum {
|
||||
};
|
||||
|
||||
struct ntb_payload_header {
|
||||
uint64_t ver;
|
||||
uint64_t len;
|
||||
uint64_t flags;
|
||||
ntb_q_idx_t ver;
|
||||
uint32_t len;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -338,6 +338,14 @@ static const struct ntb_ctx_ops ntb_transport_ops = {
|
||||
|
||||
MALLOC_DEFINE(M_NTB_IF, "if_ntb", "ntb network driver");
|
||||
|
||||
static inline void
|
||||
iowrite32(uint32_t val, void *addr)
|
||||
{
|
||||
|
||||
bus_space_write_4(X86_BUS_SPACE_MEM, 0/* HACK */, (uintptr_t)addr,
|
||||
val);
|
||||
}
|
||||
|
||||
/* Module setup and teardown */
|
||||
static int
|
||||
ntb_handle_module_events(struct module *m, int what, void *arg)
|
||||
@ -568,7 +576,8 @@ ntb_transport_probe(struct ntb_softc *ntb)
|
||||
mw = &nt->mw_vec[i];
|
||||
|
||||
rc = ntb_mw_get_range(ntb, i, &mw->phys_addr, &mw->vbase,
|
||||
&mw->phys_size, &mw->xlat_align, &mw->xlat_align_size);
|
||||
&mw->phys_size, &mw->xlat_align, &mw->xlat_align_size,
|
||||
&mw->addr_limit);
|
||||
if (rc != 0)
|
||||
goto err;
|
||||
|
||||
@ -708,7 +717,6 @@ ntb_transport_init_queue(struct ntb_transport_ctx *nt, unsigned int qp_num)
|
||||
|
||||
STAILQ_INIT(&qp->rx_post_q);
|
||||
STAILQ_INIT(&qp->rx_pend_q);
|
||||
STAILQ_INIT(&qp->rx_free_q);
|
||||
STAILQ_INIT(&qp->tx_free_q);
|
||||
|
||||
callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp);
|
||||
@ -733,9 +741,6 @@ ntb_transport_free_queue(struct ntb_transport_qp *qp)
|
||||
qp->tx_handler = NULL;
|
||||
qp->event_handler = NULL;
|
||||
|
||||
while ((entry = ntb_list_rm(&qp->ntb_rx_q_lock, &qp->rx_free_q)))
|
||||
free(entry, M_NTB_IF);
|
||||
|
||||
while ((entry = ntb_list_rm(&qp->ntb_rx_q_lock, &qp->rx_pend_q)))
|
||||
free(entry, M_NTB_IF);
|
||||
|
||||
@ -887,9 +892,9 @@ ntb_process_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry)
|
||||
{
|
||||
void *offset;
|
||||
|
||||
offset = (char *)qp->tx_mw + qp->tx_max_frame * qp->tx_index;
|
||||
offset = qp->tx_mw + qp->tx_max_frame * qp->tx_index;
|
||||
CTR3(KTR_NTB,
|
||||
"TX: process_tx: tx_pkts=%u, tx_index=%u, remote entry=%u",
|
||||
"TX: process_tx: tx_pkts=%lu, tx_index=%u, remote entry=%u",
|
||||
qp->tx_pkts, qp->tx_index, qp->remote_rx_info->entry);
|
||||
if (qp->tx_index == qp->remote_rx_info->entry) {
|
||||
CTR0(KTR_NTB, "TX: ring full");
|
||||
@ -900,8 +905,11 @@ ntb_process_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry)
|
||||
if (entry->len > qp->tx_max_frame - sizeof(struct ntb_payload_header)) {
|
||||
if (qp->tx_handler != NULL)
|
||||
qp->tx_handler(qp, qp->cb_data, entry->buf,
|
||||
EIO);
|
||||
EIO);
|
||||
else
|
||||
m_freem(entry->buf);
|
||||
|
||||
entry->buf = NULL;
|
||||
ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q);
|
||||
CTR1(KTR_NTB,
|
||||
"TX: frame too big. returning entry %p to tx_free_q",
|
||||
@ -929,8 +937,8 @@ ntb_memcpy_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry,
|
||||
hdr = (struct ntb_payload_header *)((char *)offset + qp->tx_max_frame -
|
||||
sizeof(struct ntb_payload_header));
|
||||
entry->x_hdr = hdr;
|
||||
hdr->len = entry->len; /* TODO: replace with bus_space_write */
|
||||
hdr->ver = qp->tx_pkts; /* TODO: replace with bus_space_write */
|
||||
iowrite32(entry->len, &hdr->len);
|
||||
iowrite32(qp->tx_pkts, &hdr->ver);
|
||||
|
||||
/* This piece is ntb_memcpy_tx() */
|
||||
CTR2(KTR_NTB, "TX: copying %d bytes to offset %p", entry->len, offset);
|
||||
@ -945,8 +953,8 @@ ntb_memcpy_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry,
|
||||
}
|
||||
|
||||
/* The rest is ntb_tx_copy_callback() */
|
||||
/* TODO: replace with bus_space_write */
|
||||
hdr->flags = entry->flags | IF_NTB_DESC_DONE_FLAG;
|
||||
iowrite32(entry->flags | IF_NTB_DESC_DONE_FLAG, &hdr->flags);
|
||||
CTR1(KTR_NTB, "TX: hdr %p set DESC_DONE", hdr);
|
||||
|
||||
ntb_peer_db_set(qp->ntb, 1ull << qp->qp_num);
|
||||
|
||||
@ -959,13 +967,16 @@ ntb_memcpy_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry,
|
||||
qp->tx_bytes += entry->len;
|
||||
|
||||
if (qp->tx_handler)
|
||||
qp->tx_handler(qp, qp->cb_data, entry->cb_data,
|
||||
entry->len);
|
||||
qp->tx_handler(qp, qp->cb_data, entry->buf,
|
||||
entry->len);
|
||||
else
|
||||
m_freem(entry->buf);
|
||||
entry->buf = NULL;
|
||||
}
|
||||
|
||||
CTR2(KTR_NTB,
|
||||
"TX: entry %p sent. hdr->ver = %d, Returning to tx_free_q", entry,
|
||||
hdr->ver);
|
||||
CTR3(KTR_NTB,
|
||||
"TX: entry %p sent. hdr->ver = %u, hdr->flags = 0x%x, Returning "
|
||||
"to tx_free_q", entry, hdr->ver, hdr->flags);
|
||||
ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q);
|
||||
}
|
||||
|
||||
@ -1021,13 +1032,11 @@ ntb_process_rxc(struct ntb_transport_qp *qp)
|
||||
{
|
||||
struct ntb_payload_header *hdr;
|
||||
struct ntb_queue_entry *entry;
|
||||
void *offset;
|
||||
caddr_t offset;
|
||||
|
||||
offset = (void *)
|
||||
((char *)qp->rx_buff + qp->rx_max_frame * qp->rx_index);
|
||||
hdr = (void *)
|
||||
((char *)offset + qp->rx_max_frame -
|
||||
sizeof(struct ntb_payload_header));
|
||||
offset = qp->rx_buff + qp->rx_max_frame * qp->rx_index;
|
||||
hdr = (void *)(offset + qp->rx_max_frame -
|
||||
sizeof(struct ntb_payload_header));
|
||||
|
||||
CTR1(KTR_NTB, "RX: process_rxc rx_index = %u", qp->rx_index);
|
||||
if ((hdr->flags & IF_NTB_DESC_DONE_FLAG) == 0) {
|
||||
@ -1045,7 +1054,7 @@ ntb_process_rxc(struct ntb_transport_qp *qp)
|
||||
|
||||
if (hdr->ver != (uint32_t)qp->rx_pkts) {
|
||||
CTR2(KTR_NTB,"RX: ver != rx_pkts (%x != %lx). "
|
||||
"Returning entry %p to rx_pend_q", hdr->ver, qp->rx_pkts);
|
||||
"Returning entry to rx_pend_q", hdr->ver, qp->rx_pkts);
|
||||
qp->rx_err_ver++;
|
||||
return (EIO);
|
||||
}
|
||||
@ -1136,20 +1145,30 @@ ntb_complete_rxc(void *arg, int pending)
|
||||
break;
|
||||
|
||||
entry->x_hdr->flags = 0;
|
||||
/* XXX bus_space_write */
|
||||
qp->rx_info->entry = entry->index;
|
||||
iowrite32(entry->index, &qp->rx_info->entry);
|
||||
|
||||
STAILQ_REMOVE_HEAD(&qp->rx_post_q, entry);
|
||||
|
||||
len = entry->len;
|
||||
m = entry->buf;
|
||||
|
||||
STAILQ_REMOVE_HEAD(&qp->rx_post_q, entry);
|
||||
STAILQ_INSERT_TAIL(&qp->rx_free_q, entry, entry);
|
||||
/*
|
||||
* Re-initialize queue_entry for reuse; rx_handler takes
|
||||
* ownership of the mbuf.
|
||||
*/
|
||||
entry->buf = NULL;
|
||||
entry->len = transport_mtu;
|
||||
entry->cb_data = qp->transport->ifp;
|
||||
|
||||
STAILQ_INSERT_TAIL(&qp->rx_pend_q, entry, entry);
|
||||
|
||||
mtx_unlock_spin(&qp->ntb_rx_q_lock);
|
||||
|
||||
CTR2(KTR_NTB, "RX: completing entry %p, mbuf %p", entry, m);
|
||||
if (qp->rx_handler != NULL && qp->client_ready)
|
||||
qp->rx_handler(qp, qp->cb_data, m, len);
|
||||
else
|
||||
m_freem(m);
|
||||
|
||||
mtx_lock_spin(&qp->ntb_rx_q_lock);
|
||||
}
|
||||
@ -1301,7 +1320,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw, size_t size)
|
||||
mw->buff_size = buff_size;
|
||||
|
||||
mw->virt_addr = contigmalloc(mw->buff_size, M_NTB_IF, M_ZERO, 0,
|
||||
BUS_SPACE_MAXADDR, mw->xlat_align, 0);
|
||||
mw->addr_limit, mw->xlat_align, 0);
|
||||
if (mw->virt_addr == NULL) {
|
||||
mw->xlat_size = 0;
|
||||
mw->buff_size = 0;
|
||||
|
@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#define NTB_HB_TIMEOUT 1 /* second */
|
||||
#define ATOM_LINK_RECOVERY_TIME 500 /* ms */
|
||||
#define BAR_HIGH_MASK (~((1ull << 12) - 1))
|
||||
|
||||
#define DEVICE2SOFTC(dev) ((struct ntb_softc *) device_get_softc(dev))
|
||||
|
||||
@ -113,6 +114,7 @@ struct ntb_pci_bar_info {
|
||||
vm_paddr_t pbase;
|
||||
caddr_t vbase;
|
||||
vm_size_t size;
|
||||
bool mapped_wc : 1;
|
||||
|
||||
/* Configuration register offsets */
|
||||
uint32_t psz_off;
|
||||
@ -326,6 +328,10 @@ SYSCTL_UINT(_hw_ntb, OID_AUTO, debug_level, CTLFLAG_RWTUN,
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static unsigned g_ntb_enable_wc = 1;
|
||||
SYSCTL_UINT(_hw_ntb, OID_AUTO, enable_writecombine, CTLFLAG_RDTUN,
|
||||
&g_ntb_enable_wc, 0, "Set to 1 to map memory windows write combining");
|
||||
|
||||
static struct ntb_hw_info pci_ids[] = {
|
||||
/* XXX: PS/SS IDs left out until they are supported. */
|
||||
{ 0x0C4E8086, "BWD Atom Processor S1200 Non-Transparent Bridge B2B",
|
||||
@ -766,18 +772,22 @@ map_memory_window_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar)
|
||||
save_bar_parameters(bar);
|
||||
}
|
||||
|
||||
print_map_success(ntb, bar, "mw");
|
||||
if (g_ntb_enable_wc == 0)
|
||||
return (0);
|
||||
|
||||
/* Mark bar region as write combining to improve performance. */
|
||||
rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size,
|
||||
VM_MEMATTR_WRITE_COMBINING);
|
||||
print_map_success(ntb, bar, "mw");
|
||||
if (rc == 0)
|
||||
if (rc == 0) {
|
||||
bar->mapped_wc = true;
|
||||
device_printf(ntb->device,
|
||||
"Marked BAR%d v:[%p-%p] p:[%p-%p] as "
|
||||
"WRITE_COMBINING.\n",
|
||||
PCI_RID2BAR(bar->pci_resource_id), bar->vbase,
|
||||
(char *)bar->vbase + bar->size - 1,
|
||||
(void *)bar->pbase, (void *)(bar->pbase + bar->size - 1));
|
||||
else
|
||||
} else
|
||||
device_printf(ntb->device,
|
||||
"Unable to mark BAR%d v:[%p-%p] p:[%p-%p] as "
|
||||
"WRITE_COMBINING: %d\n",
|
||||
@ -2475,15 +2485,19 @@ ntb_peer_spad_read(struct ntb_softc *ntb, unsigned int idx, uint32_t *val)
|
||||
*/
|
||||
int
|
||||
ntb_mw_get_range(struct ntb_softc *ntb, unsigned mw_idx, vm_paddr_t *base,
|
||||
caddr_t *vbase, size_t *size, size_t *align, size_t *align_size)
|
||||
caddr_t *vbase, size_t *size, size_t *align, size_t *align_size,
|
||||
bus_addr_t *plimit)
|
||||
{
|
||||
struct ntb_pci_bar_info *bar;
|
||||
bus_addr_t limit;
|
||||
size_t bar_b2b_off;
|
||||
enum ntb_bar bar_num;
|
||||
|
||||
if (mw_idx >= ntb_mw_count(ntb))
|
||||
return (EINVAL);
|
||||
|
||||
bar = &ntb->bar_info[ntb_mw_to_bar(ntb, mw_idx)];
|
||||
bar_num = ntb_mw_to_bar(ntb, mw_idx);
|
||||
bar = &ntb->bar_info[bar_num];
|
||||
bar_b2b_off = 0;
|
||||
if (mw_idx == ntb->b2b_mw_idx) {
|
||||
KASSERT(ntb->b2b_off != 0,
|
||||
@ -2491,6 +2505,11 @@ ntb_mw_get_range(struct ntb_softc *ntb, unsigned mw_idx, vm_paddr_t *base,
|
||||
bar_b2b_off = ntb->b2b_off;
|
||||
}
|
||||
|
||||
if (bar_is_64bit(ntb, bar_num))
|
||||
limit = BUS_SPACE_MAXADDR;
|
||||
else
|
||||
limit = BUS_SPACE_MAXADDR_32BIT;
|
||||
|
||||
if (base != NULL)
|
||||
*base = bar->pbase + bar_b2b_off;
|
||||
if (vbase != NULL)
|
||||
@ -2501,6 +2520,8 @@ ntb_mw_get_range(struct ntb_softc *ntb, unsigned mw_idx, vm_paddr_t *base,
|
||||
*align = bar->size;
|
||||
if (align_size != NULL)
|
||||
*align_size = 1;
|
||||
if (plimit != NULL)
|
||||
*plimit = limit;
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -2514,7 +2535,9 @@ ntb_mw_get_range(struct ntb_softc *ntb, unsigned mw_idx, vm_paddr_t *base,
|
||||
* Set the translation of a memory window. The peer may access local memory
|
||||
* through the window starting at the address, up to the size. The address
|
||||
* must be aligned to the alignment specified by ntb_mw_get_range(). The size
|
||||
* must be aligned to the size alignment specified by ntb_mw_get_range().
|
||||
* must be aligned to the size alignment specified by ntb_mw_get_range(). The
|
||||
* address must be below the plimit specified by ntb_mw_get_range() (i.e. for
|
||||
* 32-bit BARs).
|
||||
*
|
||||
* Return: Zero on success, otherwise an error number.
|
||||
*/
|
||||
@ -2551,14 +2574,14 @@ ntb_mw_set_trans(struct ntb_softc *ntb, unsigned idx, bus_addr_t addr,
|
||||
|
||||
limit = 0;
|
||||
if (bar_is_64bit(ntb, bar_num)) {
|
||||
base = ntb_reg_read(8, base_reg);
|
||||
base = ntb_reg_read(8, base_reg) & BAR_HIGH_MASK;
|
||||
|
||||
if (limit_reg != 0 && size != mw_size)
|
||||
limit = base + size;
|
||||
|
||||
/* Set and verify translation address */
|
||||
ntb_reg_write(8, xlat_reg, addr);
|
||||
reg_val = ntb_reg_read(8, xlat_reg);
|
||||
reg_val = ntb_reg_read(8, xlat_reg) & BAR_HIGH_MASK;
|
||||
if (reg_val != addr) {
|
||||
ntb_reg_write(8, xlat_reg, 0);
|
||||
return (EIO);
|
||||
@ -2566,7 +2589,7 @@ ntb_mw_set_trans(struct ntb_softc *ntb, unsigned idx, bus_addr_t addr,
|
||||
|
||||
/* Set and verify the limit */
|
||||
ntb_reg_write(8, limit_reg, limit);
|
||||
reg_val = ntb_reg_read(8, limit_reg);
|
||||
reg_val = ntb_reg_read(8, limit_reg) & BAR_HIGH_MASK;
|
||||
if (reg_val != limit) {
|
||||
ntb_reg_write(8, limit_reg, base);
|
||||
ntb_reg_write(8, xlat_reg, 0);
|
||||
@ -2575,19 +2598,19 @@ ntb_mw_set_trans(struct ntb_softc *ntb, unsigned idx, bus_addr_t addr,
|
||||
} else {
|
||||
/* Configure 32-bit (split) BAR MW */
|
||||
|
||||
if ((addr & ~UINT32_MAX) != 0)
|
||||
return (EINVAL);
|
||||
if (((addr + size) & ~UINT32_MAX) != 0)
|
||||
return (EINVAL);
|
||||
if ((addr & UINT32_MAX) != addr)
|
||||
return (ERANGE);
|
||||
if (((addr + size) & UINT32_MAX) != (addr + size))
|
||||
return (ERANGE);
|
||||
|
||||
base = ntb_reg_read(4, base_reg);
|
||||
base = ntb_reg_read(4, base_reg) & BAR_HIGH_MASK;
|
||||
|
||||
if (limit_reg != 0 && size != mw_size)
|
||||
limit = base + size;
|
||||
|
||||
/* Set and verify translation address */
|
||||
ntb_reg_write(4, xlat_reg, addr);
|
||||
reg_val = ntb_reg_read(4, xlat_reg);
|
||||
reg_val = ntb_reg_read(4, xlat_reg) & BAR_HIGH_MASK;
|
||||
if (reg_val != addr) {
|
||||
ntb_reg_write(4, xlat_reg, 0);
|
||||
return (EIO);
|
||||
@ -2595,7 +2618,7 @@ ntb_mw_set_trans(struct ntb_softc *ntb, unsigned idx, bus_addr_t addr,
|
||||
|
||||
/* Set and verify the limit */
|
||||
ntb_reg_write(4, limit_reg, limit);
|
||||
reg_val = ntb_reg_read(4, limit_reg);
|
||||
reg_val = ntb_reg_read(4, limit_reg) & BAR_HIGH_MASK;
|
||||
if (reg_val != limit) {
|
||||
ntb_reg_write(4, limit_reg, base);
|
||||
ntb_reg_write(4, xlat_reg, 0);
|
||||
@ -2622,6 +2645,60 @@ ntb_mw_clear_trans(struct ntb_softc *ntb, unsigned mw_idx)
|
||||
return (ntb_mw_set_trans(ntb, mw_idx, 0, 0));
|
||||
}
|
||||
|
||||
/*
|
||||
* ntb_mw_get_wc - Get the write-combine status of a memory window
|
||||
*
|
||||
* Returns: Zero on success, setting *wc; otherwise an error number (e.g. if
|
||||
* idx is an invalid memory window).
|
||||
*/
|
||||
int
|
||||
ntb_mw_get_wc(struct ntb_softc *ntb, unsigned idx, bool *wc)
|
||||
{
|
||||
struct ntb_pci_bar_info *bar;
|
||||
|
||||
if (idx >= ntb_mw_count(ntb))
|
||||
return (EINVAL);
|
||||
|
||||
bar = &ntb->bar_info[ntb_mw_to_bar(ntb, idx)];
|
||||
*wc = bar->mapped_wc;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* ntb_mw_set_wc - Set the write-combine status of a memory window
|
||||
*
|
||||
* If 'wc' matches the current status, this does nothing and succeeds.
|
||||
*
|
||||
* Returns: Zero on success, setting the caching attribute on the virtual
|
||||
* mapping of the BAR; otherwise an error number (e.g. if idx is an invalid
|
||||
* memory window, or if changing the caching attribute fails).
|
||||
*/
|
||||
int
|
||||
ntb_mw_set_wc(struct ntb_softc *ntb, unsigned idx, bool wc)
|
||||
{
|
||||
struct ntb_pci_bar_info *bar;
|
||||
vm_memattr_t attr;
|
||||
int rc;
|
||||
|
||||
if (idx >= ntb_mw_count(ntb))
|
||||
return (EINVAL);
|
||||
|
||||
bar = &ntb->bar_info[ntb_mw_to_bar(ntb, idx)];
|
||||
if (bar->mapped_wc == wc)
|
||||
return (0);
|
||||
|
||||
if (wc)
|
||||
attr = VM_MEMATTR_WRITE_COMBINING;
|
||||
else
|
||||
attr = VM_MEMATTR_DEFAULT;
|
||||
|
||||
rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, attr);
|
||||
if (rc == 0)
|
||||
bar->mapped_wc = wc;
|
||||
|
||||
return (rc);
|
||||
}
|
||||
|
||||
/**
|
||||
* ntb_peer_db_set() - Set the doorbell on the secondary/external side
|
||||
* @ntb: pointer to ntb_softc instance
|
||||
|
@ -77,10 +77,14 @@ void ntb_clear_ctx(struct ntb_softc *);
|
||||
|
||||
uint8_t ntb_mw_count(struct ntb_softc *);
|
||||
int ntb_mw_get_range(struct ntb_softc *, unsigned mw_idx, vm_paddr_t *base,
|
||||
caddr_t *vbase, size_t *size, size_t *align, size_t *align_size);
|
||||
caddr_t *vbase, size_t *size, size_t *align, size_t *align_size,
|
||||
bus_addr_t *plimit);
|
||||
int ntb_mw_set_trans(struct ntb_softc *, unsigned mw_idx, bus_addr_t, size_t);
|
||||
int ntb_mw_clear_trans(struct ntb_softc *, unsigned mw_idx);
|
||||
|
||||
int ntb_mw_get_wc(struct ntb_softc *, unsigned mw_idx, bool *wc);
|
||||
int ntb_mw_set_wc(struct ntb_softc *, unsigned mw_idx, bool wc);
|
||||
|
||||
uint8_t ntb_get_max_spads(struct ntb_softc *ntb);
|
||||
int ntb_spad_write(struct ntb_softc *ntb, unsigned int idx, uint32_t val);
|
||||
int ntb_spad_read(struct ntb_softc *ntb, unsigned int idx, uint32_t *val);
|
||||
|
@ -1696,13 +1696,13 @@ re_attach(device_t dev)
|
||||
#ifdef DEV_NETMAP
|
||||
re_netmap_attach(sc);
|
||||
#endif /* DEV_NETMAP */
|
||||
|
||||
#ifdef RE_DIAG
|
||||
/*
|
||||
* Perform hardware diagnostic on the original RTL8169.
|
||||
* Some 32-bit cards were incorrectly wired and would
|
||||
* malfunction if plugged into a 64-bit slot.
|
||||
*/
|
||||
|
||||
if (hwrev == RL_HWREV_8169) {
|
||||
error = re_diag(sc);
|
||||
if (error) {
|
||||
@ -2939,6 +2939,7 @@ re_start_locked(struct ifnet *ifp)
|
||||
return;
|
||||
}
|
||||
#endif /* DEV_NETMAP */
|
||||
|
||||
if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
|
||||
IFF_DRV_RUNNING || (sc->rl_flags & RL_FLAG_LINK) == 0)
|
||||
return;
|
||||
@ -3851,6 +3852,11 @@ re_setwol(struct rl_softc *sc)
|
||||
CSR_READ_1(sc, RL_GPIO) & ~0x01);
|
||||
}
|
||||
if ((ifp->if_capenable & IFCAP_WOL) != 0) {
|
||||
if ((sc->rl_flags & RL_FLAG_8168G_PLUS) != 0) {
|
||||
/* Disable RXDV gate. */
|
||||
CSR_WRITE_4(sc, RL_MISC, CSR_READ_4(sc, RL_MISC) &
|
||||
~0x00080000);
|
||||
}
|
||||
re_set_rxmode(sc);
|
||||
if ((sc->rl_flags & RL_FLAG_WOL_MANLINK) != 0)
|
||||
re_set_linkspeed(sc);
|
||||
|
@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_platform.h"
|
||||
#include "opt_uart.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
@ -57,6 +58,16 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#define DEFAULT_RCLK 1843200
|
||||
|
||||
/*
|
||||
* Set the default baudrate tolerance to 3.0%.
|
||||
*
|
||||
* Some embedded boards have odd reference clocks (eg 25MHz)
|
||||
* and we need to handle higher variances in the target baud rate.
|
||||
*/
|
||||
#ifndef UART_DEV_TOLERANCE_PCT
|
||||
#define UART_DEV_TOLERANCE_PCT 30
|
||||
#endif /* UART_DEV_TOLERANCE_PCT */
|
||||
|
||||
static int broken_txfifo = 0;
|
||||
SYSCTL_INT(_hw, OID_AUTO, broken_txfifo, CTLFLAG_RWTUN,
|
||||
&broken_txfifo, 0, "UART FIFO has QEMU emulation bug");
|
||||
@ -123,8 +134,8 @@ ns8250_divisor(int rclk, int baudrate)
|
||||
/* 10 times error in percent: */
|
||||
error = ((actual_baud - baudrate) * 2000 / baudrate + 1) >> 1;
|
||||
|
||||
/* 3.0% maximum error tolerance: */
|
||||
if (error < -30 || error > 30)
|
||||
/* enforce maximum error tolerance: */
|
||||
if (error < -UART_DEV_TOLERANCE_PCT || error > UART_DEV_TOLERANCE_PCT)
|
||||
return (0);
|
||||
|
||||
return (divisor);
|
||||
|
@ -510,6 +510,13 @@ vmxnet3_check_version(struct vmxnet3_softc *sc)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
trunc_powerof2(int val)
|
||||
{
|
||||
|
||||
return (1U << (fls(val) - 1));
|
||||
}
|
||||
|
||||
static void
|
||||
vmxnet3_initial_config(struct vmxnet3_softc *sc)
|
||||
{
|
||||
@ -520,14 +527,14 @@ vmxnet3_initial_config(struct vmxnet3_softc *sc)
|
||||
nqueue = VMXNET3_DEF_TX_QUEUES;
|
||||
if (nqueue > mp_ncpus)
|
||||
nqueue = mp_ncpus;
|
||||
sc->vmx_max_ntxqueues = nqueue;
|
||||
sc->vmx_max_ntxqueues = trunc_powerof2(nqueue);
|
||||
|
||||
nqueue = vmxnet3_tunable_int(sc, "rxnqueue", vmxnet3_default_rxnqueue);
|
||||
if (nqueue > VMXNET3_MAX_RX_QUEUES || nqueue < 1)
|
||||
nqueue = VMXNET3_DEF_RX_QUEUES;
|
||||
if (nqueue > mp_ncpus)
|
||||
nqueue = mp_ncpus;
|
||||
sc->vmx_max_nrxqueues = nqueue;
|
||||
sc->vmx_max_nrxqueues = trunc_powerof2(nqueue);
|
||||
|
||||
if (vmxnet3_tunable_int(sc, "mq_disable", vmxnet3_mq_disable)) {
|
||||
sc->vmx_max_nrxqueues = 1;
|
||||
|
@ -3791,8 +3791,8 @@ wpi_set_pslevel(struct wpi_softc *sc, uint8_t dtim, int level, int async)
|
||||
if (level != 0) /* not CAM */
|
||||
cmd.flags |= htole16(WPI_PS_ALLOW_SLEEP);
|
||||
/* Retrieve PCIe Active State Power Management (ASPM). */
|
||||
reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + 0x10, 1);
|
||||
if (!(reg & 0x1)) /* L0s Entry disabled. */
|
||||
reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + PCIER_LINK_CTL, 1);
|
||||
if (!(reg & PCIEM_LINK_CTL_ASPMC_L0S)) /* L0s Entry disabled. */
|
||||
cmd.flags |= htole16(WPI_PS_PCI_PMGT);
|
||||
|
||||
cmd.rxtimeout = htole32(pmgt->rxtimeout * IEEE80211_DUR_TU);
|
||||
@ -5126,9 +5126,9 @@ wpi_apm_init(struct wpi_softc *sc)
|
||||
WPI_SETBITS(sc, WPI_DBG_HPET_MEM, 0xffff0000);
|
||||
|
||||
/* Retrieve PCIe Active State Power Management (ASPM). */
|
||||
reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + 0x10, 1);
|
||||
reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + PCIER_LINK_CTL, 1);
|
||||
/* Workaround for HW instability in PCIe L0->L0s->L1 transition. */
|
||||
if (reg & 0x02) /* L1 Entry enabled. */
|
||||
if (reg & PCIEM_LINK_CTL_ASPMC_L1) /* L1 Entry enabled. */
|
||||
WPI_SETBITS(sc, WPI_GIO, WPI_GIO_L0S_ENA);
|
||||
else
|
||||
WPI_CLRBITS(sc, WPI_GIO, WPI_GIO_L0S_ENA);
|
||||
|
@ -128,6 +128,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include <machine/_inttypes.h>
|
||||
#include <machine/intr_machdep.h>
|
||||
|
||||
#include <x86/apicvar.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
#include <vm/vm_kern.h>
|
||||
@ -256,6 +258,8 @@ xctrl_suspend()
|
||||
gnttab_resume(NULL);
|
||||
|
||||
#ifdef SMP
|
||||
/* Send an IPI_BITMAP in case there are pending bitmap IPIs. */
|
||||
lapic_ipi_vectored(IPI_BITMAP_VECTOR, APIC_IPI_DEST_ALL);
|
||||
if (smp_started && !CPU_EMPTY(&cpu_suspend_map)) {
|
||||
/*
|
||||
* Now that event channels have been initialized,
|
||||
|
@ -216,10 +216,12 @@ newnfs_iosize(struct nfsmount *nmp)
|
||||
* Calculate the size used for io buffers. Use the larger
|
||||
* of the two sizes to minimise nfs requests but make sure
|
||||
* that it is at least one VM page to avoid wasting buffer
|
||||
* space.
|
||||
* space. It must also be at least NFS_DIRBLKSIZ, since
|
||||
* that is the buffer size used for directories.
|
||||
*/
|
||||
iosize = imax(nmp->nm_rsize, nmp->nm_wsize);
|
||||
iosize = imax(iosize, PAGE_SIZE);
|
||||
iosize = imax(iosize, NFS_DIRBLKSIZ);
|
||||
nmp->nm_mountp->mnt_stat.f_iosize = iosize;
|
||||
return (iosize);
|
||||
}
|
||||
|
@ -150,24 +150,38 @@ g_dev_setdumpdev(struct cdev *dev, struct thread *td)
|
||||
return (error);
|
||||
}
|
||||
|
||||
static void
|
||||
static int
|
||||
init_dumpdev(struct cdev *dev)
|
||||
{
|
||||
struct g_consumer *cp;
|
||||
const char *devprefix = "/dev/", *devname;
|
||||
int error;
|
||||
size_t len;
|
||||
|
||||
if (dumpdev == NULL)
|
||||
return;
|
||||
return (0);
|
||||
|
||||
len = strlen(devprefix);
|
||||
devname = devtoname(dev);
|
||||
if (strcmp(devname, dumpdev) != 0 &&
|
||||
(strncmp(dumpdev, devprefix, len) != 0 ||
|
||||
strcmp(devname, dumpdev + len) != 0))
|
||||
return;
|
||||
if (g_dev_setdumpdev(dev, curthread) == 0) {
|
||||
return (0);
|
||||
|
||||
cp = (struct g_consumer *)dev->si_drv2;
|
||||
error = g_access(cp, 1, 0, 0);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
error = g_dev_setdumpdev(dev, curthread);
|
||||
if (error == 0) {
|
||||
freeenv(dumpdev);
|
||||
dumpdev = NULL;
|
||||
}
|
||||
|
||||
(void)g_access(cp, -1, 0, 0);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -312,7 +326,10 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
|
||||
|
||||
dev->si_iosize_max = MAXPHYS;
|
||||
dev->si_drv2 = cp;
|
||||
init_dumpdev(dev);
|
||||
error = init_dumpdev(dev);
|
||||
if (error != 0)
|
||||
printf("%s: init_dumpdev() failed (gp->name=%s, error=%d)\n",
|
||||
__func__, gp->name, error);
|
||||
|
||||
g_dev_attrchanged(cp, "GEOM::physpath");
|
||||
snprintf(buf, sizeof(buf), "cdev=%s", gp->name);
|
||||
|
@ -286,8 +286,11 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp,
|
||||
if (hdr->e_machine == bi->machine &&
|
||||
(hdr->e_ident[EI_OSABI] == bi->brand ||
|
||||
strncmp((const char *)&hdr->e_ident[OLD_EI_BRAND],
|
||||
bi->compat_3_brand, strlen(bi->compat_3_brand)) == 0))
|
||||
return (bi);
|
||||
bi->compat_3_brand, strlen(bi->compat_3_brand)) == 0)) {
|
||||
/* Looks good, but give brand a chance to veto */
|
||||
if (!bi->header_supported || bi->header_supported(imgp))
|
||||
return (bi);
|
||||
}
|
||||
}
|
||||
|
||||
/* No known brand, see if the header is recognized by any brand */
|
||||
|
@ -66,10 +66,10 @@ static size_t fragsz;
|
||||
|
||||
struct dump_pa dump_map[DUMPSYS_MD_PA_NPAIRS];
|
||||
|
||||
#if !defined(__powerpc__) && !defined(__sparc__)
|
||||
void
|
||||
dumpsys_gen_pa_init(void)
|
||||
{
|
||||
#if !defined(__sparc__) && !defined(__powerpc__)
|
||||
int n, idx;
|
||||
|
||||
bzero(dump_map, sizeof(dump_map));
|
||||
@ -80,8 +80,8 @@ dumpsys_gen_pa_init(void)
|
||||
dump_map[n].pa_start = dump_avail[idx];
|
||||
dump_map[n].pa_size = dump_avail[idx + 1] - dump_avail[idx];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
struct dump_pa *
|
||||
dumpsys_gen_pa_next(struct dump_pa *mdp)
|
||||
@ -99,20 +99,24 @@ dumpsys_gen_pa_next(struct dump_pa *mdp)
|
||||
void
|
||||
dumpsys_gen_wbinv_all(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
dumpsys_gen_unmap_chunk(vm_paddr_t pa __unused, size_t chunk __unused,
|
||||
void *va __unused)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#if !defined(__sparc__)
|
||||
int
|
||||
dumpsys_gen_write_aux_headers(struct dumperinfo *di)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
dumpsys_buf_write(struct dumperinfo *di, char *ptr, size_t sz)
|
||||
@ -233,6 +237,7 @@ dumpsys_foreach_chunk(dumpsys_callback_t cb, void *arg)
|
||||
return (seqnr);
|
||||
}
|
||||
|
||||
#if !defined(__sparc__)
|
||||
static off_t fileofs;
|
||||
|
||||
static int
|
||||
@ -391,3 +396,4 @@ dumpsys_generic(struct dumperinfo *di)
|
||||
printf("\n** DUMP FAILED (ERROR %d) **\n", error);
|
||||
return (error);
|
||||
}
|
||||
#endif
|
||||
|
51
sys/mips/conf/AP143
Normal file
51
sys/mips/conf/AP143
Normal file
@ -0,0 +1,51 @@
|
||||
#
|
||||
# AP143 - the AP143 reference board from Qualcomm Atheros includes:
|
||||
#
|
||||
# * AR9330 SoC
|
||||
# * 32MB RAM
|
||||
# * 4MB flash
|
||||
# * Integrated 1x1 2GHz wifi and 10/100 bridge
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# Include the default QCA953x parameters
|
||||
include "QCA953X_BASE"
|
||||
|
||||
ident AP143
|
||||
|
||||
# Override hints with board values
|
||||
hints "AP143.hints"
|
||||
|
||||
# Force the board memory - the base AP121 only has 16MB RAM
|
||||
options AR71XX_REALMEM=(32*1024*1024)
|
||||
|
||||
# i2c GPIO bus
|
||||
#device gpioiic
|
||||
#device iicbb
|
||||
#device iicbus
|
||||
#device iic
|
||||
|
||||
# Options required for miiproxy and mdiobus
|
||||
options ARGE_MDIO # Export an MDIO bus separate from arge
|
||||
device miiproxy # MDIO bus <-> MII PHY rendezvous
|
||||
|
||||
device etherswitch
|
||||
device arswitch
|
||||
|
||||
# read MSDOS formatted disks - USB
|
||||
#options MSDOSFS
|
||||
|
||||
# Enable the uboot environment stuff rather then the
|
||||
# redboot stuff.
|
||||
options AR71XX_ENV_UBOOT
|
||||
|
||||
# uzip - to boot natively from flash
|
||||
device geom_uncompress
|
||||
options GEOM_UNCOMPRESS
|
||||
|
||||
# Used for the static uboot partition map
|
||||
device geom_map
|
||||
|
||||
# Boot off of the rootfs, as defined in the geom_map setup.
|
||||
options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\"
|
105
sys/mips/conf/AP143.hints
Normal file
105
sys/mips/conf/AP143.hints
Normal file
@ -0,0 +1,105 @@
|
||||
#
|
||||
# This file adds to the values in QCA953X_BASE.hints.
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
# Embedded Atheros Switch
|
||||
hint.arswitch.0.at="mdio1"
|
||||
hint.arswitch.0.is_7240=0
|
||||
hint.arswitch.0.is_9340=1
|
||||
hint.arswitch.0.numphys=4
|
||||
hint.arswitch.0.phy4cpu=1 # phy 4 is a "CPU" separate PHY
|
||||
hint.arswitch.0.is_rgmii=0
|
||||
hint.arswitch.0.is_gmii=1 # arge1 <-> switch PHY is GMII
|
||||
|
||||
# arge0 - MII, autoneg, phy(4)
|
||||
# MAC for arge0 is the first 6 bytes of the ART
|
||||
hint.arge.0.eeprommac=0x1fff0000
|
||||
hint.arge.0.phymask=0x10 # PHY4
|
||||
hint.arge.0.mdio=mdioproxy2 # .. off of the switch mdiobus
|
||||
|
||||
# arge1 - GMII, 1000/full
|
||||
hint.arge.1.eeprommac=0x1fff0006
|
||||
hint.arge.1.phymask=0x0 # No directly mapped PHYs
|
||||
hint.arge.1.media=1000
|
||||
hint.arge.1.fduplex=1
|
||||
|
||||
# The AP121 4MB flash layout:
|
||||
#
|
||||
# bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs
|
||||
# init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),
|
||||
# 2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART)
|
||||
#
|
||||
# So:
|
||||
# 256k: uboot
|
||||
# 64: uboot-env
|
||||
# 2752k: rootfs
|
||||
# 896k: kernel
|
||||
# 64k: config
|
||||
# 64k: ART
|
||||
|
||||
hint.map.0.at="flash/spi0"
|
||||
hint.map.0.start=0x00000000
|
||||
hint.map.0.end=0x000040000
|
||||
hint.map.0.name="uboot"
|
||||
hint.map.0.readonly=1
|
||||
|
||||
hint.map.1.at="flash/spi0"
|
||||
hint.map.1.start=0x00040000
|
||||
hint.map.1.end=0x00050000
|
||||
hint.map.1.name="uboot-env"
|
||||
hint.map.1.readonly=0
|
||||
|
||||
hint.map.2.at="flash/spi0"
|
||||
hint.map.2.start=0x00050000
|
||||
hint.map.2.end=0x00300000
|
||||
hint.map.2.name="rootfs"
|
||||
hint.map.2.readonly=0
|
||||
|
||||
hint.map.3.at="flash/spi0"
|
||||
hint.map.3.start=0x00300000
|
||||
hint.map.3.end=0x003e0000
|
||||
hint.map.3.name="kernel"
|
||||
hint.map.3.readonly=0
|
||||
|
||||
hint.map.4.at="flash/spi0"
|
||||
hint.map.4.start=0x003e0000
|
||||
hint.map.4.end=0x003f0000
|
||||
hint.map.4.name="cfg"
|
||||
hint.map.4.readonly=0
|
||||
|
||||
# This is radio calibration section. It is (or should be!) unique
|
||||
# for each board, to take into account thermal and electrical differences
|
||||
# as well as the regulatory compliance data.
|
||||
#
|
||||
hint.map.5.at="flash/spi0"
|
||||
hint.map.5.start=0x003f0000
|
||||
hint.map.5.end=0x00400000
|
||||
hint.map.5.name="art"
|
||||
hint.map.5.readonly=1
|
||||
|
||||
# GPIO specific configuration block
|
||||
|
||||
# Don't flip on anything that isn't already enabled.
|
||||
# This includes leaving the SPI CS1/CS2 pins as GPIO pins as they're
|
||||
# not used here.
|
||||
hint.gpio.0.function_set=0x00000000
|
||||
hint.gpio.0.function_clear=0x00000000
|
||||
|
||||
# These are the GPIO LEDs and buttons which can be software controlled.
|
||||
#hint.gpio.0.pinmask=0x001c02ae
|
||||
# hint.gpio.0.pinmask=0x00001803
|
||||
|
||||
# gpio0 - WLAN LED
|
||||
# gpio1 - USB LED
|
||||
# gpio11 - Jumpstart button
|
||||
# gpio12 - Reset button
|
||||
|
||||
# LEDs are configured separately and driven by the LED device
|
||||
#hint.gpioled.0.at="gpiobus0"
|
||||
#hint.gpioled.0.name="wlan"
|
||||
#hint.gpioled.0.pins=0x0001
|
||||
|
||||
#hint.gpioled.1.at="gpiobus0"
|
||||
#hint.gpioled.1.name="usb"
|
||||
#hint.gpioled.1.pins=0x0002
|
53
sys/mips/conf/ONIONOMEGA
Normal file
53
sys/mips/conf/ONIONOMEGA
Normal file
@ -0,0 +1,53 @@
|
||||
#
|
||||
# Onion Omega - an AR9330 based SoC
|
||||
#
|
||||
# https://onion.io/omega/
|
||||
#
|
||||
# * AR9330 SoC
|
||||
# * 64MB RAM
|
||||
# * 16MB flash
|
||||
# * Integrated 1x1 2GHz wifi and optional 10/100 ethernet
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# Include the default AR933x parameters
|
||||
include "AR933X_BASE"
|
||||
|
||||
ident ONIONOMEGA
|
||||
|
||||
# Override hints with board values
|
||||
hints "ONIONOMEGA.hints"
|
||||
|
||||
# Board memory - 64MB
|
||||
options AR71XX_REALMEM=(64*1024*1024)
|
||||
|
||||
# i2c GPIO bus
|
||||
#device gpioiic
|
||||
#device iicbb
|
||||
#device iicbus
|
||||
#device iic
|
||||
|
||||
# Options required for miiproxy and mdiobus
|
||||
options ARGE_MDIO # Export an MDIO bus separate from arge
|
||||
device miiproxy # MDIO bus <-> MII PHY rendezvous
|
||||
|
||||
device etherswitch
|
||||
device arswitch
|
||||
|
||||
# read MSDOS formatted disks - USB
|
||||
#options MSDOSFS
|
||||
|
||||
# Enable the uboot environment stuff rather then the
|
||||
# redboot stuff.
|
||||
options AR71XX_ENV_UBOOT
|
||||
|
||||
# uzip - to boot natively from flash
|
||||
device geom_uncompress
|
||||
options GEOM_UNCOMPRESS
|
||||
|
||||
# Used for the static uboot partition map
|
||||
device geom_map
|
||||
|
||||
# Boot off of the rootfs, as defined in the geom_map setup.
|
||||
options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\"
|
94
sys/mips/conf/ONIONOMEGA.hints
Normal file
94
sys/mips/conf/ONIONOMEGA.hints
Normal file
@ -0,0 +1,94 @@
|
||||
#
|
||||
# This file adds to the values in AR933X_BASE.hints.
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
# mdiobus on arge1
|
||||
hint.argemdio.0.at="nexus0"
|
||||
hint.argemdio.0.maddr=0x1a000000
|
||||
hint.argemdio.0.msize=0x1000
|
||||
hint.argemdio.0.order=0
|
||||
|
||||
# Embedded Atheros Switch
|
||||
hint.arswitch.0.at="mdio0"
|
||||
|
||||
# XXX this should really say it's an AR933x switch, as there
|
||||
# are some vlan specific differences here!
|
||||
hint.arswitch.0.is_7240=1
|
||||
hint.arswitch.0.numphys=4
|
||||
hint.arswitch.0.phy4cpu=1 # phy 4 is a "CPU" separate PHY
|
||||
hint.arswitch.0.is_rgmii=0
|
||||
hint.arswitch.0.is_gmii=1 # arge1 <-> switch PHY is GMII
|
||||
|
||||
# arge0 - MII, autoneg, phy(4)
|
||||
hint.arge.0.phymask=0x10 # PHY4
|
||||
hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus
|
||||
hint.arge.0.eeprommac=0x1fff0000
|
||||
|
||||
# arge1 - GMII, 1000/full
|
||||
hint.arge.1.phymask=0x0 # No directly mapped PHYs
|
||||
hint.arge.1.media=1000
|
||||
hint.arge.1.fduplex=1
|
||||
hint.arge.1.eeprommac=0x1fff0006
|
||||
|
||||
# 16MB flash layout:
|
||||
# [ 0.510000] 5 tp-link partitions found on MTD device spi0.0
|
||||
# [ 0.510000] Creating 5 MTD partitions on "spi0.0":
|
||||
# [ 0.520000] 0x000000000000-0x000000020000 : "u-boot"
|
||||
# [ 0.520000] 0x000000020000-0x000000136468 : "kernel"
|
||||
# [ 0.530000] 0x000000136468-0x000000ff0000 : "rootfs"
|
||||
# [ 0.530000] mtd: device 2 (rootfs) set to be root filesystem
|
||||
# [ 0.540000] 1 squashfs-split partitions found on MTD device rootfs
|
||||
# [ 0.540000] 0x000000730000-0x000000fe0000 : "rootfs_data"
|
||||
# [ 0.540000] 0x000000fe0000-0x000000ff0000 : "nvram"
|
||||
# [ 0.550000] 0x000000ff0000-0x000001000000 : "art"
|
||||
# [ 0.560000] 0x000000020000-0x000000fe0000 : "firmware"
|
||||
|
||||
# 64KiB uboot
|
||||
hint.map.0.at="flash/spi0"
|
||||
hint.map.0.start=0x00000000
|
||||
hint.map.0.end=0x00010000
|
||||
hint.map.0.name="u-boot"
|
||||
hint.map.0.readonly=1
|
||||
|
||||
# 64KiB uboot
|
||||
hint.map.1.at="flash/spi0"
|
||||
hint.map.1.start=0x00010000
|
||||
hint.map.1.end=0x00020000
|
||||
hint.map.1.name="uboot-env"
|
||||
hint.map.1.readonly=1
|
||||
|
||||
# kernel
|
||||
hint.map.2.at="flash/spi0"
|
||||
hint.map.2.start=0x00020000
|
||||
hint.map.2.end="search:0x00020000:0x10000:.!/bin/sh"
|
||||
hint.map.2.name="kernel"
|
||||
hint.map.2.readonly=1
|
||||
|
||||
# rootfs ulzma
|
||||
hint.map.3.at="flash/spi0"
|
||||
hint.map.3.start="search:0x00020000:0x10000:.!/bin/sh"
|
||||
hint.map.3.end=0x00fe0000
|
||||
hint.map.3.name="rootfs"
|
||||
hint.map.3.readonly=1
|
||||
|
||||
# 64KiB cfg
|
||||
hint.map.4.at="flash/spi0"
|
||||
hint.map.4.start=0x00fe0000
|
||||
hint.map.4.end=0x00ff0000
|
||||
hint.map.4.name="cfg"
|
||||
hint.map.4.readonly=0
|
||||
|
||||
# all firmware 16000KiB
|
||||
hint.map.5.at="flash/spi0"
|
||||
hint.map.5.start=0x00020000
|
||||
hint.map.5.end=0x00ff0000
|
||||
hint.map.5.name="firmware"
|
||||
hint.map.5.readonly=0
|
||||
|
||||
# 64KiB ART
|
||||
hint.map.6.at="flash/spi0"
|
||||
hint.map.6.start=0x00ff0000
|
||||
hint.map.6.end=0x01000000
|
||||
hint.map.6.name="ART"
|
||||
hint.map.6.readonly=1
|
138
sys/mips/conf/QCA953X_BASE
Normal file
138
sys/mips/conf/QCA953X_BASE
Normal file
@ -0,0 +1,138 @@
|
||||
#
|
||||
# QCA953x -- Kernel configuration base file for the Qualcomm Atheros QCA953x SoC.
|
||||
#
|
||||
# This file (and the hints file accompanying it) are not designed to be
|
||||
# used by themselves. Instead, users of this file should create a kernel
|
||||
# config file which includes this file (which gets the basic hints), then
|
||||
# override the default options (adding devices as needed) and adding
|
||||
# hints as needed (for example, the GPIO and LAN PHY.)
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
machine mips mips
|
||||
ident QCA953X_BASE
|
||||
cpu CPU_MIPS4KC
|
||||
makeoptions KERNLOADADDR=0x80050000
|
||||
options HZ=1000
|
||||
|
||||
files "../atheros/files.ar71xx"
|
||||
hints "QCA953X_BASE.hints"
|
||||
|
||||
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
makeoptions MODULES_OVERRIDE="gpio ar71xx if_gif if_vlan if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr hwpmc ipfw"
|
||||
|
||||
options DDB
|
||||
options KDB
|
||||
options ALQ
|
||||
options BREAK_TO_DEBUGGER
|
||||
options ALT_BREAK_TO_DEBUGGER
|
||||
|
||||
options SCHED_4BSD #4BSD scheduler
|
||||
options INET #InterNETworking
|
||||
#options INET6 #InterNETworking
|
||||
#options NFSCL #Network Filesystem Client
|
||||
options PSEUDOFS #Pseudo-filesystem framework
|
||||
options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
|
||||
|
||||
# Don't include the SCSI/CAM strings in the default build
|
||||
options SCSI_NO_SENSE_STRINGS
|
||||
options SCSI_NO_OP_STRINGS
|
||||
|
||||
# .. And no sysctl strings
|
||||
options NO_SYSCTL_DESCR
|
||||
|
||||
# For small memory footprints
|
||||
options VM_KMEM_SIZE_SCALE=1
|
||||
|
||||
# Limit IO size
|
||||
options NBUF=128
|
||||
|
||||
# Limit UMTX hash size
|
||||
# options UMTX_NUM_CHAINS=64
|
||||
|
||||
#options UMA_DEBUG_ALLOC
|
||||
|
||||
# PMC
|
||||
options HWPMC_HOOKS
|
||||
#options HWPMC_MIPS_BACKTRACE
|
||||
device hwpmc
|
||||
device hwpmc_mips24k
|
||||
|
||||
options ARGE_DEBUG
|
||||
|
||||
# options NFS_LEGACYRPC
|
||||
# Debugging for use in -current
|
||||
options INVARIANTS
|
||||
options INVARIANT_SUPPORT
|
||||
options WITNESS
|
||||
options WITNESS_SKIPSPIN
|
||||
options FFS #Berkeley Fast Filesystem
|
||||
#options SOFTUPDATES #Enable FFS soft updates support
|
||||
#options UFS_ACL #Support for access control lists
|
||||
#options UFS_DIRHASH #Improve performance on big directories
|
||||
options NO_FFS_SNAPSHOT # We don't require snapshot support
|
||||
|
||||
options IPFIREWALL_DEFAULT_TO_ACCEPT
|
||||
|
||||
# Wireless NIC cards
|
||||
options IEEE80211_DEBUG
|
||||
options IEEE80211_SUPPORT_MESH
|
||||
options IEEE80211_SUPPORT_TDMA
|
||||
options IEEE80211_SUPPORT_SUPERG
|
||||
options IEEE80211_ALQ # 802.11 ALQ logging support
|
||||
device wlan # 802.11 support
|
||||
device wlan_wep # 802.11 WEP support
|
||||
device wlan_ccmp # 802.11 CCMP support
|
||||
device wlan_tkip # 802.11 TKIP support
|
||||
device wlan_xauth # 802.11 hostap support
|
||||
|
||||
# ath(4)
|
||||
device ath # Atheros network device
|
||||
device ath_rate_sample
|
||||
device ath_ahb # Atheros host bus glue
|
||||
options ATH_DEBUG
|
||||
options ATH_DIAGAPI
|
||||
option ATH_ENABLE_11N
|
||||
option AH_DEBUG_ALQ
|
||||
|
||||
#device ath_hal
|
||||
device ath_ar9300 # AR9330 HAL; no need for the others
|
||||
option AH_DEBUG
|
||||
option AH_SUPPORT_AR5416 # 11n HAL support
|
||||
option AH_SUPPORT_AR9330 # Chipset support
|
||||
option AH_AR5416_INTERRUPT_MITIGATION
|
||||
|
||||
device mii
|
||||
device arge
|
||||
|
||||
device usb
|
||||
options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order
|
||||
options USB_DEBUG
|
||||
options USB_HOST_ALIGN=32 # AR71XX (MIPS in general?) requires this
|
||||
device ehci
|
||||
|
||||
device scbus
|
||||
device umass
|
||||
device da
|
||||
|
||||
device spibus
|
||||
device ar71xx_spi
|
||||
device mx25l
|
||||
device ar71xx_wdog
|
||||
|
||||
# Handle 25MHz refclock by allowing a higher baudrate error tolerance.
|
||||
device uart
|
||||
device uart_ar71xx
|
||||
options UART_DEV_TOLERANCE_PCT=50
|
||||
|
||||
device ar71xx_apb
|
||||
|
||||
device loop
|
||||
device ether
|
||||
device md
|
||||
device bpf
|
||||
device random
|
||||
device if_bridge
|
||||
device gpio
|
||||
device gpioled
|
75
sys/mips/conf/QCA953X_BASE.hints
Normal file
75
sys/mips/conf/QCA953X_BASE.hints
Normal file
@ -0,0 +1,75 @@
|
||||
# This file (and the kernel config file accompanying it) are not designed
|
||||
# to be used by themselves. Instead, users of this file should create a
|
||||
# kernel # config file which includes this file (which gets the basic hints),
|
||||
# then override the default options (adding devices as needed) and adding
|
||||
# hints as needed (for example, the GPIO and LAN PHY.)
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
hint.apb.0.at="nexus0"
|
||||
hint.apb.0.irq=4
|
||||
|
||||
# mdiobus on arge0 - required to bring up arge0
|
||||
hint.argemdio.0.at="nexus0"
|
||||
hint.argemdio.0.maddr=0x19000000
|
||||
hint.argemdio.0.msize=0x1000
|
||||
hint.argemdio.0.order=0
|
||||
|
||||
# mdiobus on arge1 - this is what the internal switch is hooked into.
|
||||
hint.argemdio.1.at="nexus0"
|
||||
hint.argemdio.1.maddr=0x1a000000
|
||||
hint.argemdio.1.msize=0x1000
|
||||
hint.argemdio.1.order=0
|
||||
|
||||
# uart0
|
||||
hint.uart.0.at="apb0"
|
||||
# see atheros/uart_cpu_ar71xx.c why +3
|
||||
hint.uart.0.maddr=0x18020003
|
||||
hint.uart.0.msize=0x18
|
||||
hint.uart.0.irq=3
|
||||
|
||||
# ehci - on IP3
|
||||
hint.ehci.0.at="nexus0"
|
||||
hint.ehci.0.maddr=0x1b000100
|
||||
hint.ehci.0.msize=0x00ffff00
|
||||
hint.ehci.0.irq=1
|
||||
|
||||
hint.arge.0.at="nexus0"
|
||||
hint.arge.0.maddr=0x19000000
|
||||
hint.arge.0.msize=0x1000
|
||||
hint.arge.0.irq=2
|
||||
|
||||
hint.arge.1.at="nexus0"
|
||||
hint.arge.1.maddr=0x1a000000
|
||||
hint.arge.1.msize=0x1000
|
||||
hint.arge.1.irq=3
|
||||
|
||||
# XXX The ath device hangs off of the AHB, rather than the Nexus.
|
||||
hint.ath.0.at="nexus0"
|
||||
hint.ath.0.maddr=0x18100000
|
||||
hint.ath.0.msize=0x20000
|
||||
hint.ath.0.irq=0
|
||||
hint.ath.0.vendor_id=0x168c
|
||||
# XXX for now this is 0x00ff because there's no HAL support
|
||||
# yet for honeybee.
|
||||
hint.ath.0.device_id=0x00ff
|
||||
# Set this to define where the ath calibration data
|
||||
# should be fetched from in physical memory.
|
||||
# hint.ath.0.eepromaddr=0x1fff1000
|
||||
|
||||
# SPI flash
|
||||
hint.spi.0.at="nexus0"
|
||||
hint.spi.0.maddr=0x1f000000
|
||||
hint.spi.0.msize=0x10
|
||||
|
||||
hint.mx25l.0.at="spibus0"
|
||||
hint.mx25l.0.cs=0
|
||||
|
||||
# Watchdog
|
||||
hint.ar71xx_wdog.0.at="nexus0"
|
||||
|
||||
# The GPIO function and pin mask is configured per-board
|
||||
hint.gpio.0.at="apb0"
|
||||
hint.gpio.0.maddr=0x18040000
|
||||
hint.gpio.0.msize=0x1000
|
||||
hint.gpio.0.irq=2
|
@ -6,6 +6,7 @@
|
||||
|
||||
KMOD= kern_testfrwk
|
||||
SRCS= kern_testfrwk.c
|
||||
SRCS+= bus_if.h device_if.h
|
||||
|
||||
#
|
||||
# Enable full debugging
|
||||
|
@ -225,7 +225,7 @@ struct sadb_x_policy {
|
||||
u_int8_t sadb_x_policy_dir; /* direction, see ipsec.h */
|
||||
u_int8_t sadb_x_policy_reserved;
|
||||
u_int32_t sadb_x_policy_id;
|
||||
u_int32_t sadb_x_policy_reserved2;
|
||||
u_int32_t sadb_x_policy_priority;
|
||||
};
|
||||
_Static_assert(sizeof(struct sadb_x_policy) == 16, "struct size mismatch");
|
||||
|
||||
|
@ -92,6 +92,7 @@ struct secpolicy {
|
||||
u_int state;
|
||||
#define IPSEC_SPSTATE_DEAD 0
|
||||
#define IPSEC_SPSTATE_ALIVE 1
|
||||
u_int32_t priority; /* priority of this policy */
|
||||
u_int32_t id; /* It's unique number on the system. */
|
||||
/*
|
||||
* lifetime handler.
|
||||
|
@ -473,7 +473,7 @@ static void key_porttosaddr(struct sockaddr *, u_int16_t);
|
||||
key_porttosaddr((struct sockaddr *)(saddr), (port))
|
||||
static struct mbuf *key_setsadbxsa2(u_int8_t, u_int32_t, u_int32_t);
|
||||
static struct mbuf *key_setsadbxpolicy(u_int16_t, u_int8_t,
|
||||
u_int32_t);
|
||||
u_int32_t, u_int32_t);
|
||||
static struct seckey *key_dup_keymsg(const struct sadb_key *, u_int,
|
||||
struct malloc_type *);
|
||||
static struct seclifetime *key_dup_lifemsg(const struct sadb_lifetime *src,
|
||||
@ -1208,6 +1208,29 @@ key_unlink(struct secpolicy *sp)
|
||||
KEY_FREESP(&sp);
|
||||
}
|
||||
|
||||
/*
|
||||
* insert a secpolicy into the SP database. Lower priorities first
|
||||
*/
|
||||
static void
|
||||
key_insertsp(struct secpolicy *newsp)
|
||||
{
|
||||
struct secpolicy *sp;
|
||||
|
||||
SPTREE_WLOCK();
|
||||
TAILQ_FOREACH(sp, &V_sptree[newsp->spidx.dir], chain) {
|
||||
if (newsp->priority < sp->priority) {
|
||||
TAILQ_INSERT_BEFORE(sp, newsp, chain);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
TAILQ_INSERT_TAIL(&V_sptree[newsp->spidx.dir], newsp, chain);
|
||||
|
||||
done:
|
||||
newsp->state = IPSEC_SPSTATE_ALIVE;
|
||||
SPTREE_WUNLOCK();
|
||||
}
|
||||
|
||||
/*
|
||||
* Must be called after calling key_allocsp().
|
||||
* For the packet with socket.
|
||||
@ -1391,6 +1414,7 @@ key_msg2sp(struct sadb_x_policy *xpl0, size_t len, int *error)
|
||||
|
||||
newsp->spidx.dir = xpl0->sadb_x_policy_dir;
|
||||
newsp->policy = xpl0->sadb_x_policy_type;
|
||||
newsp->priority = xpl0->sadb_x_policy_priority;
|
||||
|
||||
/* check policy */
|
||||
switch (xpl0->sadb_x_policy_type) {
|
||||
@ -1627,6 +1651,7 @@ key_sp2msg(struct secpolicy *sp)
|
||||
xpl->sadb_x_policy_type = sp->policy;
|
||||
xpl->sadb_x_policy_dir = sp->spidx.dir;
|
||||
xpl->sadb_x_policy_id = sp->id;
|
||||
xpl->sadb_x_policy_priority = sp->priority;
|
||||
p = (caddr_t)xpl + sizeof(*xpl);
|
||||
|
||||
/* if is the policy for ipsec ? */
|
||||
@ -1904,10 +1929,7 @@ key_spdadd(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp)
|
||||
newsp->lifetime = lft ? lft->sadb_lifetime_addtime : 0;
|
||||
newsp->validtime = lft ? lft->sadb_lifetime_usetime : 0;
|
||||
|
||||
SPTREE_WLOCK();
|
||||
TAILQ_INSERT_TAIL(&V_sptree[newsp->spidx.dir], newsp, chain);
|
||||
newsp->state = IPSEC_SPSTATE_ALIVE;
|
||||
SPTREE_WUNLOCK();
|
||||
key_insertsp(newsp);
|
||||
|
||||
/* delete the entry in spacqtree */
|
||||
if (mhp->msg->sadb_msg_type == SADB_X_SPDUPDATE) {
|
||||
@ -3744,7 +3766,7 @@ key_porttosaddr(struct sockaddr *sa, u_int16_t port)
|
||||
* set data into sadb_x_policy
|
||||
*/
|
||||
static struct mbuf *
|
||||
key_setsadbxpolicy(u_int16_t type, u_int8_t dir, u_int32_t id)
|
||||
key_setsadbxpolicy(u_int16_t type, u_int8_t dir, u_int32_t id, u_int32_t priority)
|
||||
{
|
||||
struct mbuf *m;
|
||||
struct sadb_x_policy *p;
|
||||
@ -3764,6 +3786,7 @@ key_setsadbxpolicy(u_int16_t type, u_int8_t dir, u_int32_t id)
|
||||
p->sadb_x_policy_type = type;
|
||||
p->sadb_x_policy_dir = dir;
|
||||
p->sadb_x_policy_id = id;
|
||||
p->sadb_x_policy_priority = priority;
|
||||
|
||||
return m;
|
||||
}
|
||||
@ -6205,7 +6228,7 @@ key_acquire(const struct secasindex *saidx, struct secpolicy *sp)
|
||||
|
||||
/* set sadb_x_policy */
|
||||
if (sp) {
|
||||
m = key_setsadbxpolicy(sp->policy, sp->spidx.dir, sp->id);
|
||||
m = key_setsadbxpolicy(sp->policy, sp->spidx.dir, sp->id, sp->priority);
|
||||
if (!m) {
|
||||
error = ENOBUFS;
|
||||
goto fail;
|
||||
@ -6706,7 +6729,7 @@ key_register(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp)
|
||||
continue;
|
||||
alg = (struct sadb_alg *)(mtod(n, caddr_t) + off);
|
||||
alg->sadb_alg_id = i;
|
||||
alg->sadb_alg_ivlen = ealgo->blocksize;
|
||||
alg->sadb_alg_ivlen = ealgo->ivsize;
|
||||
alg->sadb_alg_minbits = _BITS(ealgo->minkey);
|
||||
alg->sadb_alg_maxbits = _BITS(ealgo->maxkey);
|
||||
off += PFKEY_ALIGN8(sizeof(struct sadb_alg));
|
||||
|
@ -200,16 +200,10 @@ esp_init(struct secasvar *sav, struct xformsw *xsp)
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* NB: The null xform needs a non-zero blocksize to keep the
|
||||
* crypto code happy but if we use it to set ivlen then
|
||||
* the ESP header will be processed incorrectly. The
|
||||
* compromise is to force it to zero here.
|
||||
*/
|
||||
if (SAV_ISCTRORGCM(sav))
|
||||
sav->ivlen = 8; /* RFC4106 3.1 and RFC3686 3.1 */
|
||||
else
|
||||
sav->ivlen = (txform == &enc_xform_null ? 0 : txform->ivsize);
|
||||
sav->ivlen = txform->ivsize;
|
||||
|
||||
/*
|
||||
* Setup AH-related state.
|
||||
|
@ -735,6 +735,9 @@ ipfw_install_state(struct ip_fw_chain *chain, struct ip_fw *rule,
|
||||
id.fib = M_GETFIB(args->m);
|
||||
|
||||
if (IS_IP6_FLOW_ID (&(args->f_id))) {
|
||||
bzero(&id.src_ip6, sizeof(id.src_ip6));
|
||||
bzero(&id.dst_ip6, sizeof(id.dst_ip6));
|
||||
|
||||
if (limit_mask & DYN_SRC_ADDR)
|
||||
id.src_ip6 = args->f_id.src_ip6;
|
||||
if (limit_mask & DYN_DST_ADDR)
|
||||
|
@ -683,7 +683,9 @@ int
|
||||
smb_vc_disconnect(struct smb_vc *vcp)
|
||||
{
|
||||
|
||||
smb_iod_request(vcp->vc_iod, SMBIOD_EV_DISCONNECT | SMBIOD_EV_SYNC, NULL);
|
||||
if (vcp->vc_iod != NULL)
|
||||
smb_iod_request(vcp->vc_iod, SMBIOD_EV_DISCONNECT |
|
||||
SMBIOD_EV_SYNC, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -659,6 +659,11 @@ smb_iod_thread(void *arg)
|
||||
break;
|
||||
tsleep(&iod->iod_flags, PWAIT, "90idle", iod->iod_sleeptimo);
|
||||
}
|
||||
|
||||
/* We can now safely destroy the mutexes and free the iod structure. */
|
||||
smb_sl_destroy(&iod->iod_rqlock);
|
||||
smb_sl_destroy(&iod->iod_evlock);
|
||||
free(iod, M_SMBIOD);
|
||||
mtx_unlock(&Giant);
|
||||
kproc_exit(0);
|
||||
}
|
||||
@ -685,6 +690,9 @@ smb_iod_create(struct smb_vc *vcp)
|
||||
RFNOWAIT, 0, "smbiod%d", iod->iod_id);
|
||||
if (error) {
|
||||
SMBERROR("can't start smbiod: %d", error);
|
||||
vcp->vc_iod = NULL;
|
||||
smb_sl_destroy(&iod->iod_rqlock);
|
||||
smb_sl_destroy(&iod->iod_evlock);
|
||||
free(iod, M_SMBIOD);
|
||||
return error;
|
||||
}
|
||||
@ -695,9 +703,6 @@ int
|
||||
smb_iod_destroy(struct smbiod *iod)
|
||||
{
|
||||
smb_iod_request(iod, SMBIOD_EV_SHUTDOWN | SMBIOD_EV_SYNC, NULL);
|
||||
smb_sl_destroy(&iod->iod_rqlock);
|
||||
smb_sl_destroy(&iod->iod_evlock);
|
||||
free(iod, M_SMBIOD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ MALLOC_DEFINE(M_XDATA, "xform", "xform data buffers");
|
||||
struct enc_xform enc_xform_null = {
|
||||
CRYPTO_NULL_CBC, "NULL",
|
||||
/* NB: blocksize of 4 is to generate a properly aligned ESP header */
|
||||
NULL_BLOCK_LEN, NULL_BLOCK_LEN, NULL_MIN_KEY, NULL_MAX_KEY,
|
||||
NULL_BLOCK_LEN, 0, NULL_MIN_KEY, NULL_MAX_KEY,
|
||||
null_encrypt,
|
||||
null_decrypt,
|
||||
null_setkey,
|
||||
|
@ -493,9 +493,9 @@ moea64_add_ofw_mappings(mmu_t mmup, phandle_t mmu, size_t sz)
|
||||
int i, j;
|
||||
|
||||
bzero(translations, sz);
|
||||
OF_getprop(OF_finddevice("/"), "#address-cells", &acells,
|
||||
OF_getencprop(OF_finddevice("/"), "#address-cells", &acells,
|
||||
sizeof(acells));
|
||||
if (OF_getprop(mmu, "translations", trans_cells, sz) == -1)
|
||||
if (OF_getencprop(mmu, "translations", trans_cells, sz) == -1)
|
||||
panic("moea64_bootstrap: can't get ofw translations");
|
||||
|
||||
CTR0(KTR_PMAP, "moea64_add_ofw_mappings: translations");
|
||||
@ -856,7 +856,7 @@ moea64_late_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend
|
||||
*/
|
||||
|
||||
chosen = OF_finddevice("/chosen");
|
||||
if (chosen != -1 && OF_getprop(chosen, "mmu", &mmui, 4) != -1) {
|
||||
if (chosen != -1 && OF_getencprop(chosen, "mmu", &mmui, 4) != -1) {
|
||||
mmu = OF_instance_to_package(mmui);
|
||||
if (mmu == -1 ||
|
||||
(sz = OF_getproplen(mmu, "translations")) == -1)
|
||||
|
@ -230,7 +230,7 @@ moea64_pte_synch_native(mmu_t mmu, struct pvo_entry *pvo)
|
||||
moea64_pte_from_pvo(pvo, &properpt);
|
||||
|
||||
rw_rlock(&moea64_eviction_lock);
|
||||
if ((pt->pte_hi & LPTE_AVPN_MASK) !=
|
||||
if ((be64toh(pt->pte_hi) & LPTE_AVPN_MASK) !=
|
||||
(properpt.pte_hi & LPTE_AVPN_MASK)) {
|
||||
/* Evicted */
|
||||
rw_runlock(&moea64_eviction_lock);
|
||||
@ -257,7 +257,7 @@ moea64_pte_clear_native(mmu_t mmu, struct pvo_entry *pvo, uint64_t ptebit)
|
||||
moea64_pte_from_pvo(pvo, &properpt);
|
||||
|
||||
rw_rlock(&moea64_eviction_lock);
|
||||
if ((pt->pte_hi & LPTE_AVPN_MASK) !=
|
||||
if ((be64toh(pt->pte_hi) & LPTE_AVPN_MASK) !=
|
||||
(properpt.pte_hi & LPTE_AVPN_MASK)) {
|
||||
/* Evicted */
|
||||
rw_runlock(&moea64_eviction_lock);
|
||||
@ -268,11 +268,15 @@ moea64_pte_clear_native(mmu_t mmu, struct pvo_entry *pvo, uint64_t ptebit)
|
||||
/* See "Resetting the Reference Bit" in arch manual */
|
||||
PTESYNC();
|
||||
/* 2-step here safe: precision is not guaranteed */
|
||||
ptelo = pt->pte_lo;
|
||||
ptelo = be64toh(pt->pte_lo);
|
||||
|
||||
/* One-byte store to avoid touching the C bit */
|
||||
((volatile uint8_t *)(&pt->pte_lo))[6] =
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
((uint8_t *)(&properpt.pte_lo))[6];
|
||||
#else
|
||||
((uint8_t *)(&properpt.pte_lo))[1];
|
||||
#endif
|
||||
rw_runlock(&moea64_eviction_lock);
|
||||
|
||||
critical_enter();
|
||||
@ -297,7 +301,7 @@ moea64_pte_unset_native(mmu_t mmu, struct pvo_entry *pvo)
|
||||
moea64_pte_from_pvo(pvo, &properpt);
|
||||
|
||||
rw_rlock(&moea64_eviction_lock);
|
||||
if ((pt->pte_hi & LPTE_AVPN_MASK) !=
|
||||
if ((be64toh(pt->pte_hi & LPTE_AVPN_MASK)) !=
|
||||
(properpt.pte_hi & LPTE_AVPN_MASK)) {
|
||||
/* Evicted */
|
||||
moea64_pte_overflow--;
|
||||
@ -311,7 +315,7 @@ moea64_pte_unset_native(mmu_t mmu, struct pvo_entry *pvo)
|
||||
*/
|
||||
isync();
|
||||
critical_enter();
|
||||
pt->pte_hi = (pt->pte_hi & ~LPTE_VALID) | LPTE_LOCKED;
|
||||
pt->pte_hi = be64toh((pt->pte_hi & ~LPTE_VALID) | LPTE_LOCKED);
|
||||
PTESYNC();
|
||||
TLBIE(pvo->pvo_vpn);
|
||||
ptelo = be64toh(pt->pte_lo);
|
||||
@ -337,13 +341,13 @@ moea64_pte_replace_native(mmu_t mmu, struct pvo_entry *pvo, int flags)
|
||||
moea64_pte_from_pvo(pvo, &properpt);
|
||||
|
||||
rw_rlock(&moea64_eviction_lock);
|
||||
if ((pt->pte_hi & LPTE_AVPN_MASK) !=
|
||||
if ((be64toh(pt->pte_hi) & LPTE_AVPN_MASK) !=
|
||||
(properpt.pte_hi & LPTE_AVPN_MASK)) {
|
||||
rw_runlock(&moea64_eviction_lock);
|
||||
return (-1);
|
||||
}
|
||||
pt->pte_hi = properpt.pte_hi;
|
||||
ptelo = pt->pte_lo;
|
||||
pt->pte_hi = htobe64(properpt.pte_hi);
|
||||
ptelo = be64toh(pt->pte_lo);
|
||||
rw_runlock(&moea64_eviction_lock);
|
||||
} else {
|
||||
/* Otherwise, need reinsertion and deletion */
|
||||
@ -571,9 +575,9 @@ moea64_insert_to_pteg_native(struct lpte *pvo_pt, uintptr_t slotbase,
|
||||
* Update the PTE as per "Adding a Page Table Entry". Lock is released
|
||||
* by setting the high doubleworld.
|
||||
*/
|
||||
pt->pte_lo = pvo_pt->pte_lo;
|
||||
pt->pte_lo = htobe64(pvo_pt->pte_lo);
|
||||
EIEIO();
|
||||
pt->pte_hi = pvo_pt->pte_hi;
|
||||
pt->pte_hi = htobe64(pvo_pt->pte_hi);
|
||||
PTESYNC();
|
||||
|
||||
/* Keep statistics */
|
||||
|
@ -79,9 +79,14 @@
|
||||
#define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFFUL
|
||||
#define BUS_SPACE_MAXSIZE 0xFFFFFFFFFFFFFFFFUL
|
||||
#else
|
||||
#ifdef BOOKE
|
||||
#define BUS_SPACE_MAXADDR 0xFFFFFFFFFFULL
|
||||
#define BUS_SPACE_MAXSIZE 0xFFFFFFFFUL
|
||||
#else
|
||||
#define BUS_SPACE_MAXADDR 0xFFFFFFFFUL
|
||||
#define BUS_SPACE_MAXSIZE 0xFFFFFFFFUL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define BUS_SPACE_MAP_CACHEABLE 0x01
|
||||
#define BUS_SPACE_MAP_LINEAR 0x02
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_platform.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/lock.h>
|
||||
@ -45,6 +46,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <powerpc/mpc85xx/mpc85xx.h>
|
||||
|
||||
|
||||
/*
|
||||
* MPC85xx system specific routines
|
||||
*/
|
||||
@ -70,70 +72,133 @@ int
|
||||
law_getmax(void)
|
||||
{
|
||||
uint32_t ver;
|
||||
int law_max;
|
||||
|
||||
ver = SVR_VER(mfspr(SPR_SVR));
|
||||
if (ver == SVR_MPC8555E || ver == SVR_MPC8555)
|
||||
return (8);
|
||||
if (ver == SVR_MPC8548E || ver == SVR_MPC8548 ||
|
||||
ver == SVR_MPC8533E || ver == SVR_MPC8533)
|
||||
return (10);
|
||||
switch (ver) {
|
||||
case SVR_MPC8555:
|
||||
case SVR_MPC8555E:
|
||||
law_max = 8;
|
||||
break;
|
||||
case SVR_MPC8533:
|
||||
case SVR_MPC8533E:
|
||||
case SVR_MPC8548:
|
||||
case SVR_MPC8548E:
|
||||
law_max = 10;
|
||||
break;
|
||||
case SVR_P5020:
|
||||
case SVR_P5020E:
|
||||
law_max = 32;
|
||||
break;
|
||||
default:
|
||||
law_max = 8;
|
||||
}
|
||||
|
||||
return (12);
|
||||
return (law_max);
|
||||
}
|
||||
|
||||
static inline void
|
||||
law_write(uint32_t n, uint64_t bar, uint32_t sr)
|
||||
{
|
||||
#if defined(QORIQ_DPAA)
|
||||
ccsr_write4(OCP85XX_LAWBARH(n), bar >> 32);
|
||||
ccsr_write4(OCP85XX_LAWBARL(n), bar);
|
||||
#else
|
||||
ccsr_write4(OCP85XX_LAWBAR(n), bar >> 12);
|
||||
#endif
|
||||
ccsr_write4(OCP85XX_LAWSR(n), sr);
|
||||
|
||||
/*
|
||||
* The last write to LAWAR should be followed by a read
|
||||
* of LAWAR before any device try to use any of windows.
|
||||
* What more the read of LAWAR should be followed by isync
|
||||
* instruction.
|
||||
*/
|
||||
|
||||
ccsr_read4(OCP85XX_LAWSR(n));
|
||||
isync();
|
||||
}
|
||||
|
||||
static inline void
|
||||
law_read(uint32_t n, uint64_t *bar, uint32_t *sr)
|
||||
{
|
||||
#if defined(QORIQ_DPAA)
|
||||
*bar = (uint64_t)ccsr_read4(OCP85XX_LAWBARH(n)) << 32 |
|
||||
ccsr_read4(OCP85XX_LAWBARL(n));
|
||||
#else
|
||||
*bar = (uint64_t)ccsr_read4(OCP85XX_LAWBAR(n)) << 12;
|
||||
#endif
|
||||
*sr = ccsr_read4(OCP85XX_LAWSR(n));
|
||||
}
|
||||
|
||||
static int
|
||||
law_find_free(void)
|
||||
{
|
||||
uint32_t i,sr;
|
||||
uint64_t bar;
|
||||
int law_max;
|
||||
|
||||
law_max = law_getmax();
|
||||
/* Find free LAW */
|
||||
for (i = 0; i < law_max; i++) {
|
||||
law_read(i, &bar, &sr);
|
||||
if ((sr & 0x80000000) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
return (i);
|
||||
}
|
||||
|
||||
#define _LAW_SR(trgt,size) (0x80000000 | (trgt << 20) | (ffsl(size) - 2))
|
||||
#define _LAW_BAR(addr) (addr >> 12)
|
||||
|
||||
int
|
||||
law_enable(int trgt, u_long addr, u_long size)
|
||||
law_enable(int trgt, uint64_t bar, uint32_t size)
|
||||
{
|
||||
uint32_t bar, sr;
|
||||
uint64_t bar_tmp;
|
||||
uint32_t sr, sr_tmp;
|
||||
int i, law_max;
|
||||
|
||||
if (size == 0)
|
||||
return (0);
|
||||
|
||||
law_max = law_getmax();
|
||||
bar = _LAW_BAR(addr);
|
||||
sr = _LAW_SR(trgt, size);
|
||||
|
||||
/* Bail if already programmed. */
|
||||
for (i = 0; i < law_max; i++)
|
||||
if (sr == ccsr_read4(OCP85XX_LAWSR(i)) &&
|
||||
bar == ccsr_read4(OCP85XX_LAWBAR(i)))
|
||||
for (i = 0; i < law_max; i++) {
|
||||
law_read(i, &bar_tmp, &sr_tmp);
|
||||
if (sr == sr_tmp && bar == bar_tmp)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Find an unused access window. */
|
||||
for (i = 0; i < law_max; i++)
|
||||
if ((ccsr_read4(OCP85XX_LAWSR(i)) & 0x80000000) == 0)
|
||||
break;
|
||||
i = law_find_free();
|
||||
|
||||
if (i == law_max)
|
||||
return (ENOSPC);
|
||||
|
||||
ccsr_write4(OCP85XX_LAWBAR(i), bar);
|
||||
ccsr_write4(OCP85XX_LAWSR(i), sr);
|
||||
law_write(i, bar, sr);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
law_disable(int trgt, u_long addr, u_long size)
|
||||
law_disable(int trgt, uint64_t bar, uint32_t size)
|
||||
{
|
||||
uint32_t bar, sr;
|
||||
uint64_t bar_tmp;
|
||||
uint32_t sr, sr_tmp;
|
||||
int i, law_max;
|
||||
|
||||
law_max = law_getmax();
|
||||
bar = _LAW_BAR(addr);
|
||||
sr = _LAW_SR(trgt, size);
|
||||
|
||||
/* Find and disable requested LAW. */
|
||||
for (i = 0; i < law_max; i++)
|
||||
if (sr == ccsr_read4(OCP85XX_LAWSR(i)) &&
|
||||
bar == ccsr_read4(OCP85XX_LAWBAR(i))) {
|
||||
ccsr_write4(OCP85XX_LAWBAR(i), 0);
|
||||
ccsr_write4(OCP85XX_LAWSR(i), 0);
|
||||
for (i = 0; i < law_max; i++) {
|
||||
law_read(i, &bar_tmp, &sr_tmp);
|
||||
if (sr == sr_tmp && bar == bar_tmp) {
|
||||
law_write(i, 0, 0);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
return (ENOENT);
|
||||
}
|
||||
@ -152,18 +217,22 @@ law_pci_target(struct resource *res, int *trgt_mem, int *trgt_io)
|
||||
rv = 0;
|
||||
trgt = -1;
|
||||
switch (start) {
|
||||
case 0x0000:
|
||||
case 0x8000:
|
||||
trgt = 0;
|
||||
break;
|
||||
case 0x1000:
|
||||
case 0x9000:
|
||||
trgt = 1;
|
||||
break;
|
||||
case 0x2000:
|
||||
case 0xa000:
|
||||
if (ver == SVR_MPC8548E || ver == SVR_MPC8548)
|
||||
trgt = 3;
|
||||
else
|
||||
trgt = 2;
|
||||
break;
|
||||
case 0x3000:
|
||||
case 0xb000:
|
||||
if (ver == SVR_MPC8548E || ver == SVR_MPC8548)
|
||||
rv = EINVAL;
|
||||
|
@ -48,14 +48,35 @@ extern vm_offset_t ccsrbar_va;
|
||||
/*
|
||||
* Local access registers
|
||||
*/
|
||||
#define OCP85XX_LAWBAR(n) (CCSRBAR_VA + 0xc08 + 0x20 * (n))
|
||||
#define OCP85XX_LAWSR(n) (CCSRBAR_VA + 0xc10 + 0x20 * (n))
|
||||
#if defined(QORIQ_DPAA)
|
||||
/* Write order: OCP_LAWBARH -> OCP_LAWBARL -> OCP_LAWSR */
|
||||
#define OCP85XX_LAWBARH(n) (CCSRBAR_VA + 0xc00 + 0x10 * (n))
|
||||
#define OCP85XX_LAWBARL(n) (CCSRBAR_VA + 0xc04 + 0x10 * (n))
|
||||
#define OCP85XX_LAWSR(n) (CCSRBAR_VA + 0xc08 + 0x10 * (n))
|
||||
#else
|
||||
#define OCP85XX_LAWBAR(n) (CCSRBAR_VA + 0xc08 + 0x10 * (n))
|
||||
#define OCP85XX_LAWSR(n) (CCSRBAR_VA + 0xc10 + 0x10 * (n))
|
||||
#endif
|
||||
|
||||
#define OCP85XX_TGTIF_LBC 4
|
||||
#define OCP85XX_TGTIF_RAM_INTL 11
|
||||
#define OCP85XX_TGTIF_RIO 12
|
||||
#define OCP85XX_TGTIF_RAM1 15
|
||||
#define OCP85XX_TGTIF_RAM2 22
|
||||
/* Attribute register */
|
||||
#define OCP85XX_ENA_MASK 0x80000000
|
||||
#define OCP85XX_DIS_MASK 0x7fffffff
|
||||
|
||||
#if defined(QORIQ_DPAA)
|
||||
#define OCP85XX_TGTIF_LBC 0x1f
|
||||
#define OCP85XX_TGTIF_RAM_INTL 0x14
|
||||
#define OCP85XX_TGTIF_RAM1 0x10
|
||||
#define OCP85XX_TGTIF_RAM2 0x11
|
||||
#define OCP85XX_TGTIF_BMAN 0x18
|
||||
#define OCP85XX_TGTIF_QMAN 0x3C
|
||||
#define OCP85XX_TRGT_SHIFT 20
|
||||
#else
|
||||
#define OCP85XX_TGTIF_LBC 0x04
|
||||
#define OCP85XX_TGTIF_RAM_INTL 0x0b
|
||||
#define OCP85XX_TGTIF_RIO 0x0c
|
||||
#define OCP85XX_TGTIF_RAM1 0x0f
|
||||
#define OCP85XX_TGTIF_RAM2 0x16
|
||||
#endif
|
||||
|
||||
/*
|
||||
* L2 cache registers
|
||||
@ -81,8 +102,8 @@ extern vm_offset_t ccsrbar_va;
|
||||
*/
|
||||
uint32_t ccsr_read4(uintptr_t addr);
|
||||
void ccsr_write4(uintptr_t addr, uint32_t val);
|
||||
int law_enable(int trgt, u_long addr, u_long size);
|
||||
int law_disable(int trgt, u_long addr, u_long size);
|
||||
int law_enable(int trgt, uint64_t bar, uint32_t size);
|
||||
int law_disable(int trgt, uint64_t bar, uint32_t size);
|
||||
int law_getmax(void);
|
||||
int law_pci_target(struct resource *, int *, int *);
|
||||
|
||||
|
@ -154,17 +154,17 @@ parse_ofw_memory(phandle_t node, const char *prop, struct mem_region *output)
|
||||
* be found.
|
||||
*/
|
||||
phandle = OF_finddevice("/");
|
||||
if (OF_getprop(phandle, "#address-cells", &address_cells,
|
||||
if (OF_getencprop(phandle, "#address-cells", &address_cells,
|
||||
sizeof(address_cells)) < (ssize_t)sizeof(address_cells))
|
||||
address_cells = 1;
|
||||
if (OF_getprop(phandle, "#size-cells", &size_cells,
|
||||
if (OF_getencprop(phandle, "#size-cells", &size_cells,
|
||||
sizeof(size_cells)) < (ssize_t)sizeof(size_cells))
|
||||
size_cells = 1;
|
||||
|
||||
/*
|
||||
* Get memory.
|
||||
*/
|
||||
if (node == -1 || (sz = OF_getprop(node, prop,
|
||||
if (node == -1 || (sz = OF_getencprop(node, prop,
|
||||
OFmem, sizeof(OFmem))) <= 0)
|
||||
panic("Physical memory map not found");
|
||||
|
||||
@ -572,10 +572,10 @@ OF_get_addr_props(phandle_t node, uint32_t *addrp, uint32_t *sizep, int *pcip)
|
||||
uint32_t addr, size;
|
||||
int pci, res;
|
||||
|
||||
res = OF_getprop(node, "#address-cells", &addr, sizeof(addr));
|
||||
res = OF_getencprop(node, "#address-cells", &addr, sizeof(addr));
|
||||
if (res == -1)
|
||||
addr = 2;
|
||||
res = OF_getprop(node, "#size-cells", &size, sizeof(size));
|
||||
res = OF_getencprop(node, "#size-cells", &size, sizeof(size));
|
||||
if (res == -1)
|
||||
size = 1;
|
||||
pci = 0;
|
||||
@ -624,7 +624,7 @@ OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *tag,
|
||||
OF_get_addr_props(bridge, &naddr, &nsize, &pci);
|
||||
if (pci)
|
||||
*tag = &bs_le_tag;
|
||||
res = OF_getprop(dev, (pci) ? "assigned-addresses" : "reg",
|
||||
res = OF_getencprop(dev, (pci) ? "assigned-addresses" : "reg",
|
||||
cell, sizeof(cell));
|
||||
if (res == -1)
|
||||
return (ENXIO);
|
||||
@ -653,7 +653,7 @@ OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *tag,
|
||||
OF_get_addr_props(parent, &nbridge, NULL, &pcib);
|
||||
if (pcib)
|
||||
*tag = &bs_le_tag;
|
||||
res = OF_getprop(bridge, "ranges", cell, sizeof(cell));
|
||||
res = OF_getencprop(bridge, "ranges", cell, sizeof(cell));
|
||||
if (res == -1)
|
||||
goto next;
|
||||
if (res % sizeof(cell[0]))
|
||||
|
@ -136,10 +136,11 @@ ofw_pci_init(device_t dev)
|
||||
sc = device_get_softc(dev);
|
||||
sc->sc_initialized = 1;
|
||||
|
||||
if (OF_getprop(node, "reg", &sc->sc_pcir, sizeof(sc->sc_pcir)) == -1)
|
||||
if (OF_getencprop(node, "reg", (pcell_t *)&sc->sc_pcir,
|
||||
sizeof(sc->sc_pcir)) == -1)
|
||||
return (ENXIO);
|
||||
|
||||
if (OF_getprop(node, "bus-range", busrange, sizeof(busrange)) != 8)
|
||||
if (OF_getencprop(node, "bus-range", busrange, sizeof(busrange)) != 8)
|
||||
busrange[0] = 0;
|
||||
|
||||
sc->sc_dev = dev;
|
||||
@ -498,11 +499,11 @@ ofw_pci_nranges(phandle_t node)
|
||||
int host_address_cells = 1, pci_address_cells = 3, size_cells = 2;
|
||||
ssize_t nbase_ranges;
|
||||
|
||||
OF_getprop(OF_parent(node), "#address-cells", &host_address_cells,
|
||||
OF_getencprop(OF_parent(node), "#address-cells", &host_address_cells,
|
||||
sizeof(host_address_cells));
|
||||
OF_getprop(node, "#address-cells", &pci_address_cells,
|
||||
OF_getencprop(node, "#address-cells", &pci_address_cells,
|
||||
sizeof(pci_address_cells));
|
||||
OF_getprop(node, "#size-cells", &size_cells, sizeof(size_cells));
|
||||
OF_getencprop(node, "#size-cells", &size_cells, sizeof(size_cells));
|
||||
|
||||
nbase_ranges = OF_getproplen(node, "ranges");
|
||||
if (nbase_ranges <= 0)
|
||||
@ -521,11 +522,11 @@ ofw_pci_fill_ranges(phandle_t node, struct ofw_pci_range *ranges)
|
||||
int nranges;
|
||||
int i, j, k;
|
||||
|
||||
OF_getprop(OF_parent(node), "#address-cells", &host_address_cells,
|
||||
OF_getencprop(OF_parent(node), "#address-cells", &host_address_cells,
|
||||
sizeof(host_address_cells));
|
||||
OF_getprop(node, "#address-cells", &pci_address_cells,
|
||||
OF_getencprop(node, "#address-cells", &pci_address_cells,
|
||||
sizeof(pci_address_cells));
|
||||
OF_getprop(node, "#size-cells", &size_cells, sizeof(size_cells));
|
||||
OF_getencprop(node, "#size-cells", &size_cells, sizeof(size_cells));
|
||||
|
||||
nbase_ranges = OF_getproplen(node, "ranges");
|
||||
if (nbase_ranges <= 0)
|
||||
@ -534,7 +535,7 @@ ofw_pci_fill_ranges(phandle_t node, struct ofw_pci_range *ranges)
|
||||
(pci_address_cells + host_address_cells + size_cells);
|
||||
|
||||
base_ranges = malloc(nbase_ranges, M_DEVBUF, M_WAITOK);
|
||||
OF_getprop(node, "ranges", base_ranges, nbase_ranges);
|
||||
OF_getencprop(node, "ranges", base_ranges, nbase_ranges);
|
||||
|
||||
for (i = 0, j = 0; i < nranges; i++) {
|
||||
ranges[i].pci_hi = base_ranges[j++];
|
||||
|
@ -156,7 +156,8 @@ ofw_pcibus_enum_devtree(device_t dev, u_int domain, u_int busno)
|
||||
node = ofw_bus_get_node(dev);
|
||||
|
||||
for (child = OF_child(node); child != 0; child = OF_peer(child)) {
|
||||
if (OF_getprop(child, "reg", &pcir, sizeof(pcir)) == -1)
|
||||
if (OF_getencprop(child, "reg", (pcell_t *)&pcir,
|
||||
sizeof(pcir)) == -1)
|
||||
continue;
|
||||
slot = OFW_PCI_PHYS_HI_DEVICE(pcir.phys_hi);
|
||||
func = OFW_PCI_PHYS_HI_FUNCTION(pcir.phys_hi);
|
||||
@ -305,11 +306,12 @@ ofw_pcibus_assign_interrupt(device_t dev, device_t child)
|
||||
*/
|
||||
|
||||
iparent = -1;
|
||||
if (OF_getprop(node, "interrupt-parent", &iparent, sizeof(iparent)) < 0)
|
||||
if (OF_getencprop(node, "interrupt-parent", &iparent,
|
||||
sizeof(iparent)) < 0)
|
||||
iparent = -1;
|
||||
icells = 1;
|
||||
if (iparent != -1)
|
||||
OF_getprop(OF_node_from_xref(iparent), "#interrupt-cells",
|
||||
OF_getencprop(OF_node_from_xref(iparent), "#interrupt-cells",
|
||||
&icells, sizeof(icells));
|
||||
|
||||
/*
|
||||
@ -317,12 +319,12 @@ ofw_pcibus_assign_interrupt(device_t dev, device_t child)
|
||||
* fully specified (i.e. does not need routing)
|
||||
*/
|
||||
|
||||
isz = OF_getprop(node, "AAPL,interrupts", intr, sizeof(intr));
|
||||
isz = OF_getencprop(node, "AAPL,interrupts", intr, sizeof(intr));
|
||||
if (isz == sizeof(intr[0])*icells)
|
||||
return ((iparent == -1) ? intr[0] : ofw_bus_map_intr(dev,
|
||||
iparent, icells, intr));
|
||||
|
||||
isz = OF_getprop(node, "interrupts", intr, sizeof(intr));
|
||||
isz = OF_getencprop(node, "interrupts", intr, sizeof(intr));
|
||||
if (isz == sizeof(intr[0])*icells) {
|
||||
if (iparent != -1)
|
||||
intr[0] = ofw_bus_map_intr(dev, iparent, icells, intr);
|
||||
|
@ -127,9 +127,9 @@ openpic_ofw_attach(device_t dev)
|
||||
|
||||
node = ofw_bus_get_node(dev);
|
||||
|
||||
if (OF_getprop(node, "phandle", &xref, sizeof(xref)) == -1 &&
|
||||
OF_getprop(node, "ibm,phandle", &xref, sizeof(xref)) == -1 &&
|
||||
OF_getprop(node, "linux,phandle", &xref, sizeof(xref)) == -1)
|
||||
if (OF_getencprop(node, "phandle", &xref, sizeof(xref)) == -1 &&
|
||||
OF_getencprop(node, "ibm,phandle", &xref, sizeof(xref)) == -1 &&
|
||||
OF_getencprop(node, "linux,phandle", &xref, sizeof(xref)) == -1)
|
||||
xref = node;
|
||||
|
||||
return (openpic_common_attach(dev, xref));
|
||||
|
@ -176,7 +176,7 @@ cpcht_attach(device_t dev)
|
||||
node = ofw_bus_get_node(dev);
|
||||
sc = device_get_softc(dev);
|
||||
|
||||
if (OF_getprop(node, "reg", reg, sizeof(reg)) < 12)
|
||||
if (OF_getencprop(node, "reg", reg, sizeof(reg)) < 12)
|
||||
return (ENXIO);
|
||||
|
||||
if (OF_getproplen(node, "ranges") <= 0)
|
||||
@ -219,7 +219,7 @@ cpcht_configure_htbridge(device_t dev, phandle_t child)
|
||||
u_int b, f, s;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
if (OF_getprop(child, "reg", &pcir, sizeof(pcir)) == -1)
|
||||
if (OF_getencprop(child, "reg", (pcell_t *)&pcir, sizeof(pcir)) == -1)
|
||||
return;
|
||||
|
||||
b = OFW_PCI_PHYS_HI_BUS(pcir.phys_hi);
|
||||
|
@ -186,11 +186,11 @@ kiic_attach(device_t self)
|
||||
return (ENOMEM);
|
||||
}
|
||||
|
||||
if (OF_getprop(node, "AAPL,i2c-rate", &rate, 4) != 4) {
|
||||
if (OF_getencprop(node, "AAPL,i2c-rate", &rate, 4) != 4) {
|
||||
device_printf(self, "cannot get i2c-rate\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
if (OF_getprop(node, "AAPL,address-step", &sc->sc_regstep, 4) != 4) {
|
||||
if (OF_getencprop(node, "AAPL,address-step", &sc->sc_regstep, 4) != 4) {
|
||||
device_printf(self, "unable to find i2c address step\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ macgpio_attach(device_t dev)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (OF_getprop(child,"reg",&dinfo->gpio_num,
|
||||
if (OF_getencprop(child, "reg", &dinfo->gpio_num,
|
||||
sizeof(dinfo->gpio_num)) != sizeof(dinfo->gpio_num)) {
|
||||
/*
|
||||
* Some early GPIO controllers don't provide GPIO
|
||||
@ -191,9 +191,9 @@ macgpio_attach(device_t dev)
|
||||
|
||||
resource_list_init(&dinfo->mdi_resources);
|
||||
|
||||
if (OF_getprop(child, "interrupts", &irq, sizeof(irq)) ==
|
||||
if (OF_getencprop(child, "interrupts", &irq, sizeof(irq)) ==
|
||||
sizeof(irq)) {
|
||||
OF_searchprop(child, "interrupt-parent", &iparent,
|
||||
OF_searchencprop(child, "interrupt-parent", &iparent,
|
||||
sizeof(iparent));
|
||||
resource_list_add(&dinfo->mdi_resources, SYS_RES_IRQ,
|
||||
0, MAP_IRQ(iparent, irq), MAP_IRQ(iparent, irq),
|
||||
|
@ -142,11 +142,11 @@ mphyp_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
|
||||
node = OF_peer(node);
|
||||
}
|
||||
|
||||
res = OF_getprop(node, "ibm,pft-size", prop, sizeof(prop));
|
||||
res = OF_getencprop(node, "ibm,pft-size", prop, sizeof(prop));
|
||||
if (res <= 0)
|
||||
panic("mmu_phyp: unknown PFT size");
|
||||
final_pteg_count = 1 << prop[1];
|
||||
res = OF_getprop(node, "ibm,slb-size", prop, sizeof(prop[0]));
|
||||
res = OF_getencprop(node, "ibm,slb-size", prop, sizeof(prop[0]));
|
||||
if (res > 0)
|
||||
n_slbs = prop[0];
|
||||
|
||||
|
@ -147,7 +147,7 @@ uart_phyp_probe_node(struct uart_phyp_softc *sc)
|
||||
return (ENXIO);
|
||||
|
||||
reg = -1;
|
||||
OF_getprop(node, "reg", ®, sizeof(reg));
|
||||
OF_getencprop(node, "reg", ®, sizeof(reg));
|
||||
if (reg == -1)
|
||||
return (ENXIO);
|
||||
sc->vtermid = reg;
|
||||
@ -200,7 +200,7 @@ uart_phyp_cnprobe(struct consdev *cp)
|
||||
|
||||
/* Check if OF has an active stdin/stdout */
|
||||
input = -1;
|
||||
if (OF_getprop(chosen, "stdout", &stdout,
|
||||
if (OF_getencprop(chosen, "stdout", &stdout,
|
||||
sizeof(stdout)) == sizeof(stdout) && stdout != 0)
|
||||
input = OF_instance_to_package(stdout);
|
||||
if (input == -1)
|
||||
|
@ -159,7 +159,7 @@ llan_attach(device_t dev)
|
||||
node = ofw_bus_get_node(dev);
|
||||
OF_getprop(node, "local-mac-address", sc->mac_address,
|
||||
sizeof(sc->mac_address));
|
||||
OF_getprop(node, "reg", &sc->unit, sizeof(sc->unit));
|
||||
OF_getencprop(node, "reg", &sc->unit, sizeof(sc->unit));
|
||||
|
||||
mtx_init(&sc->io_lock, "llan", NULL, MTX_DEF);
|
||||
|
||||
|
@ -290,7 +290,8 @@ vscsi_attach(device_t dev)
|
||||
mtx_init(&sc->io_lock, "vscsi", NULL, MTX_DEF);
|
||||
|
||||
/* Get properties */
|
||||
OF_getprop(ofw_bus_get_node(dev), "reg", &sc->unit, sizeof(sc->unit));
|
||||
OF_getencprop(ofw_bus_get_node(dev), "reg", &sc->unit,
|
||||
sizeof(sc->unit));
|
||||
|
||||
/* Setup interrupt */
|
||||
sc->irqid = 0;
|
||||
|
@ -172,7 +172,7 @@ parse_drconf_memory(struct mem_region *ofmem, int *msz,
|
||||
vm_offset_t base;
|
||||
int i, idx, len, lasz, lmsz, res;
|
||||
uint32_t flags, lmb_size[2];
|
||||
uint64_t *dmem;
|
||||
uint32_t *dmem;
|
||||
|
||||
lmsz = *msz;
|
||||
lasz = *asz;
|
||||
@ -182,7 +182,8 @@ parse_drconf_memory(struct mem_region *ofmem, int *msz,
|
||||
/* No drconf node, return. */
|
||||
return (0);
|
||||
|
||||
res = OF_getprop(phandle, "ibm,lmb-size", lmb_size, sizeof(lmb_size));
|
||||
res = OF_getencprop(phandle, "ibm,lmb-size", lmb_size,
|
||||
sizeof(lmb_size));
|
||||
if (res == -1)
|
||||
return (0);
|
||||
printf("Logical Memory Block size: %d MB\n", lmb_size[1] >> 20);
|
||||
@ -207,8 +208,8 @@ parse_drconf_memory(struct mem_region *ofmem, int *msz,
|
||||
*/
|
||||
cell_t arr[len/sizeof(cell_t)];
|
||||
|
||||
res = OF_getprop(phandle, "ibm,dynamic-memory", &arr,
|
||||
sizeof(arr));
|
||||
res = OF_getencprop(phandle, "ibm,dynamic-memory", arr,
|
||||
sizeof(arr));
|
||||
if (res == -1)
|
||||
return (0);
|
||||
|
||||
@ -216,12 +217,12 @@ parse_drconf_memory(struct mem_region *ofmem, int *msz,
|
||||
idx = arr[0];
|
||||
|
||||
/* First address, in arr[1], arr[2]*/
|
||||
dmem = (uint64_t*)&arr[1];
|
||||
dmem = &arr[1];
|
||||
|
||||
for (i = 0; i < idx; i++) {
|
||||
base = *dmem;
|
||||
dmem += 2;
|
||||
flags = *dmem;
|
||||
base = ((uint64_t)dmem[0] << 32) + dmem[1];
|
||||
dmem += 4;
|
||||
flags = dmem[1];
|
||||
/* Use region only if available and not reserved. */
|
||||
if ((flags & 0x8) && !(flags & 0x80)) {
|
||||
ofmem[lmsz].mr_start = base;
|
||||
@ -231,7 +232,7 @@ parse_drconf_memory(struct mem_region *ofmem, int *msz,
|
||||
lmsz++;
|
||||
lasz++;
|
||||
}
|
||||
dmem++;
|
||||
dmem += 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ -281,7 +282,7 @@ chrp_timebase_freq(platform_t plat, struct cpuref *cpuref)
|
||||
|
||||
phandle = cpuref->cr_hwref;
|
||||
|
||||
OF_getprop(phandle, "timebase-frequency", &ticks, sizeof(ticks));
|
||||
OF_getencprop(phandle, "timebase-frequency", &ticks, sizeof(ticks));
|
||||
|
||||
if (ticks <= 0)
|
||||
panic("Unable to determine timebase frequency!");
|
||||
@ -327,10 +328,10 @@ chrp_smp_first_cpu(platform_t plat, struct cpuref *cpuref)
|
||||
return (ENOENT);
|
||||
|
||||
cpuref->cr_hwref = cpu;
|
||||
res = OF_getprop(cpu, "ibm,ppc-interrupt-server#s", &cpuid,
|
||||
res = OF_getencprop(cpu, "ibm,ppc-interrupt-server#s", &cpuid,
|
||||
sizeof(cpuid));
|
||||
if (res <= 0)
|
||||
res = OF_getprop(cpu, "reg", &cpuid, sizeof(cpuid));
|
||||
res = OF_getencprop(cpu, "reg", &cpuid, sizeof(cpuid));
|
||||
if (res <= 0)
|
||||
cpuid = 0;
|
||||
cpuref->cr_cpuid = cpuid;
|
||||
@ -349,7 +350,7 @@ chrp_smp_next_cpu(platform_t plat, struct cpuref *cpuref)
|
||||
res = OF_getproplen(cpuref->cr_hwref, "ibm,ppc-interrupt-server#s");
|
||||
if (res > 0) {
|
||||
cell_t interrupt_servers[res/sizeof(cell_t)];
|
||||
OF_getprop(cpuref->cr_hwref, "ibm,ppc-interrupt-server#s",
|
||||
OF_getencprop(cpuref->cr_hwref, "ibm,ppc-interrupt-server#s",
|
||||
interrupt_servers, res);
|
||||
for (i = 0; i < res/sizeof(cell_t) - 1; i++) {
|
||||
if (interrupt_servers[i] == cpuref->cr_cpuid) {
|
||||
@ -371,10 +372,10 @@ chrp_smp_next_cpu(platform_t plat, struct cpuref *cpuref)
|
||||
return (ENOENT);
|
||||
|
||||
cpuref->cr_hwref = cpu;
|
||||
res = OF_getprop(cpu, "ibm,ppc-interrupt-server#s", &cpuid,
|
||||
res = OF_getencprop(cpu, "ibm,ppc-interrupt-server#s", &cpuid,
|
||||
sizeof(cpuid));
|
||||
if (res <= 0)
|
||||
res = OF_getprop(cpu, "reg", &cpuid, sizeof(cpuid));
|
||||
res = OF_getencprop(cpu, "reg", &cpuid, sizeof(cpuid));
|
||||
if (res <= 0)
|
||||
cpuid = 0;
|
||||
cpuref->cr_cpuid = cpuid;
|
||||
@ -393,7 +394,7 @@ chrp_smp_get_bsp(platform_t plat, struct cpuref *cpuref)
|
||||
if (chosen == 0)
|
||||
return (ENXIO);
|
||||
|
||||
res = OF_getprop(chosen, "cpu", &inst, sizeof(inst));
|
||||
res = OF_getencprop(chosen, "cpu", &inst, sizeof(inst));
|
||||
if (res < 0)
|
||||
return (ENXIO);
|
||||
|
||||
@ -401,10 +402,10 @@ chrp_smp_get_bsp(platform_t plat, struct cpuref *cpuref)
|
||||
|
||||
/* Pick the primary thread. Can it be any other? */
|
||||
cpuref->cr_hwref = bsp;
|
||||
res = OF_getprop(bsp, "ibm,ppc-interrupt-server#s", &cpuid,
|
||||
res = OF_getencprop(bsp, "ibm,ppc-interrupt-server#s", &cpuid,
|
||||
sizeof(cpuid));
|
||||
if (res <= 0)
|
||||
res = OF_getprop(bsp, "reg", &cpuid, sizeof(cpuid));
|
||||
res = OF_getencprop(bsp, "reg", &cpuid, sizeof(cpuid));
|
||||
if (res <= 0)
|
||||
cpuid = 0;
|
||||
cpuref->cr_cpuid = cpuid;
|
||||
|
@ -88,19 +88,20 @@ phyp_iommu_set_dma_tag(device_t bus, device_t dev, bus_dma_tag_t tag)
|
||||
return (ENXIO);
|
||||
|
||||
node = ofw_bus_get_node(p);
|
||||
if (OF_getprop(node, "ibm,#dma-size-cells", &dma_scells,
|
||||
if (OF_getencprop(node, "ibm,#dma-size-cells", &dma_scells,
|
||||
sizeof(cell_t)) <= 0)
|
||||
OF_searchprop(node, "#size-cells", &dma_scells, sizeof(cell_t));
|
||||
if (OF_getprop(node, "ibm,#dma-address-cells", &dma_acells,
|
||||
OF_searchencprop(node, "#size-cells", &dma_scells,
|
||||
sizeof(cell_t));
|
||||
if (OF_getencprop(node, "ibm,#dma-address-cells", &dma_acells,
|
||||
sizeof(cell_t)) <= 0)
|
||||
OF_searchprop(node, "#address-cells", &dma_acells,
|
||||
OF_searchencprop(node, "#address-cells", &dma_acells,
|
||||
sizeof(cell_t));
|
||||
|
||||
if (ofw_bus_has_prop(p, "ibm,my-dma-window"))
|
||||
OF_getprop(node, "ibm,my-dma-window", dmawindow,
|
||||
OF_getencprop(node, "ibm,my-dma-window", dmawindow,
|
||||
sizeof(cell_t)*(dma_scells + dma_acells + 1));
|
||||
else
|
||||
OF_getprop(node, "ibm,dma-window", dmawindow,
|
||||
OF_getencprop(node, "ibm,dma-window", dmawindow,
|
||||
sizeof(cell_t)*(dma_scells + dma_acells + 1));
|
||||
|
||||
struct dma_window *window = malloc(sizeof(struct dma_window),
|
||||
|
@ -133,7 +133,7 @@ rtaspci_attach(device_t dev)
|
||||
sc->ex_write_pci_config = rtas_token_lookup("ibm,write-pci-config");
|
||||
|
||||
sc->sc_extended_config = 0;
|
||||
OF_getprop(ofw_bus_get_node(dev), "ibm,pci-config-space-type",
|
||||
OF_getencprop(ofw_bus_get_node(dev), "ibm,pci-config-space-type",
|
||||
&sc->sc_extended_config, sizeof(sc->sc_extended_config));
|
||||
|
||||
return (ofw_pci_attach(dev));
|
||||
|
@ -35,7 +35,6 @@
|
||||
#define KERNELDUMP_ARCH_VERSION KERNELDUMP_SPARC64_VERSION
|
||||
#define EM_VALUE EM_SPARCV9
|
||||
|
||||
void dumpsys_pa_init(void);
|
||||
int dumpsys(struct dumperinfo *);
|
||||
|
||||
static inline struct dump_pa *
|
||||
@ -59,13 +58,6 @@ dumpsys_unmap_chunk(vm_paddr_t pa, size_t s, void *va)
|
||||
dumpsys_gen_unmap_chunk(pa, s, va);
|
||||
}
|
||||
|
||||
static inline int
|
||||
dumpsys_write_aux_headers(struct dumperinfo *di)
|
||||
{
|
||||
|
||||
return (dumpsys_gen_write_aux_headers(di));
|
||||
}
|
||||
|
||||
static inline int
|
||||
minidumpsys(struct dumperinfo *di)
|
||||
{
|
||||
|
@ -54,18 +54,6 @@ extern struct dump_pa dump_map[DUMPSYS_MD_PA_NPAIRS];
|
||||
|
||||
int do_minidump = 0;
|
||||
|
||||
void
|
||||
dumpsys_pa_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
memset(dump_map, 0, sizeof(dump_map));
|
||||
for (i = 0; i < sparc64_nmemreg; i++) {
|
||||
dump_map[i].pa_start = sparc64_memreg[i].mr_start;
|
||||
dump_map[i].pa_size = sparc64_memreg[i].mr_size;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dumpsys_map_chunk(vm_paddr_t pa, size_t chunk __unused, void **va)
|
||||
{
|
||||
@ -89,16 +77,18 @@ int
|
||||
dumpsys(struct dumperinfo *di)
|
||||
{
|
||||
static struct kerneldumpheader kdh;
|
||||
|
||||
struct sparc64_dump_hdr hdr;
|
||||
vm_size_t size, totsize, hdrsize;
|
||||
int error, i, nreg;
|
||||
|
||||
/* Calculate dump size. */
|
||||
/* Set up dump_map and calculate dump size. */
|
||||
size = 0;
|
||||
nreg = sparc64_nmemreg;
|
||||
for (i = 0; i < sparc64_nmemreg; i++)
|
||||
size += sparc64_memreg[i].mr_size;
|
||||
memset(dump_map, 0, sizeof(dump_map));
|
||||
for (i = 0; i < nreg; i++) {
|
||||
dump_map[i].pa_start = sparc64_memreg[i].mr_start;
|
||||
size += dump_map[i].pa_size = sparc64_memreg[i].mr_size;
|
||||
}
|
||||
/* Account for the header size. */
|
||||
hdrsize = roundup2(sizeof(hdr) + sizeof(struct sparc64_dump_reg) * nreg,
|
||||
DEV_BSIZE);
|
||||
@ -139,7 +129,7 @@ dumpsys(struct dumperinfo *di)
|
||||
|
||||
fileofs = hdrsize;
|
||||
/* Now, write out the region descriptors. */
|
||||
for (i = 0; i < sparc64_nmemreg; i++) {
|
||||
for (i = 0; i < nreg; i++) {
|
||||
error = reg_write(di, sparc64_memreg[i].mr_start,
|
||||
sparc64_memreg[i].mr_size);
|
||||
if (error != 0)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user