Compare commits

...

6 Commits

Author SHA1 Message Date
K. Lange
998d5867a4 boot: disable ATA drivers by default 2022-01-12 21:25:44 +09:00
K. Lange
b30aa9a64e kernel: Fixup PIC initialization issue that only showed up in v86? 2022-01-12 21:25:26 +09:00
K. Lange
a8b94bdc32 kernel: fix tss size 2022-01-12 21:25:07 +09:00
K. Lange
fdb0b43c04 debug_sh: Fix old bug that broke serial console 2022-01-12 21:24:48 +09:00
K. Lange
7aa7a42406 base: Disable ramdisk compression, it's way too slow on silly emulators 2022-01-12 21:24:29 +09:00
K. Lange
64c2150067 v1.14.1 2021-06-06 16:24:26 +09:00
8 changed files with 29 additions and 12 deletions

View File

@ -265,8 +265,9 @@ base/bin/%.krk: apps/%.krk
# Ramdisk
fatbase/ramdisk.igz: ${RAMDISK_FILES} $(shell find base) Makefile util/createramdisk.py | dirs
python3 util/createramdisk.py
gzip -c fatbase/ramdisk.img > fatbase/ramdisk.igz
rm fatbase/ramdisk.img
#gzip -c fatbase/ramdisk.img > fatbase/ramdisk.igz
#rm fatbase/ramdisk.img
mv fatbase/ramdisk.img fatbase/ramdisk.igz
# CD image

View File

@ -1,7 +1,7 @@
PRETTY_NAME="ToaruOS 1.10"
PRETTY_NAME="ToaruOS 1.14"
NAME="ToaruOS"
VERSION_ID="1.10.9"
VERSION="1.10.9"
VERSION_ID="1.14.1"
VERSION="1.14.1"
ID=toaru
HOME_URL="https://toaruos.org/"
SUPPORT_URL="https://github.com/klange/toaruos"

View File

@ -124,7 +124,7 @@ int kmain() {
"Enable the legacy ATA driver, which does not support",
"ATAPI or use DMA. May be necessary in some virtual machines.");
BOOT_OPTION(_normal_ata, 1, "DMA ATA driver",
BOOT_OPTION(_normal_ata, 0, "DMA ATA driver",
"Enable the normal, DMA-capable ATA driver. This is the default.",
NULL);

View File

@ -522,7 +522,11 @@ done:
int i = dir_entry->extent_start_LSB;
int sectors = dir_entry->extent_length_LSB / 2048 + 1;
size_t off = 0;
#if 0
#define RAMDISK_OFFSET 0x5000000
#else
#define RAMDISK_OFFSET ramdisk_off
#endif
#define SECTORS 512
while (sectors >= SECTORS) {
print_(".");
@ -538,13 +542,19 @@ done:
off += 2048 * sectors;
}
#if 0
inputPtr = (uint8_t*)RAMDISK_OFFSET;
outputPtr = (uint8_t*)ramdisk_off;
print_("\nDecompressing ramdisk... ");
if (gzip_decompress()) {
print_("Failed?\n");
}
print_("Done!\n");
ramdisk_len = (uint32_t)outputPtr - ramdisk_off;
#else
ramdisk_len = dir_entry->extent_length_LSB;
outputPtr = ramdisk_off + ramdisk_len;
#endif
modules_mboot[multiboot_header.mods_count-1].mod_start = ramdisk_off;
modules_mboot[multiboot_header.mods_count-1].mod_end = ramdisk_off + ramdisk_len;

View File

@ -87,7 +87,7 @@ void gdt_install(void) {
static void write_tss(int32_t num, uint16_t ss0, uint32_t esp0) {
tss_entry_t * tss = &gdt.tss;
uintptr_t base = (uintptr_t)tss;
uintptr_t limit = base + sizeof *tss;
uintptr_t limit = sizeof *tss;
/* Add the TSS descriptor to the GDT */
gdt_set_gate(num, base, limit, 0xE9, 0x00);

View File

@ -116,6 +116,10 @@ void irq_uninstall_handler(size_t irq) {
}
static void irq_remap(void) {
uint8_t pic1 = inportb(PIC1_DATA);
uint8_t pic2 = inportb(PIC2_DATA);
/* Cascade initialization */
outportb(PIC1_COMMAND, ICW1_INIT|ICW1_ICW4); PIC_WAIT();
outportb(PIC2_COMMAND, ICW1_INIT|ICW1_ICW4); PIC_WAIT();
@ -131,6 +135,9 @@ static void irq_remap(void) {
/* Request 8086 mode on each PIC */
outportb(PIC1_DATA, 0x01); PIC_WAIT();
outportb(PIC2_DATA, 0x01); PIC_WAIT();
outportb(PIC1_DATA, pic1);
outportb(PIC2_DATA, pic2);
}
static void irq_setup_gates(void) {

View File

@ -18,7 +18,7 @@ char * __kernel_version_format = "%d.%d.%d-%s";
/* Version numbers X.Y.Z */
int __kernel_version_major = 1;
int __kernel_version_minor = 14;
int __kernel_version_lower = 0;
int __kernel_version_lower = 1;
/* Kernel build suffix, which doesn't necessarily
* mean anything, but can be used to distinguish

View File

@ -718,10 +718,9 @@ static void debug_shell_run(void * data, char * name) {
fs_node_t * tty = kopen("/dev/ttyS0", 0);
int fd = process_append_fd((process_t *)current_process, tty);
current_process->fds->modes[fd] = 03; /* rw */
process_move_fd((process_t *)current_process, fd, 0);
process_move_fd((process_t *)current_process, fd, 1);
process_move_fd((process_t *)current_process, fd, 2);
fd = process_append_fd((process_t *)current_process, tty);
fd = process_append_fd((process_t *)current_process, tty);
current_process->fds->modes[1] = 03; /* rw */
debug_shell_actual(tty, name);
}