4 * Internal header for coreboot table access.
6 * Copyright 2014 Gerd Hoffmann <kraxel@redhat.com>
7 * Copyright 2017 Google Inc.
8 * Copyright 2017 Samuel Holland <samuel@sholland.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License v2.0 as published by
12 * the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
20 #ifndef __COREBOOT_TABLE_H
21 #define __COREBOOT_TABLE_H
25 /* Coreboot table header structure */
26 struct coreboot_table_header
{
35 /* List of coreboot entry structures that is used */
37 struct coreboot_table_entry
{
42 /* Points to a CBMEM entry */
50 /* Describes framebuffer setup by coreboot */
51 struct lb_framebuffer
{
67 u8 reserved_mask_size
;
70 /* A device, additionally with information from coreboot. */
71 struct coreboot_device
{
74 struct coreboot_table_entry entry
;
75 struct lb_cbmem_ref cbmem_ref
;
76 struct lb_framebuffer framebuffer
;
80 /* A driver for handling devices described in coreboot tables. */
81 struct coreboot_driver
{
82 int (*probe
)(struct coreboot_device
*);
83 int (*remove
)(struct coreboot_device
*);
84 struct device_driver drv
;
88 /* Register a driver that uses the data from a coreboot table. */
89 int coreboot_driver_register(struct coreboot_driver
*driver
);
91 /* Unregister a driver that uses the data from a coreboot table. */
92 void coreboot_driver_unregister(struct coreboot_driver
*driver
);
94 #endif /* __COREBOOT_TABLE_H */