[coreboot-gerrit] New patch to review for coreboot: drivers/intel/fsp1_1: Add fsp_write_line function

Lee Leahy (leroy.p.leahy@intel.com) gerrit at coreboot.org
Tue Aug 9 18:37:55 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/16128

-gerrit

commit ea9c1a7e73ef2fad8f6bd409c76360d15d21e6ff
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date:   Tue Aug 9 09:02:13 2016 -0700

    drivers/intel/fsp1_1: 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: Ib01aef448798e47ac613b38eb20bf25537b9221f
    Signed-off-by: Lee Leahy <leroy.p.leahy at intel.com>
---
 src/drivers/intel/fsp1_1/fsp_util.c         |  7 +++++++
 src/drivers/intel/fsp1_1/include/fsp/util.h | 19 +++++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/src/drivers/intel/fsp1_1/fsp_util.c b/src/drivers/intel/fsp1_1/fsp_util.c
index 6e490d3..5ce753f 100644
--- a/src/drivers/intel/fsp1_1/fsp_util.c
+++ b/src/drivers/intel/fsp1_1/fsp_util.c
@@ -17,6 +17,7 @@
 #include <bootstate.h>
 #include <cbmem.h>
 #include <console/console.h>
+#include <console/streams.h>
 #include <fsp/util.h>
 #include <timestamp.h>
 
@@ -288,3 +289,9 @@ void fsp_display_upd_value(const char *name, uint32_t size, uint64_t old,
 		}
 	}
 }
+
+size_t EFIAPI fsp_write_line(uint8_t *buffer, size_t number_of_bytes)
+{
+	console_write_line(buffer, number_of_bytes);
+	return number_of_bytes;
+}
diff --git a/src/drivers/intel/fsp1_1/include/fsp/util.h b/src/drivers/intel/fsp1_1/include/fsp/util.h
index 07cf0c7..0172423 100644
--- a/src/drivers/intel/fsp1_1/include/fsp/util.h
+++ b/src/drivers/intel/fsp1_1/include/fsp/util.h
@@ -99,4 +99,23 @@ VOID * EFIAPI get_first_hob(UINT16 type);
 VOID * EFIAPI get_next_guid_hob(CONST EFI_GUID * guid, CONST VOID *hob_start);
 VOID * EFIAPI get_first_guid_hob(CONST EFI_GUID * guid);
 
+/*
+ * 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.
+ */
+size_t EFIAPI fsp_write_line(uint8_t *buffer, size_t number_of_bytes);
+
 #endif	/* FSP1_1_UTIL_H */



More information about the coreboot-gerrit mailing list