2020-07-12 14:30:16 -05:00
|
|
|
#include <sys/syscalls.h>
|
|
|
|
|
|
|
|
#define QUAUX(X) #X
|
|
|
|
#define QU(X) QUAUX(X)
|
|
|
|
|
2019-08-26 13:07:01 -05:00
|
|
|
long initrd_sz() {
|
|
|
|
long size;
|
|
|
|
asm volatile(" \
|
2020-07-12 14:30:16 -05:00
|
|
|
mov $" QU(SYSCALL_GET_INITRD_SZ) ", %%eax; \
|
2019-08-26 13:07:01 -05:00
|
|
|
int $80; \
|
|
|
|
":"=b"(size));
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
void initrd_get(char* initrd) {
|
|
|
|
asm volatile(" \
|
2020-07-12 14:30:16 -05:00
|
|
|
mov $" QU(SYSCALL_COPY_INITRD) ", %%eax; \
|
2019-08-26 13:07:01 -05:00
|
|
|
int $80; \
|
|
|
|
"::"b"(initrd));
|
|
|
|
}
|