# HG changeset patch # User Paul Boddie # Date 1685306109 -7200 # Node ID a9f3e40e79ee69660cf8b8fcea3185195f512920 # Parent 7aa21a758551cc1b2d6e08c68dba1e98726c154b Incorporated API changes made to the L4Re distribution since Subversion r83. diff -r 7aa21a758551 -r a9f3e40e79ee pkg/devices/input/src/keypad/input-keypad-client.cc --- a/pkg/devices/input/src/keypad/input-keypad-client.cc Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/devices/input/src/keypad/input-keypad-client.cc Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * Common keypad client functionality for input event generation. * - * Copyright (C) 2018 Paul Boddie + * Copyright (C) 2018, 2023 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 @@ -70,7 +70,7 @@ /* Attach the keypad data to a region in this task. */ if (L4Re::Env::env()->rm()->attach(&_keymem, _mem->size(), - L4Re::Rm::Search_addr, + L4Re::Rm::F::Search_addr, L4::Ipc::make_cap_rw(_mem))) return; diff -r 7aa21a758551 -r a9f3e40e79ee pkg/devices/lcd/include/lcd-device.h --- a/pkg/devices/lcd/include/lcd-device.h Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/devices/lcd/include/lcd-device.h Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * LCD device support. * - * Copyright (C) 2018 Paul Boddie + * Copyright (C) 2018, 2023 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 @@ -32,6 +32,7 @@ #ifdef __cplusplus #include +#include #include class Lcd_device @@ -47,7 +48,8 @@ /* Framebuffer virtual and physical addresses. */ - l4_addr_t fb_vaddr, fb_paddr; + l4_addr_t fb_vaddr; + L4Re::Dma_space::Dma_addr fb_paddr; /* Memory capability for the framebuffer. */ diff -r 7aa21a758551 -r a9f3e40e79ee pkg/devices/lcd/include/lcd-jz4740-device.h --- a/pkg/devices/lcd/include/lcd-jz4740-device.h Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/devices/lcd/include/lcd-jz4740-device.h Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * LCD device support for the JZ4740 and related SoCs. * - * Copyright (C) 2018 Paul Boddie + * Copyright (C) 2018, 2023 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 @@ -22,8 +22,10 @@ #pragma once #include + #include "lcd-device.h" +#include #include #include @@ -37,7 +39,8 @@ { /* DMA descriptor virtual and physical addresses. */ - l4_addr_t desc_vaddr, desc_paddr; + l4_addr_t desc_vaddr; + L4Re::Dma_space::Dma_addr desc_paddr; protected: /* Device-specific memory allocation. */ diff -r 7aa21a758551 -r a9f3e40e79ee pkg/devices/lcd/src/jz4740/lcd-jz4740-device.cc --- a/pkg/devices/lcd/src/jz4740/lcd-jz4740-device.cc Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/devices/lcd/src/jz4740/lcd-jz4740-device.cc Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * Common LCD device support for the JZ4740 and related SoCs. * - * Copyright (C) 2018, 2020 Paul Boddie + * Copyright (C) 2018, 2020, 2023 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 @@ -28,11 +28,14 @@ #include "lcd-jz4740-device.h" #include +#include #include #include #include #include +#include #include +#include #include @@ -124,9 +127,10 @@ l4_size_t fb_size_out, desc_size_out; - // Memory allocation capability. + // Memory allocation capabilities. L4::Cap descmem; + L4::Cap dma; // Test for existing setup. @@ -141,6 +145,28 @@ descmem = L4Re::Util::cap_alloc.alloc(); if (!descmem.is_valid()) return 1; + dma = L4Re::Util::cap_alloc.alloc(); + if (!dma.is_valid()) return 1; + + // Create the DMA space. + + L4::Cap vbus = L4Re::Env::env()->get_cap("vbus"); + if (!vbus.is_valid()) return 1; + + if (l4_error(L4Re::Env::env()->user_factory()->create(dma))) + return 1; + + l4vbus_device_handle_t device = L4VBUS_NULL; + l4vbus_resource_t dma_resource; + + if (!find_resource(&device, &dma_resource, L4VBUS_RESOURCE_DMA_DOMAIN)) + return 1; + + if (vbus->assign_dma_domain(dma_resource.start, + L4VBUS_DMAD_BIND | L4VBUS_DMAD_L4RE_DMA_SPACE, + dma)) + return 1; + // Obtain the memory requirements. Lcd_jz4740_chip *chip = static_cast(_chip); @@ -161,13 +187,15 @@ // Map the allocated memory, obtaining virtual addresses. - const l4_size_t attach_flags = L4Re::Rm::Search_addr | L4Re::Rm::Eager_map; + const L4Re::Rm::F::Flags flags = L4Re::Rm::F::Search_addr | + L4Re::Rm::F::Eager_map | + L4Re::Rm::F::RW; fb_vaddr = 0; desc_vaddr = 0; - if (L4Re::Env::env()->rm()->attach(&fb_vaddr, fb_size, attach_flags, _fbmem, 0) || - L4Re::Env::env()->rm()->attach(&desc_vaddr, desc_size, attach_flags, descmem, 0)) + if (L4Re::Env::env()->rm()->attach(&fb_vaddr, fb_size, flags, _fbmem, 0) || + L4Re::Env::env()->rm()->attach(&desc_vaddr, desc_size, flags, descmem, 0)) return 1; // Obtain physical addresses for the framebuffer and descriptors. @@ -178,8 +206,16 @@ fb_size_out = fb_size; desc_size_out = desc_size; - if (_fbmem->phys(0, fb_paddr, fb_size_out) || - descmem->phys(0, desc_paddr, desc_size_out)) + if (dma->map(L4::Ipc::make_cap_rw(_fbmem), 0, &fb_size_out, + L4Re::Dma_space::Attributes::None, + L4Re::Dma_space::Direction::To_device, + &fb_paddr)) + return 1; + + if (dma->map(L4::Ipc::make_cap_rw(descmem), 0, &desc_size_out, + L4Re::Dma_space::Attributes::None, + L4Re::Dma_space::Direction::To_device, + &desc_paddr)) return 1; // Test the mapped region sizes. diff -r 7aa21a758551 -r a9f3e40e79ee pkg/devices/lib/panel/src/loader/panel-loader.cc --- a/pkg/devices/lib/panel/src/loader/panel-loader.cc Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/devices/lib/panel/src/loader/panel-loader.cc Sun May 28 22:35:09 2023 +0200 @@ -21,6 +21,7 @@ #include #include "panel-loader.h" +#include void *load_panel() { diff -r 7aa21a758551 -r a9f3e40e79ee pkg/devices/util/include/memory.h --- a/pkg/devices/util/include/memory.h Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/devices/util/include/memory.h Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * Memory and resource allocation utility functions. * - * Copyright (C) 2018, 2019 Paul Boddie + * Copyright (C) 2018, 2019, 2023 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 @@ -27,13 +27,16 @@ EXTERN_C_BEGIN +int find_resource(l4vbus_device_handle_t *device, l4vbus_resource_t *resource, + enum l4vbus_resource_type_t type); + int get_device(char const *hid, l4io_device_handle_t *dh, l4io_resource_handle_t *rh); int get_irq(char const *hid, l4_uint32_t *start, l4_uint32_t *end); int get_resource(l4io_device_handle_t dh, l4io_resource_t *res, - enum l4io_resource_types_t type); + enum l4vbus_resource_type_t type); int get_memory(char const *hid, l4_addr_t *start, l4_addr_t *end); diff -r 7aa21a758551 -r a9f3e40e79ee pkg/devices/util/src/dataspace.cc --- a/pkg/devices/util/src/dataspace.cc Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/devices/util/src/dataspace.cc Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * Data space allocation utility functions. * - * Copyright (C) 2018 Paul Boddie + * Copyright (C) 2018, 2023 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 @@ -52,7 +52,7 @@ /* Map the memory to a virtual address. */ - if (L4Re::Env::env()->rm()->attach(allocated, mem->size(), L4Re::Rm::Search_addr, + if (L4Re::Env::env()->rm()->attach(allocated, mem->size(), L4Re::Rm::F::Search_addr, L4::Ipc::make_cap_rw(mem))) { L4Re::Util::cap_alloc.free(mem); diff -r 7aa21a758551 -r a9f3e40e79ee pkg/devices/util/src/memory.cc --- a/pkg/devices/util/src/memory.cc Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/devices/util/src/memory.cc Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * Memory and resource allocation utility functions. * - * Copyright (C) 2018, 2019 Paul Boddie + * Copyright (C) 2018, 2019, 2023 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 @@ -45,7 +45,7 @@ if (result < 0) return result; - result = get_resource(dh, &res, L4IO_RESOURCE_IRQ); + result = get_resource(dh, &res, L4VBUS_RESOURCE_IRQ); if (result) return result; @@ -57,7 +57,7 @@ } int get_resource(l4io_device_handle_t dh, l4io_resource_t *res, - enum l4io_resource_types_t type) + enum l4vbus_resource_type_t type) { int current = 0, result = 0; l4_cap_idx_t vbus = l4re_env_get_cap("vbus"); @@ -84,7 +84,7 @@ if (result < 0) return result; - result = get_resource(dh, &res, L4IO_RESOURCE_MEM); + result = get_resource(dh, &res, L4VBUS_RESOURCE_MEM); if (result) return result; @@ -99,3 +99,39 @@ return 0; } + +static int _find_resource(l4vbus_device_handle_t device, + l4vbus_resource_t *resource, + enum l4vbus_resource_type_t type, + l4vbus_device_t info) +{ + l4_cap_idx_t vbus = l4re_env_get_cap("vbus"); + + for (unsigned int i = 0; i < info.num_resources; i++) + { + int result = l4vbus_get_resource(vbus, device, i, resource); + + if (!result && (resource->type == type)) + return 1; + } + + return 0; +} + +int find_resource(l4vbus_device_handle_t *device, l4vbus_resource_t *resource, + enum l4vbus_resource_type_t type) +{ + l4_cap_idx_t vbus = l4re_env_get_cap("vbus"); + l4vbus_device_t info; + + /* Search within devices only, not within the top-level of the bus itself. */ + + while (!l4vbus_get_next_device(vbus, L4VBUS_ROOT_BUS, device, + L4VBUS_MAX_DEPTH, &info)) + { + if (_find_resource(*device, resource, type, info)) + return 1; + } + + return 0; +} diff -r 7aa21a758551 -r a9f3e40e79ee pkg/landfall-examples/ci20_hdmi_i2c/ci20_hdmi_i2c.c --- a/pkg/landfall-examples/ci20_hdmi_i2c/ci20_hdmi_i2c.c Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/landfall-examples/ci20_hdmi_i2c/ci20_hdmi_i2c.c Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * Access the HDMI I2C peripheral on the MIPS Creator CI20 board. * - * Copyright (C) 2020 Paul Boddie + * Copyright (C) 2020, 2023 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 @@ -30,12 +30,15 @@ #include #include +#include #include #include #include #include +#include #include +#include #include #include #include @@ -146,9 +149,10 @@ /* Allocated memory. */ - l4_cap_idx_t desc_mem, fb_mem; + l4_cap_idx_t desc_mem, fb_mem, dma, vbus; l4_size_t desc_size, desc_psize, fb_size, fb_psize; - l4_addr_t desc_addr, desc_paddr, fb_addr, fb_paddr; + l4_addr_t desc_addr, fb_addr; + l4re_dma_space_dma_addr_t desc_paddr, fb_paddr; unsigned char *picture; unsigned char *fb_picture, *fb_picture_row; unsigned int x, y; @@ -157,17 +161,19 @@ l4_uint32_t hdmi_irq_start = 0, hdmi_irq_end = 0; l4_uint32_t lcd_irq_start = 0, lcd_irq_end = 0; - l4_cap_idx_t icucap, hdmi_irq, lcd_irq; + l4_cap_idx_t icu, hdmi_irq, lcd_irq; /* Capability allocation. */ desc_mem = l4re_util_cap_alloc(); fb_mem = l4re_util_cap_alloc(); + dma = l4re_util_cap_alloc(); hdmi_irq = l4re_util_cap_alloc(); lcd_irq = l4re_util_cap_alloc(); - icucap = l4re_env_get_cap("icu"); + icu = l4re_env_get_cap("icu"); + vbus = l4re_env_get_cap("vbus"); - if (l4_is_invalid_cap(icucap)) + if (l4_is_invalid_cap(icu)) { printf("No 'icu' capability available in the virtual bus.\n"); return 1; @@ -208,10 +214,10 @@ /* Bind interrupt objects to IRQ numbers. Here, the first HDMI interrupt is bound, this being the general HDMI interrupt. */ - err = l4_error(l4_icu_bind(icucap, + err = l4_error(l4_icu_bind(icu, item_in_range(hdmi_irq_start, hdmi_irq_end, 0), hdmi_irq)) || - l4_error(l4_icu_bind(icucap, + l4_error(l4_icu_bind(icu, item_in_range(lcd_irq_start, lcd_irq_end, 0), lcd_irq)); @@ -353,38 +359,75 @@ jz4780_hdmi_enable(hdmi, jz4780_cpm_get_lcd_pixel_frequency(cpm)); + /* Create the DMA space. */ + + err = l4_error(l4_factory_create(l4re_env()->mem_alloc, L4RE_PROTO_DMA_SPACE, dma)); + + if (err) + { + printf("Could not create DMA space: %s\n", l4sys_errtostr(err)); + return 1; + } + + l4vbus_device_handle_t device = L4VBUS_NULL; + l4vbus_resource_t dma_resource; + + if (!find_resource(&device, &dma_resource, L4VBUS_RESOURCE_DMA_DOMAIN)) + { + printf("Could not find DMA domain.\n"); + return 1; + } + + err = l4vbus_assign_dma_domain(vbus, dma_resource.start, + L4VBUS_DMAD_BIND | L4VBUS_DMAD_L4RE_DMA_SPACE, + dma); + + if (err) + { + printf("Could not assign DMA space: %s\n", l4sys_errtostr(err)); + return 1; + } + /* Allocate descriptors and framebuffer at 2**8 == 256 byte == 64 word alignment. */ desc_size = jz4740_lcd_get_descriptors_size(lcd); fb_size = jz4740_lcd_get_screen_size(lcd); - if (l4re_ma_alloc_align(desc_size, desc_mem, L4RE_MA_CONTINUOUS | L4RE_MA_PINNED, 8) || - l4re_ma_alloc_align(fb_size, fb_mem, L4RE_MA_CONTINUOUS | L4RE_MA_PINNED, 8)) + err = l4re_ma_alloc_align(desc_size, desc_mem, L4RE_MA_CONTINUOUS | L4RE_MA_PINNED, 8) || + l4re_ma_alloc_align(fb_size, fb_mem, L4RE_MA_CONTINUOUS | L4RE_MA_PINNED, 8); + + if (err) { - printf("Could not allocate memory.\n"); + printf("Could not allocate memory: %s\n", l4sys_errtostr(err)); return 1; } - if (l4re_rm_attach((void **) &desc_addr, desc_size, - L4RE_RM_SEARCH_ADDR | L4RE_RM_EAGER_MAP, - desc_mem, 0, L4_PAGESHIFT) || - l4re_rm_attach((void **) &fb_addr, fb_size, - L4RE_RM_SEARCH_ADDR | L4RE_RM_EAGER_MAP, - fb_mem, 0, L4_PAGESHIFT)) + err = l4re_rm_attach((void **) &desc_addr, desc_size, + L4RE_RM_F_SEARCH_ADDR | L4RE_RM_F_EAGER_MAP | L4RE_RM_F_RW, + desc_mem, 0, L4_PAGESHIFT) || + l4re_rm_attach((void **) &fb_addr, fb_size, + L4RE_RM_F_SEARCH_ADDR | L4RE_RM_F_EAGER_MAP | L4RE_RM_F_RW, + fb_mem, 0, L4_PAGESHIFT); + + if (err) { - printf("Could not map memory.\n"); + printf("Could not map memory: %s\n", l4sys_errtostr(err)); return 1; } - if (l4re_ds_phys(desc_mem, 0, &desc_paddr, &desc_psize) || - l4re_ds_phys(fb_mem, 0, &fb_paddr, &fb_psize)) + err = l4re_dma_space_map(dma, desc_mem | L4_CAP_FPAGE_RW, 0, &desc_psize, 0, + L4RE_DMA_SPACE_TO_DEVICE, &desc_paddr) || + l4re_dma_space_map(dma, fb_mem | L4_CAP_FPAGE_RW, 0, &fb_psize, 0, + L4RE_DMA_SPACE_TO_DEVICE, &fb_paddr); + + if (err) { - printf("Could not get physical addresses for memory.\n"); + printf("Could not get physical addresses for memory: %s\n", l4sys_errtostr(err)); return 1; } - printf("Descriptors at %lx/%lx, size %d/%d.\n", desc_addr, desc_paddr, desc_size, desc_psize); - printf("Framebuffer at %lx/%lx, size %d/%d.\n", fb_addr, fb_paddr, fb_size, fb_psize); + printf("Descriptors at %lx/%llx, size %d/%d.\n", desc_addr, desc_paddr, desc_size, desc_psize); + printf("Framebuffer at %lx/%llx, size %d/%d.\n", fb_addr, fb_paddr, fb_size, fb_psize); //memset((void *) fb_addr, 0x7f, fb_size); diff -r 7aa21a758551 -r a9f3e40e79ee pkg/landfall-examples/ci20_leds/ci20_leds.c --- a/pkg/landfall-examples/ci20_leds/ci20_leds.c Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/landfall-examples/ci20_leds/ci20_leds.c Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * (c) 2008-2009 Adam Lackorzynski * economic rights: Technische Universität Dresden (Germany) - * Copyright (C) 2017, 2018 Paul Boddie + * Copyright (C) 2017, 2018, 2023 Paul Boddie * * This file is part of TUD:OS and distributed under the terms of the * GNU General Public License 2. @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -224,7 +225,7 @@ /* Attach ourselves to the interrupt handler. */ - tag = l4_irq_attach(irqcap, 0xDEAD, l4re_env()->main_thread); + tag = l4_rcv_ep_bind_thread(irqcap, l4re_env()->main_thread, 0xDEAD); if ((err = l4_error(tag))) { diff -r 7aa21a758551 -r a9f3e40e79ee pkg/landfall-examples/input_event_client/input_event_client.cc --- a/pkg/landfall-examples/input_event_client/input_event_client.cc Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/landfall-examples/input_event_client/input_event_client.cc Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * Access an input device via a capability. * - * Copyright (C) 2018 Paul Boddie + * Copyright (C) 2018, 2023 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 @@ -273,7 +273,7 @@ void *evmem = 0; - if (L4Re::Env::env()->rm()->attach(&evmem, mem->size(), L4Re::Rm::Search_addr, + if (L4Re::Env::env()->rm()->attach(&evmem, mem->size(), L4Re::Rm::F::Search_addr, L4::Ipc::make_cap_rw(mem))) return 1; diff -r 7aa21a758551 -r a9f3e40e79ee pkg/landfall-examples/keypad_ds_client/keypad_ds_client.cc --- a/pkg/landfall-examples/keypad_ds_client/keypad_ds_client.cc Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/landfall-examples/keypad_ds_client/keypad_ds_client.cc Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * Display the keypad matrix using the specified dimensions. * - * Copyright (C) 2018 Paul Boddie + * Copyright (C) 2018, 2023 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 @@ -156,7 +156,7 @@ /* Attach the keypad data to a region in this task. */ - if (L4Re::Env::env()->rm()->attach(&keymem, mem->size(), L4Re::Rm::Search_addr, + if (L4Re::Env::env()->rm()->attach(&keymem, mem->size(), L4Re::Rm::F::Search_addr, L4::Ipc::make_cap_rw(mem))) return 1; diff -r 7aa21a758551 -r a9f3e40e79ee pkg/landfall-examples/keypad_ds_client/keypad_ds_client_c.c --- a/pkg/landfall-examples/keypad_ds_client/keypad_ds_client_c.c Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/landfall-examples/keypad_ds_client/keypad_ds_client_c.c Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * Display the keypad matrix using the specified dimensions. * - * Copyright (C) 2018 Paul Boddie + * Copyright (C) 2018, 2023 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 @@ -163,7 +163,7 @@ /* Attach the keypad data to a region in this task. */ - if (l4re_rm_attach(&keymem, l4re_ds_size(mem), L4RE_RM_SEARCH_ADDR, mem, 0, + if (l4re_rm_attach(&keymem, l4re_ds_size(mem), L4RE_RM_F_SEARCH_ADDR, mem, 0, L4_PAGESHIFT)) return 1; diff -r 7aa21a758551 -r a9f3e40e79ee pkg/landfall-examples/letux400_keypad_physical/letux400_keypad_physical.c --- a/pkg/landfall-examples/letux400_keypad_physical/letux400_keypad_physical.c Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/landfall-examples/letux400_keypad_physical/letux400_keypad_physical.c Sun May 28 22:35:09 2023 +0200 @@ -2,7 +2,7 @@ * Display the physical keypad matrix layout for the Letux 400 notebook * computer. * - * Copyright (C) 2018 Paul Boddie + * Copyright (C) 2018, 2023 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 @@ -300,7 +300,7 @@ /* Attach the keypad data to a region in this task. */ - if (l4re_rm_attach(&keymem, l4re_ds_size(mem), L4RE_RM_SEARCH_ADDR, mem, 0, + if (l4re_rm_attach(&keymem, l4re_ds_size(mem), L4RE_RM_F_SEARCH_ADDR, mem, 0, L4_PAGESHIFT)) return 1; diff -r 7aa21a758551 -r a9f3e40e79ee pkg/landfall-examples/qi_lb60_keypad_physical/qi_lb60_keypad_physical.c --- a/pkg/landfall-examples/qi_lb60_keypad_physical/qi_lb60_keypad_physical.c Tue Sep 27 23:21:50 2022 +0200 +++ b/pkg/landfall-examples/qi_lb60_keypad_physical/qi_lb60_keypad_physical.c Sun May 28 22:35:09 2023 +0200 @@ -1,7 +1,7 @@ /* * Display the physical keypad matrix layout for the Ben NanoNote. * - * Copyright (C) 2018 Paul Boddie + * Copyright (C) 2018, 2023 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 @@ -294,7 +294,7 @@ /* Attach the keypad data to a region in this task. */ - if (l4re_rm_attach(&keymem, l4re_ds_size(mem), L4RE_RM_SEARCH_ADDR, mem, 0, + if (l4re_rm_attach(&keymem, l4re_ds_size(mem), L4RE_RM_F_SEARCH_ADDR, mem, 0, L4_PAGESHIFT)) return 1;