Implement an ATA driver, Add vfsmount/vfsunmount syscalls

This commit is contained in:
2025-10-14 00:39:59 +02:00
parent cb9e15330e
commit 25cb309105
19 changed files with 455 additions and 58 deletions

View File

@ -7,7 +7,7 @@
#define GDT_PRESENT 0x80
#define GDT_TSS 0x89
#define KSTACK (1024*4*4096)
#define KSTACK (1024*2*4096)
ALIGNED(16) static uint8_t kernelstack[KSTACK];
typedef struct {

View File

@ -26,3 +26,21 @@ uint32_t io_in32(uint16_t port) {
void io_out32(uint16_t port, uint32_t value) {
asm volatile("outl %%eax, %%dx" :: "d"(port), "a"(value));
}
void io_ins16(uint16_t port, void *addr, int cnt) {
asm volatile(
"cld; rep insw"
: "+D"(addr), "+c"(cnt)
: "d"(port)
: "memory", "cc"
);
}
void io_outs16(uint16_t port, const void *addr, int cnt) {
asm volatile(
"cld; rep outsw"
: "+S"(addr), "+c"(cnt)
: "d"(port)
: "memory", "cc"
);
}

View File

@ -12,4 +12,7 @@ void io_out16(uint16_t port, uint16_t value);
uint32_t io_in32(uint16_t port);
void io_out32(uint16_t port, uint32_t value);
void io_ins16(uint16_t port, void *addr, int cnt);
void io_outs16(uint16_t port, const void *addr, int cnt);
#endif // HAL_IO_H_