diff --git a/loader/src/asm.rs b/loader/src/asm.rs index 0d83820e2..7507d4b12 100644 --- a/loader/src/asm.rs +++ b/loader/src/asm.rs @@ -1,5 +1,6 @@ -use crate::platform; use core::arch::asm; + +use crate::platform; // Assembly stubs for entering into the loader, and exiting it. // Note: inline constants are not yet stable in Rust: https://github.com/rust-lang/rust/pull/104087 @@ -11,6 +12,7 @@ pub extern "C" fn _start(_kernel_args: usize, loader_sig: usize) { #[cfg(any(feature = "cramium-soc", feature = "cramium-fpga"))] let _kernel_args = _start as *const usize as usize + platform::KERNEL_OFFSET; unsafe { + #[rustfmt::skip] asm! ( "li t0, 0xffffffff", "csrw mideleg, t0", @@ -53,6 +55,7 @@ pub extern "C" fn _start(_kernel_args: usize, loader_sig: usize) { /// This is only used in debug mode pub extern "C" fn abort() { unsafe { + #[rustfmt::skip] asm!( "300:", // abort "j 300b", @@ -76,6 +79,7 @@ pub extern "C" fn start_kernel( let debug: usize = if debug_ { 1 } else { 0 }; let resume: usize = if resume_ { 1 } else { 0 }; unsafe { + #[rustfmt::skip] asm! ( // these generate redundant mv's but it ensures that the arguments are marked as used "mv a0, {args}", diff --git a/loader/src/fonts.rs b/loader/src/fonts.rs index 7575077df..c5fc21b38 100644 --- a/loader/src/fonts.rs +++ b/loader/src/fonts.rs @@ -1,21 +1,13 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // The order of these modules affects the link order in the loader, which is referred to in the graphics engine. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go pub mod emoji; - pub mod zh; - pub mod ja; - pub mod kr; - pub mod bold; - pub mod mono; - pub mod regular; - pub mod tall; - -pub mod small; +pub mod small; \ No newline at end of file diff --git a/loader/src/fonts/bold.rs b/loader/src/fonts/bold.rs index 97dd190b7..1b43acef4 100644 --- a/loader/src/fonts/bold.rs +++ b/loader/src/fonts/bold.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // This code includes encoded bitmaps of glyphs from the Chicago typeface which diff --git a/loader/src/fonts/emoji.rs b/loader/src/fonts/emoji.rs index 9584035ad..5d03a8980 100644 --- a/loader/src/fonts/emoji.rs +++ b/loader/src/fonts/emoji.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // This code includes bitmap glyphs extracted from a PNG sprite sheet document created diff --git a/loader/src/fonts/ja.rs b/loader/src/fonts/ja.rs index f28a0a99d..a0be7a0ee 100644 --- a/loader/src/fonts/ja.rs +++ b/loader/src/fonts/ja.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // This code includes bitmap glyphs extracted from a PNG sprite sheet document created diff --git a/loader/src/fonts/kr.rs b/loader/src/fonts/kr.rs index d74db83cc..62460c1cd 100644 --- a/loader/src/fonts/kr.rs +++ b/loader/src/fonts/kr.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // This code includes bitmap glyphs extracted from a PNG sprite sheet document created diff --git a/loader/src/fonts/mono.rs b/loader/src/fonts/mono.rs index 1dc536f9f..ff574928a 100644 --- a/loader/src/fonts/mono.rs +++ b/loader/src/fonts/mono.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // This code includes encoded bitmaps of glyphs from the Courier typeface which diff --git a/loader/src/fonts/regular.rs b/loader/src/fonts/regular.rs index b9865c072..983aa6ce7 100644 --- a/loader/src/fonts/regular.rs +++ b/loader/src/fonts/regular.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // This code includes encoded bitmaps of glyphs from the Geneva typeface which diff --git a/loader/src/fonts/small.rs b/loader/src/fonts/small.rs index 524126cf4..0b4fefa81 100644 --- a/loader/src/fonts/small.rs +++ b/loader/src/fonts/small.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // This code includes encoded bitmaps of glyphs from the Geneva typeface which diff --git a/loader/src/fonts/tall.rs b/loader/src/fonts/tall.rs index c40e5667e..cecf41a33 100644 --- a/loader/src/fonts/tall.rs +++ b/loader/src/fonts/tall.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // This code includes encoded bitmaps of glyphs from the Helvetica typeface. diff --git a/loader/src/fonts/zh.rs b/loader/src/fonts/zh.rs index 1baf49e5e..44cb945e4 100644 --- a/loader/src/fonts/zh.rs +++ b/loader/src/fonts/zh.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // This code includes bitmap glyphs extracted from a PNG sprite sheet document created diff --git a/services/graphics-server/src/blitstr2/codegen/lib/templates.go b/services/graphics-server/src/blitstr2/codegen/lib/templates.go index 768cc2202..8400ea74e 100644 --- a/services/graphics-server/src/blitstr2/codegen/lib/templates.go +++ b/services/graphics-server/src/blitstr2/codegen/lib/templates.go @@ -100,7 +100,7 @@ Usage: ` // Template with rust source code for a outer structure of a font file -const fontFileTemplate = `// DO NOT MAKE EDITS HERE because this file is automatically generated. +const fontFileTemplate = `// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // {{.Font.Legal}} @@ -147,7 +147,7 @@ pub const WIDTHS: [u8; {{.GS.WidthsLen}}] = [ {{end}} ` -const loaderFileTemplate = `// DO NOT MAKE EDITS HERE because this file is automatically generated. +const loaderFileTemplate = `// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go {{.Font.Legal}} @@ -163,14 +163,13 @@ pub static {{.FontName}}_GLYPHS: [u32; {{.GS.GlyphsLen}}] = [ {{.GS.Glyphs}}];{{if .GS.Widths}}{{end}} ` -const loadermodTemplate = `// DO NOT MAKE EDITS HERE because this file is automatically generated. +const loadermodTemplate = `// DO NOT MAKE EDITS HERE because this file is automatically @generated. // The order of these modules affects the link order in the loader, which is referred to in the graphics engine. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go {{range $f := .FontDir}} -pub mod {{$f.Name}}; -{{end}}` +pub mod {{$f.Name}};{{end}}` -const fontmapTemplate = `// DO NOT MAKE EDITS HERE because this file is automatically generated. +const fontmapTemplate = `// DO NOT MAKE EDITS HERE because this file is automatically @generated. // The order of these modules affects the link order in the loader, which is referred to in the graphics engine. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go #![allow(dead_code)] diff --git a/services/graphics-server/src/blitstr2/fonts/bold.rs b/services/graphics-server/src/blitstr2/fonts/bold.rs index c514435e2..e54350e22 100644 --- a/services/graphics-server/src/blitstr2/fonts/bold.rs +++ b/services/graphics-server/src/blitstr2/fonts/bold.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // // This code includes encoded bitmaps of glyphs from the Chicago typeface which diff --git a/services/graphics-server/src/blitstr2/fonts/emoji.rs b/services/graphics-server/src/blitstr2/fonts/emoji.rs index 708d09400..1c940c8c9 100644 --- a/services/graphics-server/src/blitstr2/fonts/emoji.rs +++ b/services/graphics-server/src/blitstr2/fonts/emoji.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // // This code includes bitmap glyphs extracted from a PNG sprite sheet document created diff --git a/services/graphics-server/src/blitstr2/fonts/ja.rs b/services/graphics-server/src/blitstr2/fonts/ja.rs index 850d593cb..a51cd3269 100644 --- a/services/graphics-server/src/blitstr2/fonts/ja.rs +++ b/services/graphics-server/src/blitstr2/fonts/ja.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // // This code includes bitmap glyphs extracted from a PNG sprite sheet document created diff --git a/services/graphics-server/src/blitstr2/fonts/kr.rs b/services/graphics-server/src/blitstr2/fonts/kr.rs index 74d525abe..624ae2983 100644 --- a/services/graphics-server/src/blitstr2/fonts/kr.rs +++ b/services/graphics-server/src/blitstr2/fonts/kr.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // // This code includes bitmap glyphs extracted from a PNG sprite sheet document created diff --git a/services/graphics-server/src/blitstr2/fonts/mono.rs b/services/graphics-server/src/blitstr2/fonts/mono.rs index 2371b2e0d..44e6534f3 100644 --- a/services/graphics-server/src/blitstr2/fonts/mono.rs +++ b/services/graphics-server/src/blitstr2/fonts/mono.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // // This code includes encoded bitmaps of glyphs from the Courier typeface which diff --git a/services/graphics-server/src/blitstr2/fonts/regular.rs b/services/graphics-server/src/blitstr2/fonts/regular.rs index 63c55c433..5da71867b 100644 --- a/services/graphics-server/src/blitstr2/fonts/regular.rs +++ b/services/graphics-server/src/blitstr2/fonts/regular.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // // This code includes encoded bitmaps of glyphs from the Geneva typeface which diff --git a/services/graphics-server/src/blitstr2/fonts/small.rs b/services/graphics-server/src/blitstr2/fonts/small.rs index 389ad1bf1..d691cebb8 100644 --- a/services/graphics-server/src/blitstr2/fonts/small.rs +++ b/services/graphics-server/src/blitstr2/fonts/small.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // // This code includes encoded bitmaps of glyphs from the Geneva typeface which diff --git a/services/graphics-server/src/blitstr2/fonts/tall.rs b/services/graphics-server/src/blitstr2/fonts/tall.rs index 5d72fa1d8..509cf0093 100644 --- a/services/graphics-server/src/blitstr2/fonts/tall.rs +++ b/services/graphics-server/src/blitstr2/fonts/tall.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // // This code includes encoded bitmaps of glyphs from the Helvetica typeface. diff --git a/services/graphics-server/src/blitstr2/fonts/zh.rs b/services/graphics-server/src/blitstr2/fonts/zh.rs index 447990f40..19f4bde26 100644 --- a/services/graphics-server/src/blitstr2/fonts/zh.rs +++ b/services/graphics-server/src/blitstr2/fonts/zh.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go // // This code includes bitmap glyphs extracted from a PNG sprite sheet document created diff --git a/services/graphics-server/src/fontmap.rs b/services/graphics-server/src/fontmap.rs index 2e231753b..8d6a1749f 100644 --- a/services/graphics-server/src/fontmap.rs +++ b/services/graphics-server/src/fontmap.rs @@ -1,4 +1,4 @@ -// DO NOT MAKE EDITS HERE because this file is automatically generated. +// DO NOT MAKE EDITS HERE because this file is automatically @generated. // The order of these modules affects the link order in the loader, which is referred to in the graphics engine. // To make changes, see /services/graphics-server/src/blitstr2/codegen/main.go #![allow(dead_code)]