1/** @file
2*
3*  Copyright (c) 2011-2015, ARM Limited. All rights reserved.
4*  Copyright (c) 2015, Hisilicon Limited. All rights reserved.
5*  Copyright (c) 2015, Linaro Limited. All rights reserved.
6*
7*  This program and the accompanying materials
8*  are licensed and made available under the terms and conditions of the BSD License
9*  which accompanies this distribution.  The full text of the license may be found at
10*  http://opensource.org/licenses/bsd-license.php
11*
12*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14*
15**/
16
17
18
19#ifndef __ACPI_NEXT_LIB_H__
20#define __ACPI_NEXT_LIB_H__
21
22#define EFI_ACPI_6_0_GIC_ITS_INIT(GicITSHwId, GicITSBase) \
23  { \
24    EFI_ACPI_6_0_GIC_ITS, sizeof (EFI_ACPI_6_0_GIC_ITS_STRUCTURE), EFI_ACPI_RESERVED_WORD, \
25    GicITSHwId, GicITSBase, EFI_ACPI_RESERVED_DWORD\
26  }
27
28#define EFI_ACPI_5_1_GICR_STRUCTURE_INIT(    \
29    GicRBase, GicRlength)                                   \
30  {                                                                                  \
31    EFI_ACPI_5_1_GICR, sizeof (EFI_ACPI_5_1_GICR_STRUCTURE), EFI_ACPI_RESERVED_WORD,   \
32     GicRBase, GicRlength \
33  }
34
35#define EFI_ACPI_6_0_GICC_AFFINITY_STRUCTURE_INIT(                                              \
36    ProximityDomain, ACPIProcessorUID, Flags, ClockDomain)                                      \
37  {                                                                                             \
38    3, sizeof (EFI_ACPI_5_1_GICC_AFFINITY_STRUCTURE),ProximityDomain ,                          \
39     ACPIProcessorUID,  Flags,  ClockDomain                                                     \
40  }
41
42#define EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE_INIT(                                              \
43    ProximityDomain, AddressBaseLow, AddressBaseHigh, LengthLow, LengthHigh, Flags)               \
44  {                                                                                               \
45    1, sizeof (EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE),ProximityDomain , EFI_ACPI_RESERVED_WORD,  \
46    AddressBaseLow, AddressBaseHigh, LengthLow, LengthHigh, EFI_ACPI_RESERVED_DWORD, Flags,       \
47    EFI_ACPI_RESERVED_QWORD                                                                       \
48  }
49
50#pragma pack(1)
51//
52// Define the number of each table type.
53// This is where the table layout is modified.
54//
55#define EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT  64
56#define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT                10
57
58
59typedef struct {
60  EFI_ACPI_6_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER          Header;
61  EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE                      Memory[EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT];
62  EFI_ACPI_6_0_GICC_AFFINITY_STRUCTURE                        Gicc[EFI_ACPI_PROCESSOR_LOCAL_GICC_AFFINITY_STRUCTURE_COUNT];
63} EFI_ACPI_STATIC_RESOURCE_AFFINITY_TABLE;
64
65#pragma pack()
66#endif
67
68