Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2783 → Rev 2784

/trunk/kernel/arch/amd64/include/cpu.h
35,8 → 35,9
#ifndef KERN_amd64_CPU_H_
#define KERN_amd64_CPU_H_
 
#define RFLAGS_IF (1 << 9)
#define RFLAGS_RF (1 << 16)
#define RFLAGS_IF (1 << 9)
#define RFLAGS_DF (1 << 10)
#define RFLAGS_RF (1 << 16)
 
#define EFER_MSR_NUM 0xc0000080
#define AMD_SCE_FLAG 0
/trunk/kernel/arch/amd64/src/syscall.c
62,9 → 62,11
write_msr(AMD_MSR_LSTAR, (uint64_t)syscall_entry);
/* Mask RFLAGS on syscall
* - disable interrupts, until we exchange the stack register
* (mask the IE bit)
* (mask the IF bit)
* - clear DF so that the string instructions operate in
* the right direction
*/
write_msr(AMD_MSR_SFMASK, 0x200);
write_msr(AMD_MSR_SFMASK, RFLAGS_IF | RFLAGS_DF);
}
 
/** @}
/trunk/kernel/arch/amd64/src/asm_utils.S
248,6 → 248,7
.endif
 
save_all_gpr
cld
 
movq $(\i), %rdi # %rdi - first parameter
movq %rsp, %rsi # %rsi - pointer to istate
/trunk/kernel/arch/amd64/src/boot/boot.S
54,6 → 54,7
.long multiboot_image_start
 
multiboot_image_start:
cld
movl $START_STACK, %esp # initialize stack pointer
lgdtl bootstrap_gdtr # initialize Global Descriptor Table register
 
126,7 → 127,6
mov $vesa_init, %esi
mov $VESA_INIT_SEGMENT << 4, %edi
mov $e_vesa_init - vesa_init, %ecx
cld
rep movsb
 
mov $VESA_INIT_SEGMENT << 4, %edi
282,7 → 282,6
movq $BOOT_OFFSET, %rsi
movq $AP_BOOT_OFFSET, %rdi
movq $_hardcoded_unmapped_size, %rcx
cld
rep movsb
#endif
556,7 → 555,6
addl %eax, %edi
movw $0x0c00, %ax # black background, light red foreground
cld
ploop:
lodsb
/trunk/kernel/arch/ia32/src/asm.S
173,6 → 173,7
movw %ax, %ds
movw %ax, %es
cld
sti
# syscall_handler(edx, ecx, ebx, esi, edi, ebp, eax)
call syscall_handler
233,6 → 234,8
movw %ax, %ds
movw %ax, %es
 
cld
 
pushl %esp # *istate
pushl $(\i) # intnum
call exc_dispatch # excdispatch(intnum, *istate)
/trunk/kernel/arch/ia32/src/boot/boot.S
50,6 → 50,7
.long multiboot_image_start
multiboot_image_start:
cld
movl $START_STACK, %esp # initialize stack pointer
lgdt KA2PA(bootstrap_gdtr) # initialize Global Descriptor Table register
 
85,7 → 86,6
mov $vesa_init, %esi
mov $VESA_INIT_SEGMENT << 4, %edi
mov $e_vesa_init - vesa_init, %ecx
cld
rep movsb
 
mov $VESA_INIT_SEGMENT << 4, %edi
206,7 → 206,6
movl $BOOT_OFFSET, %esi
movl $AP_BOOT_OFFSET, %edi
movl $_hardcoded_unmapped_size, %ecx
cld
rep movsb
#endif
279,7 → 278,6
addl %eax, %edi
movw $0x0c00, %ax # black background, light red foreground
cld
ploop:
lodsb