From 6e6e82f466a9cf7a05f3cd123fd4685cb9b75d50 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Sun, 13 Dec 2020 19:41:15 +0200 Subject: [PATCH] sq move null cap --- nucleus/src/arch/aarch64/caps.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nucleus/src/arch/aarch64/caps.rs b/nucleus/src/arch/aarch64/caps.rs index b5fcd02..6e4f418 100644 --- a/nucleus/src/arch/aarch64/caps.rs +++ b/nucleus/src/arch/aarch64/caps.rs @@ -380,6 +380,15 @@ capdefs! { AsidControl, AsidPool } +impl NullCapability { + /// Create a Null capability. + /// + /// Such capabilities are invalid and can not be used for anything. + pub fn new() -> NullCapability { + NullCapability(LocalRegisterCopy::new(u128::from(NullCap::Type::value))) + } +} + // @todo retyping a device capability requires specifying memory base exactly, can't just pick next frame? /// Capability to a block of untyped memory. @@ -483,15 +492,6 @@ impl CapNodeCapability { } } -impl NullCapability { - /// Create a Null capability. - /// - /// Such capabilities are invalid and can not be used for anything. - pub fn new() -> NullCapability { - NullCapability(LocalRegisterCopy::new(u128::from(NullCap::Type::value))) - } -} - impl CapNodeCapability { /// Create a capability to CapNode. ///