user mode: fix segments

main
Clyne 3 months ago
parent 6da213d840
commit 2d0245a85d
Signed by: clyne
GPG Key ID: 1B74EE6C49C96795

@ -39,5 +39,5 @@ clean:
run: myos.iso run: myos.iso
@echo " QEMU" @echo " QEMU"
@qemu-system-i386 -drive file=$<,index=2,media=cdrom -monitor stdio -no-reboot -s -S #-d int @qemu-system-i386 -drive file=$<,index=2,media=cdrom -monitor stdio -no-reboot #-s -S #-d int

@ -62,10 +62,22 @@ struct StubEntry
asm volatile(R"( asm volatile(R"(
pusha pusha
mov %%ds, %%ax
push %%ax
mov $0x10, %%ax
mov %%ax, %%ds
mov %%ax, %%es
mov %%ax, %%fs
mov %%ax, %%gs
push %0 push %0
cld cld
call interruptGeneralHandler call interruptGeneralHandler
pop %%eax pop %%eax
pop %%ax
mov %%ax, %%ds
mov %%ax, %%es
mov %%ax, %%fs
mov %%ax, %%gs
popa popa
add $0x4, %%esp add $0x4, %%esp
iret iret

@ -7,6 +7,7 @@
struct Registers struct Registers
{ {
std::uint32_t inum; std::uint32_t inum;
std::uint32_t ds;
std::uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; std::uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax;
std::uint32_t error; std::uint32_t error;
std::uint32_t eip, cs, eflags; std::uint32_t eip, cs, eflags;

Loading…
Cancel
Save