Skip to content

Commit

Permalink
Multiprocessor support
Browse files Browse the repository at this point in the history
  • Loading branch information
shoily committed Aug 15, 2020
1 parent c59183e commit 8059bd6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<b>XIS</b> operating system needs only 2MB of memory to run.<br>

It supports boot loader, kernel with protected mode, paging, E820 enumeration, interrupt and exception handling, system calls and user mode.
It supports boot loader, kernel with protected mode, paging, E820 enumeration, interrupt and exception handling, system calls, user mode, local APIC and multiprocessor.

<b>Instructions for building kernel -</b><br>
as --32 boot32.S -o boot32.o<br>
gcc -m32 -std=gnu99 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs -ffreestanding -fno-pic -Wall -Wextra -Werror -c util.c -o util.o<br>
gcc -m32 -std=gnu99 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs -ffreestanding -fno-pic -Wall -Wextra -Werror -c system.c -o system.o<br>
gcc -m32 -std=gnu99 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs -ffreestanding -fno-pic -Wall -Wextra -Werror -c apic.c -o apic.o<br>
as --32 handlr32.S -o handlr32.o<br>
as --32 mpinit.S -o mpinit.o<br>
gcc -m32 -std=gnu99 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs -ffreestanding -fno-pic -Wall -Wextra -Werror -c smp.c -o smp.o<br>
gcc -m32 -std=gnu99 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs -ffreestanding -fno-pic -Wall -Wextra -Werror -c setup32.c -o setup32.o<br>
gcc -m32 -std=gnu99 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs -ffreestanding -fno-pic -Wall -Wextra -Werror -c start.c -o start.o<br>
gcc -m32 -std=gnu99 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs -ffreestanding -fno-pic -Wall -Wextra -Werror -c memory.c -o memory.o<br>
gcc -m32 -std=gnu99 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs -ffreestanding -fno-pic -Wall -Wextra -Werror -c page32.c -o page32.o<br>
gcc -m32 -std=gnu99 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs -ffreestanding -fno-pic -Wall -Wextra -Werror -c usermode.c -o usermode.o<br>


ld -static -T kernel32.ld -m elf_i386 -nostdlib --nmagic boot32.o util.o system.o apic.o setup32.o handlr32.o memory.o page32.o usermode.o start.o -o xiskernel.elf<br>
ld -static -T kernel32.ld -m elf_i386 -nostdlib --nmagic boot32.o util.o system.o apic.o mpinit.o smp.o setup32.o handlr32.o memory.o page32.o usermode.o start.o -o xiskernel.elf<br>
objcopy -O binary xiskernel.elf xiskernel.bin<br>

<b>Instructions for building boot loader -</b><br>
Expand All @@ -30,7 +32,7 @@ dd if=xiskernel.bin of=hda.raw seek=1<br>
qemu-img convert -O qcow2 hda.raw hda.qcow2<br>

<b>Running using QEMU -</b><br>
sudo qemu-system-i386 -hda hda.qcow2 -m 2 --enable-kvm -cpu host<br>
sudo qemu-system-i386 -smp 2 -hda hda.qcow2 -m 2 --enable-kvm -cpu host<br>

<b>Contact -</b>

Expand Down

0 comments on commit 8059bd6

Please sign in to comment.