iPXE
Data Structures | Macros | Functions
acpi.h File Reference

ACPI data structures. More...

#include <stdint.h>
#include <byteswap.h>
#include <ipxe/refcnt.h>
#include <ipxe/list.h>
#include <ipxe/interface.h>
#include <ipxe/uaccess.h>
#include <ipxe/tables.h>
#include <ipxe/api.h>
#include <config/general.h>
#include <ipxe/null_acpi.h>
#include <ipxe/efi/efi_acpi.h>
#include <bits/acpi.h>

Go to the source code of this file.

Data Structures

struct  acpi_header
 An ACPI description header. More...
 
struct  acpi_rsdp
 Root System Description Pointer. More...
 
struct  acpi_rsdt
 ACPI Root System Description Table (RSDT) More...
 
struct  acpi_fadt
 Fixed ACPI Description Table (FADT) More...
 
struct  acpi_descriptor
 An ACPI descriptor (used to construct ACPI tables) More...
 
struct  acpi_model
 An ACPI table model. More...
 

Macros

#define ACPI_SIGNATURE(a, b, c, d)   ( ( (a) << 0 ) | ( (b) << 8 ) | ( (c) << 16 ) | ( (d) << 24 ) )
 Build ACPI signature. More...
 
#define RSDP_SIGNATURE   { 'R', 'S', 'D', ' ', 'P', 'T', 'R', ' ' }
 Root System Description Pointer signature. More...
 
#define RSDT_SIGNATURE   ACPI_SIGNATURE ( 'R', 'S', 'D', 'T' )
 Root System Description Table (RSDT) signature. More...
 
#define FADT_SIGNATURE   ACPI_SIGNATURE ( 'F', 'A', 'C', 'P' )
 Fixed ACPI Description Table (FADT) signature. More...
 
#define ACPI_PM1_CNT   0
 ACPI PM1 Control Register (within PM1a_CNT_BLK or PM1A_CNT_BLK) More...
 
#define ACPI_PM1_CNT_SLP_TYP(x)   ( (x) << 10 )
 Sleep type. More...
 
#define ACPI_PM1_CNT_SLP_EN   ( 1 << 13 )
 Sleep enable. More...
 
#define ACPI_PM_TMR   0
 ACPI PM Timer Register (within PM_TMR_BLK) More...
 
#define DSDT_SIGNATURE   ACPI_SIGNATURE ( 'D', 'S', 'D', 'T' )
 Differentiated System Description Table (DSDT) signature. More...
 
#define SSDT_SIGNATURE   ACPI_SIGNATURE ( 'S', 'S', 'D', 'T' )
 Secondary System Description Table (SSDT) signature. More...
 
#define ACPI_MODELS   __table ( struct acpi_model, "acpi_models" )
 ACPI models. More...
 
#define __acpi_model   __table_entry ( ACPI_MODELS, 01 )
 Declare an ACPI model. More...
 
#define ACPI_INLINE(_subsys, _api_func)   SINGLE_API_INLINE ( ACPI_PREFIX_ ## _subsys, _api_func )
 Calculate static inline ACPI API function name. More...
 
#define PROVIDE_ACPI(_subsys, _api_func, _func)   PROVIDE_SINGLE_API ( ACPI_PREFIX_ ## _subsys, _api_func, _func )
 Provide an ACPI API implementation. More...
 
#define PROVIDE_ACPI_INLINE(_subsys, _api_func)   PROVIDE_SINGLE_API_INLINE ( ACPI_PREFIX_ ## _subsys, _api_func )
 Provide a static inline ACPI API implementation. More...
 
#define acpi_describe_TYPE(object_type)   typeof ( struct acpi_descriptor * ( object_type ) )
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static const char * acpi_name (uint32_t signature)
 Transcribe ACPI table signature (for debugging) More...
 
static void acpi_init (struct acpi_descriptor *desc, struct acpi_model *model, struct refcnt *refcnt)
 Initialise ACPI descriptor. More...
 
userptr_t acpi_find_rsdt (void)
 Locate ACPI root system description table. More...
 
struct acpi_descriptoracpi_describe (struct interface *interface)
 Get object's ACPI descriptor. More...
 
void acpi_fix_checksum (struct acpi_header *acpi)
 Fix up ACPI table checksum. More...
 
userptr_t acpi_find (uint32_t signature, unsigned int index)
 Locate ACPI table. More...
 
int acpi_sx (uint32_t signature)
 Extract _Sx value from DSDT/SSDT. More...
 
void acpi_add (struct acpi_descriptor *desc)
 Add ACPI descriptor. More...
 
void acpi_del (struct acpi_descriptor *desc)
 Remove ACPI descriptor. More...
 
int acpi_install (int(*install)(struct acpi_header *acpi))
 Install ACPI tables. More...
 

Detailed Description

ACPI data structures.

Definition in file acpi.h.

Macro Definition Documentation

◆ ACPI_SIGNATURE

#define ACPI_SIGNATURE (   a,
  b,
  c,
 
)    ( ( (a) << 0 ) | ( (b) << 8 ) | ( (c) << 16 ) | ( (d) << 24 ) )

Build ACPI signature.

Parameters
aFirst character of ACPI signature
bSecond character of ACPI signature
cThird character of ACPI signature
dFourth character of ACPI signature
Return values
signatureACPI signature

Definition at line 74 of file acpi.h.

◆ RSDP_SIGNATURE

#define RSDP_SIGNATURE   { 'R', 'S', 'D', ' ', 'P', 'T', 'R', ' ' }

Root System Description Pointer signature.

Definition at line 78 of file acpi.h.

◆ RSDT_SIGNATURE

#define RSDT_SIGNATURE   ACPI_SIGNATURE ( 'R', 'S', 'D', 'T' )

Root System Description Table (RSDT) signature.

Definition at line 95 of file acpi.h.

◆ FADT_SIGNATURE

#define FADT_SIGNATURE   ACPI_SIGNATURE ( 'F', 'A', 'C', 'P' )

Fixed ACPI Description Table (FADT) signature.

Definition at line 106 of file acpi.h.

◆ ACPI_PM1_CNT

#define ACPI_PM1_CNT   0

ACPI PM1 Control Register (within PM1a_CNT_BLK or PM1A_CNT_BLK)

Definition at line 129 of file acpi.h.

◆ ACPI_PM1_CNT_SLP_TYP

#define ACPI_PM1_CNT_SLP_TYP (   x)    ( (x) << 10 )

Sleep type.

Definition at line 130 of file acpi.h.

◆ ACPI_PM1_CNT_SLP_EN

#define ACPI_PM1_CNT_SLP_EN   ( 1 << 13 )

Sleep enable.

Definition at line 131 of file acpi.h.

◆ ACPI_PM_TMR

#define ACPI_PM_TMR   0

ACPI PM Timer Register (within PM_TMR_BLK)

Definition at line 134 of file acpi.h.

◆ DSDT_SIGNATURE

#define DSDT_SIGNATURE   ACPI_SIGNATURE ( 'D', 'S', 'D', 'T' )

Differentiated System Description Table (DSDT) signature.

Definition at line 137 of file acpi.h.

◆ SSDT_SIGNATURE

#define SSDT_SIGNATURE   ACPI_SIGNATURE ( 'S', 'S', 'D', 'T' )

Secondary System Description Table (SSDT) signature.

Definition at line 140 of file acpi.h.

◆ ACPI_MODELS

#define ACPI_MODELS   __table ( struct acpi_model, "acpi_models" )

ACPI models.

Definition at line 189 of file acpi.h.

◆ __acpi_model

struct acpi_model ib_sbft_model __acpi_model   __table_entry ( ACPI_MODELS, 01 )

Declare an ACPI model.

IB sBFT model.

aBFT model

Definition at line 192 of file acpi.h.

◆ ACPI_INLINE

#define ACPI_INLINE (   _subsys,
  _api_func 
)    SINGLE_API_INLINE ( ACPI_PREFIX_ ## _subsys, _api_func )

Calculate static inline ACPI API function name.

Parameters
_prefixSubsystem prefix
_api_funcAPI function
Return values
_subsys_funcSubsystem API function

Definition at line 201 of file acpi.h.

◆ PROVIDE_ACPI

#define PROVIDE_ACPI (   _subsys,
  _api_func,
  _func 
)    PROVIDE_SINGLE_API ( ACPI_PREFIX_ ## _subsys, _api_func, _func )

Provide an ACPI API implementation.

Parameters
_prefixSubsystem prefix
_api_funcAPI function
_funcImplementing function

Definition at line 211 of file acpi.h.

◆ PROVIDE_ACPI_INLINE

#define PROVIDE_ACPI_INLINE (   _subsys,
  _api_func 
)    PROVIDE_SINGLE_API_INLINE ( ACPI_PREFIX_ ## _subsys, _api_func )

Provide a static inline ACPI API implementation.

Parameters
_prefixSubsystem prefix
_api_funcAPI function

Definition at line 220 of file acpi.h.

◆ acpi_describe_TYPE

#define acpi_describe_TYPE (   object_type)    typeof ( struct acpi_descriptor * ( object_type ) )

Definition at line 239 of file acpi.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ acpi_name()

static const char* acpi_name ( uint32_t  signature)
inlinestatic

Transcribe ACPI table signature (for debugging)

Parameters
signatureACPI table signature
Return values
nameACPI table signature name

Definition at line 55 of file acpi.h.

55  {
56  static union {
58  char name[5];
59  } u;
60 
61  u.signature = cpu_to_le32 ( signature );
62  return u.name;
63 }
u8 signature
Definition: CIB_PRM.h:35
#define cpu_to_le32(value)
Definition: byteswap.h:107
unsigned int uint32_t
Definition: stdint.h:12
char name[NETDEV_NAME_LEN]
Name of this network device.
Definition: netdevice.h:358
union @16 u

References cpu_to_le32, name, signature, and u.

Referenced by acpi_find(), acpi_settings_fetch(), acpi_sx(), acpi_sx_zsdt(), dummy_install(), efi_block_install(), and int13_install().

◆ acpi_init()

static void acpi_init ( struct acpi_descriptor desc,
struct acpi_model model,
struct refcnt refcnt 
)
inlinestatic

Initialise ACPI descriptor.

Parameters
descACPI descriptor
modelTable model
refcntReference count

Definition at line 160 of file acpi.h.

161  {
162 
163  desc->refcnt = refcnt;
164  desc->model = model;
165  INIT_LIST_HEAD ( &desc->list );
166 }
static void(*) struct refcnt refcnt)
Definition: pool.h:62
struct acpi_model * model
Table model.
Definition: acpi.h:147
struct list_head list
List of ACPI descriptors for this model.
Definition: acpi.h:149
#define INIT_LIST_HEAD(list)
Initialise a list head.
Definition: list.h:45
struct refcnt * refcnt
Reference count of containing object.
Definition: acpi.h:145

References INIT_LIST_HEAD, acpi_descriptor::list, acpi_descriptor::model, refcnt, and acpi_descriptor::refcnt.

Referenced by aoedev_open(), ib_srp_open(), and iscsi_open().

◆ acpi_find_rsdt()

userptr_t acpi_find_rsdt ( void  )

Locate ACPI root system description table.

Return values
rsdtACPI root system description table, or UNULL

Referenced by acpi_find(), and acpi_sx().

◆ acpi_describe()

struct acpi_descriptor* acpi_describe ( struct interface intf)

Get object's ACPI descriptor.

Parameters
intfInterface
Return values
descACPI descriptor, or NULL

Definition at line 334 of file acpi.c.

334  {
335  struct interface *dest;
336  acpi_describe_TYPE ( void * ) *op =
337  intf_get_dest_op ( intf, acpi_describe, &dest );
338  void *object = intf_object ( dest );
339  struct acpi_descriptor *desc;
340 
341  if ( op ) {
342  desc = op ( object );
343  } else {
344  desc = NULL;
345  }
346 
347  intf_put ( dest );
348  return desc;
349 }
void * intf_object(struct interface *intf)
Get pointer to object containing object interface.
Definition: interface.c:154
An object interface.
Definition: interface.h:109
static void * dest
Definition: strings.h:176
struct acpi_descriptor * acpi_describe(struct interface *intf)
Get object's ACPI descriptor.
Definition: acpi.c:334
#define acpi_describe_TYPE(object_type)
Definition: acpi.h:239
static uint16_t struct vmbus_xfer_pages_operations * op
Definition: netvsc.h:327
An ACPI descriptor (used to construct ACPI tables)
Definition: acpi.h:143
void intf_put(struct interface *intf)
Decrement reference count on an object interface.
Definition: interface.c:144
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
#define intf_get_dest_op(intf, type, dest)
Get object interface destination and operation method.
Definition: interface.h:214

References acpi_describe(), acpi_describe_TYPE, dest, intf_get_dest_op, intf_object(), intf_put(), NULL, and op.

Referenced by acpi_describe(), and sanpath_open().

◆ acpi_fix_checksum()

void acpi_fix_checksum ( struct acpi_header acpi)

Fix up ACPI table checksum.

Parameters
acpiACPI table header

Definition at line 76 of file acpi.c.

76  {
77 
78  /* Update checksum */
79  acpi->checksum -= acpi_checksum ( virt_to_user ( acpi ) );
80 }
static uint8_t acpi_checksum(userptr_t table)
Compute ACPI table checksum.
Definition: acpi.c:51
static EFI_ACPI_TABLE_PROTOCOL * acpi
ACPI table protocol protocol.
Definition: efi_block.c:61
userptr_t virt_to_user(volatile const void *addr)
Convert virtual address to user pointer.

References acpi, acpi_checksum(), and virt_to_user().

Referenced by efi_block_install(), and int13_install().

◆ acpi_find()

userptr_t acpi_find ( uint32_t  signature,
unsigned int  index 
)

Locate ACPI table.

Parameters
signatureRequested table signature
indexRequested index of table with this signature
Return values
tableTable, or UNULL if not found

Definition at line 89 of file acpi.c.

89  {
90  struct acpi_header acpi;
91  struct acpi_rsdt *rsdtab;
92  typeof ( rsdtab->entry[0] ) entry;
93  userptr_t rsdt;
94  userptr_t table;
95  size_t len;
96  unsigned int count;
97  unsigned int i;
98 
99  /* Locate RSDT */
100  rsdt = acpi_find_rsdt();
101  if ( ! rsdt ) {
102  DBG ( "RSDT not found\n" );
103  return UNULL;
104  }
105 
106  /* Read RSDT header */
107  copy_from_user ( &acpi, rsdt, 0, sizeof ( acpi ) );
108  if ( acpi.signature != cpu_to_le32 ( RSDT_SIGNATURE ) ) {
109  DBGC ( rsdt, "RSDT %#08lx has invalid signature:\n",
110  user_to_phys ( rsdt, 0 ) );
111  DBGC_HDA ( rsdt, user_to_phys ( rsdt, 0 ), &acpi,
112  sizeof ( acpi ) );
113  return UNULL;
114  }
115  len = le32_to_cpu ( acpi.length );
116  if ( len < sizeof ( rsdtab->acpi ) ) {
117  DBGC ( rsdt, "RSDT %#08lx has invalid length:\n",
118  user_to_phys ( rsdt, 0 ) );
119  DBGC_HDA ( rsdt, user_to_phys ( rsdt, 0 ), &acpi,
120  sizeof ( acpi ) );
121  return UNULL;
122  }
123 
124  /* Calculate number of entries */
125  count = ( ( len - sizeof ( rsdtab->acpi ) ) / sizeof ( entry ) );
126 
127  /* Search through entries */
128  for ( i = 0 ; i < count ; i++ ) {
129 
130  /* Get table address */
131  copy_from_user ( &entry, rsdt,
132  offsetof ( typeof ( *rsdtab ), entry[i] ),
133  sizeof ( entry ) );
134 
135  /* Read table header */
136  table = phys_to_user ( entry );
137  copy_from_user ( &acpi.signature, table, 0,
138  sizeof ( acpi.signature ) );
139 
140  /* Check table signature */
141  if ( acpi.signature != cpu_to_le32 ( signature ) )
142  continue;
143 
144  /* Check index */
145  if ( index-- )
146  continue;
147 
148  /* Check table integrity */
149  if ( acpi_checksum ( table ) != 0 ) {
150  DBGC ( rsdt, "RSDT %#08lx found %s with bad checksum "
151  "at %08lx\n", user_to_phys ( rsdt, 0 ),
152  acpi_name ( signature ),
153  user_to_phys ( table, 0 ) );
154  break;
155  }
156 
157  DBGC ( rsdt, "RSDT %#08lx found %s at %08lx\n",
158  user_to_phys ( rsdt, 0 ), acpi_name ( signature ),
159  user_to_phys ( table, 0 ) );
160  return table;
161  }
162 
163  DBGC ( rsdt, "RSDT %#08lx could not find %s\n",
164  user_to_phys ( rsdt, 0 ), acpi_name ( signature ) );
165  return UNULL;
166 }
#define RSDT_SIGNATURE
Root System Description Table (RSDT) signature.
Definition: acpi.h:95
#define le32_to_cpu(value)
Definition: byteswap.h:113
static __always_inline void copy_from_user(void *dest, userptr_t src, off_t src_off, size_t len)
Copy data from user buffer.
Definition: uaccess.h:337
unsigned long user_to_phys(userptr_t userptr, off_t offset)
Convert user pointer to physical address.
static uint8_t acpi_checksum(userptr_t table)
Compute ACPI table checksum.
Definition: acpi.c:51
#define DBGC(...)
Definition: compiler.h:505
userptr_t phys_to_user(unsigned long phys_addr)
Convert physical address to user pointer.
#define offsetof(type, field)
Get offset of a field within a structure.
Definition: stddef.h:24
ACPI Root System Description Table (RSDT)
Definition: acpi.h:98
u8 signature
Definition: CIB_PRM.h:35
#define DBGC_HDA(...)
Definition: compiler.h:506
static EFI_ACPI_TABLE_PROTOCOL * acpi
ACPI table protocol protocol.
Definition: efi_block.c:61
uint32_t entry[0]
ACPI table entries.
Definition: acpi.h:102
#define cpu_to_le32(value)
Definition: byteswap.h:107
union aes_table_entry entry[256]
Table entries, indexed by S(N)
Definition: aes.c:26
userptr_t acpi_find_rsdt(void)
Locate ACPI root system description table.
An ACPI description header.
Definition: acpi.h:28
struct acpi_header acpi
ACPI header.
Definition: acpi.h:100
#define UNULL
Equivalent of NULL for user pointers.
Definition: uaccess.h:36
uint32_t len
Length.
Definition: ena.h:14
uint16_t count
Number of entries.
Definition: ena.h:22
static const char * acpi_name(uint32_t signature)
Transcribe ACPI table signature (for debugging)
Definition: acpi.h:55
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
uint64_t index
Index of the first segment within the content.
Definition: pccrc.h:21
unsigned long userptr_t
A pointer to a user buffer.
Definition: uaccess.h:33
if(natsemi->flags &NATSEMI_64BIT) return 1

References acpi, acpi_rsdt::acpi, acpi_checksum(), acpi_find_rsdt(), acpi_name(), copy_from_user(), count, cpu_to_le32, DBG, DBGC, DBGC_HDA, entry, acpi_rsdt::entry, index, le32_to_cpu, len, offsetof, phys_to_user(), RSDT_SIGNATURE, signature, UNULL, and user_to_phys().

Referenced by acpi_poweroff(), acpi_settings_fetch(), acpi_sx(), and acpi_timer_probe().

◆ acpi_sx()

int acpi_sx ( uint32_t  signature)

Extract _Sx value from DSDT/SSDT.

Parameters
signatureSignature (e.g. "_S5_")
Return values
sx_Sx value, or negative error

Definition at line 257 of file acpi.c.

257  {
258  struct acpi_fadt fadtab;
259  userptr_t rsdt;
260  userptr_t fadt;
261  userptr_t dsdt;
262  userptr_t ssdt;
263  unsigned int i;
264  int sx;
265 
266  /* Locate RSDT */
267  rsdt = acpi_find_rsdt();
268  if ( ! rsdt ) {
269  DBG ( "RSDT not found\n" );
270  return -ENOENT;
271  }
272 
273  /* Try DSDT first */
274  fadt = acpi_find ( FADT_SIGNATURE, 0 );
275  if ( fadt ) {
276  copy_from_user ( &fadtab, fadt, 0, sizeof ( fadtab ) );
277  dsdt = phys_to_user ( fadtab.dsdt );
278  if ( ( sx = acpi_sx_zsdt ( dsdt, signature ) ) >= 0 )
279  return sx;
280  }
281 
282  /* Try all SSDTs */
283  for ( i = 0 ; ; i++ ) {
284  ssdt = acpi_find ( SSDT_SIGNATURE, i );
285  if ( ! ssdt )
286  break;
287  if ( ( sx = acpi_sx_zsdt ( ssdt, signature ) ) >= 0 )
288  return sx;
289  }
290 
291  DBGC ( rsdt, "RSDT %#08lx could not find \\_Sx \"%s\"\n",
292  user_to_phys ( rsdt, 0 ), acpi_name ( signature ) );
293  return -ENOENT;
294 }
static __always_inline void copy_from_user(void *dest, userptr_t src, off_t src_off, size_t len)
Copy data from user buffer.
Definition: uaccess.h:337
unsigned long user_to_phys(userptr_t userptr, off_t offset)
Convert user pointer to physical address.
#define DBGC(...)
Definition: compiler.h:505
#define SSDT_SIGNATURE
Secondary System Description Table (SSDT) signature.
Definition: acpi.h:140
#define ENOENT
No such file or directory.
Definition: errno.h:514
userptr_t phys_to_user(unsigned long phys_addr)
Convert physical address to user pointer.
u8 signature
Definition: CIB_PRM.h:35
Fixed ACPI Description Table (FADT)
Definition: acpi.h:109
#define FADT_SIGNATURE
Fixed ACPI Description Table (FADT) signature.
Definition: acpi.h:106
userptr_t acpi_find_rsdt(void)
Locate ACPI root system description table.
uint32_t dsdt
Physical address of DSDT.
Definition: acpi.h:115
static const char * acpi_name(uint32_t signature)
Transcribe ACPI table signature (for debugging)
Definition: acpi.h:55
userptr_t acpi_find(uint32_t signature, unsigned int index)
Locate ACPI table.
Definition: acpi.c:89
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
static int acpi_sx_zsdt(userptr_t zsdt, uint32_t signature)
Extract _Sx value from DSDT/SSDT.
Definition: acpi.c:186
unsigned long userptr_t
A pointer to a user buffer.
Definition: uaccess.h:33

References acpi_find(), acpi_find_rsdt(), acpi_name(), acpi_sx_zsdt(), copy_from_user(), DBG, DBGC, acpi_fadt::dsdt, ENOENT, FADT_SIGNATURE, phys_to_user(), signature, SSDT_SIGNATURE, and user_to_phys().

Referenced by acpi_poweroff().

◆ acpi_add()

void acpi_add ( struct acpi_descriptor desc)

Add ACPI descriptor.

Parameters
descACPI descriptor

Definition at line 308 of file acpi.c.

308  {
309 
310  /* Add to list of descriptors */
311  ref_get ( desc->refcnt );
312  list_add_tail ( &desc->list, &desc->model->descs );
313 }
struct list_head descs
List of descriptors.
Definition: acpi.h:171
struct acpi_model * model
Table model.
Definition: acpi.h:147
#define list_add_tail(new, head)
Add a new entry to the tail of a list.
Definition: list.h:93
struct list_head list
List of ACPI descriptors for this model.
Definition: acpi.h:149
#define ref_get(refcnt)
Get additional reference to object.
Definition: refcnt.h:92
struct refcnt * refcnt
Reference count of containing object.
Definition: acpi.h:145

References acpi_model::descs, acpi_descriptor::list, list_add_tail, acpi_descriptor::model, ref_get, and acpi_descriptor::refcnt.

Referenced by sanpath_open().

◆ acpi_del()

void acpi_del ( struct acpi_descriptor desc)

Remove ACPI descriptor.

Parameters
descACPI descriptor

Definition at line 320 of file acpi.c.

320  {
321 
322  /* Remove from list of descriptors */
323  list_check_contains_entry ( desc, &desc->model->descs, list );
324  list_del ( &desc->list );
325  ref_put ( desc->refcnt );
326 }
struct list_head descs
List of descriptors.
Definition: acpi.h:171
struct acpi_model * model
Table model.
Definition: acpi.h:147
#define list_del(list)
Delete an entry from a list.
Definition: list.h:119
struct list_head list
List of ACPI descriptors for this model.
Definition: acpi.h:149
struct refcnt * refcnt
Reference count of containing object.
Definition: acpi.h:145
#define list_check_contains_entry(entry, head, member)
Check list contains a specified entry.
Definition: list.h:522
#define ref_put(refcnt)
Drop reference to object.
Definition: refcnt.h:106

References acpi_model::descs, acpi_descriptor::list, list_check_contains_entry, list_del, acpi_descriptor::model, ref_put, and acpi_descriptor::refcnt.

Referenced by sandev_undescribe(), and sanpath_open().

◆ acpi_install()

int acpi_install ( int(*)(struct acpi_header *acpi install)

Install ACPI tables.

Parameters
installTable installation method
Return values
rcReturn status code

Definition at line 357 of file acpi.c.

357  {
358  struct acpi_model *model;
359  int rc;
360 
361  for_each_table_entry ( model, ACPI_MODELS ) {
362  if ( ( rc = model->install ( install ) ) != 0 )
363  return rc;
364  }
365 
366  return 0;
367 }
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
int(* install)(int(*install)(struct acpi_header *acpi))
Install ACPI tables.
Definition: acpi.h:185
An ACPI table model.
Definition: acpi.h:169
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
Definition: tables.h:358
#define ACPI_MODELS
ACPI models.
Definition: acpi.h:189

References ACPI_MODELS, for_each_table_entry, acpi_model::install, and rc.

Referenced by dummy_san_describe(), efi_block_describe(), and int13_describe().