summaryrefslogtreecommitdiffstats
path: root/lib/libjove/arch/x86_64/invoke-pagemap.c
blob: 8357904c134c544500da64df37ef04b6371f62ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <arch/x86_64/object-pagemap.h>
#include <kernel/syscall.h>
#include <kernel/arch/x86_64/syscall.h>
#include <object.h>
#include <path-fromobj.h>
#include <syscall.h>
#include <jove/jove.h>

int
_syscall_invoke_mapping_get(KernelObjectPageMapping *mapping, uint16_t pmli, KernelObjectPageMapping *dest)
{
    uint8_t *syscallData = _syscall_message_ptr;
    int syscall_at = 0;

    SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, mapping);
    SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, INVOKE_MAPPING_GET, uint8_t);
    SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, pmli, uint16_t);
    SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, dest);

    return _syscall_invoke();
}