Skip to content

PMP: initialization and experiments#545

Open
WhatAmISupposedToPutHere wants to merge 5 commits intoAsahiLinux:mainfrom
WhatAmISupposedToPutHere:feldspar
Open

PMP: initialization and experiments#545
WhatAmISupposedToPutHere wants to merge 5 commits intoAsahiLinux:mainfrom
WhatAmISupposedToPutHere:feldspar

Conversation

@WhatAmISupposedToPutHere
Copy link
Contributor

The thingy that makes your mac use less power.


ADT_FOREACH_PROPERTY(adt, pmp_iop_anode, prop)
{
if (fdt_setprop(dt, tunables_node, prop->name, prop->value, prop->size))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect we want to filter this at least lightly. compatible = [iop-nub,rtbuddy-v2] and AAPL,phandle shouldn't be copied. There are further properties an OSS driver probably does not need.
I hope "these are the property names apple uses in the ADT" is a convincing argument during dt-bindings / driver review but don't really see a sane alternative.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The annoying part is that firmware requests the property values from this node by name, so i don't even have a static list of properties that it needs. Can only treat them as an opaque key/value dict.

pio_base = u.adt["/arm-io/dart-pmp"].pio_vm_base
granularity = u.adt["/arm-io/dart-pmp"].pio_granularity
i = 0
for (host_addr, size) in [(0x282000000, 0x1000000),(0x304000000, 0x1000000),(0x383000000, 0x1000000),(0x402000000, 0x1000000),(0x210e70000, 0x90000),(0x211e70000, 0x90000),(0x212e70000, 0x90000)]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these address/size pairs observed by tracing? On which device? Can we derive them from the ADT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is on a m1 pro, they are derived from adt (reg 4 and following, i have written them down in linux driver's dt)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we documents that this is only expected to run on t6000 (and maybe other t600x or t602x devices)? An compatibility check with early exit would be enough. Please mention it in the commit message as well.

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Copy all the things that PMP needs in order to boot.

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants