From 1c3ab9b8e896dc69c3f54d6ffc017f9685efa907 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Sat, 22 Feb 2020 14:28:20 -0800 Subject: [PATCH] Add runtime_services --- include/uefi/runtime_services.h | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 include/uefi/runtime_services.h diff --git a/include/uefi/runtime_services.h b/include/uefi/runtime_services.h new file mode 100644 index 0000000..50fad97 --- /dev/null +++ b/include/uefi/runtime_services.h @@ -0,0 +1,51 @@ +#pragma once +#ifndef _uefi_runtime_services_h_ +#define _uefi_runtime_services_h_ + +// This Source Code Form is part of the j6-uefi-headers project and is subject +// to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was +// not distributed with this file, You can obtain one at +// http://mozilla.org/MPL/2.0/. + +#include +#include + +namespace uefi { +namespace rs_impl { + using convert_pointer = uefi::status (*)(uint64_t, void **); +} + +struct runtime_services { + static constexpr uint64_t signature = 0x56524553544e5552ull; + + table_header header; + + // Time Services + void *get_time; + void *set_time; + void *get_wakeup_time; + void *set_wakeup_time; + + // Virtual Memory Services + void *set_virtual_address_map; + rs_impl::convert_pointer convert_pointer; + + // Variable Services + void *get_variable; + void *get_next_variable_name; + void *set_variable; + + // Miscellaneous Services + void *get_next_high_monotonic_count; + void *reset_system; + + // UEFI 2.0 Capsule Services + void *update_capsule; + void *query_capsule_capabilities; + + // Miscellaneous UEFI 2.0 Service + void *query_variable_info; +}; + +} // namespace uefi +#endif