Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssl/dist/crypto PR/53838: Scole Mail...
details: https://anonhg.NetBSD.org/src/rev/0d76a0275588
branches: trunk
changeset: 995815:0d76a0275588
user: christos <christos%NetBSD.org@localhost>
date: Sun Jan 06 22:20:50 2019 +0000
description:
PR/53838: Scole Mail: OPENSSL_rdtsc() is reading a time counter
for randomness, and the powerpc code uses mftbu and mftb for access.
The 601 is different than other powerpcs. It doesn't have a time
base register (TBR), but a real time clock (RTC) so it needs to
use different calls like mfrtcu/mfrtcl instead.
diffstat:
crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r 02897ae007d8 -r 0d76a0275588 crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl
--- a/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl Sun Jan 06 19:44:54 2019 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl Sun Jan 06 22:20:50 2019 +0000
@@ -132,6 +132,17 @@
mftb r3
___
$code.=<<___ if ($flavour !~ /64/);
+ mfspr r0,287
+ srwi r0,r0,0x10
+ cmplwi r0,0x1
+ bgt .Loop_rdtsc
+.Loop_rdtsc_601:
+ mfrtcu r5
+ mfrtcl r3
+ mfrtcu r4
+ cmplw r4,r5
+ bne .Loop_rdtsc_601
+ blr
Loop_rdtsc:
mftbu r5
mftb r3
Home |
Main Index |
Thread Index |
Old Index