From nobody Thu Nov 16 19:03:35 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWTvq1HyPz510HG for ; Thu, 16 Nov 2023 19:03:35 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SWTvq13bsz3Wss for ; Thu, 16 Nov 2023 19:03:35 +0000 (UTC) (envelope-from daemon-user@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700161415; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=fl9LoJggxfzDikPeAaH9y6CTHBiJk4zUnephdm2UhxM=; b=peCLIuRncJGDBmQglKaJHBuKahJa2Fe8SrQE1IBVCUCA4JSbrzkGlNozRFdq+sfbT1hnyE LVa0JONyTbrnFkwtCO86KoLnPWq6XOC+HLznorOCviZGVDqwmuzjKNlgcr8VKTYDVEEQiU 0Sooo9ug5yEZoMhVaxf/WYqh7jWwBu+Ng2F390X0j21U0EaTvJ83991CStdAeL7PzWv4aW xjpIG1GibfqgidN9nJBr5pT7FRbUW80sT4iiH8T/K6uWjPpRiJnT3Jf7z4HFXyluQZoL0d Zu1++/vCAWze1BLc5OGO51yqGyL7FvPQNeCCX7QuumVljXrpHKF2ExXvkJlyWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700161415; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=fl9LoJggxfzDikPeAaH9y6CTHBiJk4zUnephdm2UhxM=; b=AaeqtV4oK2AvRa4pVTc4QtJaPVy/kNd/WdEYXZVH+HjyLHKEUm3ljBNCI6xC+wGRN7uHs5 7eScEw9u8ceMppyC8hiT6QymxRGJHuwejZ5unrINp+kOIdWshwJf+XrILOHLsdJrVdNUts fK4bvQ7Du3hqQYkWU7qn02NVHGGFJS/8YHFoCTgWJ6jrocDqKmvTFU9JcJJYQTpBWqIqVl qeb3ABoA/nCPsmSQIx8brbgpuy7oU38hdI44tJkrbWuoaPpNqxsVxORAkgNBPMGfOp7Wht E39qxtTDhebiKSJkUyo+dW9QQ5juQL92bbTha7kmeDwpcdRi0gtubpOCs78L9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700161415; a=rsa-sha256; cv=none; b=QWBIMdorK2TzDTj1peRDfLlQfnqJ+ueZ6PLkqhTdWSYGDbEbGC42wi53q9D2/W6tE78IXQ sunUhBq0wtuA/MdOC8XFvh7UAcvjom07bu0KkmVZIro7lWUgI6XF1+kXHibnb7V5iWjGcf C6IysuEyy/YeTJm2IcIeb82wALX2d8k1OjNiSg4lWBHoZ2DPuuKnfsg8xPYGtXQ+yzzcV3 LEn4KEbfydla7FNZWeNLy9BMPvKfR7VPMcqtLly1mVK1uEQehFSPB9a3oji6Qzclh4SmxK gy3EnFkDAEUafxn7BHY3tSGPeKFBxPK3e4hhMZqGWe+c69qCsDVy/x+HD7JbnA== Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:606c::16:b]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4SWTvq08jBz1BWN for ; Thu, 16 Nov 2023 19:03:35 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id 03C9A44A83; Thu, 16 Nov 2023 19:03:35 +0000 (UTC) Date: Thu, 16 Nov 2023 19:03:35 +0000 To: freebsd-arm@freebsd.org From: "titus_edc.ro (Titus Manea)" Reply-to: "titus_edc.ro (Titus Manea)" Subject: [Differential] D42638: Rockchip RNG Message-ID: X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , , X-Herald-Rules: <28>, <31>, <32>, <34>, <177>, <79> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk Thread-Topic: PHID-DREV-d2ijur6r7trb5hmp22or X-Phabricator-Mail-ID: 4156725 X-Phabricator-Send-Attempt: p3afaifxhayaf44c In-Reply-To: References: Thread-Index: OWFmNTUxOTI4ODQ5ZTcyYzhiMjc4N2YxM2RmIGVWZ4c= X-Phabricator-Stamps: actor(@titus_edc.ro) application(Differential) author(@titus_edc.ro) herald(H28) herald(H31) herald(H32) herald(H34) herald(H79) herald(H177) monogram(D42638) object-type(DREV) phid(PHID-DREV-d2ijur6r7trb5hmp22or) reviewer(@andrew) reviewer(@freebsd-arm-list) revision-repository(rG) revision-status(needs-review) subscriber(@emaste) subscriber(@imp) via(web) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_d0957a9db152ebc6cc15e86a0f83e5c2" --b1_d0957a9db152ebc6cc15e86a0f83e5c2 Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: base64 dGl0dXNfZWRjLnJvIGNyZWF0ZWQgdGhpcyByZXZpc2lvbi4KdGl0dXNfZWRjLnJvIGFkZGVkIGEg cmV2aWV3ZXI6IGZyZWVic2QtYXJtLWxpc3QuCkhlcmFsZCBhZGRlZCBzdWJzY3JpYmVyczogZW1h c3RlLCBpbXAuCkhlcmFsZCBhZGRlZCBhIHJldmlld2VyOiBhbmRyZXcuCkhlcmFsZCBhZGRlZCBh IHJldmlld2VyOiBhbmRyZXcuCkhlcmFsZCBhZGRlZCBhIHJldmlld2VyOiBhbmRyZXcuCnRpdHVz X2VkYy5ybyByZXF1ZXN0ZWQgcmV2aWV3IG9mIHRoaXMgcmV2aXNpb24uCgpSRVZJU0lPTiBTVU1N QVJZCiAgcm9ja2NoaXAgcm5nIHN1cHBvcnQsIHNpbWlsYXIgd2l0aCBiY20yODM1X3JuZwogIHJh bmRvbSBkYXRhIGdlbmVyYXRlZCBpcyBwYXNzZWQgdG8KICByYW5kb21faGFydmVzdF9xdWV1ZQog IAogIHYxIGFuZCB2MiBzdXBwb3J0ZWQgb25seSB2MiB0ZXN0ZWQKICByYW5kb21uZXNzIG9mIGRh dGEgZ2VuZXJhdGVkIG9ubHkgdGVzdGVkIHdpdGggdGhlICdleWUgdGVzdCcKClJFUE9TSVRPUlkK ICByRyBGcmVlQlNEIHNyYyByZXBvc2l0b3J5CgpSRVZJU0lPTiBERVRBSUwKICBodHRwczovL3Jl dmlld3MuZnJlZWJzZC5vcmcvRDQyNjM4CgpBRkZFQ1RFRCBGSUxFUwogIGFybTY0L3JvY2tjaGlw L3JrX3JuZy5jCgpFTUFJTCBQUkVGRVJFTkNFUwogIGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9y Zy9zZXR0aW5ncy9wYW5lbC9lbWFpbHByZWZlcmVuY2VzLwoKVG86IHRpdHVzX2VkYy5ybywgZnJl ZWJzZC1hcm0tbGlzdCwgYW5kcmV3CkNjOiBpbXAsIGVtYXN0ZSwgcHN0ZWYK --b1_d0957a9db152ebc6cc15e86a0f83e5c2 Content-Type: text/x-patch; charset=utf-8; name="D42638.130216.patch" Content-Transfer-Encoding: base64 Content-Disposition: attach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pCit7CisJc3RydWN0IHJrX3JuZ19jb25m ICpjb21wYXQ7CisJaWYgKCFvZndfYnVzX3N0YXR1c19va2F5KGRldikpCisJCXJldHVybiAoRU5Y SU8pOworCisJY29tcGF0ID0gKHN0cnVjdCBya19ybmdfY29uZiAqKSBvZndfYnVzX3NlYXJjaF9j b21wYXRpYmxlKGRldiwgY29tcGF0X2RhdGEpLT5vY2RfZGF0YTsKKwlpZiAoIWNvbXBhdCkKKwkJ cmV0dXJuIChFTlhJTyk7CisKKwlkZXZpY2Vfc2V0X2Rlc2MoZGV2LCBjb21wYXQtPm5hbWUpOwor CisJcmV0dXJuIChCVVNfUFJPQkVfREVGQVVMVCk7Cit9CisKK3N0YXRpYyBpbnQKK3JrX3JuZ19h dHRhY2goZGV2aWNlX3QgZGV2KQoreworCXN0cnVjdCBya19ybmdfc29mdGMgKnNjOworCWludCBl cnJvciA9IDAsIGksIG5jZWxsczsKKwljbGtfdCBjbGs7CisJaHdyZXNldF90IGh3cmVzZXQgPSBO VUxMOworCXBoYW5kbGVfdCBub2RlOworCisJc2MgPSBkZXZpY2VfZ2V0X3NvZnRjKGRldik7CisJ c2MtPnNjX2RldiA9IGRldjsKKworCXNjLT5zY19jb25mID0gKHN0cnVjdCBya19ybmdfY29uZiAq KW9md19idXNfc2VhcmNoX2NvbXBhdGlibGUoZGV2LCBjb21wYXRfZGF0YSktPm9jZF9kYXRhOwor CWlmKCFzYy0+c2NfY29uZikgeworCQllcnJvciA9IEVOWElPOworCQlnb3RvIGZhaWw7CisJfQor CisgICAgICAgIGlmIChidXNfYWxsb2NfcmVzb3VyY2VzKGRldiwgcmtfcm5nX3NwZWMsIHNjLT5z Y19yZXMpICE9IDApIHsKKyAgICAgICAgICAgICAgICBkZXZpY2VfcHJpbnRmKGRldiwgImNhbm5v dCBhbGxvY2F0ZSByZXNvdXJjZXMgZm9yIGRldmljZVxuIik7CisgICAgICAgICAgICAgICAgZXJy b3IgPSBFTlhJTzsKKyAgICAgICAgICAgICAgICBnb3RvIGZhaWw7CisgICAgICAgIH0KKworICAg ICAgICBub2RlID0gb2Z3X2J1c19nZXRfbm9kZShkZXYpOworCisJaWYgKE9GX2hhc3Byb3Aobm9k ZSwgImFzc2lnbmVkLWNsb2NrcyIpKSB7CisJCWVycm9yID0gY2xrX3NldF9hc3NpZ25lZChkZXYs IG5vZGUpOworCQlpZihlcnJvcikgeworCQkJZGV2aWNlX3ByaW50ZihkZXYsICJDb3VsZCBub3Qg c2V0IGFzc2lnbmVkIGNsb2Nrc1xuIik7CisJCQlnb3RvIGZhaWw7CisJCX0KKwl9CisKKyAgICAg ICAgZXJyb3IgPSBvZndfYnVzX3BhcnNlX3hyZWZfbGlzdF9nZXRfbGVuZ3RoKG5vZGUsICJjbG9j a3MiLAorICAgICAgICAgICAgIiNjbG9jay1jZWxscyIsICZuY2VsbHMpOworICAgICAgICBpZiAo ZXJyb3IgIT0gMCB8fCBuY2VsbHMgPCAyKSB7CisgICAgICAgICAgICAgICAgZGV2aWNlX3ByaW50 ZihkZXYsICJjb3VsZG4ndCBmaW5kIGVub3VnaCBjbG9ja3NcbiIpOworICAgICAgICAgICAgICAg IGVycm9yID0gRU5YSU87CisgICAgICAgICAgICAgICAgZ290byBmYWlsOworICAgICAgICB9CisK Kwlmb3IoaSA9IDA7aSA8IG5jZWxscztpKyspIHsKKwkJZXJyb3IgPSBjbGtfZ2V0X2J5X29md19p bmRleChkZXYsIG5vZGUsIGksICZjbGspOworCQlpZihlcnJvcikgeworCQkJZGV2aWNlX3ByaW50 ZihkZXYsICJDb3VsZCBub3QgZ2V0IGNsb2NrICMlZFxuIiwgaSk7CisJCQllcnJvciA9IEVOWElP OworCQkJZ290byBmYWlsOworCQkgfQorCisJCWVycm9yID0gY2xrX2VuYWJsZShjbGspOworCQlp ZihlcnJvcikgeworCQkJZGV2aWNlX3ByaW50ZihkZXYsICJDb3VsZCBub3QgZW5hYmxlIGNsb2Nr ICMlc1xuIiwgY2xrX2dldF9uYW1lKGNsaykpOworCQkJZXJyb3IgPSBFTlhJTzsKKwkJCWdvdG8g ZmFpbDsKKwkJIH0KKwl9CisKKwllcnJvciA9IGh3cmVzZXRfZ2V0X2J5X29md19uYW1lKGRldiwg bm9kZSwgInJlc2V0IiwgJmh3cmVzZXQpOworICAgICAgICBpZiAoZXJyb3IgIT0gMCAmJiBlcnJv ciAhPSBFTk9FTlQpIHsKKyAgICAgICAgICAgICAgICBkZXZpY2VfcHJpbnRmKGRldiwgIkNhbm5v dCBnZXQgJ3Jlc2V0JyByZXNldFxuIik7CisgICAgICAgICAgICAgICAgZXJyb3IgPSBFTlhJTzsK KyAgICAgICAgICAgICAgIC8qIGdvdG8gZmFpbDsqLworICAgICAgICB9CisKKyAgICAgICAgaWYg KGh3cmVzZXQgIT0gTlVMTCkgeworICAgICAgICAgICAgICAgIGVycm9yID0gaHdyZXNldF9kZWFz c2VydChod3Jlc2V0KTsKKyAgICAgICAgICAgICAgICBpZiAoZXJyb3IgIT0gMCkgeworICAgICAg ICAgICAgICAgICAgICAgICAgZGV2aWNlX3ByaW50ZihkZXYsICJDYW5ub3QgZGVhc3NlcnQgcmVz ZXRcbiIpOworICAgICAgICAgICAgICAgICAgICAgICAgZ290byBmYWlsOworICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgfQorCisJLyogSW5pdGlhbGl6ZSBjYWxsb3V0ICovCisJY2FsbG91dF9p bml0KCZzYy0+c2Nfcm5ndG8sIENBTExPVVRfTVBTQUZFKTsKKwljYWxsb3V0X3Jlc2V0KCZzYy0+ c2Nfcm5ndG8sIGh6LCBya19ybmdfaGFydmVzdCwgc2MpOworCisJcmV0dXJuICgwKTsKK2ZhaWw6 CisJcmV0dXJuIChlcnJvcik7Cit9CisKK3N0YXRpYyBpbnQKK3JrX3JuZ19kZXRhY2goZGV2aWNl X3QgZGV2KQoreworCXN0cnVjdCBya19ybmdfc29mdGMgKnNjOworCisJc2MgPSBkZXZpY2VfZ2V0 X3NvZnRjKGRldik7CisKKwkvKiBTdG9w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