coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mec.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#ifndef EC_GOOGLE_COMMON_MEC_H
4
#define EC_GOOGLE_COMMON_MEC_H
5
6
#include <
stddef.h
>
7
#include <
stdint.h
>
8
9
/* Indicate read or write from MEC IO region */
10
enum
mec_io_type
{
11
MEC_IO_READ
,
12
MEC_IO_WRITE
13
};
14
15
/*
16
* mec_io_bytes - Read / write bytes to MEC EMI port
17
*
18
* @type: Indicate read or write operation
19
* @base: Base address for MEC EMI region
20
* @offset: Base read / write address
21
* @buffer: Destination / source buffer
22
* @size: Number of bytes to read / write
23
*
24
* @returns 8-bit checksum of all bytes read or written
25
*/
26
27
uint8_t
mec_io_bytes
(
enum
mec_io_type
type
,
uint16_t
base
,
28
uint16_t
offset
,
void
*
buffer
,
size_t
size);
29
30
#endif
/* EC_GOOGLE_COMMON_MEC_H */
offset
static size_t offset
Definition:
flashconsole.c:16
type
unsigned int type
Definition:
edid.c:57
mec_io_type
mec_io_type
Definition:
mec.h:10
MEC_IO_WRITE
@ MEC_IO_WRITE
Definition:
mec.h:12
MEC_IO_READ
@ MEC_IO_READ
Definition:
mec.h:11
mec_io_bytes
uint8_t mec_io_bytes(enum mec_io_type type, uint16_t base, uint16_t offset, void *buffer, size_t size)
Definition:
mec.c:49
buffer
u8 buffer[C2P_BUFFER_MAXSIZE]
Definition:
psp_smm.c:18
base
uintptr_t base
Definition:
uart.c:17
stddef.h
stdint.h
uint16_t
unsigned short uint16_t
Definition:
stdint.h:11
uint8_t
unsigned char uint8_t
Definition:
stdint.h:8
src
ec
google
common
mec.h
Generated by
1.9.1