From b05b2c7f14aa7d67d2c5b65ea880b246fedd57e4 Mon Sep 17 00:00:00 2001 From: Ryan Cohen Date: Tue, 26 Apr 2022 21:07:28 -0400 Subject: [PATCH] Add documentation links for `BootServices` and `RuntimeServices`. The links show which methods in `SystemTable` can be called to get a reference of each struct. rust-osdev#416 --- src/table/boot.rs | 6 ++++++ src/table/runtime.rs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/table/boot.rs b/src/table/boot.rs index 26ddd4268..5636a3a7a 100644 --- a/src/table/boot.rs +++ b/src/table/boot.rs @@ -18,6 +18,12 @@ use core::{ptr, slice}; /// Contains pointers to all of the boot services. /// +/// # Accessing `BootServices` +/// +/// A reference to `BootServices` can only be accessed by calling [`boot_services`]. +/// +/// [`boot_services`]: crate::table::SystemTable::boot_services +/// /// # Accessing protocols /// /// Protocols can be opened using several methods of `BootServices`. Most diff --git a/src/table/runtime.rs b/src/table/runtime.rs index 08597e543..9272033cd 100644 --- a/src/table/runtime.rs +++ b/src/table/runtime.rs @@ -18,6 +18,12 @@ use core::{fmt, ptr}; /// /// This table, and the function pointers it contains are valid /// even after the UEFI OS loader and OS have taken control of the platform. +/// +/// # Accessing `RuntimeServices` +/// +/// A reference to `RuntimeServices` can only be accessed by calling [`runtime_services`]. +/// +/// [`runtime_services`]: crate::table::SystemTable::runtime_services #[repr(C)] pub struct RuntimeServices { header: Header,