Page MenuHomeFreeBSD

A10/A20 Security ID
ClosedPublic

Authored by manu on May 16 2016, 4:57 AM.
Tags
Referenced Files
Unknown Object (File)
Mon, Jun 3, 1:53 AM
Unknown Object (File)
Wed, May 29, 1:21 AM
Unknown Object (File)
Tue, May 28, 9:08 PM
Unknown Object (File)
Mon, May 20, 2:33 AM
Unknown Object (File)
May 13 2024, 1:34 PM
Unknown Object (File)
May 13 2024, 10:39 AM
Unknown Object (File)
May 13 2024, 6:29 AM
Unknown Object (File)
May 12 2024, 12:21 AM

Details

Summary

Add A10/A20 support for aw_sid.
Expose the rootkey via sysctl.
The rootkey can be used for product identification or to generate a mac address (this is was u-boot uses).

Test Plan

Tested on A10 and A20 hardware.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4490
Build 4541: arc lint + arc unit

Event Timeline

manu retitled this revision from to A10/A20 Security ID.
manu updated this object.
manu edited the test plan for this revision. (Show Details)
manu added a reviewer: ARM.
manu set the repository for this revision to rS FreeBSD src repository - subversion.
manu added a project: ARM.
jmcneill added inline comments.
sys/arm/allwinner/aw_sid.c
119

Can you make this based on compat string instead?

162

be32enc(&out[i * 4], tmp);

181

I would change == ENXIO to != 0.

sys/arm/allwinner/aw_sid.c
184

I think you can use %D here. It's part of printf(9).

sys/arm/allwinner/aw_sid.c
184

%D gives me the decimal representation.
Also quoting the man :
These conversion characters are deprecated, and will eventually disappear.

Update based on comment from jmcneill

manu marked 5 inline comments as done.Jul 12 2016, 6:20 PM
sys/arm/allwinner/aw_sid.c
184

The libc printf will print a decimal representation, however the kernel printf will print a hexdump of a string. It is also not listed as being deprecated in the man page.

https://www.freebsd.org/cgi/man.cgi?query=printf&sektion=9

Use printf(9) %D conversion char.

manu marked an inline comment as done.Jul 12 2016, 6:54 PM
sys/arm/allwinner/aw_sid.c
159

Should return an error here if this gets called on something other than A10/A20.

Return ENXIO if rootkey is called on a SoC != A10 and A20
Return ENXIO if tscalib is called on a SoC != A83T
This revision is now accepted and ready to land.Jul 19 2016, 8:40 PM
This revision was automatically updated to reflect the committed changes.