mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Fixed compiler warnings
This commit is contained in:
parent
48e8f0c513
commit
cddf0426e3
@ -301,7 +301,7 @@ namespace APIC
|
||||
|
||||
APIC::~APIC() {}
|
||||
|
||||
void Timer::OnInterruptReceived(TrapFrame *Frame) {}
|
||||
void Timer::OnInterruptReceived(TrapFrame *Frame) { UNUSED(Frame); }
|
||||
|
||||
void Timer::OneShot(uint32_t Vector, uint64_t Miliseconds)
|
||||
{
|
||||
|
@ -85,6 +85,7 @@ namespace GlobalDescriptorTable
|
||||
{0, 0, 0, 0, 0, 0, 0},
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
void *CPUStackPointer[MAX_CPU];
|
||||
|
@ -487,6 +487,7 @@ namespace InterruptDescriptorTable
|
||||
|
||||
void Init(int Core)
|
||||
{
|
||||
UNUSED(Core);
|
||||
static int once = 0;
|
||||
if (!once++)
|
||||
{
|
||||
|
@ -6,6 +6,7 @@ int Entry(void *Info);
|
||||
|
||||
void _start(void *Raw)
|
||||
{
|
||||
UNUSED(Raw);
|
||||
error("ERROR! INVALID BOOT PROTOCOL!");
|
||||
while (1)
|
||||
asmv("hlt");
|
||||
|
@ -28,26 +28,65 @@ static const char *PageFaultDescriptions[8] = {
|
||||
SafeFunction void DivideByZeroExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Divide by zero exception\n");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void DebugExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
CrashHandler::EHPrint("\eDD2920System crashed!\n");
|
||||
CrashHandler::EHPrint("Kernel triggered debug exception.\n");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void NonMaskableInterruptExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("NMI exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void BreakpointExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Breakpoint exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void OverflowExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Overflow exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void BoundRangeExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Bound range exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void NonMaskableInterruptExceptionHandler(CHArchTrapFrame *Frame) { fixme("NMI exception"); }
|
||||
SafeFunction void BreakpointExceptionHandler(CHArchTrapFrame *Frame) { fixme("Breakpoint exception"); }
|
||||
SafeFunction void OverflowExceptionHandler(CHArchTrapFrame *Frame) { fixme("Overflow exception"); }
|
||||
SafeFunction void BoundRangeExceptionHandler(CHArchTrapFrame *Frame) { fixme("Bound range exception"); }
|
||||
SafeFunction void InvalidOpcodeExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
CrashHandler::EHPrint("\eDD2920System crashed!\n");
|
||||
CrashHandler::EHPrint("Kernel tried to execute an invalid opcode.\n");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void DeviceNotAvailableExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Device not available exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void DoubleFaultExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Double fault exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void CoprocessorSegmentOverrunExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Coprocessor segment overrun exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void InvalidTSSExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Invalid TSS exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void SegmentNotPresentExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Segment not present exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void DeviceNotAvailableExceptionHandler(CHArchTrapFrame *Frame) { fixme("Device not available exception"); }
|
||||
SafeFunction void DoubleFaultExceptionHandler(CHArchTrapFrame *Frame) { fixme("Double fault exception"); }
|
||||
SafeFunction void CoprocessorSegmentOverrunExceptionHandler(CHArchTrapFrame *Frame) { fixme("Coprocessor segment overrun exception"); }
|
||||
SafeFunction void InvalidTSSExceptionHandler(CHArchTrapFrame *Frame) { fixme("Invalid TSS exception"); }
|
||||
SafeFunction void SegmentNotPresentExceptionHandler(CHArchTrapFrame *Frame) { fixme("Segment not present exception"); }
|
||||
SafeFunction void StackFaultExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
CPU::x64::SelectorErrorCode SelCode = {.raw = Frame->ErrorCode};
|
||||
@ -229,10 +268,38 @@ SafeFunction void PageFaultExceptionHandler(CHArchTrapFrame *Frame)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
SafeFunction void x87FloatingPointExceptionHandler(CHArchTrapFrame *Frame) { fixme("x87 floating point exception"); }
|
||||
SafeFunction void AlignmentCheckExceptionHandler(CHArchTrapFrame *Frame) { fixme("Alignment check exception"); }
|
||||
SafeFunction void MachineCheckExceptionHandler(CHArchTrapFrame *Frame) { fixme("Machine check exception"); }
|
||||
SafeFunction void SIMDFloatingPointExceptionHandler(CHArchTrapFrame *Frame) { fixme("SIMD floating point exception"); }
|
||||
SafeFunction void VirtualizationExceptionHandler(CHArchTrapFrame *Frame) { fixme("Virtualization exception"); }
|
||||
SafeFunction void SecurityExceptionHandler(CHArchTrapFrame *Frame) { fixme("Security exception"); }
|
||||
SafeFunction void UnknownExceptionHandler(CHArchTrapFrame *Frame) { fixme("Unknown exception"); }
|
||||
SafeFunction void x87FloatingPointExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("x87 floating point exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void AlignmentCheckExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Alignment check exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void MachineCheckExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Machine check exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void SIMDFloatingPointExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("SIMD floating point exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void VirtualizationExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Virtualization exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void SecurityExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Security exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
SafeFunction void UnknownExceptionHandler(CHArchTrapFrame *Frame)
|
||||
{
|
||||
fixme("Unknown exception");
|
||||
UNUSED(Frame);
|
||||
}
|
||||
|
@ -110,6 +110,7 @@ namespace CrashHandler
|
||||
SafeFunction void CrashKeyboardDriver::OnInterruptReceived(void *Frame)
|
||||
#endif
|
||||
{
|
||||
UNUSED(Frame);
|
||||
uint8_t scanCode = inb(0x60);
|
||||
if (scanCode == KEY_D_TAB ||
|
||||
scanCode == KEY_D_LCTRL ||
|
||||
|
@ -20,5 +20,6 @@ namespace CrashHandler
|
||||
SafeFunction void DisplayConsoleScreen(CRData data)
|
||||
{
|
||||
EHPrint("TODO");
|
||||
UNUSED(data);
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ using namespace UniversalAsynchronousReceiverTransmitter;
|
||||
static inline __no_instrument_function void uart_wrapper(char c, void *unused)
|
||||
{
|
||||
UART(COM1).Write(c);
|
||||
(void)unused;
|
||||
UNUSED(unused);
|
||||
}
|
||||
|
||||
static inline __no_instrument_function void WritePrefix(DebugLevel Level, const char *File, int Line, const char *Function)
|
||||
|
@ -197,6 +197,7 @@ namespace Driver
|
||||
{
|
||||
SmartCriticalSection(DriverInterruptLock);
|
||||
((int (*)(void *))(Handle))(Data);
|
||||
UNUSED(Frame);
|
||||
}
|
||||
|
||||
DriverInterruptHook::DriverInterruptHook(int Interrupt, void *Address, void *ParamData) : Interrupts::Handler(Interrupt)
|
||||
|
@ -69,25 +69,35 @@ void *Drivermemset(void *Destination, int Value, unsigned long Size)
|
||||
void DriverNetSend(unsigned int DriverID, unsigned char *Data, unsigned short Size)
|
||||
{
|
||||
DumpData("DriverNetSend", Data, Size);
|
||||
UNUSED(DriverID);
|
||||
}
|
||||
|
||||
void DriverNetReceive(unsigned int DriverID, unsigned char *Data, unsigned short Size)
|
||||
{
|
||||
DumpData("DriverNetReceive", Data, Size);
|
||||
UNUSED(DriverID);
|
||||
}
|
||||
|
||||
void DriverAHCIDiskRead(unsigned int DriverID, unsigned long Sector, unsigned char *Data, unsigned int SectorCount, unsigned char Port)
|
||||
{
|
||||
DumpData("DriverDiskRead", Data, SectorCount * 512);
|
||||
UNUSED(DriverID);
|
||||
UNUSED(Sector);
|
||||
UNUSED(Port);
|
||||
}
|
||||
|
||||
void DriverAHCIDiskWrite(unsigned int DriverID, unsigned long Sector, unsigned char *Data, unsigned int SectorCount, unsigned char Port)
|
||||
{
|
||||
DumpData("DriverDiskWrite", Data, SectorCount * 512);
|
||||
UNUSED(DriverID);
|
||||
UNUSED(Sector);
|
||||
UNUSED(Port);
|
||||
}
|
||||
|
||||
char *DriverPCIGetDeviceName(unsigned int VendorID, unsigned int DeviceID)
|
||||
{
|
||||
UNUSED(VendorID);
|
||||
UNUSED(DeviceID);
|
||||
return (char *)"Unknown";
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,8 @@ namespace Driver
|
||||
{
|
||||
DriverCode Driver::DriverLoadBindInput(void *DrvExtHdr, uintptr_t DriverAddress, size_t Size, bool IsElf)
|
||||
{
|
||||
UNUSED(DrvExtHdr);
|
||||
UNUSED(IsElf);
|
||||
Memory::Tracker *Tracker = new Memory::Tracker;
|
||||
Fex *fex = (Fex *)Tracker->RequestPages(TO_PAGES(Size));
|
||||
memcpy(fex, (void *)DriverAddress, Size);
|
||||
|
@ -16,6 +16,7 @@ namespace Driver
|
||||
{
|
||||
DriverCode Driver::DriverLoadBindInterrupt(void *DrvExtHdr, uintptr_t DriverAddress, size_t Size, bool IsElf)
|
||||
{
|
||||
UNUSED(IsElf);
|
||||
Memory::Tracker *Tracker = new Memory::Tracker;
|
||||
Fex *fex = (Fex *)Tracker->RequestPages(TO_PAGES(Size));
|
||||
memcpy(fex, (void *)DriverAddress, Size);
|
||||
|
@ -16,6 +16,7 @@ namespace Driver
|
||||
{
|
||||
DriverCode Driver::DriverLoadBindPCI(void *DrvExtHdr, uintptr_t DriverAddress, size_t Size, bool IsElf)
|
||||
{
|
||||
UNUSED(IsElf);
|
||||
for (unsigned long Vidx = 0; Vidx < sizeof(((FexExtended *)DrvExtHdr)->Driver.Bind.PCI.VendorID) / sizeof(((FexExtended *)DrvExtHdr)->Driver.Bind.PCI.VendorID[0]); Vidx++)
|
||||
for (unsigned long Didx = 0; Didx < sizeof(((FexExtended *)DrvExtHdr)->Driver.Bind.PCI.DeviceID) / sizeof(((FexExtended *)DrvExtHdr)->Driver.Bind.PCI.DeviceID[0]); Didx++)
|
||||
{
|
||||
|
@ -17,6 +17,9 @@ namespace Driver
|
||||
DriverCode Driver::DriverLoadBindProcess(void *DrvExtHdr, uintptr_t DriverAddress, size_t Size, bool IsElf)
|
||||
{
|
||||
fixme("Process driver: %s", ((FexExtended *)DrvExtHdr)->Driver.Name);
|
||||
UNUSED(Size);
|
||||
UNUSED(DriverAddress);
|
||||
UNUSED(IsElf);
|
||||
return DriverCode::NOT_IMPLEMENTED;
|
||||
}
|
||||
}
|
||||
|
@ -346,8 +346,10 @@ void operator delete[](void *Pointer)
|
||||
void operator delete(void *Pointer, long unsigned int Size)
|
||||
{
|
||||
HeapFree(Pointer);
|
||||
UNUSED(Size);
|
||||
}
|
||||
void operator delete[](void *Pointer, long unsigned int Size)
|
||||
{
|
||||
HeapFree(Pointer);
|
||||
UNUSED(Size);
|
||||
}
|
||||
|
@ -30,63 +30,313 @@ __ubsan_handle_pointer_overflow_abort
|
||||
__ubsan_handle_cfi_check_fail
|
||||
*/
|
||||
|
||||
extern void __asan_report_load1(void *unknown) { ubsan("load1"); }
|
||||
extern void __asan_report_load2(void *unknown) { ubsan("load2"); }
|
||||
extern void __asan_report_load4(void *unknown) { ubsan("load4"); }
|
||||
extern void __asan_report_load8(void *unknown) { ubsan("load8"); }
|
||||
extern void __asan_report_load16(void *unknown) { ubsan("load16"); }
|
||||
extern void __asan_report_load_n(void *unknown, uintptr_t size) { ubsan("loadn"); }
|
||||
extern void __asan_report_load1(void *unknown)
|
||||
{
|
||||
ubsan("load1");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store1(void *unknown) { ubsan("store1"); }
|
||||
extern void __asan_report_store2(void *unknown) { ubsan("store2"); }
|
||||
extern void __asan_report_store4(void *unknown) { ubsan("store4"); }
|
||||
extern void __asan_report_store8(void *unknown) { ubsan("store8"); }
|
||||
extern void __asan_report_store16(void *unknown) { ubsan("store16"); }
|
||||
extern void __asan_report_store_n(void *unknown, uintptr_t size) { ubsan("storen"); }
|
||||
extern void __asan_report_load2(void *unknown)
|
||||
{
|
||||
ubsan("load2");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_load1_noabort(void *unknown) { ubsan("load1"); }
|
||||
extern void __asan_report_load2_noabort(void *unknown) { ubsan("load2"); }
|
||||
extern void __asan_report_load4_noabort(void *unknown) { ubsan("load4"); }
|
||||
extern void __asan_report_load8_noabort(void *unknown) { ubsan("load8"); }
|
||||
extern void __asan_report_load16_noabort(void *unknown) { ubsan("load16"); }
|
||||
extern void __asan_report_load_n_noabort(void *unknown, uintptr_t size) { ubsan("loadn"); }
|
||||
extern void __asan_report_load4(void *unknown)
|
||||
{
|
||||
ubsan("load4");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store1_noabort(void *unknown) { ubsan("store1"); }
|
||||
extern void __asan_report_store2_noabort(void *unknown) { ubsan("store2"); }
|
||||
extern void __asan_report_store4_noabort(void *unknown) { ubsan("store4"); }
|
||||
extern void __asan_report_store8_noabort(void *unknown) { ubsan("store8"); }
|
||||
extern void __asan_report_store16_noabort(void *unknown) { ubsan("store16"); }
|
||||
extern void __asan_report_store_n_noabort(void *unknown, uintptr_t size) { ubsan("storen"); }
|
||||
extern void __asan_report_load8(void *unknown)
|
||||
{
|
||||
ubsan("load8");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_0(uintptr_t size) { ubsan("stack malloc 0"); }
|
||||
extern void __asan_stack_malloc_1(uintptr_t size) { ubsan("stack malloc 1"); }
|
||||
extern void __asan_stack_malloc_2(uintptr_t size) { ubsan("stack malloc 2"); }
|
||||
extern void __asan_stack_malloc_3(uintptr_t size) { ubsan("stack malloc 3"); }
|
||||
extern void __asan_stack_malloc_4(uintptr_t size) { ubsan("stack malloc 4"); }
|
||||
extern void __asan_stack_malloc_5(uintptr_t size) { ubsan("stack malloc 5"); }
|
||||
extern void __asan_stack_malloc_6(uintptr_t size) { ubsan("stack malloc 6"); }
|
||||
extern void __asan_stack_malloc_7(uintptr_t size) { ubsan("stack malloc 7"); }
|
||||
extern void __asan_stack_malloc_8(uintptr_t size) { ubsan("stack malloc 8"); }
|
||||
extern void __asan_stack_malloc_9(uintptr_t size) { ubsan("stack malloc 9"); }
|
||||
extern void __asan_report_load16(void *unknown)
|
||||
{
|
||||
ubsan("load16");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_0(void *ptr, uintptr_t size) { ubsan("stack free 0"); }
|
||||
extern void __asan_stack_free_1(void *ptr, uintptr_t size) { ubsan("stack free 1"); }
|
||||
extern void __asan_stack_free_2(void *ptr, uintptr_t size) { ubsan("stack free 2"); }
|
||||
extern void __asan_stack_free_3(void *ptr, uintptr_t size) { ubsan("stack free 3"); }
|
||||
extern void __asan_stack_free_4(void *ptr, uintptr_t size) { ubsan("stack free 4"); }
|
||||
extern void __asan_stack_free_5(void *ptr, uintptr_t size) { ubsan("stack free 5"); }
|
||||
extern void __asan_stack_free_6(void *ptr, uintptr_t size) { ubsan("stack free 6"); }
|
||||
extern void __asan_stack_free_7(void *ptr, uintptr_t size) { ubsan("stack free 7"); }
|
||||
extern void __asan_stack_free_8(void *ptr, uintptr_t size) { ubsan("stack free 8"); }
|
||||
extern void __asan_stack_free_9(void *ptr, uintptr_t size) { ubsan("stack free 9"); }
|
||||
extern void __asan_report_load_n(void *unknown, uintptr_t size)
|
||||
{
|
||||
ubsan("loadn");
|
||||
UNUSED(unknown);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_poison_stack_memory(void *addr, uintptr_t size) { ubsan("poison stack memory"); }
|
||||
extern void __asan_unpoison_stack_memory(void *addr, uintptr_t size) { ubsan("unpoison stack memory"); }
|
||||
extern void __asan_report_store1(void *unknown)
|
||||
{
|
||||
ubsan("store1");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store2(void *unknown)
|
||||
{
|
||||
ubsan("store2");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store4(void *unknown)
|
||||
{
|
||||
ubsan("store4");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store8(void *unknown)
|
||||
{
|
||||
ubsan("store8");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store16(void *unknown)
|
||||
{
|
||||
ubsan("store16");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store_n(void *unknown, uintptr_t size)
|
||||
{
|
||||
ubsan("storen");
|
||||
UNUSED(unknown);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_report_load1_noabort(void *unknown)
|
||||
{
|
||||
ubsan("load1");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_load2_noabort(void *unknown)
|
||||
{
|
||||
ubsan("load2");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_load4_noabort(void *unknown)
|
||||
{
|
||||
ubsan("load4");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_load8_noabort(void *unknown)
|
||||
{
|
||||
ubsan("load8");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_load16_noabort(void *unknown)
|
||||
{
|
||||
ubsan("load16");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_load_n_noabort(void *unknown, uintptr_t size)
|
||||
{
|
||||
ubsan("loadn");
|
||||
UNUSED(unknown);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_report_store1_noabort(void *unknown)
|
||||
{
|
||||
ubsan("store1");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store2_noabort(void *unknown)
|
||||
{
|
||||
ubsan("store2");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store4_noabort(void *unknown)
|
||||
{
|
||||
ubsan("store4");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store8_noabort(void *unknown)
|
||||
{
|
||||
ubsan("store8");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store16_noabort(void *unknown)
|
||||
{
|
||||
ubsan("store16");
|
||||
UNUSED(unknown);
|
||||
}
|
||||
|
||||
extern void __asan_report_store_n_noabort(void *unknown, uintptr_t size)
|
||||
{
|
||||
ubsan("storen");
|
||||
UNUSED(unknown);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_0(uintptr_t size)
|
||||
{
|
||||
ubsan("stack malloc 0");
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_1(uintptr_t size)
|
||||
{
|
||||
ubsan("stack malloc 1");
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_2(uintptr_t size)
|
||||
{
|
||||
ubsan("stack malloc 2");
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_3(uintptr_t size)
|
||||
{
|
||||
ubsan("stack malloc 3");
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_4(uintptr_t size)
|
||||
{
|
||||
ubsan("stack malloc 4");
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_5(uintptr_t size)
|
||||
{
|
||||
ubsan("stack malloc 5");
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_6(uintptr_t size)
|
||||
{
|
||||
ubsan("stack malloc 6");
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_7(uintptr_t size)
|
||||
{
|
||||
ubsan("stack malloc 7");
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_8(uintptr_t size)
|
||||
{
|
||||
ubsan("stack malloc 8");
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_malloc_9(uintptr_t size)
|
||||
{
|
||||
ubsan("stack malloc 9");
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_0(void *ptr, uintptr_t size)
|
||||
{
|
||||
ubsan("stack free 0");
|
||||
UNUSED(ptr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_1(void *ptr, uintptr_t size)
|
||||
{
|
||||
ubsan("stack free 1");
|
||||
UNUSED(ptr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_2(void *ptr, uintptr_t size)
|
||||
{
|
||||
ubsan("stack free 2");
|
||||
UNUSED(ptr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_3(void *ptr, uintptr_t size)
|
||||
{
|
||||
ubsan("stack free 3");
|
||||
UNUSED(ptr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_4(void *ptr, uintptr_t size)
|
||||
{
|
||||
ubsan("stack free 4");
|
||||
UNUSED(ptr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_5(void *ptr, uintptr_t size)
|
||||
{
|
||||
ubsan("stack free 5");
|
||||
UNUSED(ptr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_6(void *ptr, uintptr_t size)
|
||||
{
|
||||
ubsan("stack free 6");
|
||||
UNUSED(ptr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_7(void *ptr, uintptr_t size)
|
||||
{
|
||||
ubsan("stack free 7");
|
||||
UNUSED(ptr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_8(void *ptr, uintptr_t size)
|
||||
{
|
||||
ubsan("stack free 8");
|
||||
UNUSED(ptr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_stack_free_9(void *ptr, uintptr_t size)
|
||||
{
|
||||
ubsan("stack free 9");
|
||||
UNUSED(ptr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_poison_stack_memory(void *addr, uintptr_t size)
|
||||
{
|
||||
ubsan("poison stack memory");
|
||||
UNUSED(addr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_unpoison_stack_memory(void *addr, uintptr_t size)
|
||||
{
|
||||
ubsan("unpoison stack memory");
|
||||
UNUSED(addr);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_before_dynamic_init(const char *module_name)
|
||||
{
|
||||
ubsan("before dynamic init");
|
||||
UNUSED(module_name);
|
||||
}
|
||||
|
||||
extern void __asan_before_dynamic_init(const char *module_name) { ubsan("before dynamic init"); }
|
||||
extern void __asan_after_dynamic_init(void) { ubsan("after dynamic init"); }
|
||||
|
||||
extern void __asan_register_globals(void *unknown, size_t size) { ubsan("register_globals"); }
|
||||
extern void __asan_register_globals(void *unknown, size_t size)
|
||||
{
|
||||
ubsan("register_globals");
|
||||
UNUSED(unknown);
|
||||
UNUSED(size);
|
||||
}
|
||||
|
||||
extern void __asan_unregister_globals(void) { ubsan("unregister_globals"); }
|
||||
|
||||
extern void __asan_init(void) { ubsan("init"); }
|
||||
@ -291,4 +541,5 @@ void __ubsan_handle_dynamic_type_cache_miss(struct dynamic_type_cache_miss_data
|
||||
{
|
||||
if (UBSANMsg(data->location.file, data->location.line, data->location.column))
|
||||
ubsan("Dynamic type cache miss.");
|
||||
UNUSED(ptr);
|
||||
}
|
@ -320,7 +320,6 @@ namespace FileSystem
|
||||
if (strcmp(Path, ".") == 0)
|
||||
{
|
||||
FILE *file = new FILE;
|
||||
FileStatus filestatus = FileStatus::OK;
|
||||
file->Node = Parent;
|
||||
if (unlikely(!file->Node))
|
||||
file->Status = FileStatus::NOT_FOUND;
|
||||
@ -336,7 +335,6 @@ namespace FileSystem
|
||||
Parent = Parent->Parent;
|
||||
|
||||
FILE *file = new FILE;
|
||||
FileStatus filestatus = FileStatus::OK;
|
||||
file->Node = Parent;
|
||||
if (!file->Node)
|
||||
file->Status = FileStatus::NOT_FOUND;
|
||||
|
@ -13,10 +13,15 @@ EXTERNC void fprintf(FILE *stream, const char *Format, ...)
|
||||
va_start(args, Format);
|
||||
vprintf_(Format, args);
|
||||
va_end(args);
|
||||
UNUSED(stream);
|
||||
}
|
||||
|
||||
// TODO: Implement proper fputs
|
||||
EXTERNC void fputs(const char *s, FILE *stream) { printf_("%s", s); }
|
||||
EXTERNC void fputs(const char *s, FILE *stream)
|
||||
{
|
||||
printf_("%s", s);
|
||||
UNUSED(stream);
|
||||
}
|
||||
|
||||
static struct cag_option ConfigOptions[] = {
|
||||
{.identifier = 'a',
|
||||
|
@ -358,8 +358,8 @@ static inline __no_instrument_function void append_termination_with_gadget(outpu
|
||||
// only takes pointers to functions with an extra argument
|
||||
static inline __no_instrument_function void putchar_wrapper(char c, void *unused)
|
||||
{
|
||||
(void)unused;
|
||||
putchar(c);
|
||||
UNUSED(unused);
|
||||
}
|
||||
|
||||
static inline __no_instrument_function output_gadget_t discarding_gadget(void)
|
||||
|
@ -15,7 +15,7 @@ static inline SafeFunction __no_instrument_function void profiler_uart_wrapper(c
|
||||
bool renable = EnableProfiler;
|
||||
EnableProfiler = false;
|
||||
UART(COM2).Write(c);
|
||||
(void)unused;
|
||||
UNUSED(unused);
|
||||
if (renable)
|
||||
EnableProfiler = true;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ struct gcov_info
|
||||
static inline SafeFunction __no_instrument_function void gcov_uart_wrapper(char c, void *unused)
|
||||
{
|
||||
UART(COM2).Write(c);
|
||||
(void)unused;
|
||||
UNUSED(unused);
|
||||
}
|
||||
|
||||
// TODO: Implement
|
||||
@ -60,8 +60,12 @@ EXTERNC SafeFunction __no_instrument_function void __gcov_flush(void)
|
||||
|
||||
EXTERNC SafeFunction __no_instrument_function void __gcov_merge_add(gcov_type *counters, unsigned int n_counters)
|
||||
{
|
||||
UNUSED(counters);
|
||||
UNUSED(n_counters);
|
||||
}
|
||||
|
||||
EXTERNC SafeFunction __no_instrument_function void __gcov_merge_single(gcov_type *counters, unsigned int n_counters)
|
||||
{
|
||||
UNUSED(counters);
|
||||
UNUSED(n_counters);
|
||||
}
|
||||
|
@ -9,11 +9,13 @@ using namespace UniversalAsynchronousReceiverTransmitter;
|
||||
static inline SafeFunction __no_instrument_function void gprof_uart_wrapper(char c, void *unused)
|
||||
{
|
||||
UART(COM2).Write(c);
|
||||
(void)unused;
|
||||
UNUSED(unused);
|
||||
}
|
||||
|
||||
EXTERNC SafeFunction __no_instrument_function void mcount(unsigned long frompc, unsigned long selfpc)
|
||||
{
|
||||
// TODO: Implement
|
||||
/* https://docs.kernel.org/trace/ftrace-design.html */
|
||||
UNUSED(frompc);
|
||||
UNUSED(selfpc);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ static int sys_exit(SyscallsFrame *Frame, int code)
|
||||
trace("Userspace thread %s(%lld) exited with code %#llx", TaskManager->GetCurrentThread()->Name, TaskManager->GetCurrentThread()->ID, code);
|
||||
TaskManager->GetCurrentThread()->ExitCode = code;
|
||||
TaskManager->GetCurrentThread()->Status = Tasking::TaskStatus::Terminated;
|
||||
UNUSED(Frame);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -20,23 +21,31 @@ static int sys_print(SyscallsFrame *Frame, char Char, int Index)
|
||||
#ifdef DEBUG
|
||||
Display->SetBuffer(Index);
|
||||
#endif
|
||||
UNUSED(Frame);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static uintptr_t sys_request_pages(SyscallsFrame *Frame, size_t Count)
|
||||
{
|
||||
UNUSED(Frame);
|
||||
return (uintptr_t)TaskManager->GetCurrentThread()->Memory->RequestPages(Count);
|
||||
}
|
||||
|
||||
static int sys_free_pages(SyscallsFrame *Frame, uintptr_t Address, size_t Count)
|
||||
{
|
||||
TaskManager->GetCurrentThread()->Memory->FreePages((void *)Address, Count);
|
||||
UNUSED(Frame);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sys_kernelctl(SyscallsFrame *Frame, int Command, uint64_t Arg1, uint64_t Arg2, uint64_t Arg3, uint64_t Arg4)
|
||||
{
|
||||
fixme("KernelCTL: %lld", Command);
|
||||
UNUSED(Arg1);
|
||||
UNUSED(Arg2);
|
||||
UNUSED(Arg3);
|
||||
UNUSED(Arg4);
|
||||
UNUSED(Frame);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -90,6 +90,9 @@ namespace InterProcessCommunication
|
||||
handle->Listening = 1;
|
||||
handle->Error = IPCSuccess;
|
||||
|
||||
// FIXME: ID is not used.
|
||||
UNUSED(ID);
|
||||
|
||||
return IPCError{IPCSuccess};
|
||||
}
|
||||
|
||||
|
@ -45,12 +45,14 @@ namespace Tasking
|
||||
bool Security::UntrustToken(Token token)
|
||||
{
|
||||
fixme("UntrustToken->false");
|
||||
UNUSED(token);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Security::DestroyToken(Token token)
|
||||
{
|
||||
fixme("DestroyToken->false");
|
||||
UNUSED(token);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -546,6 +546,12 @@ namespace CPU
|
||||
asmv("cpuid"
|
||||
: "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx)
|
||||
: "a"(Function));
|
||||
#else
|
||||
UNUSED(Function);
|
||||
UNUSED(eax);
|
||||
UNUSED(ebx);
|
||||
UNUSED(ecx);
|
||||
UNUSED(edx);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -556,6 +562,8 @@ namespace CPU
|
||||
:
|
||||
: "r"(Address)
|
||||
: "memory");
|
||||
#else
|
||||
UNUSED(Address);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -94,8 +94,22 @@ namespace Disk
|
||||
PartitionStyle Style = PartitionStyle::Unknown;
|
||||
size_t Index = 0;
|
||||
|
||||
size_t Read(size_t Offset, size_t Count, uint8_t *Buffer) { return 0; }
|
||||
size_t Write(size_t Offset, size_t Count, uint8_t *Buffer) { return 0; }
|
||||
size_t Read(size_t Offset, size_t Count, uint8_t *Buffer)
|
||||
{
|
||||
return 0;
|
||||
UNUSED(Offset);
|
||||
UNUSED(Count);
|
||||
UNUSED(Buffer);
|
||||
}
|
||||
|
||||
size_t Write(size_t Offset, size_t Count, uint8_t *Buffer)
|
||||
{
|
||||
return 0;
|
||||
UNUSED(Offset);
|
||||
UNUSED(Count);
|
||||
UNUSED(Buffer);
|
||||
}
|
||||
|
||||
Partition() {}
|
||||
~Partition() {}
|
||||
};
|
||||
@ -111,8 +125,22 @@ namespace Disk
|
||||
bool MechanicalDisk = false;
|
||||
size_t UniqueIdentifier = 0xdeadbeef;
|
||||
|
||||
size_t Read(size_t Offset, size_t Count, uint8_t *Buffer) { return 0; }
|
||||
size_t Write(size_t Offset, size_t Count, uint8_t *Buffer) { return 0; }
|
||||
size_t Read(size_t Offset, size_t Count, uint8_t *Buffer)
|
||||
{
|
||||
return 0;
|
||||
UNUSED(Offset);
|
||||
UNUSED(Count);
|
||||
UNUSED(Buffer);
|
||||
}
|
||||
|
||||
size_t Write(size_t Offset, size_t Count, uint8_t *Buffer)
|
||||
{
|
||||
return 0;
|
||||
UNUSED(Offset);
|
||||
UNUSED(Count);
|
||||
UNUSED(Buffer);
|
||||
}
|
||||
|
||||
Drive()
|
||||
{ // TODO: Allocate buffer
|
||||
}
|
||||
|
@ -58,12 +58,12 @@ namespace UniversalAsynchronousReceiverTransmitter
|
||||
* @param Char the sent character.
|
||||
*/
|
||||
|
||||
virtual void OnSent(uint8_t Char) {}
|
||||
virtual void OnSent(uint8_t Char) { UNUSED(Char); }
|
||||
/**
|
||||
* @brief Called when a character is received.
|
||||
* @param Char the received character.
|
||||
*/
|
||||
virtual void OnReceived(uint8_t Char) {}
|
||||
virtual void OnReceived(uint8_t Char) { UNUSED(Char); }
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user