Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
998d5867a4 | ||
|
b30aa9a64e | ||
|
a8b94bdc32 | ||
|
fdb0b43c04 | ||
|
7aa7a42406 | ||
|
64c2150067 |
5
Makefile
5
Makefile
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user