|
| 1 | +/* vmfs.c: FREESTANDING VM: VIRTUAL MEMORY MAPPING STUB |
| 2 | + * |
| 3 | + * $Id$ |
| 4 | + * Copyright (c) 2001-2023 Ravenbrook Limited. See end of file for license. |
| 5 | + * |
| 6 | + * .purpose: The purpose of this code is to test at compile time |
| 7 | + * whether the code MPS can be compiled as freestanding [FIXME: ref?] |
| 8 | + * with a command like:: |
| 9 | + * |
| 10 | + * gcc -nostdlib -DCONFIG_PLINTH_NONE -DCONFIG_PF_ANSI \ |
| 11 | + * --entry mps_lib_assert_fail mps.c mpslibfs.c vmfs.c |
| 12 | + * |
| 13 | + * .sources: design.mps.lib |
| 14 | + */ |
| 15 | + |
| 16 | +#include "mpm.h" |
| 17 | +#include "vm.h" |
| 18 | + |
| 19 | +SRCID(vmfs, "$Id$"); |
| 20 | + |
| 21 | + |
| 22 | +Size PageSize(void) |
| 23 | +{ |
| 24 | + NOTREACHED; |
| 25 | +} |
| 26 | + |
| 27 | + |
| 28 | +Res VMParamFromArgs(void *params, size_t paramSize, ArgList args) |
| 29 | +{ |
| 30 | + NOTREACHED; |
| 31 | +} |
| 32 | + |
| 33 | + |
| 34 | +/* VMInit -- reserve some virtual address space, and create a VM structure */ |
| 35 | + |
| 36 | +Res VMInit(VM vm, Size size, Size grainSize, void *params) |
| 37 | +{ |
| 38 | + NOTREACHED; |
| 39 | +} |
| 40 | + |
| 41 | + |
| 42 | +/* VMFinish -- release all address space and finish VM structure */ |
| 43 | + |
| 44 | +void VMFinish(VM vm) |
| 45 | +{ |
| 46 | + NOTREACHED; |
| 47 | +} |
| 48 | + |
| 49 | + |
| 50 | +/* VMMap -- map the given range of memory */ |
| 51 | + |
| 52 | +Res VMMap(VM vm, Addr base, Addr limit) |
| 53 | +{ |
| 54 | + NOTREACHED; |
| 55 | +} |
| 56 | + |
| 57 | + |
| 58 | +/* VMUnmap -- unmap the given range of memory */ |
| 59 | + |
| 60 | +void VMUnmap(VM vm, Addr base, Addr limit) |
| 61 | +{ |
| 62 | + NOTREACHED; |
| 63 | +} |
| 64 | + |
| 65 | + |
| 66 | +/* C. COPYRIGHT AND LICENSE |
| 67 | + * |
| 68 | + * Copyright (C) 2001-2023 Ravenbrook Limited <https://www.ravenbrook.com/>. |
| 69 | + * |
| 70 | + * Redistribution and use in source and binary forms, with or without |
| 71 | + * modification, are permitted provided that the following conditions are |
| 72 | + * met: |
| 73 | + * |
| 74 | + * 1. Redistributions of source code must retain the above copyright |
| 75 | + * notice, this list of conditions and the following disclaimer. |
| 76 | + * |
| 77 | + * 2. Redistributions in binary form must reproduce the above copyright |
| 78 | + * notice, this list of conditions and the following disclaimer in the |
| 79 | + * documentation and/or other materials provided with the |
| 80 | + * distribution. |
| 81 | + * |
| 82 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS |
| 83 | + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 84 | + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
| 85 | + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 86 | + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 87 | + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 88 | + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 89 | + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 90 | + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 91 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 92 | + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 93 | + */ |
0 commit comments