Fix minor warnings
This commit is contained in:
@ -32,7 +32,7 @@ void baseimg_init(void) {
|
||||
hal_hang();
|
||||
} else {
|
||||
LOG("baseimg", "base.img found\n");
|
||||
LOG("baseimg", "addr = %p, size = %lld\n", baseimg->address, baseimg->size);
|
||||
LOG("baseimg", "addr = %p, size = %lu\n", baseimg->address, baseimg->size);
|
||||
for (size_t i = 0; i < 30; i++) {
|
||||
kprintf("%02X ", ((uint8_t *)(baseimg->address))[i]);
|
||||
if (i > 0 && (i + 1) % 10 == 0) {
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "hal/hal.h"
|
||||
|
||||
int32_t littlefs_cleanup(struct VfsMountPoint *vmp) {
|
||||
dlfree(vmp->fs.littlefs.instance.cfg);
|
||||
dlfree((void *)vmp->fs.littlefs.instance.cfg);
|
||||
int32_t err = vmp->backingsd->cleanup(vmp->backingsd);
|
||||
if (err != E_OK) {
|
||||
return err;
|
||||
|
@ -25,7 +25,7 @@ typedef struct BackTraceFrame {
|
||||
void backtrace(BackTraceFrame *bt) {
|
||||
kprintf("Backtrace:\n");
|
||||
for (size_t frame = 0; bt; frame++) {
|
||||
kprintf(" 0x%llx\n", bt->rip);
|
||||
kprintf(" %zu: 0x%lx\n", frame, bt->rip);
|
||||
bt = bt->rbp;
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ void hal_vmm_map_kern(uint64_t targetcr3) {
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t hal_vmm_userproc_pml4_phys(Proc *proc) {
|
||||
uint64_t hal_vmm_userproc_pml4_phys(void) {
|
||||
uint8_t *cr3phys = pmm_alloc(1);
|
||||
uint64_t phys = (uint64_t)cr3phys;
|
||||
hal_memset(VIRT(phys), 0, HAL_PAGE_SIZE);
|
||||
|
@ -17,8 +17,6 @@ typedef struct VasRange {
|
||||
uint8_t pgflags;
|
||||
} PACKED VasRange;
|
||||
|
||||
struct Proc;
|
||||
|
||||
enum {
|
||||
HAL_PG_PRESENT = 1<<0,
|
||||
HAL_PG_RW = 1<<1,
|
||||
@ -60,6 +58,6 @@ void hal_vmm_map_page(uint64_t cr3phys, uint64_t virtaddr, uint64_t physaddr, ui
|
||||
uint64_t hal_vmm_current_cr3(void);
|
||||
void hal_vmm_map_range(uint64_t cr3phys, void *virtstart, void *physstart, size_t size, uint32_t flags);
|
||||
void hal_vmm_unmap_range(uint64_t cr3phys, void *virtstart, void *physstart, size_t size);
|
||||
uint64_t hal_vmm_userproc_pml4_phys(struct Proc *proc);
|
||||
uint64_t hal_vmm_userproc_pml4_phys();
|
||||
|
||||
#endif // HAL_VMM_H_
|
||||
|
@ -108,7 +108,7 @@ Proc *proc_spawnuser(char *mountpoint, char *path) {
|
||||
ksprintf(proc->name, "%s:%s", mountpoint, path);
|
||||
|
||||
hal_memset(&proc->platformdata.trapframe, 0, sizeof(proc->platformdata.trapframe));
|
||||
proc->platformdata.cr3 = hal_vmm_userproc_pml4_phys(proc);
|
||||
proc->platformdata.cr3 = hal_vmm_userproc_pml4_phys();
|
||||
|
||||
uint8_t *kstackp = (uint8_t *)pmm_alloc(PROC_STACKBLOCKS) + PROC_STACKSIZE;
|
||||
proc->platformdata.kstack = kstackp;
|
||||
|
@ -5,12 +5,13 @@
|
||||
#include <stddef.h>
|
||||
#include "spinlock/spinlock.h"
|
||||
#include "ramsd.h"
|
||||
#include "compiler/attr.h"
|
||||
|
||||
enum {
|
||||
STOREDEV_RAMSD,
|
||||
};
|
||||
|
||||
static const char *storedev_strings[] = {
|
||||
UNUSED static const char *storedev_strings[] = {
|
||||
"RAMSD",
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define SYSCALLS_MAX 0xff
|
||||
|
||||
#define SYSCALL0(name) \
|
||||
name(IntrStackFrame *frame, \
|
||||
name(UNUSED IntrStackFrame *frame, \
|
||||
UNUSED uint64_t _1, \
|
||||
UNUSED uint64_t _2, \
|
||||
UNUSED uint64_t _3, \
|
||||
@ -18,7 +18,7 @@
|
||||
)
|
||||
|
||||
#define SYSCALL1(name, arg1) \
|
||||
name(IntrStackFrame *frame, \
|
||||
name(UNUSED IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
UNUSED uint64_t _2, \
|
||||
UNUSED uint64_t _3, \
|
||||
@ -28,7 +28,7 @@
|
||||
)
|
||||
|
||||
#define SYSCALL2(name, arg1, arg2) \
|
||||
name(IntrStackFrame *frame, \
|
||||
name(UNUSED IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
uint64_t arg2, \
|
||||
UNUSED uint64_t _3, \
|
||||
@ -38,7 +38,7 @@
|
||||
)
|
||||
|
||||
#define SYSCALL3(name, arg1, arg2, arg3) \
|
||||
name(IntrStackFrame *frame, \
|
||||
name(UNUSED IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
uint64_t arg2, \
|
||||
uint64_t arg3, \
|
||||
@ -48,7 +48,7 @@
|
||||
)
|
||||
|
||||
#define SYSCALL4(name, arg1, arg2, arg3, arg4) \
|
||||
name(IntrStackFrame *frame, \
|
||||
name(UNUSED IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
uint64_t arg2, \
|
||||
uint64_t arg3, \
|
||||
@ -58,7 +58,7 @@
|
||||
)
|
||||
|
||||
#define SYSCALL5(name, arg1, arg2, arg3, arg4, arg5) \
|
||||
name(IntrStackFrame *frame, \
|
||||
name(UNUSED IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
uint64_t arg2, \
|
||||
uint64_t arg3, \
|
||||
@ -68,7 +68,7 @@
|
||||
)
|
||||
|
||||
#define SYSCALL6(name, arg1, arg2, arg3, arg4, arg5, arg6) \
|
||||
name(IntrStackFrame *frame, \
|
||||
name(UNUSED IntrStackFrame *frame, \
|
||||
uint64_t arg1, \
|
||||
uint64_t arg2, \
|
||||
uint64_t arg3, \
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "fs/portlfs/portlfs.h"
|
||||
#include "storedev/storedev.h"
|
||||
#include "sysdefs/ioctl.h"
|
||||
#include "compiler/attr.h"
|
||||
|
||||
#define VFS_MOUNTPOINT_LABEL_MAX 128
|
||||
#define VFS_MOUNTPOINTS_MAX 30
|
||||
@ -16,7 +17,7 @@ enum {
|
||||
VFS_LITTLEFS,
|
||||
};
|
||||
|
||||
static const char *vfs_strings[] = {
|
||||
UNUSED static const char *vfs_strings[] = {
|
||||
"Little FS",
|
||||
};
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#if !defined(__ASSEMBLER__)
|
||||
|
||||
__attribute__((unused))
|
||||
static const char *_ERROR_STRINGS[] = {
|
||||
"OK",
|
||||
"Out of memory",
|
||||
|
Reference in New Issue
Block a user