#ifndef _LIBJOVE_ARCH_x86_64_OBJECT_PAGEMAP_H #define _LIBJOVE_ARCH_x86_64_OBJECT_PAGEMAP_H 1 #include #include #include typedef struct KernelObjectPageMap { KernelObjectTyped typed; } KernelObjectPageMap; KernelObjectPageMap *jove_object_as_pagemap(KernelObjectTyped *typed); /**@FUNC Populates a given region of memory for a page map value. * @PARAM pagemap address of pagemap cache object. * @PARAM dir directory this memory is a member of. * @PARAM memb index into directory to place object.*/ void _jove_alloc_pagemap_inplace( KernelObjectPageMap *pagemap, KernelObjectDirectory *dir, uint8_t memb); /**@FUNC Allocates a region of memory to represent a page map. * @PARAM dir directory to place new value in. * @PARAM memb index into directory to place object. * @RETURN newly allocated object. NULL on failure. * Possible failures: * EJOVE_FULL: Slot is already taken by an existing object. * EJOVE_NOALLOC: libjove does not have an allocator yet.*/ KernelObjectPageMap* _jove_alloc_pagemap( KernelObjectDirectory *dir, uint8_t memb); int jove_pagemap_exists( KernelObjectPageMap *map, uint8_t depth, uint16_t *path); JoveError jove_pagemap_map( KernelObjectPageMap *map, uint8_t depth, uint16_t *path, KernelObjectUntyped *page); JoveError jove_pagemap_map_unmap( KernelObjectPageMap *map, uint8_t depth, uint16_t *path, KernelObjectUntyped *dest); #endif