paul@355 | 1 | /* |
paul@366 | 2 | * A system pager interface. |
paul@355 | 3 | * |
paul@355 | 4 | * Copyright (C) 2022 Paul Boddie <paul@boddie.org.uk> |
paul@355 | 5 | * |
paul@355 | 6 | * This program is free software; you can redistribute it and/or |
paul@355 | 7 | * modify it under the terms of the GNU General Public License as |
paul@355 | 8 | * published by the Free Software Foundation; either version 2 of |
paul@355 | 9 | * the License, or (at your option) any later version. |
paul@355 | 10 | * |
paul@355 | 11 | * This program is distributed in the hope that it will be useful, |
paul@355 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@355 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@355 | 14 | * GNU General Public License for more details. |
paul@355 | 15 | * |
paul@355 | 16 | * You should have received a copy of the GNU General Public License |
paul@355 | 17 | * along with this program; if not, write to the Free Software |
paul@355 | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
paul@355 | 19 | * Boston, MA 02110-1301, USA |
paul@355 | 20 | */ |
paul@355 | 21 | |
paul@355 | 22 | #pragma once |
paul@355 | 23 | |
paul@355 | 24 | #include "pager_object_interface.h" |
paul@355 | 25 | |
paul@355 | 26 | |
paul@355 | 27 | |
paul@355 | 28 | /* A simple system pager also acting as a region mapper. */ |
paul@355 | 29 | |
paul@355 | 30 | class ExecPager : public PagerObject |
paul@355 | 31 | { |
paul@355 | 32 | public: |
paul@366 | 33 | virtual ~ExecPager(); |
paul@355 | 34 | |
paul@355 | 35 | /* Notification methods. */ |
paul@355 | 36 | |
paul@355 | 37 | virtual long exception(l4_exc_regs_t regs, |
paul@366 | 38 | l4_snd_fpage_t *region) = 0; |
paul@355 | 39 | |
paul@355 | 40 | virtual long page_fault(l4_umword_t pfa, l4_umword_t pc, |
paul@355 | 41 | l4_snd_fpage_t *region); |
paul@355 | 42 | |
paul@355 | 43 | /* Region manager/mapper methods. */ |
paul@355 | 44 | |
paul@355 | 45 | virtual long attach(address_t *start, offset_t size, map_flags_t flags, |
paul@355 | 46 | l4_cap_idx_t ds, address_t offset, unsigned char align); |
paul@355 | 47 | |
paul@355 | 48 | }; |
paul@355 | 49 | |
paul@355 | 50 | /* vim: tabstop=2 expandtab shiftwidth=2 |
paul@355 | 51 | */ |