File tree 7 files changed +61
-37
lines changed
7 files changed +61
-37
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ cargo-features = ["publish-lockfile"]
2
2
3
3
[package ]
4
4
name = " bootloader"
5
- version = " 0.3.12 "
5
+ version = " 0.3.13 "
6
6
authors = [
" Philipp Oppermann <[email protected] >" ]
7
7
license = " MIT/Apache-2.0"
8
8
description = " An experimental pure-Rust x86 bootloader."
Original file line number Diff line number Diff line change @@ -22,8 +22,10 @@ impl MemoryMap {
22
22
}
23
23
24
24
pub fn add_region ( & mut self , region : MemoryRegion ) {
25
- assert ! ( self . next_entry_index( ) < MAX_MEMORY_MAP_SIZE ,
26
- "too many memory regions in memory map" ) ;
25
+ assert ! (
26
+ self . next_entry_index( ) < MAX_MEMORY_MAP_SIZE ,
27
+ "too many memory regions in memory map"
28
+ ) ;
27
29
self . entries [ self . next_entry_index ( ) ] = region;
28
30
self . next_entry_index += 1 ;
29
31
self . sort ( ) ;
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ impl IdentityMappedAddr {
64
64
}
65
65
66
66
// Symbols defined in `linker.ld`
67
- extern {
67
+ extern "C" {
68
68
static mmap_ent: usize ;
69
69
static _memory_map: usize ;
70
70
static _kib_kernel_size: usize ;
@@ -208,7 +208,8 @@ fn load_elf(
208
208
& segments,
209
209
& mut rec_page_table,
210
210
& mut frame_allocator,
211
- ) . expect ( "kernel mapping failed" ) ;
211
+ )
212
+ . expect ( "kernel mapping failed" ) ;
212
213
213
214
// Map a page for the boot info structure
214
215
let boot_info_page = {
@@ -223,7 +224,8 @@ fn load_elf(
223
224
flags,
224
225
& mut rec_page_table,
225
226
& mut frame_allocator,
226
- ) . expect ( "Mapping of bootinfo page failed" )
227
+ )
228
+ . expect ( "Mapping of bootinfo page failed" )
227
229
. flush ( ) ;
228
230
page
229
231
} ;
Original file line number Diff line number Diff line change @@ -91,7 +91,8 @@ pub(crate) fn map_segment(
91
91
page_table_flags,
92
92
page_table,
93
93
frame_allocator,
94
- ) ?. flush ( ) ;
94
+ ) ?
95
+ . flush ( ) ;
95
96
96
97
type PageArray = [ u64 ; Size4KiB :: SIZE as usize / 8 ] ;
97
98
@@ -119,7 +120,8 @@ pub(crate) fn map_segment(
119
120
page_table_flags,
120
121
page_table,
121
122
frame_allocator,
122
- ) ?. flush ( ) ;
123
+ ) ?
124
+ . flush ( ) ;
123
125
}
124
126
125
127
// Map additional frames.
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ pub use self::vga_text_80x25::*;
4
4
#[ cfg( feature = "vga_320x200" ) ]
5
5
pub use self :: vga_320x200:: * ;
6
6
7
- mod vga_text_80x25;
8
7
mod vga_320x200;
8
+ mod vga_text_80x25;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ impl Printer {
54
54
for ( y, byte) in rendered. iter ( ) . enumerate ( ) {
55
55
for ( x, bit) in ( 0 ..8 ) . enumerate ( ) {
56
56
if * byte & ( 1 << bit) == 0 {
57
- continue
57
+ continue ;
58
58
}
59
59
let color = 0xf ;
60
60
vga_buffer[ ( y_pos + y) * SCREEN_WIDTH + x_pos + x] = color;
You can’t perform that action at this time.
0 commit comments