[coreboot-gerrit] New patch to review for coreboot: drivers/intel/fsp2_0: Add fsp_write_line function
Lee Leahy (leroy.p.leahy@intel.com)
gerrit at coreboot.org
Tue Aug 9 18:37:58 CEST 2016
Lee Leahy (leroy.p.leahy at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16129
-gerrit
commit 82342b2e891eec6f3460afb862aea61471cfd954
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date: Tue Aug 9 09:04:45 2016 -0700
drivers/intel/fsp2_0: Add fsp_write_line function
Add fsp_write_line function which may be called by FSP to output debug
serial data to the console.
TEST=Build and run on Galilel Gen2
Change-Id: If7bfcea1af82209dcdc5a9f9f2d9334842c1595e
Signed-off-by: Lee Leahy <leroy.p.leahy at intel.com>
---
src/drivers/intel/fsp2_0/debug.c | 8 ++++++++
src/drivers/intel/fsp2_0/include/fsp/debug.h | 20 ++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/src/drivers/intel/fsp2_0/debug.c b/src/drivers/intel/fsp2_0/debug.c
index 5053b5e..6ea959d 100644
--- a/src/drivers/intel/fsp2_0/debug.c
+++ b/src/drivers/intel/fsp2_0/debug.c
@@ -10,9 +10,17 @@
*/
#include <console/console.h>
+#include <console/streams.h>
#include <fsp/util.h>
#include <soc/intel/common/util.h>
+__attribute__((cdecl)) size_t fsp_write_line(uint8_t *buffer,
+ size_t number_of_bytes)
+{
+ console_write_line(buffer, number_of_bytes);
+ return number_of_bytes;
+}
+
/*-----------
* MemoryInit
*-----------
diff --git a/src/drivers/intel/fsp2_0/include/fsp/debug.h b/src/drivers/intel/fsp2_0/include/fsp/debug.h
index 3708c67..0509388 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/debug.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/debug.h
@@ -58,4 +58,24 @@ const char *fsp_get_guid_name(const uint8_t *guid);
void fsp_print_guid_extension_hob(const struct hob_header *hob);
int fsp_find_bootloader_tolum(struct range_entry *re);
+/*
+ * Write data from buffer to serial device.
+ *
+ * Writes number_of_bytes data bytes from Buffer to the serial device.
+ * The number of bytes actually written to the serial device is returned.
+ *
+ * If number_of_bytes is zero, don't output any data but instead wait until
+ * the serial port has output all data, then return 0.
+ *
+ * @param buffer Pointer to the data buffer to be written.
+ * @param number_of_bytes Number of bytes to written to the serial device.
+ *
+ * @retval 0 number_of_bytes is 0.
+ * @retval >0 The number of bytes written to the serial device.
+ * If this value is less than number_of_bytes, then the
+ * write operation failed.
+ */
+__attribute__((cdecl)) size_t fsp_write_line(uint8_t *buffer,
+ size_t number_of_bytes);
+
#endif /* _FSP2_0_DEBUG_H_ */
More information about the coreboot-gerrit
mailing list