Skip to content

Commit 8e6977c

Browse files
reordenando los fuentes para separar tsl
1 parent 96683ca commit 8e6977c

File tree

15 files changed

+515
-307
lines changed

15 files changed

+515
-307
lines changed

asm/include/sysvar.inc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
;;==============================================================================
44

55

6-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cfg_smpinit: db 1 ; By default SMP is enabled. Set to 0 to disable.
7-
86
;; Memory locations
97
;; Info de video en 2 lugares para consultar: InfoMap y VBEModeInfoBlock.
108
;; Info de video desde 0x5080
@@ -69,8 +67,3 @@ p_HPET_Timers: equ SystemVariables + 0x184
6967
p_BootDisk: equ SystemVariables + 0x185 ;; 'F' for Floppy drive
7068
p_1gb_pages: equ SystemVariables + 0x186 ;; 1 if 1GB pages are supported
7169

72-
73-
74-
75-
76-
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,11 @@ ap_sleep:
154154

155155
; =============================================================================
156156
; EOF
157+
158+
159+
160+
161+
162+
163+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;%include "./asm/include/sysvar.inc"
164+
%include "./asm/sysvar_16.asm"

asm/sysvar.asm

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,14 @@
66
section .data
77

88

9-
global GDTR32 ;; Requiere ubicacion hasta FFFFFFFF.
9+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;global GDTR32 ;; Requiere ubicacion hasta FFFFFFFF.
1010
global GDTR64
1111
global SYS64_CODE_SEL
1212
global IDTR64
1313

1414
cfg_smpinit: db 1 ; By default SMP is enabled. Set to 0 to disable.
1515

1616

17-
align 16
18-
GDTR32: ;; Global Descriptors Table Register
19-
dw gdt32_end - gdt32 - 1 ;; Limit.
20-
dq gdt32 ;; Linear address of GDT
21-
22-
align 16
23-
gdt32:
24-
SYS32_NULL_SEL: equ $ - gdt32 ;; Null Segment
25-
dq 0x0000000000000000
26-
SYS32_CODE_SEL: equ $ - gdt32 ;; 32-bit code descriptor
27-
dq 0x00CF9A000000FFFF ;; 55 Granularity 4KiB, 54 Size 32bit, 4
28-
;; 7 Present, 44 Code/Data, 43 Executabl
29-
;; e, 41 Readable.
30-
SYS32_DATA_SEL: equ $ - gdt32 ;; 32-bit data descriptor
31-
dq 0x00CF92000000FFFF ;; 55 Granularity 4KiB, 54 Size 32bit, 4
32-
;; 7 Present, 44 Code/Data, 41 Writeable
33-
gdt32_end:
34-
3517
align 16
3618

3719
tGDTR64: ;; Global Descriptors Table Register

asm/sysvar_16.asm

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
;;==============================================================================
2+
;; System Variables | @file /asm/sysvar.asm
3+
;;==============================================================================
4+
5+
6+
;;global GDTR32 ;; Requiere ubicacion hasta FFFFFFFF.
7+
8+
9+
section .data
10+
11+
12+
align 16
13+
GDTR32: ;; Global Descriptors Table Register
14+
dw gdt32_end - gdt32 - 1 ;; Limit.
15+
dq gdt32 ;; Linear address of GDT
16+
17+
align 16
18+
gdt32:
19+
SYS32_NULL_SEL: equ $ - gdt32 ;; Null Segment
20+
dq 0x0000000000000000
21+
SYS32_CODE_SEL: equ $ - gdt32 ;; 32-bit code descriptor
22+
dq 0x00CF9A000000FFFF ;; 55 Granularity 4KiB, 54 Size 32bit, 4
23+
;; 7 Present, 44 Code/Data, 43 Executabl
24+
;; e, 41 Readable.
25+
SYS32_DATA_SEL: equ $ - gdt32 ;; 32-bit data descriptor
26+
dq 0x00CF92000000FFFF ;; 55 Granularity 4KiB, 54 Size 32bit, 4
27+
;; 7 Present, 44 Code/Data, 41 Writeable
28+
gdt32_end:

0 commit comments

Comments
 (0)