wip: pic. sending to continue on main pc

This commit is contained in:
Karina
2025-12-27 17:09:14 +04:00
parent 144ac4e581
commit 18b3e9cbe7
8 changed files with 65 additions and 14 deletions
+8 -1
View File
@@ -1,3 +1,6 @@
#ifndef IO_H
#define IO_H
static inline void outb(unsigned short port, unsigned char val) {
__asm__ volatile(
"outb %0, %1"
@@ -15,4 +18,8 @@ static inline unsigned char inb(unsigned short port) {
);
return ret;
}
}
void io_wait();
#endif
+4
View File
@@ -0,0 +1,4 @@
#ifndef PIC_H
#define PIC_H
#endif
-1
View File
@@ -19,7 +19,6 @@
#define PTE_GET_ADDR(entry) ((entry) & PTE_ADDR_MASK) // get physical address
#define PTE_GET_FLAGS(entry) ((entry) & ~PTE_ADDR_MASK) // get flags
#define VMM_PT_INDEX(virt) (((virt) >> 12) & 0x1FF) // Table Index (bits 12-20)
#define VMM_PD_INDEX(virt) (((virt) >> 21) & 0x1FF) // Page Directory Index (bits 21-29)
#define VMM_PDPT_INDEX(virt) (((virt) >> 30) & 0x1FF) // PDPT Index (bits 30-38)