limine_requests.h (779B)
1 #ifndef LIMINE_REQUESTS_H 2 #define LIMINE_REQUESTS_H 3 4 #include "limine.h" 5 6 // Only define once to avoid duplicates (result: kernel panic) 7 #ifdef DEFINE_LIMINE_REQUESTS 8 9 __attribute__((used, section(".limine_requests"))) 10 volatile LIMINE_BASE_REVISION(3); 11 12 __attribute__((used, section(".limine_requests"))) 13 volatile struct limine_framebuffer_request framebuffer_request = { 14 .id = LIMINE_FRAMEBUFFER_REQUEST, 15 .revision = 0 16 }; 17 18 __attribute__((used, section(".limine_requests_start"))) 19 volatile LIMINE_REQUESTS_START_MARKER 20 21 __attribute__((used, section(".limine_requests_end"))) 22 volatile LIMINE_REQUESTS_END_MARKER; 23 24 #else 25 26 // External declaration for other files 27 extern volatile struct limine_framebuffer_request framebuffer_request; 28 29 #endif 30 31 #endif // LIMINE_REQUESTS_H