# HG changeset patch # User Paul Boddie # Date 1650983694 -7200 # Node ID f7b1aaad7f8661de3d5e6c372e9b5a2e7dc0a1fd # Parent 03f89f48f859ab72a84ea6275c6e3a5ef3d20c5f Added a function for defining flexpage receive windows. diff -r 03f89f48f859 -r f7b1aaad7f86 libipc/include/ipc/util_ipc.h --- a/libipc/include/ipc/util_ipc.h Tue Apr 26 00:38:25 2022 +0200 +++ b/libipc/include/ipc/util_ipc.h Tue Apr 26 16:34:54 2022 +0200 @@ -1,7 +1,7 @@ /* * Interprocess communication abstractions. * - * Copyright (C) 2018, 2019, 2021 Paul Boddie + * Copyright (C) 2018, 2019, 2021, 2022 Paul Boddie * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -36,6 +36,7 @@ long _expect_capabilities(l4_buf_regs_t *bregs, int number); long _expect_capability(l4_buf_regs_t *bregs, int item); +long _expect_fpage(l4_buf_regs_t *bregs, int item, l4_umword_t map_control, l4_fpage_t fpage); void _export_capability(l4_msgtag_t tag, l4_msg_regs_t *mregs, int item, l4_cap_idx_t ref); void _export_fpage(l4_msgtag_t tag, l4_msg_regs_t *mregs, int item, l4_snd_fpage_t fpage); void _export_page(l4_msgtag_t tag, l4_msg_regs_t *mregs, int item, l4_umword_t hot_spot, l4_fpage_t fpage); diff -r 03f89f48f859 -r f7b1aaad7f86 libipc/lib/src/util_ipc.c --- a/libipc/lib/src/util_ipc.c Tue Apr 26 00:38:25 2022 +0200 +++ b/libipc/lib/src/util_ipc.c Tue Apr 26 16:34:54 2022 +0200 @@ -1,7 +1,7 @@ /* * Interprocess communication abstractions. * - * Copyright (C) 2018, 2019, 2021 Paul Boddie + * Copyright (C) 2018, 2019, 2021, 2022 Paul Boddie * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -64,6 +64,17 @@ return L4_EOK; } +/* Indicate that a flexpage is expected at the given position. */ + +long _expect_fpage(l4_buf_regs_t *bregs, int item, l4_umword_t map_control, l4_fpage_t fpage) +{ + bregs->bdr = 0; + bregs->br[item] = map_control; + bregs->br[item + 1] = fpage.raw; + + return L4_EOK; +} + /* Export in the message at the given position the given capability. */ void _export_capability(l4_msgtag_t tag, l4_msg_regs_t *mregs, int item, l4_cap_idx_t ref)