Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
Loading...
Searching...
No Matches
qemu_fwcfg.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2026 Maximilian Zimmermann
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
12
13
#ifndef ZEPHYR_INCLUDE_DRIVERS_FIRMWARE_QEMU_FWCFG_H_
14
#define ZEPHYR_INCLUDE_DRIVERS_FIRMWARE_QEMU_FWCFG_H_
15
24
25
#include <
stdbool.h
>
26
#include <stddef.h>
27
#include <
stdint.h
>
28
29
#include <
zephyr/device.h
>
30
#include <
zephyr/sys/util.h
>
31
34
#define FW_CFG_SIGNATURE 0x0000
36
#define FW_CFG_ID 0x0001
38
#define FW_CFG_FILE_DIR 0x0019
39
41
#define FW_CFG_ID_F_TRADITIONAL BIT(0)
43
#define FW_CFG_ID_F_DMA BIT(1)
45
58
int
qemu_fwcfg_read_item
(
const
struct
device
*dev,
uint16_t
key,
void
*buf,
size_t
len);
59
75
int
qemu_fwcfg_write_item
(
const
struct
device
*dev,
uint16_t
key,
const
void
*buf,
size_t
len);
76
85
int
qemu_fwcfg_get_features
(
const
struct
device
*dev,
uint32_t
*features);
86
98
int
qemu_fwcfg_find_file
(
const
struct
device
*dev,
const
char
*file,
uint16_t
*
select
,
99
uint32_t
*size);
100
109
bool
qemu_fwcfg_dma_supported
(
const
struct
device
*dev);
110
112
113
#endif
/* ZEPHYR_INCLUDE_DRIVERS_FIRMWARE_QEMU_FWCFG_H_ */
device.h
qemu_fwcfg_read_item
int qemu_fwcfg_read_item(const struct device *dev, uint16_t key, void *buf, size_t len)
Read data from an fw_cfg item.
qemu_fwcfg_dma_supported
bool qemu_fwcfg_dma_supported(const struct device *dev)
Check whether fw_cfg DMA feature is available.
qemu_fwcfg_find_file
int qemu_fwcfg_find_file(const struct device *dev, const char *file, uint16_t *select, uint32_t *size)
Look up a file entry in fw_cfg file directory.
qemu_fwcfg_get_features
int qemu_fwcfg_get_features(const struct device *dev, uint32_t *features)
Get fw_cfg feature bits reported by the device.
qemu_fwcfg_write_item
int qemu_fwcfg_write_item(const struct device *dev, uint16_t key, const void *buf, size_t len)
Write data to an fw_cfg item.
select
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout)
stdbool.h
stdint.h
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
uint16_t
__UINT16_TYPE__ uint16_t
Definition
stdint.h:89
device
Runtime device structure (in ROM) per driver instance.
Definition
device.h:513
util.h
Misc utilities.
zephyr
drivers
firmware
qemu_fwcfg
qemu_fwcfg.h
Generated on
for Zephyr API by
1.17.0