feat: introduce bootloader-agnostic Boot Contract, add btlist command to list connected Bluetooth devices

This commit is contained in:
2026-06-20 21:25:24 +02:00
parent c86650d662
commit 3f26b8cdb4
20 changed files with 904 additions and 213 deletions
+10 -10
View File
@@ -7,21 +7,21 @@
using namespace Kt;
namespace Memory {
LargestSection Scan(limine_memmap_response* mmap) {
LargestSection Scan(const montauk::boot::MemoryMap& mmap) {
LargestSection currentLargestSection{};
for (size_t i = 0; i < mmap->entry_count; i++) {
auto entry = mmap->entries[i];
for (size_t i = 0; i < mmap.count; i++) {
const auto& entry = mmap.regions[i];
if (entry->base == 0) {
if (entry.base == 0) {
continue;
}
if (entry->type == LIMINE_MEMMAP_USABLE) {
if (entry->length > currentLargestSection.size) {
if (entry.kind == montauk::boot::MemoryKind::Usable) {
if (entry.length > currentLargestSection.size) {
currentLargestSection = {
.address = (uint64_t)entry->base,
.size = entry->length
.address = entry.base,
.size = entry.length
};
}
}
@@ -33,4 +33,4 @@ namespace Memory {
return currentLargestSection;
}
};
};