/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ /****************************************************************************** * * Name: acbuffer.h - Support for buffers returned by ACPI predefined names * * Copyright (C) 2000 - 2025, Intel Corp. *
*****************************************************************************/
#ifndef __ACBUFFER_H__ #define __ACBUFFER_H__
/* * Contains buffer structures for these predefined names: * _FDE, _GRT, _GTM, _PLD, _SRT
*/
/* * Note: C bitfields are not used for this reason: * * "Bitfields are great and easy to read, but unfortunately the C language * does not specify the layout of bitfields in memory, which means they are * essentially useless for dealing with packed data in on-disk formats or * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, * this decision was a design error in C. Ritchie could have picked an order * and stuck with it." Norman Ramsey. * See http://stackoverflow.com/a/1053662/41661
*/
/* * Formatted _PLD return value. The minimum size is a package containing * one buffer. * Revision 1: Buffer is 16 bytes (128 bits) * Revision 2: Buffer is 20 bytes (160 bits) * * Note: This structure is returned from the acpi_decode_pld_buffer * interface.
*/ struct acpi_pld_info {
u8 revision;
u8 ignore_color;
u8 red;
u8 green;
u8 blue;
u16 width;
u16 height;
u8 user_visible;
u8 dock;
u8 lid;
u8 panel;
u8 vertical_position;
u8 horizontal_position;
u8 shape;
u8 group_orientation;
u8 group_token;
u8 group_position;
u8 bay;
u8 ejectable;
u8 ospm_eject_required;
u8 cabinet_number;
u8 card_cage_number;
u8 reference;
u8 rotation;
u8 order;
u8 reserved;
u16 vertical_offset;
u16 horizontal_offset;
};
/* * Macros to: * 1) Convert a _PLD buffer to internal struct acpi_pld_info format - ACPI_PLD_GET* * (Used by acpi_decode_pld_buffer) * 2) Construct a _PLD buffer - ACPI_PLD_SET* * (Intended for BIOS use only)
*/ #define ACPI_PLD_REV1_BUFFER_SIZE 16 /* For Revision 1 of the buffer (From ACPI spec) */ #define ACPI_PLD_REV2_BUFFER_SIZE 20 /* For Revision 2 of the buffer (From ACPI spec) */ #define ACPI_PLD_BUFFER_SIZE 20 /* For Revision 2 of the buffer (From ACPI spec) */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.