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 Galileo Gen2

Change-Id: Ib01aef448798e47ac613b38eb20bf25537b9221f
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/16128
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Lee Leahy 2016-08-09 09:02:13 -07:00
parent 219c3328f1
commit c52a4f7328
2 changed files with 16 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#include <bootstate.h> #include <bootstate.h>
#include <cbmem.h> #include <cbmem.h>
#include <console/console.h> #include <console/console.h>
#include <console/streams.h>
#include <fsp/util.h> #include <fsp/util.h>
#include <timestamp.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;
}

View File

@ -99,4 +99,13 @@ VOID * EFIAPI get_first_hob(UINT16 type);
VOID * EFIAPI get_next_guid_hob(CONST EFI_GUID * guid, CONST VOID *hob_start); VOID * EFIAPI get_next_guid_hob(CONST EFI_GUID * guid, CONST VOID *hob_start);
VOID * EFIAPI get_first_guid_hob(CONST EFI_GUID * guid); VOID * EFIAPI get_first_guid_hob(CONST EFI_GUID * guid);
/*
* Writes number_of_bytes data bytes from buffer to the console.
* The number of bytes actually written to the console is returned.
*
* If number_of_bytes is zero, don't output any data but instead wait until
* the console has output all data, then return 0.
*/
size_t EFIAPI fsp_write_line(uint8_t *buffer, size_t number_of_bytes);
#endif /* FSP1_1_UTIL_H */ #endif /* FSP1_1_UTIL_H */