ahci: load AHCI as module

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-08-12 16:06:58 -04:00
commit cb2c3e1053
Signed by: michaelsshaw
GPG key ID: 5A5E0FB20708A9E7
6 changed files with 74 additions and 13 deletions

View file

@ -11,6 +11,10 @@
#define DRIVER_ENTRY_PRIORITY(fn, pr) static void (*__initcall_##fn)(void) __attribute((used, section(".initcall." #pr))) = fn
#define DRIVER_EXIT(fn) static void (*__exitcall_##fn)(void) __attribute((used, section(".exitcall"))) = fn
#define DRIVER_ALIAS(_alias) \
static const char __driver_alias_##__LINE__[] \
__attribute__((used, section(".modinfo"), aligned(1))) = "alias=" _alias
#define DRIVER_PCI 1
typedef int (*pci_init_t)(struct pci_device *dev);

View file

@ -15,6 +15,7 @@ void *memcpy_user(struct proc *proc, void *dest, const void *src, size_t num);
int memcmp(const void *aa, const void *bb, size_t num);
int strcmp(const char *a, const char *b);
int strncmp(const char *a, const char *b, size_t n);
char *strchr(const char *s, int c);
void *memset(void *str, int c, size_t n);
char *strcpy(char *dest, const char *src);
char *strncpy(char *dest, const char *src, size_t n);