sync
This commit is contained in:
parent
01bad5edf2
commit
f609457dcf
@ -1,5 +1,5 @@
|
||||
#!/bin/ksh
|
||||
# $OpenBSD: install.sub,v 1.1243 2023/04/25 14:20:13 kn Exp $
|
||||
# $OpenBSD: install.sub,v 1.1244 2023/05/02 15:55:58 deraadt Exp $
|
||||
#
|
||||
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
|
||||
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
|
||||
@ -3102,7 +3102,7 @@ Create a passphrase protected CRYPTO softraid volume to be used as root disk.
|
||||
__EOT
|
||||
diskinfo $(get_dkdevs);;
|
||||
'') ;;
|
||||
no) return;;
|
||||
n|no) return;;
|
||||
*) isin "$resp" $(get_dkdevs) && break
|
||||
echo 'No such disk.';;
|
||||
esac
|
||||
|
@ -1 +1 @@
|
||||
# SecBSD 1.3-df696c4: Mon May 2 00:00:00 UTC 2023 (Quetzalcoatl)
|
||||
# SecBSD 1.3-8bfda6e: Mon May 2 00:00:00 UTC 2023 (Quetzalcoatl)
|
||||
|
2
gnu/usr.bin/binutils-2.17/binutils/configure
vendored
2
gnu/usr.bin/binutils-2.17/binutils/configure
vendored
@ -3508,7 +3508,7 @@ else
|
||||
lt_cv_sys_max_cmd_len=8192;
|
||||
;;
|
||||
|
||||
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
|
||||
netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | secbsd*)
|
||||
# This has been around since 386BSD, at least. Likely further.
|
||||
if test -x /sbin/sysctl; then
|
||||
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
|
||||
|
@ -185,7 +185,7 @@ case ${generic_target} in
|
||||
esac ;;
|
||||
i386-*-openbsd[0-2].* | \
|
||||
i386-*-openbsd3.[0-2]) fmt=aout em=obsd ;;
|
||||
i386-*-openbsd* | i386-*-secbsd) fmt=elf em=obsd ;;
|
||||
i386-*-openbsd* | i386-*-secbsd*) fmt=elf em=obsd ;;
|
||||
i386-*-linux*aout*) fmt=aout em=linux ;;
|
||||
i386-*-linux*oldld) fmt=aout em=linux ;;
|
||||
i386-*-linux*coff*) fmt=coff em=linux ;;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ec_curve.c,v 1.39 2023/05/01 17:53:01 tb Exp $ */
|
||||
/* $OpenBSD: ec_curve.c,v 1.41 2023/05/02 13:01:57 tb Exp $ */
|
||||
/*
|
||||
* Written by Nils Larsch for the OpenSSL project.
|
||||
*/
|
||||
@ -3000,11 +3000,10 @@ static const struct ec_list_element {
|
||||
static EC_GROUP *
|
||||
ec_group_new_from_data(const struct ec_list_element *curve)
|
||||
{
|
||||
EC_GROUP *group = NULL;
|
||||
EC_POINT *P = NULL;
|
||||
EC_GROUP *group = NULL, *ret = NULL;
|
||||
EC_POINT *generator = NULL;
|
||||
BN_CTX *ctx = NULL;
|
||||
BIGNUM *p, *a, *b, *x, *y, *order, *cofactor;
|
||||
int ok = 0;
|
||||
|
||||
if ((ctx = BN_CTX_new()) == NULL) {
|
||||
ECerror(ERR_R_MALLOC_FAILURE);
|
||||
@ -3057,8 +3056,9 @@ ec_group_new_from_data(const struct ec_list_element *curve)
|
||||
ECerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
EC_GROUP_set_curve_name(group, curve->nid);
|
||||
|
||||
if ((P = EC_POINT_new(group)) == NULL) {
|
||||
if ((generator = EC_POINT_new(group)) == NULL) {
|
||||
ECerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
@ -3070,7 +3070,7 @@ ec_group_new_from_data(const struct ec_list_element *curve)
|
||||
ECerror(ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
|
||||
if (!EC_POINT_set_affine_coordinates(group, generator, x, y, ctx)) {
|
||||
ECerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
@ -3082,51 +3082,45 @@ ec_group_new_from_data(const struct ec_list_element *curve)
|
||||
ECerror(ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (!EC_GROUP_set_generator(group, P, order, cofactor)) {
|
||||
if (!EC_GROUP_set_generator(group, generator, order, cofactor)) {
|
||||
ECerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (curve->seed != NULL) {
|
||||
if (!EC_GROUP_set_seed(group, curve->seed, curve->seed_len)) {
|
||||
ECerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
ok = 1;
|
||||
|
||||
ret = group;
|
||||
group = NULL;
|
||||
|
||||
err:
|
||||
if (!ok) {
|
||||
EC_GROUP_free(group);
|
||||
group = NULL;
|
||||
}
|
||||
EC_POINT_free(P);
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(generator);
|
||||
BN_CTX_end(ctx);
|
||||
BN_CTX_free(ctx);
|
||||
|
||||
return group;
|
||||
return ret;
|
||||
}
|
||||
|
||||
EC_GROUP *
|
||||
EC_GROUP_new_by_curve_name(int nid)
|
||||
{
|
||||
size_t i;
|
||||
EC_GROUP *ret = NULL;
|
||||
|
||||
if (nid <= 0)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < CURVE_LIST_LENGTH; i++) {
|
||||
if (curve_list[i].nid == nid) {
|
||||
ret = ec_group_new_from_data(&curve_list[i]);
|
||||
break;
|
||||
}
|
||||
if (curve_list[i].nid == nid)
|
||||
return ec_group_new_from_data(&curve_list[i]);
|
||||
}
|
||||
if (ret == NULL) {
|
||||
ECerror(EC_R_UNKNOWN_GROUP);
|
||||
return NULL;
|
||||
}
|
||||
EC_GROUP_set_curve_name(ret, nid);
|
||||
|
||||
return ret;
|
||||
ECerror(EC_R_UNKNOWN_GROUP);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: X509_NAME_get_index_by_NID.3,v 1.13 2022/07/02 17:09:09 jsing Exp $
|
||||
.\" $OpenBSD: X509_NAME_get_index_by_NID.3,v 1.14 2023/05/02 14:13:05 beck Exp $
|
||||
.\" OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400
|
||||
.\"
|
||||
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
|
||||
@ -49,7 +49,7 @@
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd $Mdocdate: July 2 2022 $
|
||||
.Dd $Mdocdate: May 2 2023 $
|
||||
.Dt X509_NAME_GET_INDEX_BY_NID 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -136,22 +136,32 @@ run from 0 to
|
||||
.Fn X509_NAME_get_text_by_NID
|
||||
and
|
||||
.Fn X509_NAME_get_text_by_OBJ
|
||||
retrieve the "text" from the first entry in
|
||||
retrieve the bytes encoded as UTF-8 from the first entry in
|
||||
.Fa name
|
||||
which matches
|
||||
.Fa nid
|
||||
or
|
||||
.Fa obj .
|
||||
At most
|
||||
.Fa len
|
||||
bytes will be written and the text written to
|
||||
.Fa buf
|
||||
will be NUL terminated.
|
||||
If
|
||||
.Fa buf
|
||||
is
|
||||
.Dv NULL ,
|
||||
nothing is written, but the return value is calculated as usual.
|
||||
If
|
||||
.Fa buf
|
||||
is not
|
||||
.Dv NULL ,
|
||||
no more than
|
||||
.Fa len
|
||||
bytes will be written and the text written to
|
||||
.Fa buf
|
||||
will be NUL terminated.
|
||||
.Pp
|
||||
Nothing is written and it is a failure if
|
||||
.Fa len
|
||||
is not large enough to hold the NUL byte terminated UTF-8 encoding of
|
||||
the text, or if the UTF-8 encoding ot the text would contins a NUL
|
||||
byte.
|
||||
.Pp
|
||||
All relevant
|
||||
.Dv NID_*
|
||||
@ -189,8 +199,8 @@ if the index is invalid.
|
||||
.Fn X509_NAME_get_text_by_NID
|
||||
and
|
||||
.Fn X509_NAME_get_text_by_OBJ
|
||||
return the length of the output string written, not counting the
|
||||
terminating NUL, or -1 if no match is found.
|
||||
return the length of the output UTF-8 string written, not counting the
|
||||
terminating NUL, or -1 in the case of an error or no match being found.
|
||||
.Pp
|
||||
In some cases of failure of
|
||||
.Fn X509_NAME_get_index_by_NID
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pk7_mime.c,v 1.17 2023/04/26 14:25:58 tb Exp $ */
|
||||
/* $OpenBSD: pk7_mime.c,v 1.19 2023/05/02 09:56:12 tb Exp $ */
|
||||
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
||||
* project.
|
||||
*/
|
||||
@ -71,8 +71,7 @@ LCRYPTO_ALIAS(BIO_new_PKCS7);
|
||||
int
|
||||
i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags)
|
||||
{
|
||||
return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)p7, in, flags,
|
||||
&PKCS7_it);
|
||||
return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)p7, in, flags, &PKCS7_it);
|
||||
}
|
||||
LCRYPTO_ALIAS(i2d_PKCS7_bio_stream);
|
||||
|
||||
@ -87,16 +86,14 @@ LCRYPTO_ALIAS(PEM_write_bio_PKCS7_stream);
|
||||
int
|
||||
SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
|
||||
{
|
||||
STACK_OF(X509_ALGOR) *mdalgs;
|
||||
int ctype_nid = OBJ_obj2nid(p7->type);
|
||||
if (ctype_nid == NID_pkcs7_signed)
|
||||
STACK_OF(X509_ALGOR) *mdalgs = NULL;
|
||||
int ctype_nid;
|
||||
|
||||
if ((ctype_nid = OBJ_obj2nid(p7->type)) == NID_pkcs7_signed)
|
||||
mdalgs = p7->d.sign->md_algs;
|
||||
else
|
||||
mdalgs = NULL;
|
||||
|
||||
flags ^= SMIME_OLDMIME;
|
||||
|
||||
|
||||
return SMIME_write_ASN1(bio, (ASN1_VALUE *)p7, data, flags,
|
||||
ctype_nid, NID_undef, mdalgs, &PKCS7_it);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: x509name.c,v 1.31 2023/02/16 08:38:17 tb Exp $ */
|
||||
/* $OpenBSD: x509name.c,v 1.32 2023/05/02 14:13:05 beck Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -66,6 +66,7 @@
|
||||
#include <openssl/stack.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
#include "bytestring.h"
|
||||
#include "x509_local.h"
|
||||
|
||||
int
|
||||
@ -84,21 +85,37 @@ int
|
||||
X509_NAME_get_text_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, char *buf,
|
||||
int len)
|
||||
{
|
||||
int i;
|
||||
unsigned char *text = NULL;
|
||||
ASN1_STRING *data;
|
||||
int i, text_len;
|
||||
int ret = -1;
|
||||
CBS cbs;
|
||||
|
||||
i = X509_NAME_get_index_by_OBJ(name, obj, -1);
|
||||
if (i < 0)
|
||||
return (-1);
|
||||
goto err;
|
||||
data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, i));
|
||||
i = (data->length > (len - 1)) ? (len - 1) : data->length;
|
||||
if (buf == NULL)
|
||||
return (data->length);
|
||||
if (i >= 0) {
|
||||
memcpy(buf, data->data, i);
|
||||
buf[i] = '\0';
|
||||
/*
|
||||
* Fail if we cannot encode as UTF-8, or if the UTF-8 encoding of the
|
||||
* string contains a 0 byte, because mortal callers seldom handle the
|
||||
* length difference correctly
|
||||
*/
|
||||
if ((text_len = ASN1_STRING_to_UTF8(&text, data)) < 0)
|
||||
goto err;
|
||||
CBS_init(&cbs, text, text_len);
|
||||
if (CBS_contains_zero_byte(&cbs))
|
||||
goto err;
|
||||
/* We still support the "pass NULL to find out how much" API */
|
||||
if (buf != NULL) {
|
||||
if (!CBS_write_bytes(&cbs, buf, len - 1, NULL))
|
||||
goto err;
|
||||
/* It must be a C string */
|
||||
buf[text_len] = '\0';
|
||||
}
|
||||
return (i);
|
||||
ret = text_len;
|
||||
err:
|
||||
free(text);
|
||||
return (ret);
|
||||
}
|
||||
LCRYPTO_ALIAS(X509_NAME_get_text_by_OBJ);
|
||||
|
||||
|
@ -35,12 +35,11 @@ The changes made in version 1.2.13.1 are documented in the file ChangeLog.
|
||||
|
||||
Unsupported third party contributions are provided in directory contrib/ .
|
||||
|
||||
zlib is available in Java using the java.util.zip package, documented at
|
||||
http://java.sun.com/developer/technicalArticles/Programming/compression/ .
|
||||
zlib is available in Java using the java.util.zip package. Follow the API
|
||||
Documentation link at: https://docs.oracle.com/search/?q=java.util.zip .
|
||||
|
||||
A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is available
|
||||
at CPAN (Comprehensive Perl Archive Network) sites, including
|
||||
http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
|
||||
A Perl interface to zlib and bzip2 written by Paul Marquess <pmqs@cpan.org>
|
||||
can be found at https://github.com/pmqs/IO-Compress .
|
||||
|
||||
A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
|
||||
available in Python 1.5 and later versions, see
|
||||
|
@ -522,7 +522,7 @@ typedef uLong FAR uLongf;
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# if defined(_WIN32) && !defined(__GNUC__)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
|
@ -729,7 +729,7 @@ ZEXTERN int ZEXPORT deflateParams(z_streamp strm,
|
||||
Then no more input data should be provided before the deflateParams() call.
|
||||
If this is done, the old level and strategy will be applied to the data
|
||||
compressed before deflateParams(), and the new level and strategy will be
|
||||
applied to the the data compressed after deflateParams().
|
||||
applied to the data compressed after deflateParams().
|
||||
|
||||
deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
|
||||
state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bio_asn1.c,v 1.3 2023/04/25 19:48:24 tb Exp $ */
|
||||
/* $OpenBSD: bio_asn1.c,v 1.4 2023/05/02 09:30:37 tb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
|
||||
@ -125,8 +125,8 @@ test_prefix_leak(void)
|
||||
if ((bio_out = BIO_new(BIO_s_mem())) == NULL)
|
||||
goto err;
|
||||
|
||||
if (!i2d_ASN1_bio_stream(bio_out, (ASN1_VALUE *)pkcs7, bio_in,
|
||||
SMIME_STREAM | SMIME_BINARY, &PKCS7_it))
|
||||
if (!i2d_PKCS7_bio_stream(bio_out, pkcs7, bio_in,
|
||||
SMIME_STREAM | SMIME_BINARY))
|
||||
goto err;
|
||||
|
||||
if (set_me != 1) {
|
||||
|
@ -272,7 +272,7 @@ try_again:
|
||||
print "D- $line\n" if $verbose;
|
||||
next;
|
||||
}
|
||||
if ($id =~ /^(?:ASN1|BN|X509(?:V3)?)_[FR]_\w+$/) {
|
||||
if ($id =~ /^(?:ASN1|BIO|BN|X509(?:V3)?)_[FR]_\w+$/) {
|
||||
print "D- $line\n" if $verbose;
|
||||
next;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: x509_asn1.c,v 1.16 2023/05/01 11:02:23 job Exp $ */
|
||||
/* $OpenBSD: x509_asn1.c,v 1.17 2023/05/02 14:13:05 beck Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2023 Job Snijders <job@openbsd.org>
|
||||
*
|
||||
@ -512,13 +512,88 @@ test_x509_req_setters(void)
|
||||
return failed;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
static const struct testcase {
|
||||
char *data;
|
||||
int len;
|
||||
int len_to_pass;
|
||||
int encode_type;
|
||||
int expected_result;
|
||||
char *expected_string;
|
||||
} testCases[] = {
|
||||
/* should work */
|
||||
{"fozzie", 6, 80, MBSTRING_ASC, 6, "fozzie"},
|
||||
/* should work */
|
||||
{"fozzie", 6, -1, MBSTRING_ASC, 6, ""},
|
||||
/* should fail, truncation */
|
||||
{"muppet", 6, 5, MBSTRING_ASC, -1, ""},
|
||||
/* should fail, contains 0 byte */
|
||||
{"g\0nzo", 5, 80, MBSTRING_ASC, -1, ""},
|
||||
/* should fail, can't encode as utf-8 */
|
||||
{"\x30\x00", 2, 80, V_ASN1_SEQUENCE, -1, ""},
|
||||
};
|
||||
|
||||
#define NUM_TEST_CASES (sizeof(testCases) / sizeof(testCases[0]))
|
||||
|
||||
static int
|
||||
test_x509_name_get(void)
|
||||
{
|
||||
int failed = 0;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < NUM_TEST_CASES; i++) {
|
||||
const struct testcase *test = testCases + i;
|
||||
X509_NAME_ENTRY *entry = NULL;
|
||||
X509_NAME *name = NULL;
|
||||
char textbuf[80];
|
||||
int result;
|
||||
|
||||
textbuf[0] = '\0';
|
||||
if ((name = X509_NAME_new()) == NULL)
|
||||
err(1, "X509_NAME_new");
|
||||
if ((entry = X509_NAME_ENTRY_new()) == NULL)
|
||||
err(1, "X509_NAME_ENTRY_new");
|
||||
if (!X509_NAME_ENTRY_set_object(entry,
|
||||
OBJ_nid2obj(NID_commonName)))
|
||||
err(1, "X509_NAME_ENTRY_set_object");
|
||||
if (!X509_NAME_ENTRY_set_data(entry, test->encode_type,
|
||||
test->data, test->len))
|
||||
err(1, "X509_NAME_ENTRY_set_data");
|
||||
if (!X509_NAME_add_entry(name, entry, -1, 0))
|
||||
err(1, "X509_NAME_add_entry");
|
||||
if (test->len_to_pass == -1)
|
||||
result = X509_NAME_get_text_by_NID(name, NID_commonName,
|
||||
NULL, 0);
|
||||
else
|
||||
result = X509_NAME_get_text_by_NID(name, NID_commonName,
|
||||
textbuf, test->len_to_pass);
|
||||
if (result != test->expected_result) {
|
||||
fprintf(stderr,
|
||||
"Test %zu X509_GET_text_by_NID returned %d,"
|
||||
"expected %d\n", i, result, test->expected_result);
|
||||
failed++;
|
||||
}
|
||||
if (result != -1 &&
|
||||
strcmp(test->expected_string, textbuf) != 0) {
|
||||
fprintf(stderr,
|
||||
"Test %zu, X509_GET_text_by_NID returned bytes do"
|
||||
"not match \n", i);
|
||||
failed++;
|
||||
}
|
||||
X509_NAME_ENTRY_free(entry);
|
||||
X509_NAME_free(name);
|
||||
}
|
||||
return failed;
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
int failed = 0;
|
||||
|
||||
failed |= test_x509_setters();
|
||||
/* failed |= */ test_x509_crl_setters();
|
||||
/* failed |= */ test_x509_req_setters();
|
||||
failed |= test_x509_name_get();
|
||||
|
||||
OPENSSL_cleanup();
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: airport,v 1.89 2023/04/21 00:37:10 kn Exp $
|
||||
# $OpenBSD: airport,v 1.90 2023/05/02 08:48:06 stsp Exp $
|
||||
# @(#)airport 8.1 (Berkeley) 6/8/93
|
||||
#
|
||||
# Some of this information from the Airport Search Engine at
|
||||
@ -374,6 +374,7 @@ CPR:Casper/Natrone County International, Wyoming, USA
|
||||
CPT:Cape Town International, Cape Town, South Africa
|
||||
CRD:Comodoro Rivadavia, Chubut, Argentina
|
||||
CRI:Crooked Island, Bahamas
|
||||
CRL:Brussels South / Gosselies, Charleroi, Belgium
|
||||
CRM:Charleston (WV) Yeager, South Carolina, USA
|
||||
CRP:Corpus Christi International, Texas, USA
|
||||
CRU:Carriacou Island, Grenada
|
||||
|
@ -86,7 +86,7 @@ abl_match(struct device *parent, void *match, void *aux)
|
||||
{
|
||||
struct acpi_attach_args *aa = aux;
|
||||
struct cfdata *cf = match;
|
||||
|
||||
|
||||
return acpi_matchhids(aa, abl_hids, cf->cf_driver->cd_name);
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ checklids(struct acpi_softc *sc)
|
||||
if (lids == 0 && lid_action != 0)
|
||||
return EAGAIN;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
|
@ -259,7 +259,7 @@ acpiec_match(struct device *parent, void *match, void *aux)
|
||||
struct acpi_softc *acpisc = (struct acpi_softc *)parent;
|
||||
|
||||
/* Check for early ECDT table attach */
|
||||
if (ecdt &&
|
||||
if (ecdt &&
|
||||
!memcmp(ecdt->hdr.signature, ECDT_SIG, sizeof(ECDT_SIG) - 1))
|
||||
return (1);
|
||||
if (acpisc->sc_ec)
|
||||
|
@ -435,7 +435,7 @@ thinkpad_hotkey(struct aml_node *node, int notify_type, void *arg)
|
||||
case THINKPAD_BUTTON_SUSPEND:
|
||||
#ifndef SMALL_KERNEL
|
||||
if (acpi_record_event(sc->sc_acpi, APM_USER_SUSPEND_REQ))
|
||||
acpi_addtask(sc->sc_acpi, acpi_sleep_task,
|
||||
acpi_addtask(sc->sc_acpi, acpi_sleep_task,
|
||||
sc->sc_acpi, SLEEP_SUSPEND);
|
||||
#endif
|
||||
break;
|
||||
@ -456,7 +456,7 @@ thinkpad_hotkey(struct aml_node *node, int notify_type, void *arg)
|
||||
case THINKPAD_BUTTON_HIBERNATE:
|
||||
#if defined(HIBERNATE) && !defined(SMALL_KERNEL)
|
||||
if (acpi_record_event(sc->sc_acpi, APM_USER_HIBERNATE_REQ))
|
||||
acpi_addtask(sc->sc_acpi, acpi_sleep_task,
|
||||
acpi_addtask(sc->sc_acpi, acpi_sleep_task,
|
||||
sc->sc_acpi, SLEEP_HIBERNATE);
|
||||
#endif
|
||||
break;
|
||||
@ -472,12 +472,12 @@ thinkpad_hotkey(struct aml_node *node, int notify_type, void *arg)
|
||||
break;
|
||||
case THINKPAD_PORT_REPL_DOCKED:
|
||||
sc->sc_sens[THINKPAD_SENSOR_PORTREPL].value = 1;
|
||||
sc->sc_sens[THINKPAD_SENSOR_PORTREPL].status =
|
||||
sc->sc_sens[THINKPAD_SENSOR_PORTREPL].status =
|
||||
SENSOR_S_OK;
|
||||
break;
|
||||
case THINKPAD_PORT_REPL_UNDOCKED:
|
||||
sc->sc_sens[THINKPAD_SENSOR_PORTREPL].value = 0;
|
||||
sc->sc_sens[THINKPAD_SENSOR_PORTREPL].status =
|
||||
sc->sc_sens[THINKPAD_SENSOR_PORTREPL].status =
|
||||
SENSOR_S_OK;
|
||||
break;
|
||||
default:
|
||||
|
@ -230,7 +230,7 @@ kstatioc_leave(struct kstat_req *ksreq, struct kstat *ks)
|
||||
ksreq->ks_interval = ks->ks_interval;
|
||||
|
||||
if (ksreq->ks_data == NULL) {
|
||||
/* userland doesn't want actual data, so shortcut */
|
||||
/* userland doesn't want actual data, so shortcut */
|
||||
kstat_enter(ks);
|
||||
ksreq->ks_datalen = ks->ks_datalen;
|
||||
ksreq->ks_updated = ks->ks_updated;
|
||||
@ -633,7 +633,7 @@ kstat_remove(struct kstat *ks)
|
||||
KASSERTMSG(ks->ks_state == KSTAT_S_INSTALLED,
|
||||
"kstat %p %s:%u:%s:%u is not installed", ks,
|
||||
ks->ks_provider, ks->ks_instance, ks->ks_name, ks->ks_unit);
|
||||
|
||||
|
||||
ks->ks_state = KSTAT_S_CREATED;
|
||||
rw_exit_write(&kstat_lock);
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ aac_pci_attach(parent, self, aux)
|
||||
printf("%s\n", intrstr);
|
||||
|
||||
sc->aac_dmat = pa->pa_dmat;
|
||||
|
||||
|
||||
for (m = aac_identifiers; m->vendor != 0; m++)
|
||||
if (m->vendor == PCI_VENDOR(pa->pa_id) &&
|
||||
m->device == PCI_PRODUCT(pa->pa_id)) {
|
||||
|
@ -64,7 +64,7 @@ agpbus_probe(struct agp_attach_args *aa)
|
||||
struct pci_attach_args *pa = aa->aa_pa;
|
||||
|
||||
if (strncmp(aa->aa_busname, "agp", 3) == 0 &&
|
||||
PCI_CLASS(pa->pa_class) == PCI_CLASS_BRIDGE &&
|
||||
PCI_CLASS(pa->pa_class) == PCI_CLASS_BRIDGE &&
|
||||
PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_BRIDGE_HOST)
|
||||
return (1);
|
||||
return (0);
|
||||
@ -215,7 +215,7 @@ agp_generic_enable(struct agp_softc *sc, u_int32_t mode)
|
||||
struct pci_attach_args pa;
|
||||
pcireg_t tstatus, mstatus, command;
|
||||
int rq, sba, fw, rate, capoff;
|
||||
|
||||
|
||||
if (pci_find_device(&pa, agpvga_match) == 0 ||
|
||||
pci_get_capability(pa.pa_pc, pa.pa_tag, PCI_CAP_AGP,
|
||||
&capoff, NULL) == 0) {
|
||||
@ -359,7 +359,7 @@ agp_acquire(void *dev)
|
||||
{
|
||||
struct agp_softc *sc = (struct agp_softc *)dev;
|
||||
|
||||
if (sc->sc_chipc == NULL)
|
||||
if (sc->sc_chipc == NULL)
|
||||
return (EINVAL);
|
||||
|
||||
if (sc->sc_state != AGP_ACQUIRE_FREE)
|
||||
@ -377,7 +377,7 @@ agp_release(void *dev)
|
||||
if (sc->sc_state == AGP_ACQUIRE_FREE)
|
||||
return (0);
|
||||
|
||||
if (sc->sc_state != AGP_ACQUIRE_KERNEL)
|
||||
if (sc->sc_state != AGP_ACQUIRE_KERNEL)
|
||||
return (EBUSY);
|
||||
|
||||
sc->sc_state = AGP_ACQUIRE_FREE;
|
||||
|
@ -96,7 +96,7 @@ agp_ali_probe(struct device *parent, void *match, void *aux)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
agp_ali_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct agp_ali_softc *asc = (struct agp_ali_softc *)self;
|
||||
@ -135,7 +135,7 @@ agp_ali_attach(struct device *parent, struct device *self, void *aux)
|
||||
reg = pci_conf_read(asc->asc_pc, asc->asc_tag, AGP_ALI_ATTBASE);
|
||||
reg = (reg & 0xff) | gatt->ag_physical;
|
||||
pci_conf_write(asc->asc_pc, asc->asc_tag, AGP_ALI_ATTBASE, reg);
|
||||
|
||||
|
||||
/* Enable the TLB. */
|
||||
reg = pci_conf_read(asc->asc_pc, asc->asc_tag, AGP_ALI_TLBCTRL);
|
||||
reg = (reg & ~0xff) | 0x10;
|
||||
@ -179,7 +179,7 @@ agp_ali_restore(struct agp_ali_softc *asc)
|
||||
/* Install the gatt and aperture size. */
|
||||
pci_conf_write(asc->asc_pc, asc->asc_tag, AGP_ALI_ATTBASE,
|
||||
asc->asc_attbase);
|
||||
|
||||
|
||||
/* Enable the TLB. */
|
||||
pci_conf_write(asc->asc_pc, asc->asc_tag, AGP_ALI_TLBCTRL,
|
||||
asc->asc_tlbctrl);
|
||||
|
@ -59,7 +59,7 @@
|
||||
/* I810/I815 only, memory is in dcache */
|
||||
#define INTEL_LOCAL 0x2
|
||||
/* Memory is snooped, must not be accessed through gtt from the cpu. */
|
||||
#define INTEL_COHERENT 0x6
|
||||
#define INTEL_COHERENT 0x6
|
||||
|
||||
enum {
|
||||
CHIP_NONE = 0, /* not integrated graphics */
|
||||
@ -194,7 +194,7 @@ agp_i810_get_chiptype(struct pci_attach_args *pa)
|
||||
return (CHIP_IRONLAKE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return (CHIP_NONE);
|
||||
}
|
||||
|
||||
@ -379,7 +379,7 @@ agp_i810_attach(struct device *parent, struct device *self, void *aux)
|
||||
/* FALLTHROUGH */
|
||||
case CHIP_I915:
|
||||
/* FALLTHROUGH */
|
||||
case CHIP_I965:
|
||||
case CHIP_I965:
|
||||
/* FALLTHROUGH */
|
||||
case CHIP_G33:
|
||||
/* FALLTHROUGH */
|
||||
@ -559,7 +559,7 @@ agp_i810_configure(struct agp_i810_softc *isc)
|
||||
tmp = isc->isc_apaddr;
|
||||
if (isc->chiptype == CHIP_I810) {
|
||||
tmp += isc->dcache_size;
|
||||
} else {
|
||||
} else {
|
||||
tmp += isc->stolen << AGP_PAGE_SHIFT;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ struct agp_intel_softc {
|
||||
CHIP_I845,
|
||||
CHIP_I850,
|
||||
CHIP_I865
|
||||
} chiptype;
|
||||
} chiptype;
|
||||
/* registers saved during a suspend/resume cycle. */
|
||||
pcireg_t savectrl;
|
||||
pcireg_t savecmd;
|
||||
@ -115,7 +115,7 @@ agp_intel_probe(struct device *parent, void *match, void *aux)
|
||||
case PCI_PRODUCT_INTEL_82840_HB:
|
||||
case PCI_PRODUCT_INTEL_82845_HB:
|
||||
case PCI_PRODUCT_INTEL_82845G_HB:
|
||||
case PCI_PRODUCT_INTEL_82850_HB:
|
||||
case PCI_PRODUCT_INTEL_82850_HB:
|
||||
case PCI_PRODUCT_INTEL_82855PM_HB:
|
||||
case PCI_PRODUCT_INTEL_82855GM_HB:
|
||||
case PCI_PRODUCT_INTEL_82860_HB:
|
||||
@ -202,7 +202,7 @@ agp_intel_attach(struct device *parent, struct device *self, void *aux)
|
||||
/* Install the gatt. */
|
||||
pci_conf_write(pa->pa_pc, pa->pa_tag, AGP_INTEL_ATTBASE,
|
||||
gatt->ag_physical);
|
||||
|
||||
|
||||
/* Enable the GLTB and setup the control register. */
|
||||
switch (isc->chiptype) {
|
||||
case CHIP_I443:
|
||||
@ -262,7 +262,7 @@ agp_intel_attach(struct device *parent, struct device *self, void *aux)
|
||||
pci_conf_write(isc->isc_pc, isc->isc_tag,
|
||||
AGP_INTEL_ERRCMD, reg);
|
||||
}
|
||||
|
||||
|
||||
isc->agpdev = (struct agp_softc *)agp_attach_bus(pa, &agp_intel_methods,
|
||||
isc->isc_apaddr, isc->isc_apsize, &isc->dev);
|
||||
return;
|
||||
@ -329,7 +329,7 @@ agp_intel_restore(struct agp_intel_softc *isc)
|
||||
/* Install the gatt. */
|
||||
pci_conf_write(isc->isc_pc, isc->isc_tag, AGP_INTEL_ATTBASE,
|
||||
isc->gatt->ag_physical);
|
||||
|
||||
|
||||
/* Enable the GLTB and setup the control register. */
|
||||
switch (isc->chiptype) {
|
||||
case CHIP_I443:
|
||||
|
@ -135,7 +135,7 @@ agp_sis_attach(struct device *parent, struct device *self, void *aux)
|
||||
/* Install the gatt. */
|
||||
pci_conf_write(ssc->ssc_pc, ssc->ssc_tag, AGP_SIS_ATTBASE,
|
||||
gatt->ag_physical);
|
||||
|
||||
|
||||
/* Enable the aperture and auto-tlb-inval */
|
||||
reg = pci_conf_read(ssc->ssc_pc, ssc->ssc_tag, AGP_SIS_WINCTRL);
|
||||
reg |= (0x05 << 24) | 3;
|
||||
@ -176,7 +176,7 @@ agp_sis_restore(struct agp_sis_softc *ssc)
|
||||
/* Install the gatt. */
|
||||
pci_conf_write(ssc->ssc_pc, ssc->ssc_tag, AGP_SIS_ATTBASE,
|
||||
ssc->gatt->ag_physical);
|
||||
|
||||
|
||||
/*
|
||||
* Enable the aperture, reset the aperture size and enable and
|
||||
* auto-tlb-inval.
|
||||
@ -217,7 +217,7 @@ agp_sis_set_aperture(void *sc, bus_size_t aperture)
|
||||
|
||||
gws = ffs(aperture / 4*1024*1024) - 1;
|
||||
|
||||
reg = pci_conf_read(ssc->ssc_pc, ssc->ssc_tag, AGP_SIS_WINCTRL);
|
||||
reg = pci_conf_read(ssc->ssc_pc, ssc->ssc_tag, AGP_SIS_WINCTRL);
|
||||
reg &= ~0x00000070;
|
||||
reg |= gws << 4;
|
||||
pci_conf_write(ssc->ssc_pc, ssc->ssc_tag, AGP_SIS_WINCTRL, reg);
|
||||
|
@ -238,7 +238,7 @@ agp_via_get_aperture(void *sc)
|
||||
struct agp_via_softc *vsc = sc;
|
||||
bus_size_t apsize;
|
||||
|
||||
apsize = pci_conf_read(vsc->vsc_pc, vsc->vsc_tag,
|
||||
apsize = pci_conf_read(vsc->vsc_pc, vsc->vsc_tag,
|
||||
vsc->regs[REG_APSIZE]) & 0x1f;
|
||||
|
||||
/*
|
||||
|
@ -210,7 +210,7 @@
|
||||
#define AGP_I810_MISCC_RPTC 0x00c0
|
||||
#define AGP_I810_MISCC_RPTC_NOLIMIT 0x0000
|
||||
#define AGP_I810_MISCC_RPTC_62 0x0040
|
||||
#define AGP_I810_MISCC_RPTC_50 0x0080
|
||||
#define AGP_I810_MISCC_RPTC_50 0x0080
|
||||
#define AGP_I810_MISCC_RPTC_37 0x00c0
|
||||
|
||||
/*
|
||||
|
@ -105,7 +105,7 @@ struct agp_softc {
|
||||
pcireg_t sc_id;
|
||||
|
||||
int sc_opened;
|
||||
int sc_capoff;
|
||||
int sc_capoff;
|
||||
int sc_nextid; /* next mem block id */
|
||||
enum agp_acquire_state sc_state;
|
||||
|
||||
|
@ -459,7 +459,7 @@ const struct ahc_pci_identity ahc_pci_ident_table [] =
|
||||
ID_ALL_MASK,
|
||||
ahc_aic7892_setup
|
||||
},
|
||||
/* aic7895 based controllers */
|
||||
/* aic7895 based controllers */
|
||||
{
|
||||
ID_AHA_2940U_DUAL,
|
||||
ID_ALL_MASK,
|
||||
@ -480,7 +480,7 @@ const struct ahc_pci_identity ahc_pci_ident_table [] =
|
||||
ID_AIC7895_ARO_MASK,
|
||||
ahc_aic7895_setup
|
||||
},
|
||||
/* aic7896/97 based controllers */
|
||||
/* aic7896/97 based controllers */
|
||||
{
|
||||
ID_AHA_3950U2B_0,
|
||||
ID_ALL_MASK,
|
||||
@ -506,7 +506,7 @@ const struct ahc_pci_identity ahc_pci_ident_table [] =
|
||||
ID_ALL_MASK,
|
||||
ahc_aic7896_setup
|
||||
},
|
||||
/* aic7899 based controllers */
|
||||
/* aic7899 based controllers */
|
||||
{
|
||||
ID_AHA_3960D,
|
||||
ID_ALL_MASK,
|
||||
@ -665,7 +665,7 @@ ahc_find_pci_device(pcireg_t id, pcireg_t subid, u_int func)
|
||||
* ID as valid.
|
||||
*/
|
||||
if (func > 0
|
||||
&& ahc_9005_subdevinfo_valid(PCI_VENDOR(id), PCI_PRODUCT(id),
|
||||
&& ahc_9005_subdevinfo_valid(PCI_VENDOR(id), PCI_PRODUCT(id),
|
||||
PCI_VENDOR(subid), PCI_PRODUCT(subid))
|
||||
&& SUBID_9005_MFUNCENB(PCI_PRODUCT(subid)) == 0)
|
||||
return (NULL);
|
||||
@ -834,7 +834,7 @@ ahc_pci_attach(struct device *parent, struct device *self, void *aux)
|
||||
ahc_name(ahc));
|
||||
devconfig |= DACEN;
|
||||
}
|
||||
|
||||
|
||||
/* Ensure that pci error generation, a test feature, is disabled. */
|
||||
devconfig |= PCIERRGENDIS;
|
||||
|
||||
@ -963,7 +963,7 @@ ahc_pci_attach(struct device *parent, struct device *self, void *aux)
|
||||
M_NOWAIT | M_ZERO);
|
||||
if (ahc->seep_config == NULL)
|
||||
goto error_out;
|
||||
|
||||
|
||||
/* See if we have a SEEPROM and perform auto-term */
|
||||
ahc_check_extport(ahc, &sxfrctl1);
|
||||
|
||||
@ -1208,7 +1208,7 @@ ahc_probe_ext_scbram(struct ahc_softc *ahc)
|
||||
fast = FALSE;
|
||||
large = FALSE;
|
||||
num_scbs = 0;
|
||||
|
||||
|
||||
if (ahc_ext_scbram_present(ahc) == 0)
|
||||
goto done;
|
||||
|
||||
@ -1402,7 +1402,7 @@ ahc_pci_intr(struct ahc_softc *ahc)
|
||||
|
||||
if ((status1 & (DPE|SSE|RMA|RTA|STA|DPR)) == 0) {
|
||||
printf("%s: Latched PCIERR interrupt with "
|
||||
"no status bits set\n", ahc_name(ahc));
|
||||
"no status bits set\n", ahc_name(ahc));
|
||||
} else {
|
||||
ahc_outb(ahc, CLRINT, CLRPARERR);
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ const struct ahd_pci_identity ahd_pci_ident_table[] =
|
||||
ID_ALL_MASK,
|
||||
ahd_aic7901A_setup
|
||||
},
|
||||
/* aic7902 based controllers */
|
||||
/* aic7902 based controllers */
|
||||
{
|
||||
ID_AHA_29320,
|
||||
ID_ALL_MASK,
|
||||
@ -240,7 +240,7 @@ const struct ahd_pci_identity ahd_pci_ident_table[] =
|
||||
};
|
||||
|
||||
const u_int ahd_num_pci_devs = NUM_ELEMENTS(ahd_pci_ident_table);
|
||||
|
||||
|
||||
#define DEVCONFIG 0x40
|
||||
#define PCIXINITPAT 0x0000E000ul
|
||||
#define PCIXINIT_PCI33_66 0x0000E000ul
|
||||
@ -342,7 +342,7 @@ ahd_pci_attach(struct device *parent, struct device *self, void *aux)
|
||||
pci_intr_handle_t ih;
|
||||
const char *intrstr;
|
||||
pcireg_t devconfig, memtype, subid;
|
||||
uint16_t device, subvendor;
|
||||
uint16_t device, subvendor;
|
||||
int error, ioh_valid, ioh2_valid, l, memh_valid;
|
||||
|
||||
ahd->dev_softc = pa;
|
||||
@ -373,10 +373,10 @@ ahd_pci_attach(struct device *parent, struct device *self, void *aux)
|
||||
error = entry->setup(ahd, pa);
|
||||
if (error != 0)
|
||||
return;
|
||||
|
||||
|
||||
/* XXX ahc on sparc64 needs this twice */
|
||||
devconfig = pci_conf_read(pa->pa_pc, pa->pa_tag, DEVCONFIG);
|
||||
|
||||
|
||||
if ((devconfig & PCIXINITPAT) == PCIXINIT_PCI33_66) {
|
||||
ahd->chip |= AHD_PCI;
|
||||
/* Disable PCIX workarounds when running in PCI mode. */
|
||||
@ -482,7 +482,7 @@ ahd_pci_attach(struct device *parent, struct device *self, void *aux)
|
||||
devconfig |= DACEN;
|
||||
pci_conf_write(pa->pa_pc, pa->pa_tag, DEVCONFIG, devconfig);
|
||||
}
|
||||
|
||||
|
||||
ahd_softc_init(ahd);
|
||||
|
||||
/*
|
||||
@ -514,7 +514,7 @@ ahd_pci_attach(struct device *parent, struct device *self, void *aux)
|
||||
}
|
||||
if (intrstr != NULL)
|
||||
printf(": %s\n", intrstr);
|
||||
|
||||
|
||||
/* Get the size of the cache */
|
||||
ahd->pci_cachesize = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_BHLC_REG);
|
||||
ahd->pci_cachesize *= 4;
|
||||
@ -668,7 +668,7 @@ ahd_check_extport(struct ahd_softc *ahd)
|
||||
/*
|
||||
* Fetch VPD for this function and parse it.
|
||||
*/
|
||||
if (bootverbose)
|
||||
if (bootverbose)
|
||||
printf("%s: Reading VPD from SEEPROM...",
|
||||
ahd_name(ahd));
|
||||
|
||||
@ -681,12 +681,12 @@ ahd_check_extport(struct ahd_softc *ahd)
|
||||
/*bytestream*/TRUE);
|
||||
if (error == 0)
|
||||
error = ahd_parse_vpddata(ahd, &vpd);
|
||||
if (bootverbose)
|
||||
if (bootverbose)
|
||||
printf("%s: VPD parsing %s\n",
|
||||
ahd_name(ahd),
|
||||
error == 0 ? "successful" : "failed");
|
||||
|
||||
if (bootverbose)
|
||||
if (bootverbose)
|
||||
printf("%s: Reading SEEPROM...", ahd_name(ahd));
|
||||
|
||||
/* Address is always in units of 16bit words */
|
||||
@ -941,7 +941,7 @@ ahd_pci_intr(struct ahd_softc *ahd)
|
||||
u_int intstat;
|
||||
u_int i;
|
||||
u_int reg;
|
||||
|
||||
|
||||
intstat = ahd_inb(ahd, INTSTAT);
|
||||
|
||||
if ((intstat & SPLTINT) != 0)
|
||||
@ -965,7 +965,7 @@ ahd_pci_intr(struct ahd_softc *ahd)
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
u_int bit;
|
||||
|
||||
|
||||
if (i == 5)
|
||||
continue;
|
||||
|
||||
@ -980,7 +980,7 @@ ahd_pci_intr(struct ahd_softc *ahd)
|
||||
pci_status_strings[bit],
|
||||
pci_status_source[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pci_status1 = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);
|
||||
pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG , pci_status1);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@ -37,13 +37,13 @@
|
||||
#define GRAPH_OBJECT_TYPE_CONNECTOR 0x3
|
||||
#define GRAPH_OBJECT_TYPE_ROUTER 0x4
|
||||
/* deleted */
|
||||
#define GRAPH_OBJECT_TYPE_DISPLAY_PATH 0x6
|
||||
#define GRAPH_OBJECT_TYPE_DISPLAY_PATH 0x6
|
||||
#define GRAPH_OBJECT_TYPE_GENERIC 0x7
|
||||
|
||||
/****************************************************/
|
||||
/* Encoder Object ID Definition */
|
||||
/****************************************************/
|
||||
#define ENCODER_OBJECT_ID_NONE 0x00
|
||||
#define ENCODER_OBJECT_ID_NONE 0x00
|
||||
|
||||
/* Radeon Class Display Hardware */
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_LVDS 0x01
|
||||
@ -96,7 +96,7 @@
|
||||
/****************************************************/
|
||||
/* Connector Object ID Definition */
|
||||
/****************************************************/
|
||||
#define CONNECTOR_OBJECT_ID_NONE 0x00
|
||||
#define CONNECTOR_OBJECT_ID_NONE 0x00
|
||||
#define CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I 0x01
|
||||
#define CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I 0x02
|
||||
#define CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D 0x03
|
||||
@ -158,7 +158,7 @@
|
||||
#define RESERVED1_ID_MASK 0x0800
|
||||
#define OBJECT_TYPE_MASK 0x7000
|
||||
#define RESERVED2_ID_MASK 0x8000
|
||||
|
||||
|
||||
#define OBJECT_ID_SHIFT 0x00
|
||||
#define ENUM_ID_SHIFT 0x08
|
||||
#define OBJECT_TYPE_SHIFT 0x0C
|
||||
@ -179,14 +179,14 @@
|
||||
/* Encoder Object ID definition - Shared with BIOS */
|
||||
/****************************************************/
|
||||
/*
|
||||
#define ENCODER_INTERNAL_LVDS_ENUM_ID1 0x2101
|
||||
#define ENCODER_INTERNAL_LVDS_ENUM_ID1 0x2101
|
||||
#define ENCODER_INTERNAL_TMDS1_ENUM_ID1 0x2102
|
||||
#define ENCODER_INTERNAL_TMDS2_ENUM_ID1 0x2103
|
||||
#define ENCODER_INTERNAL_DAC1_ENUM_ID1 0x2104
|
||||
#define ENCODER_INTERNAL_DAC2_ENUM_ID1 0x2105
|
||||
#define ENCODER_INTERNAL_SDVOA_ENUM_ID1 0x2106
|
||||
#define ENCODER_INTERNAL_SDVOB_ENUM_ID1 0x2107
|
||||
#define ENCODER_SIL170B_ENUM_ID1 0x2108
|
||||
#define ENCODER_SIL170B_ENUM_ID1 0x2108
|
||||
#define ENCODER_CH7303_ENUM_ID1 0x2109
|
||||
#define ENCODER_CH7301_ENUM_ID1 0x210A
|
||||
#define ENCODER_INTERNAL_DVO1_ENUM_ID1 0x210B
|
||||
@ -200,8 +200,8 @@
|
||||
#define ENCODER_INTERNAL_KLDSCP_TMDS1_ENUM_ID1 0x2113
|
||||
#define ENCODER_INTERNAL_KLDSCP_DVO1_ENUM_ID1 0x2114
|
||||
#define ENCODER_INTERNAL_KLDSCP_DAC1_ENUM_ID1 0x2115
|
||||
#define ENCODER_INTERNAL_KLDSCP_DAC2_ENUM_ID1 0x2116
|
||||
#define ENCODER_SI178_ENUM_ID1 0x2117
|
||||
#define ENCODER_INTERNAL_KLDSCP_DAC2_ENUM_ID1 0x2116
|
||||
#define ENCODER_SI178_ENUM_ID1 0x2117
|
||||
#define ENCODER_MVPU_FPGA_ENUM_ID1 0x2118
|
||||
#define ENCODER_INTERNAL_DDI_ENUM_ID1 0x2119
|
||||
#define ENCODER_VT1625_ENUM_ID1 0x211A
|
||||
@ -316,7 +316,7 @@
|
||||
|
||||
#define ENCODER_SI178_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_SI178 << OBJECT_ID_SHIFT)
|
||||
ENCODER_OBJECT_ID_SI178 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_MVPU_FPGA_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
@ -324,7 +324,7 @@
|
||||
|
||||
#define ENCODER_INTERNAL_DDI_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_DDI << OBJECT_ID_SHIFT)
|
||||
ENCODER_OBJECT_ID_INTERNAL_DDI << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_VT1625_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
@ -352,7 +352,7 @@
|
||||
|
||||
#define ENCODER_INTERNAL_KLDSCP_LVTMA_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA << OBJECT_ID_SHIFT)
|
||||
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_UNIPHY1_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
|
@ -6137,7 +6137,7 @@ int amdgpu_in_reset(struct amdgpu_device *adev)
|
||||
{
|
||||
return atomic_read(&adev->reset_domain->in_gpu_reset);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* amdgpu_device_halt() - bring hardware to some kind of halt state
|
||||
*
|
||||
|
@ -3418,7 +3418,7 @@ amdgpu_init_backlight(struct amdgpu_device *adev)
|
||||
|
||||
if (bd == NULL)
|
||||
return;
|
||||
|
||||
|
||||
drm_connector_list_iter_begin(dev, &conn_iter);
|
||||
drm_for_each_connector_iter(connector, &conn_iter) {
|
||||
if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
|
||||
|
@ -1100,7 +1100,7 @@ void amdgpu_bo_fini(struct amdgpu_device *adev)
|
||||
arch_io_free_memtype_wc(adev->gmc.aper_base, adev->gmc.aper_size);
|
||||
#else
|
||||
drm_mtrr_del(0, adev->gmc.aper_base, adev->gmc.aper_size, DRM_MTRR_WC);
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
drm_dev_exit(idx);
|
||||
|
@ -101,7 +101,7 @@ amdgpu_vm_it_iter_next(struct amdgpu_bo_va_mapping *node, uint64_t start,
|
||||
|
||||
static void
|
||||
amdgpu_vm_it_remove(struct amdgpu_bo_va_mapping *node,
|
||||
struct rb_root_cached *root)
|
||||
struct rb_root_cached *root)
|
||||
{
|
||||
rb_erase_cached(&node->rb, root);
|
||||
}
|
||||
|
@ -1906,7 +1906,7 @@ static int gfx_v11_0_rlc_load_microcode(struct amdgpu_device *adev)
|
||||
if (version_minor == 3)
|
||||
gfx_v11_0_load_rlcp_rlcv_microcode(adev);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -3348,7 +3348,7 @@ static int gfx_v11_0_cp_compute_load_microcode(struct amdgpu_device *adev)
|
||||
}
|
||||
|
||||
memcpy(fw, fw_data, fw_size);
|
||||
|
||||
|
||||
amdgpu_bo_kunmap(adev->gfx.mec.mec_fw_obj);
|
||||
amdgpu_bo_unreserve(adev->gfx.mec.mec_fw_obj);
|
||||
|
||||
|
@ -58,7 +58,7 @@ static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
|
||||
imu_hdr = (const struct imu_firmware_header_v1_0 *)adev->gfx.imu_fw->data;
|
||||
adev->gfx.imu_fw_version = le32_to_cpu(imu_hdr->header.ucode_version);
|
||||
//adev->gfx.imu_feature_version = le32_to_cpu(imu_hdr->ucode_feature_version);
|
||||
|
||||
|
||||
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
|
||||
info = &adev->firmware.ucode[AMDGPU_UCODE_ID_IMU_I];
|
||||
info->ucode_id = AMDGPU_UCODE_ID_IMU_I;
|
||||
@ -240,9 +240,9 @@ static const struct imu_rlc_ram_golden imu_rlc_ram_golden_11[] =
|
||||
IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_AGP_BOT, 0x00000002, 0xe0000000),
|
||||
IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_AGP_TOP, 0x00000000, 0xe0000000),
|
||||
IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_L2_PROTECTION_FAULT_CNTL2, 0x00020000, 0xe0000000),
|
||||
IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regSDMA0_UCODE_SELFLOAD_CONTROL, 0x00000210, 0),
|
||||
IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regSDMA1_UCODE_SELFLOAD_CONTROL, 0x00000210, 0),
|
||||
IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCPC_PSP_DEBUG, CPC_PSP_DEBUG__GPA_OVERRIDE_MASK, 0),
|
||||
IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regSDMA0_UCODE_SELFLOAD_CONTROL, 0x00000210, 0),
|
||||
IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regSDMA1_UCODE_SELFLOAD_CONTROL, 0x00000210, 0),
|
||||
IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCPC_PSP_DEBUG, CPC_PSP_DEBUG__GPA_OVERRIDE_MASK, 0),
|
||||
IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCPG_PSP_DEBUG, CPG_PSP_DEBUG__GPA_OVERRIDE_MASK, 0)
|
||||
};
|
||||
|
||||
|
@ -186,7 +186,7 @@ static int xgpu_ai_send_access_requests(struct amdgpu_device *adev,
|
||||
/* Dummy REQ_GPU_INIT_DATA handling */
|
||||
r = xgpu_ai_poll_msg(adev, IDH_REQ_GPU_INIT_DATA_READY);
|
||||
/* version set to 0 since dummy */
|
||||
adev->virt.req_init_data_ver = 0;
|
||||
adev->virt.req_init_data_ver = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -273,7 +273,7 @@ static int sdma_v5_0_init_microcode(struct amdgpu_device *adev)
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ enum amd_apu_flags {
|
||||
* acquires the list of IP blocks for the GPU in use on initialization.
|
||||
* It can then operate on this list to perform standard driver operations
|
||||
* such as: init, fini, suspend, resume, etc.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IP block implementations are named using the following convention:
|
||||
* <functionality>_v<version> (E.g.: gfx_v6_0).
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,12 @@
|
||||
/****************************************************************************\
|
||||
*
|
||||
*
|
||||
* File Name atomfirmwareid.h
|
||||
*
|
||||
* Description ATOM BIOS command/data table ID definition header file
|
||||
*
|
||||
* Copyright 2016 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
* and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
|
@ -1,14 +1,14 @@
|
||||
/****************************************************************************\
|
||||
*
|
||||
*
|
||||
* Module Name displayobjectsoc15.h
|
||||
* Project
|
||||
* Device
|
||||
* Project
|
||||
* Device
|
||||
*
|
||||
* Description Contains the common definitions for display objects for SoC15 products.
|
||||
*
|
||||
* Copyright 2014 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
* and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
/****************************************************
|
||||
* Display Object Type Definition
|
||||
* Display Object Type Definition
|
||||
*****************************************************/
|
||||
enum display_object_type{
|
||||
DISPLAY_OBJECT_TYPE_NONE =0x00,
|
||||
@ -45,7 +45,7 @@ DISPLAY_OBJECT_TYPE_CONNECTOR =0x03
|
||||
};
|
||||
|
||||
/****************************************************
|
||||
* Encorder Object Type Definition
|
||||
* Encorder Object Type Definition
|
||||
*****************************************************/
|
||||
enum encoder_object_type{
|
||||
ENCODER_OBJECT_ID_NONE =0x00,
|
||||
@ -56,11 +56,11 @@ ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 =0x03,
|
||||
|
||||
|
||||
/****************************************************
|
||||
* Connector Object ID Definition
|
||||
* Connector Object ID Definition
|
||||
*****************************************************/
|
||||
|
||||
enum connector_object_type{
|
||||
CONNECTOR_OBJECT_ID_NONE =0x00,
|
||||
CONNECTOR_OBJECT_ID_NONE =0x00,
|
||||
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D =0x01,
|
||||
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D =0x02,
|
||||
CONNECTOR_OBJECT_ID_HDMI_TYPE_A =0x03,
|
||||
@ -72,12 +72,12 @@ CONNECTOR_OBJECT_ID_OPM =0x07
|
||||
|
||||
|
||||
/****************************************************
|
||||
* Protection Object ID Definition
|
||||
* Protection Object ID Definition
|
||||
*****************************************************/
|
||||
//No need
|
||||
|
||||
/****************************************************
|
||||
* Object ENUM ID Definition
|
||||
* Object ENUM ID Definition
|
||||
*****************************************************/
|
||||
|
||||
enum object_enum_id{
|
||||
@ -90,7 +90,7 @@ OBJECT_ENUM_ID6 =0x06
|
||||
};
|
||||
|
||||
/****************************************************
|
||||
*Object ID Bit definition
|
||||
*Object ID Bit definition
|
||||
*****************************************************/
|
||||
enum object_id_bit{
|
||||
OBJECT_ID_MASK =0x00FF,
|
||||
|
@ -28,7 +28,7 @@
|
||||
struct IP_BASE_INSTANCE {
|
||||
unsigned int segment[MAX_SEGMENT];
|
||||
};
|
||||
|
||||
|
||||
struct IP_BASE {
|
||||
struct IP_BASE_INSTANCE instance[MAX_INSTANCE];
|
||||
} __maybe_unused;
|
||||
|
@ -133,7 +133,7 @@ typedef struct _ATOM_PPLIB_EXTENDEDHEADER
|
||||
USHORT usUVDTableOffset; //points to ATOM_PPLIB_UVD_Table
|
||||
USHORT usSAMUTableOffset; //points to ATOM_PPLIB_SAMU_Table
|
||||
USHORT usPPMTableOffset; //points to ATOM_PPLIB_PPM_Table
|
||||
USHORT usACPTableOffset; //points to ATOM_PPLIB_ACP_Table
|
||||
USHORT usACPTableOffset; //points to ATOM_PPLIB_ACP_Table
|
||||
/* points to ATOM_PPLIB_POWERTUNE_Table */
|
||||
USHORT usPowerTuneTableOffset;
|
||||
/* points to ATOM_PPLIB_CLOCK_Voltage_Dependency_Table for sclkVddgfxTable */
|
||||
@ -223,14 +223,14 @@ typedef struct _ATOM_PPLIB_POWERPLAYTABLE3
|
||||
typedef struct _ATOM_PPLIB_POWERPLAYTABLE4
|
||||
{
|
||||
ATOM_PPLIB_POWERPLAYTABLE3 basicTable3;
|
||||
ULONG ulGoldenPPID; // PPGen use only
|
||||
ULONG ulGoldenPPID; // PPGen use only
|
||||
ULONG ulGoldenRevision; // PPGen use only
|
||||
USHORT usVddcDependencyOnSCLKOffset;
|
||||
USHORT usVddciDependencyOnMCLKOffset;
|
||||
USHORT usVddcDependencyOnMCLKOffset;
|
||||
USHORT usMaxClockVoltageOnDCOffset;
|
||||
USHORT usVddcPhaseShedLimitsTableOffset; // Points to ATOM_PPLIB_PhaseSheddingLimits_Table
|
||||
USHORT usMvddDependencyOnMCLKOffset;
|
||||
USHORT usMvddDependencyOnMCLKOffset;
|
||||
} ATOM_PPLIB_POWERPLAYTABLE4, *LPATOM_PPLIB_POWERPLAYTABLE4;
|
||||
|
||||
typedef struct _ATOM_PPLIB_POWERPLAYTABLE5
|
||||
@ -376,21 +376,21 @@ typedef struct _ATOM_PPLIB_RS780_CLOCK_INFO
|
||||
UCHAR ucMaxHTLinkWidth; // From SBIOS - {2, 4, 8, 16}
|
||||
UCHAR ucMinHTLinkWidth; // From SBIOS - {2, 4, 8, 16}. Effective only if CDLW enabled. Minimum down stream width could
|
||||
USHORT usHTLinkFreq; // See definition ATOM_PPLIB_RS780_HTLINKFREQ_xxx or in MHz(>=200).
|
||||
ULONG ulFlags;
|
||||
ULONG ulFlags;
|
||||
} ATOM_PPLIB_RS780_CLOCK_INFO;
|
||||
|
||||
#define ATOM_PPLIB_RS780_VOLTAGE_NONE 0
|
||||
#define ATOM_PPLIB_RS780_VOLTAGE_LOW 1
|
||||
#define ATOM_PPLIB_RS780_VOLTAGE_HIGH 2
|
||||
#define ATOM_PPLIB_RS780_VOLTAGE_VARIABLE 3
|
||||
#define ATOM_PPLIB_RS780_VOLTAGE_NONE 0
|
||||
#define ATOM_PPLIB_RS780_VOLTAGE_LOW 1
|
||||
#define ATOM_PPLIB_RS780_VOLTAGE_HIGH 2
|
||||
#define ATOM_PPLIB_RS780_VOLTAGE_VARIABLE 3
|
||||
|
||||
#define ATOM_PPLIB_RS780_SPMCLK_NONE 0 // We cannot change the side port memory clock, leave it as it is.
|
||||
#define ATOM_PPLIB_RS780_SPMCLK_LOW 1
|
||||
#define ATOM_PPLIB_RS780_SPMCLK_HIGH 2
|
||||
|
||||
#define ATOM_PPLIB_RS780_HTLINKFREQ_NONE 0
|
||||
#define ATOM_PPLIB_RS780_HTLINKFREQ_LOW 1
|
||||
#define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH 2
|
||||
#define ATOM_PPLIB_RS780_HTLINKFREQ_NONE 0
|
||||
#define ATOM_PPLIB_RS780_HTLINKFREQ_LOW 1
|
||||
#define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH 2
|
||||
|
||||
typedef struct _ATOM_PPLIB_EVERGREEN_CLOCK_INFO
|
||||
{
|
||||
@ -432,14 +432,14 @@ typedef struct _ATOM_PPLIB_CI_CLOCK_INFO
|
||||
|
||||
USHORT usMemoryClockLow;
|
||||
UCHAR ucMemoryClockHigh;
|
||||
|
||||
|
||||
UCHAR ucPCIEGen;
|
||||
USHORT usPCIELane;
|
||||
} ATOM_PPLIB_CI_CLOCK_INFO;
|
||||
|
||||
typedef struct _ATOM_PPLIB_SUMO_CLOCK_INFO{
|
||||
USHORT usEngineClockLow; //clockfrequency & 0xFFFF. The unit is in 10khz
|
||||
UCHAR ucEngineClockHigh; //clockfrequency >> 16.
|
||||
UCHAR ucEngineClockHigh; //clockfrequency >> 16.
|
||||
UCHAR vddcIndex; //2-bit vddc index;
|
||||
USHORT tdpLimit;
|
||||
//please initalize to 0
|
||||
@ -464,10 +464,10 @@ typedef struct _ATOM_PPLIB_CZ_CLOCK_INFO {
|
||||
|
||||
typedef struct _ATOM_PPLIB_STATE_V2
|
||||
{
|
||||
//number of valid dpm levels in this state; Driver uses it to calculate the whole
|
||||
//number of valid dpm levels in this state; Driver uses it to calculate the whole
|
||||
//size of the state: sizeof(ATOM_PPLIB_STATE_V2) + (ucNumDPMLevels - 1) * sizeof(UCHAR)
|
||||
UCHAR ucNumDPMLevels;
|
||||
|
||||
|
||||
//a index to the array of nonClockInfos
|
||||
UCHAR nonClockInfoIndex;
|
||||
/**
|
||||
@ -477,9 +477,9 @@ typedef struct _ATOM_PPLIB_STATE_V2
|
||||
} ATOM_PPLIB_STATE_V2;
|
||||
|
||||
typedef struct _StateArray{
|
||||
//how many states we have
|
||||
//how many states we have
|
||||
UCHAR ucNumEntries;
|
||||
|
||||
|
||||
ATOM_PPLIB_STATE_V2 states[1];
|
||||
}StateArray;
|
||||
|
||||
@ -487,10 +487,10 @@ typedef struct _StateArray{
|
||||
typedef struct _ClockInfoArray{
|
||||
//how many clock levels we have
|
||||
UCHAR ucNumEntries;
|
||||
|
||||
|
||||
//sizeof(ATOM_PPLIB_CLOCK_INFO)
|
||||
UCHAR ucEntrySize;
|
||||
|
||||
|
||||
UCHAR clockInfo[1];
|
||||
}ClockInfoArray;
|
||||
|
||||
@ -500,7 +500,7 @@ typedef struct _NonClockInfoArray{
|
||||
UCHAR ucNumEntries;
|
||||
//sizeof(ATOM_PPLIB_NONCLOCK_INFO)
|
||||
UCHAR ucEntrySize;
|
||||
|
||||
|
||||
ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[1];
|
||||
}NonClockInfoArray;
|
||||
|
||||
@ -722,7 +722,7 @@ typedef struct _ATOM_PPLIB_PPM_Table
|
||||
ULONG ulPlatformTDC;
|
||||
ULONG ulSmallACPlatformTDC;
|
||||
ULONG ulApuTDP;
|
||||
ULONG ulDGpuTDP;
|
||||
ULONG ulDGpuTDP;
|
||||
ULONG ulDGpuUlvPower;
|
||||
ULONG ulTjmax;
|
||||
} ATOM_PPLIB_PPM_Table;
|
||||
|
@ -365,7 +365,7 @@ typedef struct {
|
||||
uint16_t FanMaximumRpm;
|
||||
uint16_t FanTargetTemperature;
|
||||
uint16_t FanTargetGfxclk;
|
||||
uint8_t FanZeroRpmEnable;
|
||||
uint8_t FanZeroRpmEnable;
|
||||
uint8_t FanTachEdgePerRev;
|
||||
|
||||
|
||||
@ -659,8 +659,8 @@ typedef struct {
|
||||
uint8_t Gfx_IdleHystLimit;
|
||||
uint8_t Gfx_FPS;
|
||||
uint8_t Gfx_MinActiveFreqType;
|
||||
uint8_t Gfx_BoosterFreqType;
|
||||
uint8_t Gfx_UseRlcBusy;
|
||||
uint8_t Gfx_BoosterFreqType;
|
||||
uint8_t Gfx_UseRlcBusy;
|
||||
uint16_t Gfx_MinActiveFreq;
|
||||
uint16_t Gfx_BoosterFreq;
|
||||
uint16_t Gfx_PD_Data_time_constant;
|
||||
@ -674,7 +674,7 @@ typedef struct {
|
||||
uint8_t Soc_IdleHystLimit;
|
||||
uint8_t Soc_FPS;
|
||||
uint8_t Soc_MinActiveFreqType;
|
||||
uint8_t Soc_BoosterFreqType;
|
||||
uint8_t Soc_BoosterFreqType;
|
||||
uint8_t Soc_UseRlcBusy;
|
||||
uint16_t Soc_MinActiveFreq;
|
||||
uint16_t Soc_BoosterFreq;
|
||||
@ -690,7 +690,7 @@ typedef struct {
|
||||
uint8_t Mem_FPS;
|
||||
uint8_t Mem_MinActiveFreqType;
|
||||
uint8_t Mem_BoosterFreqType;
|
||||
uint8_t Mem_UseRlcBusy;
|
||||
uint8_t Mem_UseRlcBusy;
|
||||
uint16_t Mem_MinActiveFreq;
|
||||
uint16_t Mem_BoosterFreq;
|
||||
uint16_t Mem_PD_Data_time_constant;
|
||||
|
@ -1312,8 +1312,8 @@ struct pptable_funcs {
|
||||
* @get_ecc_table: message SMU to get ECC INFO table.
|
||||
*/
|
||||
ssize_t (*get_ecc_info)(struct smu_context *smu, void *table);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @stb_collect_info: Collects Smart Trace Buffers data.
|
||||
*/
|
||||
|
@ -90,7 +90,7 @@ DEFINE_STATIC_SRCU(drm_unplug_srcu);
|
||||
* Some functions are only called once on init regardless of how many times
|
||||
* drm attaches. In linux this is handled via module_init()/module_exit()
|
||||
*/
|
||||
int drm_refcnt;
|
||||
int drm_refcnt;
|
||||
|
||||
struct drm_softc {
|
||||
struct device sc_dev;
|
||||
@ -1225,7 +1225,7 @@ drm_attach_pci(const struct drm_driver *driver, struct pci_attach_args *pa,
|
||||
sc = (struct drm_softc *)config_found_sm(dev, &arg, drmprint, drmsubmatch);
|
||||
if (sc == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
return sc->sc_drm;
|
||||
}
|
||||
|
||||
@ -1522,7 +1522,7 @@ const struct pci_device_id *
|
||||
drm_find_description(int vendor, int device, const struct pci_device_id *idlist)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
|
||||
for (i = 0; idlist[i].vendor != 0; i++) {
|
||||
if ((idlist[i].vendor == vendor) &&
|
||||
(idlist[i].device == device ||
|
||||
@ -1546,7 +1546,7 @@ struct drm_file *
|
||||
drm_find_file_by_minor(struct drm_device *dev, int minor)
|
||||
{
|
||||
struct drm_file key;
|
||||
|
||||
|
||||
key.fminor = minor;
|
||||
return (SPLAY_FIND(drm_file_tree, &dev->files, &key));
|
||||
}
|
||||
@ -1886,7 +1886,7 @@ drm_dmamem_alloc(bus_dma_tag_t dmat, bus_size_t size, bus_size_t alignment,
|
||||
struct drm_dmamem *mem;
|
||||
size_t strsize;
|
||||
/*
|
||||
* segs is the last member of the struct since we modify the size
|
||||
* segs is the last member of the struct since we modify the size
|
||||
* to allow extra segments if more than one are allowed.
|
||||
*/
|
||||
strsize = sizeof(*mem) + (sizeof(bus_dma_segment_t) * (nsegments - 1));
|
||||
@ -1904,7 +1904,7 @@ drm_dmamem_alloc(bus_dma_tag_t dmat, bus_size_t size, bus_size_t alignment,
|
||||
&mem->nsegs, BUS_DMA_NOWAIT | BUS_DMA_ZERO) != 0)
|
||||
goto destroy;
|
||||
|
||||
if (bus_dmamem_map(dmat, mem->segs, mem->nsegs, size,
|
||||
if (bus_dmamem_map(dmat, mem->segs, mem->nsegs, size,
|
||||
&mem->kva, BUS_DMA_NOWAIT | mapflags) != 0)
|
||||
goto free;
|
||||
|
||||
|
@ -102,7 +102,7 @@ drm_fault(struct uvm_faultinfo *ufi, vaddr_t vaddr, vm_page_t *pps,
|
||||
* we do not allow device mappings to be mapped copy-on-write
|
||||
* so we kill any attempt to do so here.
|
||||
*/
|
||||
|
||||
|
||||
if (UVM_ET_ISCOPYONWRITE(entry)) {
|
||||
uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj);
|
||||
return(VM_PAGER_ERROR);
|
||||
@ -144,7 +144,7 @@ drm_fault(struct uvm_faultinfo *ufi, vaddr_t vaddr, vm_page_t *pps,
|
||||
return (ret);
|
||||
}
|
||||
|
||||
boolean_t
|
||||
boolean_t
|
||||
drm_flush(struct uvm_object *uobj, voff_t start, voff_t stop, int flags)
|
||||
{
|
||||
return (TRUE);
|
||||
@ -309,10 +309,10 @@ int drm_gem_object_init(struct drm_device *dev,
|
||||
printf("%s size too big %lu\n", __func__, size);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
obj->uao = uao_create(size, 0);
|
||||
uvm_obj_init(&obj->uobj, &drm_pgops, 1);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ kthread_run(int (*func)(void *), void *data, const char *name)
|
||||
thread->func = func;
|
||||
thread->data = data;
|
||||
thread->flags = 0;
|
||||
|
||||
|
||||
if (kthread_create(kthread_func, thread, &thread->proc, name)) {
|
||||
free(thread, M_DRM, sizeof(*thread));
|
||||
return ERR_PTR(-ENOMEM);
|
||||
@ -272,7 +272,7 @@ kthread_create_worker(unsigned int flags, const char *fmt, ...)
|
||||
vsnprintf(name, sizeof(name), fmt, ap);
|
||||
va_end(ap);
|
||||
w->tq = taskq_create(name, 1, IPL_HIGH, 0);
|
||||
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ kthread_destroy_worker(struct kthread_worker *worker)
|
||||
{
|
||||
taskq_destroy(worker->tq);
|
||||
free(worker, M_DRM, sizeof(*worker));
|
||||
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -551,7 +551,7 @@ __free_pages(struct vm_page *page, unsigned int order)
|
||||
{
|
||||
struct pglist mlist;
|
||||
int i;
|
||||
|
||||
|
||||
TAILQ_INIT(&mlist);
|
||||
for (i = 0; i < (1 << order); i++)
|
||||
TAILQ_INSERT_TAIL(&mlist, &page[i], pageq);
|
||||
@ -623,7 +623,7 @@ void
|
||||
kunmap_atomic(void *addr)
|
||||
{
|
||||
KASSERT(kmap_atomic_inuse);
|
||||
|
||||
|
||||
pmap_kremove(kmap_atomic_va, PAGE_SIZE);
|
||||
kmap_atomic_inuse = 0;
|
||||
}
|
||||
@ -1193,7 +1193,7 @@ retry:
|
||||
int
|
||||
i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
|
||||
{
|
||||
int ret;
|
||||
int ret;
|
||||
|
||||
if (adap->lock_ops)
|
||||
adap->lock_ops->lock_bus(adap, 0);
|
||||
@ -1497,7 +1497,7 @@ backlight_device_register(const char *name, void *kdev, void *data,
|
||||
bd->data = data;
|
||||
|
||||
task_set(&bd->task, backlight_do_update_status, bd);
|
||||
|
||||
|
||||
return bd;
|
||||
}
|
||||
|
||||
@ -1720,7 +1720,7 @@ dma_fence_wait(struct dma_fence *fence, bool intr)
|
||||
ret = dma_fence_wait_timeout(fence, intr, MAX_SCHEDULE_TIMEOUT);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1880,7 +1880,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
|
||||
list_del(&cb.base.node);
|
||||
out:
|
||||
mtx_leave(fence->lock);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1926,7 +1926,7 @@ dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count,
|
||||
cb = mallocarray(count, sizeof(*cb), M_DRM, M_WAITOK|M_CANFAIL|M_ZERO);
|
||||
if (cb == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
struct dma_fence *fence = fences[i];
|
||||
cb[i].proc = curproc;
|
||||
@ -2022,7 +2022,7 @@ dma_fence_array_cb_func(struct dma_fence *f, struct dma_fence_cb *cb)
|
||||
struct dma_fence_array_cb *array_cb =
|
||||
container_of(cb, struct dma_fence_array_cb, cb);
|
||||
struct dma_fence_array *dfa = array_cb->array;
|
||||
|
||||
|
||||
if (atomic_dec_and_test(&dfa->num_pending))
|
||||
timeout_add(&dfa->to, 1);
|
||||
else
|
||||
@ -2046,7 +2046,7 @@ dma_fence_array_enable_signaling(struct dma_fence *fence)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2526,7 +2526,7 @@ pcie_get_speed_cap(struct pci_dev *pdev)
|
||||
tag = pdev->tag;
|
||||
|
||||
if (!pci_get_capability(pc, tag, PCI_CAP_PCIEXPRESS,
|
||||
&pos, NULL))
|
||||
&pos, NULL))
|
||||
return PCI_SPEED_UNKNOWN;
|
||||
|
||||
id = pci_conf_read(pc, tag, PCI_ID_REG);
|
||||
@ -2582,7 +2582,7 @@ pcie_get_width_cap(struct pci_dev *pdev)
|
||||
int bus, device, function;
|
||||
|
||||
if (!pci_get_capability(pc, tag, PCI_CAP_PCIEXPRESS,
|
||||
&pos, NULL))
|
||||
&pos, NULL))
|
||||
return PCIE_LNK_WIDTH_UNKNOWN;
|
||||
|
||||
id = pci_conf_read(pc, tag, PCI_ID_REG);
|
||||
@ -2607,13 +2607,13 @@ pcie_aspm_enabled(struct pci_dev *pdev)
|
||||
pcireg_t lcsr;
|
||||
|
||||
if (!pci_get_capability(pc, tag, PCI_CAP_PCIEXPRESS,
|
||||
&pos, NULL))
|
||||
&pos, NULL))
|
||||
return false;
|
||||
|
||||
lcsr = pci_conf_read(pc, tag, pos + PCI_PCIE_LCSR);
|
||||
if ((lcsr & (PCI_PCIE_LCSR_ASPM_L0S | PCI_PCIE_LCSR_ASPM_L1)) != 0)
|
||||
return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2896,7 +2896,7 @@ interval_tree_iter_first(struct rb_root_cached *root, unsigned long start,
|
||||
|
||||
void
|
||||
interval_tree_remove(struct interval_tree_node *node,
|
||||
struct rb_root_cached *root)
|
||||
struct rb_root_cached *root)
|
||||
{
|
||||
rb_erase_cached(&node->rb, root);
|
||||
}
|
||||
@ -3021,7 +3021,7 @@ fput(struct file *fp)
|
||||
{
|
||||
if (fp->f_type != DTYPE_SYNC)
|
||||
return;
|
||||
|
||||
|
||||
FRELE(fp, curproc);
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ int drm_legacy_lock(struct drm_device *dev, void *data,
|
||||
ret ? "interrupted" : "has lock");
|
||||
if (ret) return ret;
|
||||
|
||||
/* don't set the block all signals on the master process for now
|
||||
/* don't set the block all signals on the master process for now
|
||||
* really probably not the correct answer but lets us debug xkb
|
||||
* xserver for now */
|
||||
if (!drm_is_current_master(file_priv)) {
|
||||
|
@ -95,7 +95,7 @@ drmm_kfree(struct drm_device *dev, void *p)
|
||||
}
|
||||
}
|
||||
mtx_leave(&dev->managed.lock);
|
||||
|
||||
|
||||
if (m != NULL) {
|
||||
free(m->p, M_DRM, m->size);
|
||||
free(m, M_DRM, sizeof(*m));
|
||||
|
@ -174,7 +174,7 @@ drm_mm_interval_tree_iter_first(const struct rb_root_cached *root,
|
||||
|
||||
static void
|
||||
drm_mm_interval_tree_remove(struct drm_mm_node *node,
|
||||
struct rb_root_cached *root)
|
||||
struct rb_root_cached *root)
|
||||
{
|
||||
rb_erase_cached(&node->rb, root);
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ intel_gmch_gtt_get(u64 *gtt_total,
|
||||
{
|
||||
struct inteldrm_softc *dev_priv = (void *)inteldrm_cd.cd_devs[0];
|
||||
struct agp_info *ai = &dev_priv->drm.agp->info;
|
||||
|
||||
|
||||
*gtt_total = ai->ai_aperture_size;
|
||||
*mappable_base = ai->ai_aperture_base;
|
||||
*mappable_end = ai->ai_aperture_size;
|
||||
|
@ -228,7 +228,7 @@ static int __uao_rw(struct uvm_object *uao, loff_t off,
|
||||
unsigned int this =
|
||||
min_t(size_t, PAGE_SIZE - offset_in_page(off), len);
|
||||
void *vaddr = kmap(page);
|
||||
|
||||
|
||||
if (write) {
|
||||
memcpy(vaddr + offset_in_page(off), ptr, this);
|
||||
set_page_dirty(page);
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* \file drm_atomic.h
|
||||
* Atomic operations used in the DRM which may or may not be provided by the OS.
|
||||
*
|
||||
*
|
||||
* \author Eric Anholt <anholt@FreeBSD.org>
|
||||
*/
|
||||
|
||||
@ -298,7 +298,7 @@ __test_and_set_bit(u_int b, volatile void *p)
|
||||
volatile u_int *ptr = (volatile u_int *)p;
|
||||
unsigned int prev = ptr[b >> 5];
|
||||
ptr[b >> 5] |= m;
|
||||
|
||||
|
||||
return (prev & m) != 0;
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ find_next_bit(const volatile void *p, int max, int b)
|
||||
#define wmb() __membar("dsb sy")
|
||||
#define mb() __membar("dsb sy")
|
||||
#elif defined(__mips64__)
|
||||
#define rmb() mips_sync()
|
||||
#define rmb() mips_sync()
|
||||
#define wmb() mips_sync()
|
||||
#define mb() mips_sync()
|
||||
#elif defined(__powerpc64__)
|
||||
|
@ -12,8 +12,8 @@
|
||||
#define CAP_SYS_NICE 0x2
|
||||
|
||||
static inline bool
|
||||
capable(int cap)
|
||||
{
|
||||
capable(int cap)
|
||||
{
|
||||
switch (cap) {
|
||||
case CAP_SYS_ADMIN:
|
||||
case CAP_SYS_NICE:
|
||||
@ -21,7 +21,7 @@ capable(int cap)
|
||||
default:
|
||||
panic("unhandled capability");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool
|
||||
perfmon_capable(void)
|
||||
|
@ -61,7 +61,7 @@ struct dma_buf_export_info {
|
||||
struct dma_resv *resv;
|
||||
};
|
||||
|
||||
#define DEFINE_DMA_BUF_EXPORT_INFO(x) struct dma_buf_export_info x
|
||||
#define DEFINE_DMA_BUF_EXPORT_INFO(x) struct dma_buf_export_info x
|
||||
|
||||
struct dma_buf *dma_buf_export(const struct dma_buf_export_info *);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#define _LINUX_FILE_H
|
||||
|
||||
/* both for printf */
|
||||
#include <sys/types.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
void fd_install(int, struct file *);
|
||||
|
@ -106,7 +106,7 @@ tasklet_hi_schedule(struct tasklet_struct *ts)
|
||||
task_add(taskletq, &ts->task);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static inline void
|
||||
tasklet_disable_nosync(struct tasklet_struct *ts)
|
||||
{
|
||||
atomic_inc(&ts->count);
|
||||
|
@ -119,7 +119,7 @@ static inline u32
|
||||
ioread32(const volatile void __iomem *addr)
|
||||
{
|
||||
uint32_t val;
|
||||
|
||||
|
||||
iobarrier();
|
||||
val = lemtoh32(addr);
|
||||
rmb();
|
||||
|
@ -135,7 +135,7 @@ pci_read_config_dword(struct pci_dev *pdev, int reg, u32 *val)
|
||||
{
|
||||
*val = pci_conf_read(pdev->pc, pdev->tag, reg);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_read_config_word(struct pci_dev *pdev, int reg, u16 *val)
|
||||
@ -145,7 +145,7 @@ pci_read_config_word(struct pci_dev *pdev, int reg, u16 *val)
|
||||
v = pci_conf_read(pdev->pc, pdev->tag, (reg & ~0x2));
|
||||
*val = (v >> ((reg & 0x2) * 8));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_read_config_byte(struct pci_dev *pdev, int reg, u8 *val)
|
||||
@ -155,14 +155,14 @@ pci_read_config_byte(struct pci_dev *pdev, int reg, u8 *val)
|
||||
v = pci_conf_read(pdev->pc, pdev->tag, (reg & ~0x3));
|
||||
*val = (v >> ((reg & 0x3) * 8));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_write_config_dword(struct pci_dev *pdev, int reg, u32 val)
|
||||
{
|
||||
pci_conf_write(pdev->pc, pdev->tag, reg, val);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_write_config_word(struct pci_dev *pdev, int reg, u16 val)
|
||||
@ -174,7 +174,7 @@ pci_write_config_word(struct pci_dev *pdev, int reg, u16 val)
|
||||
v |= (val << ((reg & 0x2) * 8));
|
||||
pci_conf_write(pdev->pc, pdev->tag, (reg & ~0x2), v);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_write_config_byte(struct pci_dev *pdev, int reg, u8 val)
|
||||
@ -319,7 +319,7 @@ static inline int
|
||||
pcie_set_readrq(struct pci_dev *pdev, int rrq)
|
||||
{
|
||||
uint16_t val;
|
||||
|
||||
|
||||
pcie_capability_read_word(pdev, PCI_PCIE_DCSR, &val);
|
||||
val &= ~PCI_PCIE_DCSR_MPS;
|
||||
val |= (ffs(rrq) - 8) << 12;
|
||||
|
@ -99,7 +99,7 @@ __rb_deepest_left(struct rb_node *node)
|
||||
else
|
||||
node = RB_RIGHT(node, __entry);
|
||||
}
|
||||
return parent;
|
||||
return parent;
|
||||
}
|
||||
|
||||
static inline struct rb_node *
|
||||
|
@ -77,7 +77,7 @@ static inline bool
|
||||
__sg_page_iter_next(struct sg_page_iter *iter)
|
||||
{
|
||||
iter->sg_pgoffset++;
|
||||
while (iter->__nents > 0 &&
|
||||
while (iter->__nents > 0 &&
|
||||
iter->sg_pgoffset >= (iter->sg->length / PAGE_SIZE)) {
|
||||
iter->sg_pgoffset -= (iter->sg->length / PAGE_SIZE);
|
||||
iter->sg++;
|
||||
|
@ -91,7 +91,7 @@ typedef struct {
|
||||
|
||||
static inline void
|
||||
seqlock_init(seqlock_t *sl, int wantipl)
|
||||
{
|
||||
{
|
||||
sl->seq = 0;
|
||||
mtx_init(&sl->lock, wantipl);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ match_string(const char * const *array, size_t n, const char *str)
|
||||
for (i = 0; i < n; i++) {
|
||||
if (array[i] == NULL)
|
||||
break;
|
||||
if (!strcmp(array[i], str))
|
||||
if (!strcmp(array[i], str))
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@ -30,11 +30,11 @@
|
||||
|
||||
static inline long
|
||||
get_nr_swap_pages(void)
|
||||
{
|
||||
{
|
||||
return uvmexp.swpages - uvmexp.swpginuse;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* XXX For now, we don't want the shrinker to be too aggressive, so
|
||||
* pretend we're not called from the pagedaemon even if we are.
|
||||
*/
|
||||
|
@ -30,12 +30,12 @@ typedef uint32_t u32;
|
||||
typedef int64_t s64;
|
||||
typedef uint64_t u64;
|
||||
|
||||
typedef uint16_t __le16;
|
||||
typedef uint16_t __be16;
|
||||
typedef uint32_t __le32;
|
||||
typedef uint16_t __le16;
|
||||
typedef uint16_t __be16;
|
||||
typedef uint32_t __le32;
|
||||
typedef uint32_t __be32;
|
||||
typedef uint64_t __le64;
|
||||
typedef uint64_t __be64;
|
||||
typedef uint64_t __le64;
|
||||
typedef uint64_t __be64;
|
||||
|
||||
typedef bus_addr_t dma_addr_t;
|
||||
typedef paddr_t phys_addr_t;
|
||||
|
@ -221,7 +221,7 @@ wake_up(wait_queue_head_t *wqh)
|
||||
wait_queue_entry_t *wqe;
|
||||
wait_queue_entry_t *tmp;
|
||||
mtx_enter(&wqh->lock);
|
||||
|
||||
|
||||
list_for_each_entry_safe(wqe, tmp, &wqh->head, entry) {
|
||||
KASSERT(wqe->func != NULL);
|
||||
if (wqe->func != NULL)
|
||||
@ -255,7 +255,7 @@ wake_up_all_locked(wait_queue_head_t *wqh)
|
||||
.private = curproc, \
|
||||
.func = autoremove_wake_function, \
|
||||
.entry = LIST_HEAD_INIT((name).entry), \
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
prepare_to_wait(wait_queue_head_t *wqh, wait_queue_entry_t *wqe, int state)
|
||||
|
@ -209,7 +209,7 @@ static inline int
|
||||
ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) {
|
||||
return __ww_mutex_lock(lock, ctx, false, false);
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
ww_mutex_lock_slow(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) {
|
||||
(void)__ww_mutex_lock(lock, ctx, true, false);
|
||||
@ -219,7 +219,7 @@ static inline int
|
||||
ww_mutex_lock_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) {
|
||||
return __ww_mutex_lock(lock, ctx, false, true);
|
||||
}
|
||||
|
||||
|
||||
static inline int __must_check
|
||||
ww_mutex_lock_slow_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) {
|
||||
return __ww_mutex_lock(lock, ctx, true, true);
|
||||
|
@ -233,7 +233,7 @@ typedef union {
|
||||
# define R300_WAIT_3D 0x2
|
||||
/* these two defines are DOING IT WRONG - however
|
||||
* we have userspace which relies on using these.
|
||||
* The wait interface is backwards compat new
|
||||
* The wait interface is backwards compat new
|
||||
* code should use the NEW_WAIT defines below
|
||||
* THESE ARE NOT BIT FIELDS
|
||||
*/
|
||||
|
@ -56,7 +56,7 @@ static __inline void swapfunc(char *, char *, size_t, int);
|
||||
static __inline void
|
||||
swapfunc(char *a, char *b, size_t n, int swaptype)
|
||||
{
|
||||
if (swaptype <= 1)
|
||||
if (swaptype <= 1)
|
||||
swapcode(long, a, b, n)
|
||||
else
|
||||
swapcode(char, a, b, n)
|
||||
@ -167,7 +167,7 @@ loop: SWAPINIT(a, es);
|
||||
|
||||
void
|
||||
sort(void *a, size_t n, size_t es, int (*cmp)(const void *, const void *),
|
||||
void *x)
|
||||
void *x)
|
||||
{
|
||||
KASSERT(x == NULL);
|
||||
qsort(a, n, es, cmp);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@ -37,13 +37,13 @@
|
||||
#define GRAPH_OBJECT_TYPE_CONNECTOR 0x3
|
||||
#define GRAPH_OBJECT_TYPE_ROUTER 0x4
|
||||
/* deleted */
|
||||
#define GRAPH_OBJECT_TYPE_DISPLAY_PATH 0x6
|
||||
#define GRAPH_OBJECT_TYPE_DISPLAY_PATH 0x6
|
||||
#define GRAPH_OBJECT_TYPE_GENERIC 0x7
|
||||
|
||||
/****************************************************/
|
||||
/* Encoder Object ID Definition */
|
||||
/****************************************************/
|
||||
#define ENCODER_OBJECT_ID_NONE 0x00
|
||||
#define ENCODER_OBJECT_ID_NONE 0x00
|
||||
|
||||
/* Radeon Class Display Hardware */
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_LVDS 0x01
|
||||
@ -96,7 +96,7 @@
|
||||
/****************************************************/
|
||||
/* Connector Object ID Definition */
|
||||
/****************************************************/
|
||||
#define CONNECTOR_OBJECT_ID_NONE 0x00
|
||||
#define CONNECTOR_OBJECT_ID_NONE 0x00
|
||||
#define CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I 0x01
|
||||
#define CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I 0x02
|
||||
#define CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D 0x03
|
||||
@ -156,7 +156,7 @@
|
||||
#define RESERVED1_ID_MASK 0x0800
|
||||
#define OBJECT_TYPE_MASK 0x7000
|
||||
#define RESERVED2_ID_MASK 0x8000
|
||||
|
||||
|
||||
#define OBJECT_ID_SHIFT 0x00
|
||||
#define ENUM_ID_SHIFT 0x08
|
||||
#define OBJECT_TYPE_SHIFT 0x0C
|
||||
@ -177,14 +177,14 @@
|
||||
/* Encoder Object ID definition - Shared with BIOS */
|
||||
/****************************************************/
|
||||
/*
|
||||
#define ENCODER_INTERNAL_LVDS_ENUM_ID1 0x2101
|
||||
#define ENCODER_INTERNAL_LVDS_ENUM_ID1 0x2101
|
||||
#define ENCODER_INTERNAL_TMDS1_ENUM_ID1 0x2102
|
||||
#define ENCODER_INTERNAL_TMDS2_ENUM_ID1 0x2103
|
||||
#define ENCODER_INTERNAL_DAC1_ENUM_ID1 0x2104
|
||||
#define ENCODER_INTERNAL_DAC2_ENUM_ID1 0x2105
|
||||
#define ENCODER_INTERNAL_SDVOA_ENUM_ID1 0x2106
|
||||
#define ENCODER_INTERNAL_SDVOB_ENUM_ID1 0x2107
|
||||
#define ENCODER_SIL170B_ENUM_ID1 0x2108
|
||||
#define ENCODER_SIL170B_ENUM_ID1 0x2108
|
||||
#define ENCODER_CH7303_ENUM_ID1 0x2109
|
||||
#define ENCODER_CH7301_ENUM_ID1 0x210A
|
||||
#define ENCODER_INTERNAL_DVO1_ENUM_ID1 0x210B
|
||||
@ -198,8 +198,8 @@
|
||||
#define ENCODER_INTERNAL_KLDSCP_TMDS1_ENUM_ID1 0x2113
|
||||
#define ENCODER_INTERNAL_KLDSCP_DVO1_ENUM_ID1 0x2114
|
||||
#define ENCODER_INTERNAL_KLDSCP_DAC1_ENUM_ID1 0x2115
|
||||
#define ENCODER_INTERNAL_KLDSCP_DAC2_ENUM_ID1 0x2116
|
||||
#define ENCODER_SI178_ENUM_ID1 0x2117
|
||||
#define ENCODER_INTERNAL_KLDSCP_DAC2_ENUM_ID1 0x2116
|
||||
#define ENCODER_SI178_ENUM_ID1 0x2117
|
||||
#define ENCODER_MVPU_FPGA_ENUM_ID1 0x2118
|
||||
#define ENCODER_INTERNAL_DDI_ENUM_ID1 0x2119
|
||||
#define ENCODER_VT1625_ENUM_ID1 0x211A
|
||||
@ -314,7 +314,7 @@
|
||||
|
||||
#define ENCODER_SI178_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_SI178 << OBJECT_ID_SHIFT)
|
||||
ENCODER_OBJECT_ID_SI178 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_MVPU_FPGA_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
@ -322,7 +322,7 @@
|
||||
|
||||
#define ENCODER_INTERNAL_DDI_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_DDI << OBJECT_ID_SHIFT)
|
||||
ENCODER_OBJECT_ID_INTERNAL_DDI << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_VT1625_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
@ -350,7 +350,7 @@
|
||||
|
||||
#define ENCODER_INTERNAL_KLDSCP_LVTMA_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA << OBJECT_ID_SHIFT)
|
||||
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_UNIPHY1_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: if_aq_pci.c,v 1.21 2023/05/01 08:25:55 kettenis Exp $ */
|
||||
/* $OpenBSD: if_aq_pci.c,v 1.22 2023/05/02 12:32:22 kettenis Exp $ */
|
||||
/* $NetBSD: if_aq.c,v 1.27 2021/06/16 00:21:18 riastradh Exp $ */
|
||||
|
||||
/*
|
||||
@ -1970,7 +1970,7 @@ aq2_fw_reboot(struct aq_softc *sc)
|
||||
snprintf(buf, sizeof(buf), "(unknown 0x%08x)", v);
|
||||
break;
|
||||
}
|
||||
printf(", Atlantic2 %s, F/W version %d.%d.%d\n", buf,
|
||||
printf(", Atlantic2 %s, F/W version %d.%d.%d", buf,
|
||||
FW_VERSION_MAJOR(sc), FW_VERSION_MINOR(sc), FW_VERSION_BUILD(sc));
|
||||
|
||||
aq2_interface_buffer_read(sc, AQ2_FW_INTERFACE_OUT_FILTER_CAPS_REG,
|
||||
|
@ -329,7 +329,7 @@ sr_raid1c_rw(struct sr_workunit *wu)
|
||||
|
||||
if (sr_validate_io(wu, &blkno, "sr_raid1c_rw"))
|
||||
return (1);
|
||||
|
||||
|
||||
if (ISSET(wu->swu_xs->flags, SCSI_DATA_OUT) &&
|
||||
!ISSET(wu->swu_flags, SR_WUF_REBUILD)) {
|
||||
mdd_raid1c = &wu->swu_dis->mds.mdd_raid1c;
|
||||
|
@ -673,7 +673,7 @@ spdmem_ddr3_decode(struct spdmem_softc *sc, struct spdmem *s)
|
||||
SPDMEM_DDR3_DATAWIDTH_PRIMASK;
|
||||
chipwidth = s->sm_data[SPDMEM_DDR3_MOD_ORG] &
|
||||
SPDMEM_DDR3_MOD_ORG_CHIPWIDTH_MASK;
|
||||
physbanks = (s->sm_data[SPDMEM_DDR3_MOD_ORG] >>
|
||||
physbanks = (s->sm_data[SPDMEM_DDR3_MOD_ORG] >>
|
||||
SPDMEM_DDR3_MOD_ORG_BANKS_SHIFT) & SPDMEM_DDR3_MOD_ORG_BANKS_MASK;
|
||||
|
||||
dimm_size = (chipsize + 28 - 20) - 3 + (datawidth + 3) -
|
||||
@ -691,7 +691,7 @@ spdmem_ddr3_decode(struct spdmem_softc *sc, struct spdmem *s)
|
||||
if (mtype == SPDMEM_DDR3_RDIMM || mtype == SPDMEM_DDR3_MINI_RDIMM)
|
||||
printf(" registered");
|
||||
|
||||
if (s->sm_data[SPDMEM_DDR3_DATAWIDTH] & SPDMEM_DDR3_DATAWIDTH_ECCMASK)
|
||||
if (s->sm_data[SPDMEM_DDR3_DATAWIDTH] & SPDMEM_DDR3_DATAWIDTH_ECCMASK)
|
||||
printf(" ECC");
|
||||
|
||||
dividend = s->sm_data[SPDMEM_DDR3_MTB_DIVIDEND];
|
||||
@ -759,7 +759,7 @@ spdmem_ddr4_decode(struct spdmem_softc *sc, struct spdmem *s)
|
||||
SPDMEM_DDR4_DATAWIDTH_PRIMASK;
|
||||
chipwidth = s->sm_data[SPDMEM_DDR4_MOD_ORG] &
|
||||
SPDMEM_DDR4_MOD_ORG_CHIPWIDTH_MASK;
|
||||
physbanks = (s->sm_data[SPDMEM_DDR4_MOD_ORG] >>
|
||||
physbanks = (s->sm_data[SPDMEM_DDR4_MOD_ORG] >>
|
||||
SPDMEM_DDR4_MOD_ORG_BANKS_SHIFT) & SPDMEM_DDR4_MOD_ORG_BANKS_MASK;
|
||||
|
||||
if ((s->sm_data[SPDMEM_DDR4_PACK_TYPE] &
|
||||
@ -796,7 +796,7 @@ spdmem_ddr4_decode(struct spdmem_softc *sc, struct spdmem *s)
|
||||
if (mtype == SPDMEM_DDR4_16B_SO_DIMM)
|
||||
printf(" 16-bit");
|
||||
|
||||
if (s->sm_data[SPDMEM_DDR4_DATAWIDTH] & SPDMEM_DDR4_DATAWIDTH_ECCMASK)
|
||||
if (s->sm_data[SPDMEM_DDR4_DATAWIDTH] & SPDMEM_DDR4_DATAWIDTH_ECCMASK)
|
||||
printf(" ECC");
|
||||
|
||||
mtb = s->sm_data[SPDMEM_DDR4_TCKMIN_MTB];
|
||||
|
@ -526,7 +526,7 @@ typedef uLong FAR uLongf;
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# if defined(_WIN32) && !defined(__GNUC__)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
|
@ -729,7 +729,7 @@ ZEXTERN int ZEXPORT deflateParams(z_streamp strm,
|
||||
Then no more input data should be provided before the deflateParams() call.
|
||||
If this is done, the old level and strategy will be applied to the data
|
||||
compressed before deflateParams(), and the new level and strategy will be
|
||||
applied to the the data compressed after deflateParams().
|
||||
applied to the data compressed after deflateParams().
|
||||
|
||||
deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
|
||||
state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: nd6.c,v 1.272 2023/04/05 23:01:03 kn Exp $ */
|
||||
/* $OpenBSD: nd6.c,v 1.273 2023/05/02 06:06:13 bluhm Exp $ */
|
||||
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -303,7 +303,8 @@ nd6_llinfo_timer(struct rtentry *rt)
|
||||
if (ln->ln_asked < nd6_mmaxtries) {
|
||||
ln->ln_asked++;
|
||||
nd6_llinfo_settimer(ln, RETRANS_TIMER / 1000);
|
||||
nd6_ns_output(ifp, NULL, &dst->sin6_addr, ln, 0);
|
||||
nd6_ns_output(ifp, NULL, &dst->sin6_addr,
|
||||
&ln->ln_saddr6, 0);
|
||||
} else {
|
||||
struct mbuf_list ml;
|
||||
struct mbuf *m;
|
||||
@ -336,6 +337,7 @@ nd6_llinfo_timer(struct rtentry *rt)
|
||||
ln = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case ND6_LLINFO_REACHABLE:
|
||||
if (!ND6_LLINFO_PERMANENT(ln)) {
|
||||
ln->ln_state = ND6_LLINFO_STALE;
|
||||
@ -357,14 +359,16 @@ nd6_llinfo_timer(struct rtentry *rt)
|
||||
ln->ln_asked = 1;
|
||||
ln->ln_state = ND6_LLINFO_PROBE;
|
||||
nd6_llinfo_settimer(ln, RETRANS_TIMER / 1000);
|
||||
nd6_ns_output(ifp, &dst->sin6_addr, &dst->sin6_addr, ln, 0);
|
||||
nd6_ns_output(ifp, &dst->sin6_addr, &dst->sin6_addr,
|
||||
&ln->ln_saddr6, 0);
|
||||
break;
|
||||
|
||||
case ND6_LLINFO_PROBE:
|
||||
if (ln->ln_asked < nd6_umaxtries) {
|
||||
ln->ln_asked++;
|
||||
nd6_llinfo_settimer(ln, RETRANS_TIMER / 1000);
|
||||
nd6_ns_output(ifp, &dst->sin6_addr,
|
||||
&dst->sin6_addr, ln, 0);
|
||||
nd6_ns_output(ifp, &dst->sin6_addr, &dst->sin6_addr,
|
||||
&ln->ln_saddr6, 0);
|
||||
} else {
|
||||
nd6_free(rt);
|
||||
ln = NULL;
|
||||
@ -1247,7 +1251,9 @@ nd6_resolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
|
||||
struct sockaddr_dl *sdl;
|
||||
struct rtentry *rt;
|
||||
struct llinfo_nd6 *ln = NULL;
|
||||
struct in6_addr saddr6;
|
||||
time_t uptime;
|
||||
int solicit = 0;
|
||||
|
||||
if (m->m_flags & M_MCAST) {
|
||||
ETHER_MAP_IPV6_MULTICAST(&satosin6(dst)->sin6_addr, desten);
|
||||
@ -1357,9 +1363,13 @@ nd6_resolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
|
||||
if (!ND6_LLINFO_PERMANENT(ln) && ln->ln_asked == 0) {
|
||||
ln->ln_asked++;
|
||||
nd6_llinfo_settimer(ln, RETRANS_TIMER / 1000);
|
||||
nd6_ns_output(ifp, NULL, &satosin6(dst)->sin6_addr, ln, 0);
|
||||
saddr6 = ln->ln_saddr6;
|
||||
solicit = 1;
|
||||
}
|
||||
KERNEL_UNLOCK();
|
||||
|
||||
if (solicit)
|
||||
nd6_ns_output(ifp, NULL, &satosin6(dst)->sin6_addr, &saddr6, 0);
|
||||
return (EAGAIN);
|
||||
|
||||
bad:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: nd6.h,v 1.97 2023/04/05 21:51:47 bluhm Exp $ */
|
||||
/* $OpenBSD: nd6.h,v 1.98 2023/05/02 06:06:13 bluhm Exp $ */
|
||||
/* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -141,7 +141,7 @@ void nd6_na_output(struct ifnet *, const struct in6_addr *,
|
||||
const struct in6_addr *, u_long, int, struct sockaddr *);
|
||||
void nd6_ns_input(struct mbuf *, int, int);
|
||||
void nd6_ns_output(struct ifnet *, const struct in6_addr *,
|
||||
const struct in6_addr *, const struct llinfo_nd6 *, int);
|
||||
const struct in6_addr *, const struct in6_addr *, int);
|
||||
caddr_t nd6_ifptomac(struct ifnet *);
|
||||
void nd6_dad_start(struct ifaddr *);
|
||||
void nd6_dad_stop(struct ifaddr *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: nd6_nbr.c,v 1.146 2023/04/28 14:09:06 phessler Exp $ */
|
||||
/* $OpenBSD: nd6_nbr.c,v 1.147 2023/05/02 06:06:13 bluhm Exp $ */
|
||||
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
|
||||
|
||||
/*
|
||||
@ -360,7 +360,7 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len)
|
||||
*/
|
||||
void
|
||||
nd6_ns_output(struct ifnet *ifp, const struct in6_addr *daddr6,
|
||||
const struct in6_addr *taddr6, const struct llinfo_nd6 *ln, int dad)
|
||||
const struct in6_addr *taddr6, const struct in6_addr *saddr6, int dad)
|
||||
{
|
||||
struct mbuf *m;
|
||||
struct ip6_hdr *ip6;
|
||||
@ -423,7 +423,7 @@ nd6_ns_output(struct ifnet *ifp, const struct in6_addr *daddr6,
|
||||
bzero(&dst_sa, sizeof(dst_sa));
|
||||
src_sa.sin6_family = dst_sa.sin6_family = AF_INET6;
|
||||
src_sa.sin6_len = dst_sa.sin6_len = sizeof(struct sockaddr_in6);
|
||||
if (daddr6)
|
||||
if (daddr6 != NULL)
|
||||
dst_sa.sin6_addr = *daddr6;
|
||||
else {
|
||||
dst_sa.sin6_addr.s6_addr16[0] = __IPV6_ADDR_INT16_MLL;
|
||||
@ -451,14 +451,13 @@ nd6_ns_output(struct ifnet *ifp, const struct in6_addr *daddr6,
|
||||
* - if taddr is link local saddr6 must be link local as well
|
||||
* Otherwise, we perform the source address selection as usual.
|
||||
*/
|
||||
if (ln != NULL)
|
||||
src_sa.sin6_addr = ln->ln_saddr6;
|
||||
if (saddr6 != NULL)
|
||||
src_sa.sin6_addr = *saddr6;
|
||||
|
||||
if (!IN6_IS_ADDR_LINKLOCAL(taddr6) ||
|
||||
IN6_IS_ADDR_UNSPECIFIED(&src_sa.sin6_addr) ||
|
||||
IN6_IS_ADDR_LINKLOCAL(&src_sa.sin6_addr) ||
|
||||
!in6ifa_ifpwithaddr(ifp, &src_sa.sin6_addr)) {
|
||||
|
||||
struct rtentry *rt;
|
||||
|
||||
rt = rtalloc(sin6tosa(&dst_sa), RT_RESOLVE,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ttymsg.c,v 1.20 2021/10/24 21:24:17 deraadt Exp $ */
|
||||
/* $OpenBSD: ttymsg.c,v 1.21 2023/05/02 09:51:22 tb Exp $ */
|
||||
/* $NetBSD: ttymsg.c,v 1.3 1994/11/17 07:17:55 jtc Exp $ */
|
||||
|
||||
/*
|
||||
@ -54,11 +54,7 @@ char *ttymsg(struct iovec *, int, char *, int);
|
||||
* ignored (exclusive-use, lack of permission, etc.).
|
||||
*/
|
||||
char *
|
||||
ttymsg(iov, iovcnt, line, tmout)
|
||||
struct iovec *iov;
|
||||
int iovcnt;
|
||||
char *line;
|
||||
int tmout;
|
||||
ttymsg(struct iovec *iov, int iovcnt, char *line, int tmout)
|
||||
{
|
||||
static char device[MAXNAMLEN] = _PATH_DEV;
|
||||
static char errbuf[1024];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: vmctl.c,v 1.87 2023/04/28 19:46:41 dv Exp $ */
|
||||
/* $OpenBSD: vmctl.c,v 1.88 2023/05/02 13:02:51 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
|
||||
@ -202,7 +202,7 @@ vm_start(uint32_t start_id, const char *name, size_t memsize, int nnics,
|
||||
imsg_compose(ibuf, IMSG_VMDOP_START_VM_REQUEST, 0, 0, vmc->vmc_kernel,
|
||||
vmc, sizeof(struct vmop_create_params));
|
||||
|
||||
free(vcp);
|
||||
free(vmc);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user