1 -- vim: ft=lua ts=2 et sw=2 2 3 -- Start the framebuffer driver with supporting devices. 4 -- The target platform is the MIPS Creator CI20. 5 6 local L4 = require("L4"); 7 8 local l = L4.default_loader; 9 10 -- Define general access to peripherals. 11 12 local io_buses = { 13 common = l:new_channel(); 14 }; 15 16 l:start({ 17 caps = { 18 common = io_buses.common:svr(), 19 icu = L4.Env.icu, 20 sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), 21 }, 22 }, 23 "rom/io rom/hw_devices.io rom/mips-ci20-common.io"); 24 25 -- Expose the CPM peripheral. 26 27 local cpm = l:new_channel(); 28 29 l:start({ 30 caps = { 31 vbus = io_buses.common, 32 cpm = cpm:svr(), 33 }, 34 }, 35 "rom/dev_cpm_jz4780"); 36 37 -- Expose a display device for the CI20. 38 39 local display = l:new_channel(); -- exposes display device 40 41 l:start({ 42 caps = { 43 cpm = cpm, 44 display = display:svr(), 45 icu = L4.Env.icu, 46 vbus = io_buses.common, -- for HDMI resource access 47 }, 48 }, 49 "rom/dev_display_ci20_hdmi"); 50 51 -- Expose a framebuffer device. 52 53 local fbdrv_fb = l:new_channel(); 54 55 l:start({ 56 caps = { 57 vbus = io_buses.common, 58 fb = fbdrv_fb:svr(), 59 cpm = cpm, 60 display = display, -- needed by LCD driver 61 }, 62 }, 63 "rom/fb-drv");