Skip to content

Commit

Permalink
fix configuration of the VGA interface
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Nov 18, 2024
1 parent e6af774 commit a7c4eda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/arch/x86/kernel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ core::arch::global_asm!(include_str!("entry.s"));
pub(crate) fn init() {
processor::cpu_init();

#[cfg(all(target_arch = "x86", feature = "vga"))]
#[cfg(feature = "vga")]
vga::init();
}
6 changes: 3 additions & 3 deletions src/console.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! A wrapper around our serial console.

#[cfg(not(all(target_arch = "x86", feature = "vga")))]
#[cfg(not(feature = "vga"))]
use crate::arch::serial;
#[cfg(all(target_arch = "x86", feature = "vga"))]
#[cfg(feature = "vga")]
use crate::arch::vga;
use core::fmt;

Expand All @@ -12,7 +12,7 @@ impl fmt::Write for Console {
/// Output a string to each of our console outputs.
fn write_str(&mut self, s: &str) -> fmt::Result {
cfg_if::cfg_if! {
if #[cfg(all(target_arch = "x86", feature = "vga"))] {
if #[cfg(feature = "vga")] {
vga::VGA_SCREEN.lock().write_str(s)
} else {
serial::COM1.lock().write_str(s)
Expand Down

0 comments on commit a7c4eda

Please sign in to comment.