File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ use crate::memory_map::MemoryRegion;
2
2
use core:: slice;
3
3
4
4
#[ derive( Debug ) ]
5
- #[ repr( C ) ]
6
5
pub struct BootInfo {
7
6
pub memory_regions : & ' static mut [ MemoryRegion ] ,
8
7
pub framebuffer : Option < FrameBuffer > ,
@@ -13,7 +12,6 @@ pub struct BootInfo {
13
12
}
14
13
15
14
#[ derive( Debug ) ]
16
- #[ repr( C ) ]
17
15
pub struct FrameBuffer {
18
16
pub ( crate ) buffer_start : u64 ,
19
17
pub ( crate ) buffer_byte_len : usize ,
@@ -35,7 +33,6 @@ impl FrameBuffer {
35
33
}
36
34
37
35
#[ derive( Debug , Clone , Copy ) ]
38
- #[ repr( C ) ]
39
36
pub struct FrameBufferInfo {
40
37
pub byte_len : usize ,
41
38
pub horizontal_resolution : usize ,
@@ -46,12 +43,15 @@ pub struct FrameBufferInfo {
46
43
}
47
44
48
45
#[ derive( Debug , Clone , Copy ) ]
49
- #[ repr( C ) ]
50
46
#[ non_exhaustive]
51
47
pub enum PixelFormat {
52
48
RGB ,
53
49
BGR ,
54
50
U8 ,
55
51
}
56
52
53
+ /// Check that the _pointer_ is FFI-safe.
54
+ ///
55
+ /// Note that the `BootInfo` struct is not FFI-safe, so it needs to be compiled by the same Rust
56
+ /// compiler as the kernel in order to be safely accessed.
57
57
extern "C" fn _assert_ffi ( _boot_info : & ' static mut BootInfo ) { }
You can’t perform that action at this time.
0 commit comments