---
You received this message because you are subscribed to the Google Groups "Chromium OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.
As Julius pointed out, the sysfs VPD interface is relatively new and not supported on all platforms.
The supported way to obtain VPD info is using the "vpd" utility which will try to use sysfs first and then fallback to reading the ROM via flashrom if needed.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.
2017-01-19 9:35 GMT+08:00 'David Hendricks' via Chromium OS dev <chromiu...@chromium.org>:The supported way to obtain VPD info is using the "vpd" utility which will try to use sysfs first and then fallback to reading the ROM via flashrom if needed.I think you're referring to the script "vpd_get_value" which will try sysfs first then lookup the cache from dump_vpd_log.'vpd' will always read via flashrom, while sysfs will be updated only after system reboot.
If there weren't any VPD on the system, I would still expect sysfs to have ro and rw subdirs and to not emit the probe message. Is this expectation reasonable?
Is there anything I can do, or am I just out of luck?
--
> This driver also seems a little weird, because it looks like
> coreboot_table_find() will return -EPROBE_DEFER indefinitely, even after it
> knows it can't find any coreboot tables. Seems like there's room for
> improvement there.
It needs to defer probing because the base address it's using is put
in by another driver. Isn't that the intended way of dealing with
driver dependencies like this?
Also, I thought the driver core has
some code to prevent indefinite re-probing (like, it keeps trying to
probe the list of all still deferring drivers, but once it does a pass
where not a single new driver probed successfully it stops), or am I
misremembering that?
> Instead, it seems like the kind of device that should get instantiated from within the coreboot driver.
I'm not quite sure I follow. Are you saying that coreboot.c should
call something that instantiates the VPD driver?
> Instead, it seems like the kind of device that should get instantiated from within the coreboot driver.
I'm not quite sure I follow. Are you saying that coreboot.c should
call something that instantiates the VPD driver?
One of the design goals of this is that VPD, CBMEM console and other
features can be enabled/disabled independently in Kconfig. The
"coreboot" driver is just a service that provides access to a shared
resource they all need (the coreboot tables) and gets pulled in
automatically as a dependency if any of these are enabled. I think
this model couldn't be supported by what you're suggesting (unless you
want to put an unscalable amount of #ifdefs in the function that would
instantiate the dependent drivers).
> It's not a big deal, but I was just suggesting that it's possible to stop deferring once a coreboot "provider" (either the OF or ACPI driver) registers, and can't find any tables. At that point, it's something like -ENODEV, not -EPROBE_DEFER. But maybe that's not a great idea, and I actually think there are better ways of implementing this that don't involve probe deferral.
I think there might be situations where you have more than one
provider enabled and can't be quite sure which one will work, so this
isn't that easy.
> We are actually building, as you suggest, a custom firmware for our particular platform. Can you elaborate on adding the necessary cbmem support? Sorry if this should be obvious; I'm still kind of finding my way in the CrOS ecosystem.
What platform exactly is this? An existing official Chrome OS device?
Just a random PC running Chromium OS? Or some unreleased future
platform (if so, are you planning to develop it with Google as an
official Chrome OS device or an unofficial Chromium OS port)?
Any future official device built with Google should include the
interface. We mandate the use of our coreboot-based firmware on all
devices, and this feature has landed in coreboot's master branch a
while ago, so any future fork will have it.
If you're building an unofficial port totally by yourself, it very
much depends on what you're doing. The sysfs interface is directly
tied to data structures specific to coreboot, so if your firmware is
not coreboot-based it won't work (you could of course try to emulate
that interface, but at that point it's probably easier to just write a
new driver yourself). If you are using coreboot, any relatively recent
fork will have it (part of the CONFIG_CHROMEOS option).
---
You received this message because you are subscribed to the Google Groups "Chromium OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.