mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
feat(rust): Implement Rust-for-SUB-OS kernel layer, ChaCha20 crypto, HWMON thermal governor, and lazybox applets
- Add freestanding no_std Rust kernel layer compiled with rustc - Implement memory-safe ChaCha20 RFC-8439 stream cipher and CSPRNG in Rust - Implement intelligent thermal fan speed governor in Rust - Add printk macro bridge (kprint!, kprintln!) for Rust - Register 'rustinfo' and 'chacha20' LazyBox applets - Enable x86_64 hardware FPU & SSE (CR4.OSFXSR/OSXMMEXCPT) - Add cross-architecture C-bridge for ARM targets - Update stage2.asm kernel sector copy bounds to 448 KB
This commit is contained in:
1 parent
20bd992876
commit
24deed8ead
13 files changed
+433
-10
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#ifndef _KERNEL_RUST_H
|
||||
#define _KERNEL_RUST_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t target_fan_rpm;
|
||||
uint8_t throttle_level;
|
||||
bool is_critical;
|
||||
} __attribute__((packed)) rust_thermal_report_t;
|
||||
|
||||
int rust_kernel_init(void);
|
||||
const char* rust_kernel_status(void);
|
||||
int rust_chacha20_crypt(const uint8_t* key, const uint8_t* nonce, uint32_t counter, uint8_t* data, size_t len);
|
||||
int rust_csprng_get_random(uint8_t* buffer, size_t len);
|
||||
rust_thermal_report_t rust_sensor_calc_fan_curve(int32_t temp_celsius);
|
||||
|
||||
#endif // _KERNEL_RUST_H
|
||||
Reference in new issue
Block a user