File tree Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " hermit-entry"
3
- version = " 0.9.9 "
3
+ version = " 0.9.10 "
4
4
authors = [" Martin Kröning <mkroening@posteo.net>" ]
5
5
edition = " 2021"
6
6
description = " Hermit's loading and entry API."
Original file line number Diff line number Diff line change @@ -66,7 +66,10 @@ impl From<RawPlatformInfo> for PlatformInfo {
66
66
has_pci,
67
67
num_cpus,
68
68
cpu_freq,
69
- boot_time : OffsetDateTime :: from_unix_timestamp_nanos ( boot_time) . unwrap ( ) ,
69
+ boot_time : OffsetDateTime :: from_unix_timestamp_nanos ( i128:: from_ne_bytes (
70
+ boot_time. 0 ,
71
+ ) )
72
+ . unwrap ( ) ,
70
73
} ,
71
74
RawPlatformInfo :: LinuxBootParams {
72
75
command_line_data,
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ impl From<PlatformInfo> for RawPlatformInfo {
54
54
has_pci,
55
55
num_cpus,
56
56
cpu_freq,
57
- boot_time : boot_time. unix_timestamp_nanos ( ) ,
57
+ boot_time : boot_time. unix_timestamp_nanos ( ) . to_ne_bytes ( ) . into ( ) ,
58
58
} ,
59
59
PlatformInfo :: LinuxBootParams {
60
60
command_line,
Original file line number Diff line number Diff line change @@ -158,6 +158,17 @@ struct RawLoadInfo {
158
158
tls_info : TlsInfo ,
159
159
}
160
160
161
+ #[ derive( Clone , Copy , Debug ) ]
162
+ #[ cfg_attr( target_arch = "x86_64" , repr( C , align( 8 ) ) ) ]
163
+ #[ cfg_attr( not( target_arch = "x86_64" ) , repr( transparent) ) ]
164
+ struct Align8 < T > ( pub T ) ;
165
+
166
+ impl < T > From < T > for Align8 < T > {
167
+ fn from ( value : T ) -> Self {
168
+ Self ( value)
169
+ }
170
+ }
171
+
161
172
#[ cfg_attr( not( all( feature = "loader" , feature = "kernel" ) ) , allow( dead_code) ) ]
162
173
#[ derive( Clone , Copy , Debug ) ]
163
174
#[ repr( C ) ]
@@ -174,7 +185,7 @@ enum RawPlatformInfo {
174
185
has_pci : bool ,
175
186
num_cpus : NonZeroU64 ,
176
187
cpu_freq : Option < NonZeroU32 > ,
177
- boot_time : i128 ,
188
+ boot_time : Align8 < [ u8 ; 16 ] > ,
178
189
} ,
179
190
LinuxBootParams {
180
191
command_line_data : * const u8 ,
You can’t perform that action at this time.
0 commit comments