#include <stdbool.h>
#include <stdint.h>
#include <sys/cdefs.h>
#include <sys/kdebug.h>
#include <machine/amd64.h>
#include <machine/pmap.h>
#include "vgacons.h"
Go to the source code of this file.
◆ VGA_ATC_DATA
◆ VGA_ATC_INDEX
◆ VGA_BASE
◆ VGA_GDC_DATA
◆ VGA_GDC_INDEX
◆ VGA_PAL_DATA
◆ VGA_PAL_RADDR
◆ VGA_PAL_WADDR
◆ VGA_SEQ_DATA
◆ VGA_SEQ_INDEX
◆ EnterFontMode()
void EnterFontMode |
( |
void |
| ) |
|
Definition at line 45 of file vgacons.c.
46{
47
50
53
56
59
62
65
66
67}
static INLINE uint8_t inb(uint16_t port)
static INLINE void outb(uint16_t port, uint8_t data)
static uint8_t ModeBuffer[6]
◆ ExitFontMode()
void ExitFontMode |
( |
void |
| ) |
|
◆ LockDisplay()
void LockDisplay |
( |
void |
| ) |
|
◆ Panic()
void Panic |
( |
const char * |
str | ) |
|
Definition at line 164 of file vgacons.c.
165{
167 __asm__("int3");
168 while (1)
169 {
170 __asm__("hlt");
171 }
172}
void VGA_Puts(const char *str)
◆ UnlockDisplay()
void UnlockDisplay |
( |
void |
| ) |
|
◆ VGA_Init()
Definition at line 75 of file vgacons.c.
76{
77 int i = 0;
78
80 {
82 }
83
86
87
88
89
90
91
92}
static short * VideoBuffer
static unsigned char TextAttribute
◆ VGA_LateInit()
void VGA_LateInit |
( |
void |
| ) |
|
◆ VGA_Putc()
Definition at line 115 of file vgacons.c.
116{
118 switch (c & 0xFF)
119 {
120 case '\b':
124 }
125 break;
126 case '\n':
129 } else {
131 }
133 break;
134 case '\r':
135 break;
136 case '\t':
141 break;
142 default:
148 } else {
150 }
152 }
153 break;
154 }
155}
void VGA_ScrollDisplay(void)
◆ VGA_Puts()
void VGA_Puts |
( |
const char * |
str | ) |
|
Definition at line 157 of file vgacons.c.
158{
159 const char *p = str;
160 while (*p != '\0')
162}
◆ VGA_ScrollDisplay()
void VGA_ScrollDisplay |
( |
void |
| ) |
|
Definition at line 100 of file vgacons.c.
101{
102 int i,j;
103 for (i = 1; i <
SizeY; i++)
104 {
105 for (j = 0; j <
SizeX; j++)
106 {
108 }
109 }
110 for (j = 0; j <
SizeX; j++)
112 return;
113}
◆ CurrentX
◆ CurrentY
◆ ModeBuffer
◆ SizeX
◆ SizeY
◆ TextAttribute
unsigned char TextAttribute = 0x70 |
|
static |
◆ VideoBuffer