kernel - various changes

+ vmm: higher half should not be identify-mapped
+ panic: now displays current process
+ kernel: fix physical addresses (ḑ̷̩̜̦̥̰͔̻͔̖͎̳̗̫̓̓͊́̒͜ơ̸͙͎̠͎̩̤̭̬̙͚̬̣͇̤̼̑̐̿̿͆͠͝ ̷̗̟̘͎̥̤̭̂͛͆́͂͝͠ͅN̴̨̛̥̩̺͚̺̠͙̼̙̯̱͚̫̊̐̅̀̌̏͆̋̕͜͝͠ͅö̵̪͚̞̞̜͎͉̦́́̍̀̃̋̇̄̓͊̎͝t̶̡͍̩̤̹̤̂̑̓͌͂̾̑̈́͒̾̾́͐͆͊͂ ̴̨̫̺̦̊̍̒͛͌̌͂͘̚̚͘͘͝I̶̥͚̯̖̙̩͂́͜d̸̢̡̗͉̠̹̒͠e̸̡̪̺͎͖͚̗̟̟̥͍͑̈̋̉̋̓̐̊̚͘͜n̸̡̍͐͗̈͌̀̓̃́́͠t̶̢͈͈̦̻̰͎̪̰̒̄͒̃̐͜ĩ̴͕̼̻͓͚͕̲̬̤͈̜̣̐̍́̾̀̏̏̑͒̚ͅf̷̡̨̼̻̠̠͔̪͍͛y̴͉͓̓͒̆̎̚ ̶̟͙͖̙̟͍̟͕̞̥̹͇̌̉́̑͗͋̀̕ͅͅM̷͙̬̲̓a̶̫̰̞̺̖̍̀p̶̡̨̡̗̖̹̩̫̯̞̬͋͂̏̍̾̽͜ͅ ̶̧̨̧̫͉̝̮̳͎͍̱̟̪̝̀̽͑̂̿̄̈̇̓͘Ḫ̶̨̨̗̣̪͓̺͙͈͙̀ḭ̶̧̡͇̹͙̩͍͎̮̤̦̜̻͎̞̔̐̇̉̓͒͛̅̿͊̍͆͘̕g̷͖͙͍͓̯̪̩̑̑͋̈́͌͐̊̀͝͠͝ĥ̴̢̡̫̪̟̞̭̟͕̖͎͊͑͛̆͝e̴̡̨̗̱̱͙͔̻̤͎͆̒̾̾̓̈͊̓ͅr̵̛͈̩͍̔̌̃̇͊̽̀̉̽̊͌̿́ ̷̨̡̛̩̹̹̇̇̈́̑̍̊͒̄́͛H̷̨̪̜̤͍̻͎̲̜͋́̆͋̂̚͘͘͜͠ą̷̠͓̫̲́́̽̉̒͌́̓ͅl̴̢̛͈̤̺̱̙̬̆̎̄̊̈́̐̾̏̿̕f̸̢̰͓̦̺̰̯͚̣̙͔̺̂͜͜)
This commit is contained in:
RaphProductions 2025-05-16 08:01:37 +02:00
parent a8e919b033
commit b2ec036055
32 changed files with 265 additions and 265 deletions

View file

@ -6,41 +6,41 @@
struct vnode;
#define VN_FILE 1
#define VN_DIR 2
#define VN_DIR 2
typedef uint32_t vnode_type_t;
typedef struct vnode_ops {
int (*read)(struct vnode* vn, void* buf, size_t off, size_t size);
struct vnode* (*lookup)(struct vnode* vn, const char* name);
int (*read)(struct vnode *vn, void *buf, size_t off, size_t size);
struct vnode *(*lookup)(struct vnode *vn, const char *name);
} vnode_ops_t;
typedef struct vnode {
char name[256];
vnode_type_t type;
uint32_t refcount;
//struct vnode* parent;
//struct vnode* child;
//struct vnode* next;
char name[256];
vnode_type_t type;
uint32_t refcount;
// struct vnode* parent;
// struct vnode* child;
// struct vnode* next;
struct vnode_ops* ops;
void* internal;
struct vnode_ops *ops;
void *internal;
} vnode_t;
typedef struct mountpoint {
char name[32];
struct fs* fs;
vnode_t* mountpoint;
char name[32];
struct fs *fs;
vnode_t *mountpoint;
} mountpoint_t;
typedef struct fs {
char name[32];
struct vnode* root;
int (*mount)(struct vnode* mountpoint);
char name[32];
struct vnode *root;
int (*mount)(struct vnode *mountpoint);
} fs_t;
void vfs_init(void);
int vfs_mount(char *path, fs_t* fs);
int vfs_mount(char *path, fs_t *fs);
int vfs_unmount(char *path);
int vfs_open(const char* path, vnode_t** result);
int vfs_read(vnode_t* vn, void* buf, size_t off, size_t size);
int vfs_open(const char *path, vnode_t **result);
int vfs_read(vnode_t *vn, void *buf, size_t off, size_t size);