Browse Source

documentation!

master
3moon 8 years ago
parent
commit
3b21392383
6 changed files with 16 additions and 4 deletions
  1. +4
    -1
      Makefile
  2. +3
    -1
      src/arch/mod.rs
  3. +2
    -0
      src/arch/x86_64/device/mod.rs
  4. +2
    -0
      src/arch/x86_64/device/vga_console.rs
  5. +2
    -2
      src/lib.rs
  6. +3
    -0
      src/macros.rs

+ 4
- 1
Makefile View File

@ -9,7 +9,7 @@ asm_obj := $(patsubst src/arch/$(arch)/%.asm, build/$(arch)/%.o, $(asm_src))
linker_script := src/arch/$(arch)/linker.ld linker_script := src/arch/$(arch)/linker.ld
grub_cfg := src/arch/$(arch)/grub.cfg grub_cfg := src/arch/$(arch)/grub.cfg
.PHONY: all clean run iso
.PHONY: all clean run iso doc
all: $(kernel) all: $(kernel)
@ -41,3 +41,6 @@ $(rs_kernel):
build/$(arch)/%.o: src/arch/$(arch)/%.asm build/$(arch)/%.o: src/arch/$(arch)/%.asm
@mkdir -p $(shell dirname $@) @mkdir -p $(shell dirname $@)
nasm -felf64 $< -o $@ nasm -felf64 $< -o $@
doc:
cargo rustdoc --lib -- --no-defaults --passes collapse-docs --passes unindent-comments --passes strip-priv-imports

+ 3
- 1
src/arch/mod.rs View File

@ -1 +1,3 @@
pub mod x86_64;
//! Architecture-specific code.
pub mod x86_64;

+ 2
- 0
src/arch/x86_64/device/mod.rs View File

@ -1 +1,3 @@
//! Device drivers for devices that *all x86_64 processors* have.
pub mod vga_console; pub mod vga_console;

+ 2
- 0
src/arch/x86_64/device/vga_console.rs View File

@ -1,3 +1,5 @@
//! A basic console driver, using the VGA text-mode buffer.
use core::fmt; use core::fmt;
use core::ptr::Unique; use core::ptr::Unique;
use spin::Mutex; use spin::Mutex;


+ 2
- 2
src/lib.rs View File

@ -17,8 +17,8 @@ use arch::x86_64::device::vga_console;
#[no_mangle] #[no_mangle]
pub extern fn kernel_main() { pub extern fn kernel_main() {
//////////// !!! WARNING !!! //////////// //////////// !!! WARNING !!! ////////////
// WE HAVE AN EXTREMELY SMALL STACK //
// AND NO GUARD PAGE //
// THE STACK IS LARGER NOW, BUT //
// WE STILL HAVE NO GUARD PAGE //
///////////////////////////////////////// /////////////////////////////////////////
vga_console::WRITER.lock().clear_screen(); vga_console::WRITER.lock().clear_screen();


+ 3
- 0
src/macros.rs View File

@ -1,3 +1,6 @@
//! Internal macros used by the kernel
//! (*e.g.* our implementation of `print!`/`println!`).
use core::fmt; use core::fmt;
#[macro_export] #[macro_export]


Loading…
Cancel
Save