summaryrefslogtreecommitdiff
path: root/gpxe/src/arch/i386/core/video_subr.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2016-02-09 18:08:47 -0800
committerH. Peter Anvin <hpa@zytor.com>2016-02-09 18:08:47 -0800
commitf2f897a1762fab84d2905f32b1c15dd7b42abb56 (patch)
treea38f51d3f1fcbf44afddb4736d549c12eaf491be /gpxe/src/arch/i386/core/video_subr.c
parent72d2959272b4616f17a97667e6dfa9d06bf109a3 (diff)
downloadsyslinux-f2f897a1762fab84d2905f32b1c15dd7b42abb56.tar.gz
gpxe: delete long since obsolete snapshot of gPXE
gPXE has been deprecated in favor of iPXE for many, many years now. It is much better than users get it directly from the iPXE project, since we should no longer need any special modifications for Syslinux use. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'gpxe/src/arch/i386/core/video_subr.c')
-rw-r--r--gpxe/src/arch/i386/core/video_subr.c104
1 files changed, 0 insertions, 104 deletions
diff --git a/gpxe/src/arch/i386/core/video_subr.c b/gpxe/src/arch/i386/core/video_subr.c
deleted file mode 100644
index c821cd02..00000000
--- a/gpxe/src/arch/i386/core/video_subr.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- * modified from linuxbios code
- * by Cai Qiang <rimy2000@hotmail.com>
- *
- */
-
-#include "stddef.h"
-#include "string.h"
-#include <gpxe/io.h>
-#include "console.h"
-#include <gpxe/init.h>
-#include "vga.h"
-
-struct console_driver vga_console;
-
-static char *vidmem; /* The video buffer */
-static int video_line, video_col;
-
-#define VIDBUFFER 0xB8000
-
-static void memsetw(void *s, int c, unsigned int n)
-{
- unsigned int i;
- u16 *ss = (u16 *) s;
-
- for (i = 0; i < n; i++) {
- ss[i] = ( u16 ) c;
- }
-}
-
-static void video_init(void)
-{
- static int inited=0;
-
- vidmem = (char *)phys_to_virt(VIDBUFFER);
-
- if (!inited) {
- video_line = 0;
- video_col = 0;
-
- memsetw(vidmem, VGA_ATTR_CLR_WHT, 2*1024); //
-
- inited=1;
- }
-}
-
-static void video_scroll(void)
-{
- int i;
-
- memcpy(vidmem, vidmem + COLS * 2, (LINES - 1) * COLS * 2);
- for (i = (LINES - 1) * COLS * 2; i < LINES * COLS * 2; i += 2)
- vidmem[i] = ' ';
-}
-
-static void vga_putc(int byte)
-{
- if (byte == '\n') {
- video_line++;
- video_col = 0;
-
- } else if (byte == '\r') {
- video_col = 0;
-
- } else if (byte == '\b') {
- video_col--;
-
- } else if (byte == '\t') {
- video_col += 4;
-
- } else if (byte == '\a') {
- //beep
- //beep(500);
-
- } else {
- vidmem[((video_col + (video_line *COLS)) * 2)] = byte;
- vidmem[((video_col + (video_line *COLS)) * 2) +1] = VGA_ATTR_CLR_WHT;
- video_col++;
- }
- if (video_col < 0) {
- video_col = 0;
- }
- if (video_col >= COLS) {
- video_line++;
- video_col = 0;
- }
- if (video_line >= LINES) {
- video_scroll();
- video_line--;
- }
- // move the cursor
- write_crtc((video_col + (video_line *COLS)) >> 8, CRTC_CURSOR_HI);
- write_crtc((video_col + (video_line *COLS)) & 0x0ff, CRTC_CURSOR_LO);
-}
-
-struct console_driver vga_console __console_driver = {
- .putchar = vga_putc,
- .disabled = 1,
-};
-
-struct init_fn video_init_fn __init_fn ( INIT_EARLY ) = {
- .initialise = video_init,
-};