minix/include/ddekit/pgtab.h
Ben Gras 2fe8fb192f Full switch to clang/ELF. Drop ack. Simplify.
There is important information about booting non-ack images in
docs/UPDATING. ack/aout-format images can't be built any more, and
booting clang/ELF-format ones is a little different. Updating to the
new boot monitor is recommended.

Changes in this commit:

	. drop boot monitor -> allowing dropping ack support
	. facility to copy ELF boot files to /boot so that old boot monitor
	  can still boot fairly easily, see UPDATING
	. no more ack-format libraries -> single-case libraries
	. some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases
	. drop several ack toolchain commands, but not all support
	  commands (e.g. aal is gone but acksize is not yet).
	. a few libc files moved to netbsd libc dir
	. new /bin/date as minix date used code in libc/
	. test compile fix
	. harmonize includes
	. /usr/lib is no longer special: without ack, /usr/lib plays no
	  kind of special bootstrapping role any more and bootstrapping
	  is done exclusively through packages, so releases depend even
	  less on the state of the machine making them now.
	. rename nbsd_lib* to lib*
	. reduce mtree
2012-02-14 14:52:02 +01:00

93 lines
2.2 KiB
C

/*
* \brief Virtual page-table facility
* \author Thomas Friebel <tf13@os.inf.tu-dresden.de>
* \author Christian Helmuth <ch12@os.inf.tu-dresden.de>
* \date 2006-11-03
*/
#ifndef _DDEKIT_PGTAB_H
#define _DDEKIT_PGTAB_H
#include <ddekit/ddekit.h>
#include <ddekit/types.h>
/* FIXME Region types may be defined by pgtab users. Do we really need them
* here? */
enum ddekit_pgtab_type
{
PTE_TYPE_OTHER, PTE_TYPE_LARGE, PTE_TYPE_UMA, PTE_TYPE_CONTIG
};
/**
* Set virtual->physical mapping for VM region
*
* \param virt virtual start address for region
* \param phys physical start address for region
* \param pages number of pages in region
* \param type pgtab type for region
*/
_PROTOTYPE( void ddekit_pgtab_set_region,
(void *virt, ddekit_addr_t phys, int pages, int type));
/**
* Set virtual->physical mapping for VM region given a specific size in bytes.
*
* Internally, DDEKit manages regions with pages. However, DDEs do not need to tangle
* with the underlying mechanism and therefore can use this function that takes care
* of translating a size to an amount of pages.
*/
_PROTOTYPE( void ddekit_pgtab_set_region_with_size,
(void *virt, ddekit_addr_t phys, int size, int type));
/**
* Clear virtual->physical mapping for VM region
*
* \param virt virtual start address for region
* \param type pgtab type for region
*/
_PROTOTYPE( void ddekit_pgtab_clear_region,
(void *virt, int type));
/**
* Get physical address for virtual address
*
* \param virt virtual address
*
* \return physical address
*/
_PROTOTYPE( ddekit_addr_t ddekit_pgtab_get_physaddr, (const void *virt));
/**
* Get virtual address for physical address
*
* \param physical physical address
*
* \return virtual address
*/
_PROTOTYPE( ddekit_addr_t ddekit_pgtab_get_virtaddr,
(const ddekit_addr_t physical));
/**
* Get type of VM region.
*
* \param virt virtual address
* \return VM region type
*/
_PROTOTYPE( int ddekit_pgtab_get_type, (const void *virt));
/**
* Get size of VM region.
*
* \param virt virtual address
*
* \return VM region size (in bytes)
*/
_PROTOTYPE( int ddekit_pgtab_get_size, (const void *virt));
#endif