iPXE
efi_acpi.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Michael Brown <mbrown@fensystems.co.uk>.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of the
7  * License, or any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  * 02110-1301, USA.
18  *
19  * You can also choose to distribute this program under the terms of
20  * the Unmodified Binary Distribution Licence (as given in the file
21  * COPYING.UBDL), provided that you have satisfied its requirements.
22  */
23 
24 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
25 
26 /**
27  * @file
28  *
29  * iPXE ACPI API for EFI
30  *
31  */
32 
33 #include <ipxe/acpi.h>
34 #include <ipxe/uaccess.h>
35 #include <ipxe/efi/efi.h>
36 #include <ipxe/efi/Guid/Acpi.h>
37 #include <ipxe/efi/efi_acpi.h>
38 
39 /** ACPI configuration table */
41 EFI_USE_TABLE ( ACPI_10_TABLE, &rsdp, 0 );
42 
43 /**
44  * Locate ACPI root system description table
45  *
46  * @ret rsdt ACPI root system description table, or NULL
47  */
48 static const struct acpi_rsdt * efi_find_rsdt ( void ) {
49 
50  /* Locate RSDT via ACPI configuration table, if available */
51  if ( rsdp )
52  return phys_to_virt ( rsdp->RsdtAddress );
53 
54  return NULL;
55 }
56 
const struct acpi_rsdt * acpi_find_rsdt(void)
Locate ACPI root system description table.
GUIDs used for ACPI entries in the EFI system table.
static acpi_find(uint32_t signature, unsigned int index)
Locate ACPI table.
Definition: rsdp.h:26
ACPI Root System Description Table (RSDT)
Definition: acpi.h:249
Root System Description Pointer Structure.
Definition: Acpi10.h:403
PROVIDE_ACPI(efi, acpi_find_rsdt, efi_find_rsdt)
Access to external ("user") memory.
static EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER * rsdp
ACPI configuration table.
Definition: efi_acpi.c:40
EFI_USE_TABLE(ACPI_10_TABLE, &rsdp, 0)
ACPI data structures.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static const struct acpi_rsdt * efi_find_rsdt(void)
Locate ACPI root system description table.
Definition: efi_acpi.c:48
EFI API.
iPXE ACPI API for EFI
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321
PROVIDE_ACPI_INLINE(efi, acpi_find)