summaryrefslogtreecommitdiffstats
path: root/rsnix/src/gop.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rsnix/src/gop.rs')
-rw-r--r--rsnix/src/gop.rs18
1 files changed, 16 insertions, 2 deletions
diff --git a/rsnix/src/gop.rs b/rsnix/src/gop.rs
index ccc6509..676814e 100644
--- a/rsnix/src/gop.rs
+++ b/rsnix/src/gop.rs
@@ -7,7 +7,7 @@ use crate::font;
7use crate::uefi::{GopModeInfo, GraphicsOutputProtocol, EFI_SUCCESS, PIXEL_BGR, PIXEL_RGB}; 7use crate::uefi::{GopModeInfo, GraphicsOutputProtocol, EFI_SUCCESS, PIXEL_BGR, PIXEL_RGB};
8use core::fmt; 8use core::fmt;
9use core::ptr; 9use core::ptr;
10use core::sync::atomic::{AtomicU32, AtomicU64, AtomicU8, Ordering}; 10use core::sync::atomic::{AtomicBool, AtomicU32, AtomicU64, AtomicU8, Ordering};
11 11
12/// Framebuffer state captured before ExitBootServices. 12/// Framebuffer state captured before ExitBootServices.
13pub struct Framebuffer { 13pub struct Framebuffer {
@@ -91,6 +91,19 @@ pub fn last_boot_stage() -> alloc::string::String {
91/// the preemptive scheduler. Set via the shell `stall` command. 91/// the preemptive scheduler. Set via the shell `stall` command.
92pub static DISPLAY_STALL: AtomicU32 = AtomicU32::new(0); 92pub static DISPLAY_STALL: AtomicU32 = AtomicU32::new(0);
93 93
94/// Set once a diagnostic QR has been rendered on screen. While locked, the
95/// klog screen echo is suppressed so subsequent log lines cannot overwrite
96/// the QR; the serial console keeps the full stream. Never released (the
97/// QR is the "photograph this" surface for hardware with no serial pipe).
98pub static QR_LOCKED: AtomicBool = AtomicBool::new(false);
99
100pub fn qr_lock() {
101 QR_LOCKED.store(true, Ordering::Relaxed);
102}
103pub fn qr_locked() -> bool {
104 QR_LOCKED.load(Ordering::Relaxed)
105}
106
94#[inline] 107#[inline]
95fn stall_display() { 108fn stall_display() {
96 let n = DISPLAY_STALL.load(Ordering::Relaxed); 109 let n = DISPLAY_STALL.load(Ordering::Relaxed);
@@ -308,7 +321,8 @@ pub fn shadow_late_init() {
308/// boot stage is written straight to the framebuffer — the last visible 321/// boot stage is written straight to the framebuffer — the last visible
309/// marker before a hang identifies where the kernel died. Uses the 322/// marker before a hang identifies where the kernel died. Uses the
310/// direct-display glyph path (the shadow may not exist yet in early 323/// direct-display glyph path (the shadow may not exist yet in early
311/// boot); the shell banner overwrites row 0 at first paint. 324/// boot). Row 0 stays a persistent status line: the shell starts its
325/// output at row 1 so the marker survives a post-boot freeze.
312pub fn boot_marker(msg: &str) { 326pub fn boot_marker(msg: &str) {
313 boot_marker_at(msg, 0); 327 boot_marker_at(msg, 0);
314} 328}