mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-29 01:14:45 +00:00

Add support for output of strings and streams of bytes. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
68 lines
1.5 KiB
C
68 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Core ACPI (Advanced Configuration and Power Interface) support
|
|
*
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Modified from coreboot file acpigen.h
|
|
*/
|
|
|
|
#ifndef __ACPI_ACPIGEN_H
|
|
#define __ACPI_ACPIGEN_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct acpi_ctx;
|
|
|
|
/**
|
|
* acpigen_get_current() - Get the current ACPI code output pointer
|
|
*
|
|
* @ctx: ACPI context pointer
|
|
* @return output pointer
|
|
*/
|
|
u8 *acpigen_get_current(struct acpi_ctx *ctx);
|
|
|
|
/**
|
|
* acpigen_emit_byte() - Emit a byte to the ACPI code
|
|
*
|
|
* @ctx: ACPI context pointer
|
|
* @data: Value to output
|
|
*/
|
|
void acpigen_emit_byte(struct acpi_ctx *ctx, uint data);
|
|
|
|
/**
|
|
* acpigen_emit_word() - Emit a 16-bit word to the ACPI code
|
|
*
|
|
* @ctx: ACPI context pointer
|
|
* @data: Value to output
|
|
*/
|
|
void acpigen_emit_word(struct acpi_ctx *ctx, uint data);
|
|
|
|
/**
|
|
* acpigen_emit_dword() - Emit a 32-bit 'double word' to the ACPI code
|
|
*
|
|
* @ctx: ACPI context pointer
|
|
* @data: Value to output
|
|
*/
|
|
void acpigen_emit_dword(struct acpi_ctx *ctx, uint data);
|
|
|
|
/**
|
|
* acpigen_emit_stream() - Emit a stream of bytes
|
|
*
|
|
* @ctx: ACPI context pointer
|
|
* @data: Data to output
|
|
* @size: Size of data in bytes
|
|
*/
|
|
void acpigen_emit_stream(struct acpi_ctx *ctx, const char *data, int size);
|
|
|
|
/**
|
|
* acpigen_emit_string() - Emit a string
|
|
*
|
|
* Emit a string with a null terminator
|
|
*
|
|
* @ctx: ACPI context pointer
|
|
* @str: String to output, or NULL for an empty string
|
|
*/
|
|
void acpigen_emit_string(struct acpi_ctx *ctx, const char *str);
|
|
|
|
#endif
|