Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45134 )
Change subject: lib: Add config MAINBOARD_OPTIONS for getting options from mainboard ......................................................................
Patch Set 12:
(1 comment)
There was some misunderstanding. I'll try to put my earlier proposition of unified get_option() implementations into some code, that should be less ambiguous.
https://review.coreboot.org/c/coreboot/+/45134/12/src/include/option.h File src/include/option.h:
https://review.coreboot.org/c/coreboot/+/45134/12/src/include/option.h@25 PS12, Line 25: mainboard_get_option
I guess I don't completely understand what the mainboard_get_option is supposed to be. Is there a reason not to make it specific to the method of getting the options? A mainboard specific method seems like it's going to further fragment the option-getting methods when we could be consolidating them.
It was my idea. To get the already existing get_console_loglevel() in line. Currently there is fragmentation on an orthogonal axis: the queried option. There is currently only one implementation (scaleway/tagada). I see no better way there as the queried value really comes from some mainboard specific code.
You are right, Martin, that this may encourage further mainboard-specific solutions, even where they aren't necessary. Still, it would really be nice to have a single get_option() API, for code like `console/init.c`.