summaryrefslogtreecommitdiff
path: root/ArmPkg/Drivers/AcpiTables/rtsm_ve-aemv8a/Bert.aslc
blob: 0fe2bc43a31d5b9c64bac645ca6d0bcf84d49c50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
 * Copyright (c) 2013 Linaro Limited
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the BSD License which accompanies
 * this distribution, and is available at
 * http://opensource.org/licenses/bsd-license.php
 *
 * Contributors:
 *     Yi Li - yi.li@linaro.org
*/

#include <IndustryStandard/Acpi.h>
#include <Platform.h>

// Generic error severity in data entry
#define BOOT_ERROR_SEVERITY_RECOVERABLE       0
#define BOOT_ERROR_SEVERITY_FATAL             1
#define BOOT_ERROR_SEVERITY_CORRECTED         2
#define BOOT_ERROR_SEVERITY_NONE              3

#pragma pack(1)

// ErrorStatus block record definitions for various errors
typedef struct {
  UINT32              UeValid:1;
  UINT32              CeValid:1;
  UINT32              MultipleUeValid:1;
  UINT32              MultipleCeValid:1;
  UINT32              NumErrorDataEntry:10;
  UINT32              Resv1:18;
} BOOT_ERROR_BLOCK_STATUS;


typedef struct {
  // Error Status block
  BOOT_ERROR_BLOCK_STATUS  BlockStatus;
  UINT32              RawDataOffset;
  UINT32              RawDataSize;
  UINT32              ErrDataSize;
  UINT32              Severity;
  // Error Status data...
} EFI_ACPI_5_0_BOOT_ERROR_REGION;


typedef struct {
  EFI_ACPI_DESCRIPTION_HEADER             Header;
  UINT32                                  BootErrorRegionLen;
  UINT64                                  BootErrorRegion;
} EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE;

#pragma pack()



EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE Bert = {    
  {
      EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE,
      sizeof (EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE),
      EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_REVISION,
      0x00,                                                     // Checksum will be updated at runtime
      {EFI_ACPI_OEM_ID},
      EFI_ACPI_OEM_TABLE_ID,
      0x02,
      EFI_ACPI_CREATOR_ID,
      EFI_ACPI_CREATOR_REVISION 
  },
  0x9D,            												//BootErrorRegionLen
  0xFFFF0008             										//BootErrorRegion
      
};


VOID*
ReferenceAcpiTable (
  VOID
  )
{
  //
  // Reference the table being generated to prevent the optimizer from removing the
  // data structure from the exeutable
  //
  return (VOID*)&Bert;
}