From 8bdb3a2d7df48b861972c4bfb58490853a228f51 Mon Sep 17 00:00:00 2001 From: Michal Januszewski Date: Tue, 16 Oct 2007 01:28:26 -0700 Subject: uvesafb: the driver core uvesafb is an enhanced version of vesafb. It uses a userspace helper (v86d) to execute calls to the x86 Video BIOS functions. The driver is not limited to any specific arch and whether it works on a given arch or not depends on that arch being supported by the userspace daemon. It has been tested on x86_32 and x86_64. A single BIOS call is represented by an instance of the uvesafb_ktask structure. This structure contains a buffer, a completion struct and a uvesafb_task substructure, containing the values of the x86 registers, a flags field and a field indicating the length of the buffer. Whenever a BIOS call is made in the driver, uvesafb_exec() builds a message using the uvesafb_task substructure and the contents of the buffer. This message is then assigned a random ack number and sent to the userspace daemon using the connector interface. The message's sequence number is used as an index for the uvfb_tasks array, which provides a mapping from the messages coming from userspace to the in-kernel uvesafb_ktask structs. The userspace daemon performs the requested operation and sends a reply in the form of a uvesafb_task struct and, optionally, a buffer. The seq and ack numbers in the reply should be exactly the same as those in the request. Each message from userspace is processed by uvesafb_cn_callback() and after passing a few sanity checks leads to the completion of a BIOS call request. Signed-off-by: Michal Januszewski Signed-off-by: Antonino Daplas Cc: Paul Mundt Cc: Paulo Marques Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/uvesafb.c | 2066 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2066 insertions(+) create mode 100644 drivers/video/uvesafb.c (limited to 'drivers/video/uvesafb.c') diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c new file mode 100644 index 000000000000..b983d262ab78 --- /dev/null +++ b/drivers/video/uvesafb.c @@ -0,0 +1,2066 @@ +/* + * A framebuffer driver for VBE 2.0+ compliant video cards + * + * (c) 2007 Michal Januszewski + * Loosely based upon the vesafb driver. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include