# HG changeset patch # User Paul Boddie # Date 1596405939 -7200 # Node ID 6384ebc51552a2f93627e23a8fbf85a99c229ed5 # Parent 2c4a4efcd9c6bebee392b393d9a3b89bc887ee40# Parent d0f2d6374b42d37bba07a751d20802fa4cd998b4 Merged concurrent changes. diff -r 2c4a4efcd9c6 -r 6384ebc51552 conf/landfall-examples/mips-ci20-fbterminal.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/landfall-examples/mips-ci20-fbterminal.cfg Mon Aug 03 00:05:39 2020 +0200 @@ -0,0 +1,107 @@ +-- vim: ft=lua ts=2 et sw=2 + +-- Start Mag to multiplex the framebuffer showing only a single program. +-- This example shows a framebuffer terminal showing the hello example's output. +-- The target platform is the MIPS Creator CI20. + +local L4 = require("L4"); + +local l = L4.default_loader; + +-- Define general access to peripherals. + +local io_buses = { + cpm = l:new_channel(); + gpio = l:new_channel(); + hdmi = l:new_channel(); + lcd = l:new_channel(); + }; + +l:start({ + caps = { + cpm = io_buses.cpm:svr(), + gpio = io_buses.gpio:svr(), + hdmi = io_buses.hdmi:svr(), + lcd = io_buses.lcd:svr(), + + icu = L4.Env.icu, + sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), + }, + }, + "rom/io rom/hw_devices.io rom/mips-ci20-common.io"); + +-- Expose the CPM peripheral. + +local cpm = l:new_channel(); + +l:start({ + caps = { + vbus = io_buses.cpm, + cpm = cpm:svr(), + }, + }, + "rom/dev_cpm_jz4780"); + +-- Expose a display device for the CI20. + +local display = l:new_channel(); -- exposes display device + +l:start({ + caps = { + cpm = cpm, + display = display:svr(), + icu = L4.Env.icu, + vbus = io_buses.hdmi, -- for HDMI resource access + }, + }, + "rom/dev_display_ci20_hdmi"); + +-- Expose a framebuffer device. + +local fbdrv_fb = l:new_channel(); + +l:start({ + caps = { + vbus = io_buses.lcd, + fb = fbdrv_fb:svr(), + cpm = cpm, + display = display, -- needed by LCD driver + }, + }, + "rom/fb-drv"); + +-- Multiplex the framebuffer. + +local mag_caps = { + mag = l:new_channel(), + svc = l:new_channel(), + }; + +l:start({ + caps = { + vbus = io_buses.gpio, -- needed by input driver + fb = fbdrv_fb, + mag = mag_caps.mag:svr(), + svc = mag_caps.svc:svr(), + }, + }, + "rom/mag"); + +-- Show the terminal. + +local term = l:new_channel(); + +l:start({ + caps = { + fb = mag_caps.svc:create(L4.Proto.Goos, "g=1280x1014+0+0", "barheight=10"), + term = term:svr(), + }, + }, + "rom/fbterminal"); + +-- Show the hello example. + +l:start({ + log_cap = term, + }, + "rom/hello"); diff -r 2c4a4efcd9c6 -r 6384ebc51552 conf/landfall-examples/mips-ci20-fbterminal.list --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/landfall-examples/mips-ci20-fbterminal.list Mon Aug 03 00:05:39 2020 +0200 @@ -0,0 +1,21 @@ + +modaddr 0x1100000 + +entry mips-ci20-fbterminal-example +bootstrap bootstrap -serial +kernel fiasco -serial_esc +roottask moe rom/mips-ci20-fbterminal.cfg +module mips-ci20-fbterminal.cfg +module mips-ci20-common.io +module plat-mips-ci20/hw_devices.io +module l4re +module io +module ned +module fb-drv +module mag +module dev_display_ci20_hdmi +module dev_cpm_jz4780 +module fbterminal +module hello +module libpanel_ci20.so +module mips-jz4740-panel.txt diff -r 2c4a4efcd9c6 -r 6384ebc51552 pkg/devices/lib/lcd/include/lcd-jz4740-regs.h --- a/pkg/devices/lib/lcd/include/lcd-jz4740-regs.h Mon Aug 03 00:05:16 2020 +0200 +++ b/pkg/devices/lib/lcd/include/lcd-jz4740-regs.h Mon Aug 03 00:05:39 2020 +0200 @@ -53,7 +53,7 @@ Counter_position_1 = 0x078, // LCD_CPOS1 Foreground_size_1 = 0x07c, // LCD_DESSIZE1 Rgb_control = 0x090, // LCD_RGBC (JZ4780) - Alpha_levels = 0x108, // LCD_ALPHA (JZ4780) + Alpha_levels = 0x118, // LCD_ALPHA (JZ4780) Priority_level = 0x2c0, // LCD_PCFG // OSD registers.