HomeFreeBSD

[PowerPC] Make cpu frequency detection endian-independent

Description

[PowerPC] Make cpu frequency detection endian-independent

On ibm,extended-clock-frequency, ensure we be64toh() the value.

On clock-frequency, remove the right-shifting hack (which was needed due to
reading a 32 bit value into a 64 bit variable) and switch to OF_getencprop()
for reading (which will handle endian conversion internally.)

Reviewed by: jhibbits (in irc)
Sponsored by: Tag1 Consulting, Inc.

Details

Provenance
bdragonAuthored on Sep 14 2020, 3:20 PM
Parents
rGbfdd0a34ad14: Partially revert r346018 and use the if/then construct instead of shell.
Branches
Unknown
Tags
Unknown

Event Timeline