Skip to content

Commit

Permalink
Рефакторинг кода (#129)
Browse files Browse the repository at this point in the history
Рефакторинг кода
  • Loading branch information
pimnik98 authored Jan 24, 2024
2 parents 8b85820 + 8c6f9ac commit 5b95a10
Show file tree
Hide file tree
Showing 32 changed files with 878 additions and 1,092 deletions.
393 changes: 272 additions & 121 deletions README.MD

Large diffs are not rendered by default.

191 changes: 0 additions & 191 deletions README_REALMD.MD

This file was deleted.

2 changes: 0 additions & 2 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ SOURCES=\
kernel/src/sys/cpuinfo.c \
kernel/src/sys/cpu_isr.c \
kernel/src/sys/gdt.c \
kernel/src/sys/tss.c \
kernel/src/sys/idt.c \
kernel/src/sys/isr.c \
kernel/src/io/ports.c \
kernel/src/io/serial_port.c \
Expand Down
Binary file added img/addr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/run_vb_D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/scr_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/scr_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/scr_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/scr_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/scr_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/scr_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/scr_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 26 additions & 35 deletions kernel/asm/gdt.s
Original file line number Diff line number Diff line change
@@ -1,41 +1,32 @@
.global gdt_flush

gdt_flush:

/* Load GDT */
mov 4(%esp), %eax
lgdt (%eax)

/*
mov %cr0, %eax
or $1, %al
mov %eax, %cr0
*/

mov $0x10, %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov %ax, %ss

ljmp $0x08,$flush

/* Load GDT */
mov 4(%esp), %eax
lgdt (%eax)
/* Это бит PG (Paging) */
/*
mov %cr0, %eax
or $1, %al
mov %eax, %cr0
*/
mov $0x10, %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov %ax, %ss
ljmp $0x08,$flush
flush:
ret

.global idt_flush

idt_flush:

mov 4(%esp), %eax
lidt (%eax)
ret

.global tss_flush
ret

.global tss_flush
tss_flush:
mov 4(%esp), %eax
ltr %ax
ret

mov 4(%esp), %eax
ltr %ax
ret
.global idt_flush
idt_flush:
mov 4(%esp), %eax
lidt (%eax)
ret
Loading

0 comments on commit 5b95a10

Please sign in to comment.