Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Need to mask warranty bit when checking board revision for 64 bit as well #502

Open
akumpf opened this issue Aug 22, 2022 · 1 comment
Open
Labels

Comments

@akumpf
Copy link

akumpf commented Aug 22, 2022

I upgraded the firmware on a Pi Zero 2 running 64-bit Bullseye, and somehow the "warranty voided" bit got flipped on. Not a big deal, except then my LED code broke because it couldn't find that board revision anymore when using this library.

For 64 bit, I believe the warranty bit is not being masked (via /proc/device-tree/system/linux,revision). Here'e the relevant 2 lines of code that handle that in the 32 bit check.

// Take out warranty and manufacturer bits

And could be added here:

uint32_t hwver = rpi_hw_info[i].hwver;

Could this also be added to the 64 bit revision check as well? Thanks!

@Gadgetoid
Copy link
Collaborator

It's broadly my preference to just do away with this cursed hardware revision check nonsense once and for all.

I unfortunately don't have a lot of time to get lost in tweaking & testing the code- if you could figure out where this mask needs to be against your flipped board and raise a PR that would be very helpful.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants