Furquan Shaikh has uploaded a new change for review. ( https://review.coreboot.org/19701 )
Change subject: lib/boot_device: Add API for getting boot device information
......................................................................
lib/boot_device: Add API for getting boot device information
Add API boot_device_get_info that can be provided by boot device
implementations to return any information that can be useful for the
caller. Return value is void *, so each implementation can return a
pointer to any data structure that is required. By default, NULL is
returned by weak implementation indicating that no information is
available for use by the caller.
BUG=b:38330715
Change-Id: Ia35fc275a2aacf1cf8a3080d5f0da5dc19284206
---
M src/include/boot_device.h
M src/lib/boot_device.c
2 files changed, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/19701/1
diff --git a/src/include/boot_device.h b/src/include/boot_device.h
index cc70442..6079cc9 100644
--- a/src/include/boot_device.h
+++ b/src/include/boot_device.h
@@ -50,4 +50,19 @@
**/
void boot_device_init(void);
+/*
+ * Obtain information about boot device. This can be used by boot device
+ * implementations to return pointer to any structure that the users might find
+ * useful. e.g. In case of SPI flash boot device, pointer to struct spi_flash
+ * would be useful for filling in coreboot tables or performing operations on
+ * the boot device.
+ *
+ * Returns:
+ * void * = Pointer to agreed-upon structure between boot device implementation
+ * and the caller.
+ * NULL = No information provided by boot device implementation or boot
+ * device init has failed.
+ */
+void *boot_device_get_info(void);
+
#endif /* _BOOT_DEVICE_H_ */
diff --git a/src/lib/boot_device.c b/src/lib/boot_device.c
index e7968f4..b9c706a 100644
--- a/src/lib/boot_device.c
+++ b/src/lib/boot_device.c
@@ -15,6 +15,15 @@
#include <boot_device.h>
+void *__attribute__((weak)) boot_device_get_info(void)
+{
+ /*
+ * Default weak-implementation that returns NULL indicating no
+ * information provided by boot device implementation.
+ */
+ return NULL;
+}
+
void __attribute__((weak)) boot_device_init(void)
{
/* Provide weak do-nothing init. */
--
To view, visit https://review.coreboot.org/19701
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia35fc275a2aacf1cf8a3080d5f0da5dc19284206
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Mario Scheithauer has posted comments on this change. ( https://review.coreboot.org/19693 )
Change subject: soc/intel/apollolake: Enable decoding for ComA and ComB on LPC
......................................................................
Patch Set 2:
(3 comments)
https://review.coreboot.org/#/c/19693/1//COMMIT_MSG
Commit Message:
PS1, Line 9: If there is an external 8250 UART, one needs to enable the appropriate
: address ranges before console_init() is called so that the init sequence
: can reach the external UART.
:
: Furthermore FSPM needs different settings for an extern
> Please add a blank line between paragraphs.
Done
PS1, Line 13: for an exter
> has to be adapted?
Done
https://review.coreboot.org/#/c/19693/1/src/soc/intel/apollolake/romstage.c
File src/soc/intel/apollolake/romstage.c:
PS1, Line 270: /
> Would it make sense to use else if () here so that if for any reason CONFIG
Sure, you are right. It's better to make it with else if().
--
To view, visit https://review.coreboot.org/19693
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I62c7d0b54edd18acf793849aef352afbcaeb68b9
Gerrit-PatchSet: 2
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Andrey Petrov <andrey.petrov(a)intel.com>
Gerrit-Reviewer: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-HasComments: Yes
Hello Paul Menzel, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/19693
to look at the new patch set (#2).
Change subject: soc/intel/apollolake: Enable decoding for ComA and ComB on LPC
......................................................................
soc/intel/apollolake: Enable decoding for ComA and ComB on LPC
If there is an external 8250 UART, one needs to enable the appropriate
address ranges before console_init() is called so that the init sequence
can reach the external UART.
Furthermore FSPM needs different settings for an external UART port. For
this, the function fill_console_params() has to be adapted.
Change-Id: I62c7d0b54edd18acf793849aef352afbcaeb68b9
Signed-off-by: Mario Scheithauer <mario.scheithauer(a)siemens.com>
---
M src/soc/intel/apollolake/include/soc/lpc.h
M src/soc/intel/apollolake/romstage.c
2 files changed, 34 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/19693/2
--
To view, visit https://review.coreboot.org/19693
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I62c7d0b54edd18acf793849aef352afbcaeb68b9
Gerrit-PatchSet: 2
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Andrey Petrov <andrey.petrov(a)intel.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>