[coreboot] Question about new_resource()

Myles Watson mylesgw at gmail.com
Mon Jan 31 21:44:02 CET 2011


> sorry to bother you directly, but Peter suggested to send the question
> below to you directly, you may have an answer :)

No problem.

> while  adding support for the Lenovo PMH7 Embedded Controller,
> i was wondering about the index parameter for new_resource().
> From looking at the coreboot source, it looks like it is an
> arbitrary number, depending on the device type for which the
> resource is allocated.

Usually it is the register location on the device.  It is specific to the
device, though, so as long as it won't be reused, any number is fine.

> What would be the corect number to use
> for an EC? Or should we add a new index for such devices?

I don't think there's a specific number that should be used for all ECs.  If
there were an EC that needed multiple ranges, it would need multiple
resource numbers.

> I'm attaching the pmh7 diff to this mail, i have chosen 0x77
> as a temporary number.

That should be fine.

Thanks,
Myles






More information about the coreboot mailing list