Fix everything back up.

This commit is contained in:
Kevin Lange 2011-03-28 20:41:17 -05:00
parent 516490a711
commit 14248e7ddd
2 changed files with 12 additions and 22 deletions

View File

@ -67,7 +67,7 @@ graphics_install_bochs() {
BOCHS_VID_MEMORY = (uint32_t *)((uint32_t)lfb_addr << 16);
} else {
/* Go find it */
for (uintptr_t x = (uintptr_t)herp + 0x1000; x < 0xFFFFF000; x += 0x1000) {
for (uintptr_t x = 0xE0000000; x < 0xFFFFF000; x += 0x1000) {
if (((uintptr_t *)x)[0] == 0xA5ADFACE) {
BOCHS_VID_MEMORY = (uint32_t *)x;
break;
@ -75,15 +75,6 @@ graphics_install_bochs() {
}
}
for (uint16_t x = 0; x < 1024; ++x) {
for (uint16_t y = 0; y < 768; ++y) {
BOCHS_VID_MEMORY[y * 1024 + x] = 0xFFFFFF;
}
}
//HALT_AND_CATCH_FIRE("Herp");
bochs_resolution_x = PREFERRED_X;
bochs_resolution_y = PREFERRED_Y;
bochs_resolution_b = PREFERRED_B;

View File

@ -146,7 +146,7 @@ int main(struct multiboot *mboot_ptr, uint32_t mboot_mag, uintptr_t esp)
fork();
if (getpid() == 0) {
while (0) {
while (1) {
uint16_t hours, minutes, seconds;
get_time(&hours, &minutes, &seconds);
@ -154,14 +154,16 @@ int main(struct multiboot *mboot_ptr, uint32_t mboot_mag, uintptr_t esp)
/* It would help a lot if I had %.2d */
/* kprintf("[%.2d:%.2d:%.2d]", hours, minutes, seconds); */
if (bochs_resolution_x) {
bochs_write_char('0' + hours / 10, bochs_resolution_x - 8 * 8 - 1, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + hours % 10, bochs_resolution_x - 8 * 7 - 1, 0, 0x00FFFFFF, 0x0);
bochs_write_char(':', bochs_resolution_x - 8 * 6 - 1, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + minutes / 10, bochs_resolution_x - 8 * 5 - 1, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + minutes % 10, bochs_resolution_x - 8 * 4 - 1, 0, 0x00FFFFFF, 0x0);
bochs_write_char(':', bochs_resolution_x - 8 * 3 - 1, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + seconds / 10, bochs_resolution_x - 8 * 2 - 1, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + seconds % 10, bochs_resolution_x - 8 * 1 - 1, 0, 0x00FFFFFF, 0x0);
bochs_write_char('[', bochs_resolution_x - 8 * 10, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + hours / 10, bochs_resolution_x - 8 * 9, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + hours % 10, bochs_resolution_x - 8 * 8, 0, 0x00FFFFFF, 0x0);
bochs_write_char(':', bochs_resolution_x - 8 * 7, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + minutes / 10, bochs_resolution_x - 8 * 6, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + minutes % 10, bochs_resolution_x - 8 * 5, 0, 0x00FFFFFF, 0x0);
bochs_write_char(':', bochs_resolution_x - 8 * 4, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + seconds / 10, bochs_resolution_x - 8 * 3, 0, 0x00FFFFFF, 0x0);
bochs_write_char('0' + seconds % 10, bochs_resolution_x - 8 * 2, 0, 0x00FFFFFF, 0x0);
bochs_write_char(']', bochs_resolution_x - 8 * 1, 0, 0x00FFFFFF, 0x0);
} else {
store_csr();
set_serial(0);
@ -181,9 +183,6 @@ int main(struct multiboot *mboot_ptr, uint32_t mboot_mag, uintptr_t esp)
}
__asm__ __volatile__ ("sti");
}
while (1) {
__asm__ __volatile__ ("hlt");
}
} else {
start_shell();
}