Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22997
b: refs/heads/master
c: ffa930e
h: refs/heads/master
i:
  22995: a6263a0
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 23, 2006
1 parent d632f33 commit 3e0cf35
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98e7d9b0529b6a348f2978a926806930a9902067
refs/heads/master: ffa930ef55ae82c09e30b2a0c4ce5d7fdea041e2
23 changes: 10 additions & 13 deletions trunk/arch/x86_64/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
#define VGABASE ((void __iomem *)0xffffffff800b8000UL)
#endif

#define MAX_YPOS max_ypos
#define MAX_XPOS max_xpos

static int max_ypos = 25, max_xpos = 80;
static int current_ypos = 25, current_xpos = 0;

Expand All @@ -29,26 +26,26 @@ static void early_vga_write(struct console *con, const char *str, unsigned n)
int i, k, j;

while ((c = *str++) != '\0' && n-- > 0) {
if (current_ypos >= MAX_YPOS) {
if (current_ypos >= max_ypos) {
/* scroll 1 line up */
for (k = 1, j = 0; k < MAX_YPOS; k++, j++) {
for (i = 0; i < MAX_XPOS; i++) {
writew(readw(VGABASE + 2*(MAX_XPOS*k + i)),
VGABASE + 2*(MAX_XPOS*j + i));
for (k = 1, j = 0; k < max_ypos; k++, j++) {
for (i = 0; i < max_xpos; i++) {
writew(readw(VGABASE+2*(max_xpos*k+i)),
VGABASE + 2*(max_xpos*j + i));
}
}
for (i = 0; i < MAX_XPOS; i++)
writew(0x720, VGABASE + 2*(MAX_XPOS*j + i));
current_ypos = MAX_YPOS-1;
for (i = 0; i < max_xpos; i++)
writew(0x720, VGABASE + 2*(max_xpos*j + i));
current_ypos = max_ypos-1;
}
if (c == '\n') {
current_xpos = 0;
current_ypos++;
} else if (c != '\r') {
writew(((0x7 << 8) | (unsigned short) c),
VGABASE + 2*(MAX_XPOS*current_ypos +
VGABASE + 2*(max_xpos*current_ypos +
current_xpos++));
if (current_xpos >= MAX_XPOS) {
if (current_xpos >= max_xpos) {
current_xpos = 0;
current_ypos++;
}
Expand Down

0 comments on commit 3e0cf35

Please sign in to comment.