1 /*
2  * Copyright (C) 2023 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef __SYSTEM_TABLE_H__
19 #define __SYSTEM_TABLE_H__
20 
21 #include "types.h"
22 
23 #include "boot_service.h"
24 #include "protocols/simple_text_output_protocol.h"
25 #include "runtime_service.h"
26 
27 typedef struct {
28   EfiGuid vendor_guid;
29   const void* vendor_table;
30 } EfiConfigurationTable;
31 
32 typedef struct EfiSystemTable {
33   EfiTableHeader header;
34   char16_t* firmware_vendor;
35   uint32_t firmware_revision;
36   EfiHandle console_in_handle;
37   void* con_in;
38   EfiHandle console_out_handle;
39   EfiSimpleTextOutputProtocol* con_out;
40   EfiHandle standard_error_handle;
41   EfiSimpleTextOutputProtocol* std_err;
42   EfiRuntimeService* runtime_services;
43   EfiBootService* boot_services;
44   size_t number_of_table_entries;
45   const EfiConfigurationTable* configuration_table;
46 } EfiSystemTable;
47 
48 #endif  // __SYSTEM_TABLE_H__
49