Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41209 )
Change subject: fw_config: Add firmware configuration interface ......................................................................
Patch Set 2:
(1 comment)
This change is ready for review.
https://review.coreboot.org/c/coreboot/+/41209/2/src/include/fw_config.h File src/include/fw_config.h:
https://review.coreboot.org/c/coreboot/+/41209/2/src/include/fw_config.h@9 PS2, Line 9:
That is what I said, you have to chain include it which is pretty ugly. Not that it is impossible.
I don't know, isn't that normal practice whenever you have a generic API that needs to pull in platform-specific definitions? <device/mmio.h> pulls in different <arch/io.h> to get an architecture-specific definition for read32(). <gpio.h> pulls in different <soc/gpio.h> to get a SoC-specific definition for gpio_t. Not sure how this would be any worse.
I would rather not reach back into the mainboard. ACPI has a bad habit of it and I've been trying to remove those.
I only found one case of non-mainboard code pulling a header directly from a mainboard and it was an older AMD platform. maybe I'm missing more instances.