UefiPayloadPkg: Add library for logging to EC

Make use of the SMFI command interface to forward logs from edk2 to
System76 EC.
This commit is contained in:
Tim Crawford
2020-04-17 10:45:17 -06:00
parent 331d92a8ba
commit 4984cdcb36
10 changed files with 250 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
/** @file
System76 EC logging
Copyright (c) 2020 System76, Inc.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef __SYSTEM76_EC_LIB__
#define __SYSTEM76_EC_LIB__
/**
Write data to the embedded controller using SMFI command interface.
@param Buffer Pointer to the data buffer to be written.
@param NumberOfBytes Number of bytes to write.
@return -1 if the command failed, else the number of data bytes written.
**/
INTN
System76EcWrite (
IN UINT8 *Buffer,
IN UINTN NumberOfBytes
);
#endif /* __SYSTEM76_EC_LIB__ */