prepare for format

This commit is contained in:
bunnie 2024-01-14 21:51:11 +08:00
parent a5137e69b1
commit ee6190a12a
22 changed files with 31 additions and 36 deletions

View file

@ -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}",

View file

@ -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 <xous_root>/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;

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
// This code includes encoded bitmaps of glyphs from the Chicago typeface which

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
// This code includes bitmap glyphs extracted from a PNG sprite sheet document created

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
// This code includes bitmap glyphs extracted from a PNG sprite sheet document created

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
// This code includes bitmap glyphs extracted from a PNG sprite sheet document created

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
// This code includes encoded bitmaps of glyphs from the Courier typeface which

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
// This code includes encoded bitmaps of glyphs from the Geneva typeface which

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
// This code includes encoded bitmaps of glyphs from the Geneva typeface which

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
// This code includes encoded bitmaps of glyphs from the Helvetica typeface.

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
// This code includes bitmap glyphs extracted from a PNG sprite sheet document created

View file

@ -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 <xous_root>/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 <xous_root>/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 <xous_root>/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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
#![allow(dead_code)]

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
//
// This code includes encoded bitmaps of glyphs from the Chicago typeface which

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
//
// This code includes bitmap glyphs extracted from a PNG sprite sheet document created

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
//
// This code includes bitmap glyphs extracted from a PNG sprite sheet document created

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
//
// This code includes bitmap glyphs extracted from a PNG sprite sheet document created

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
//
// This code includes encoded bitmaps of glyphs from the Courier typeface which

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
//
// This code includes encoded bitmaps of glyphs from the Geneva typeface which

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
//
// This code includes encoded bitmaps of glyphs from the Geneva typeface which

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
//
// This code includes encoded bitmaps of glyphs from the Helvetica typeface.

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
//
// This code includes bitmap glyphs extracted from a PNG sprite sheet document created

View file

@ -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 <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
#![allow(dead_code)]