feat: Add Intel e1000e PCIe NIC, VirtIO-GPU 2D accelerator, CPUFreq governor, and VirtIO-Input drivers

- Implement Intel 82574L / 82567LM / I217 / I219 PCIe Gigabit NIC driver with DMA ring buffers and auto-negotiation in drivers/net/e1000e.c and include/drivers/e1000e.h
- Implement VirtIO-GPU 2D hardware graphics display adapter driver with dirty rect flushing in drivers/virtio/virtio_gpu.c and include/drivers/virtio_gpu.h
- Implement Dynamic CPU Frequency Scaling and ACPI CPPC Power Governor with performance, powersave, ondemand, conservative, and schedutil policies in drivers/power/cpufreq.c and include/drivers/cpufreq.h
- Implement VirtIO-Input para-virtualized tablet/mouse event driver in drivers/virtio/virtio_input.c and include/drivers/virtio_input.h
- Expand stage2 kernel bootloader loading boundary to 768 KB (1536 sectors)
- Add LazyBox applets: 'cpufreq', 'gpuinfo', 'e1000e'
- Verified across x86_64, AArch64, and ARMv8i targets
This commit is contained in:
subhobhai943 committed 2026-08-21 02:38:27 +05:30
1 parent d1361aeaf2
commit 492045b24d
14 files changed
+716 -24

No files matched your search

+33
View File
@@ -37,6 +37,10 @@
#include <sound/beep.h>
#include <kernel/tsc.h>
#include <kernel/vt_art.h>
#include <drivers/cpufreq.h>
#include <drivers/virtio_gpu.h>
#include <drivers/e1000e.h>
#include <drivers/virtio_input.h>
#include <arch/arch.h>
#include <kernel/printk.h>
#include <lib/string.h>
@@ -994,6 +998,32 @@ static int applet_dnscache(int argc, char** argv) {
return 0;
}
static int applet_cpufreq(int argc, char** argv) {
if (argc >= 3 && strcmp(argv[1], "-g") == 0) {
if (cpufreq_set_governor_by_name(argv[2]) == 0) {
printk(ANSI_BRIGHT_GREEN "CPU governor switched to '%s'\n" ANSI_RESET, argv[2]);
return 0;
} else {
printk(ANSI_BRIGHT_RED "Invalid governor '%s'. Valid: performance, powersave, ondemand, conservative, schedutil\n" ANSI_RESET, argv[2]);
return 1;
}
}
cpufreq_dump_info();
return 0;
}
static int applet_gpuinfo(int argc, char** argv) {
(void)argc; (void)argv;
virtio_gpu_dump_status();
return 0;
}
static int applet_e1000e(int argc, char** argv) {
(void)argc; (void)argv;
e1000e_dump_stats();
return 0;
}
static int applet_readelf(int argc, char** argv) {
if (argc >= 2) {
int fd = vfs_open(argv[1], 0);
@@ -2144,6 +2174,9 @@ static const lazybox_applet_t applets[] = {
{"aead", applet_aead, "aead [message]", "Rust ChaCha20-Poly1305 AEAD", "Crypto"},
{"tscinfo", applet_tscinfo, "tscinfo", "Hardware TSC cycle counter", "System"},
{"vtart", applet_vtart, "vtart [--palette/--bars]", "Terminal graphics visualizer", "Terminal"},
{"cpufreq", applet_cpufreq, "cpufreq [-g governor]", "CPU frequency & P-State gov", "System"},
{"gpuinfo", applet_gpuinfo, "gpuinfo", "VirtIO-GPU hardware status", "Virtualization"},
{"e1000e", applet_e1000e, "e1000e", "Intel e1000e PCIe NIC stats", "Network"},
{NULL, NULL, NULL, NULL, NULL}
};