File tree Expand file tree Collapse file tree 3 files changed +1888
-0
lines changed
Expand file tree Collapse file tree 3 files changed +1888
-0
lines changed Original file line number Diff line number Diff line change 1+ ;;==============================================================================
2+ ;; Transient System Load | @file /asm/tsl_ap.asm
3+ ;;=============================================================================
4+ ;; Recibe la informacion del sistema. Hace configuraciones basicas del mismo. Co
5+ ;; pia el kernel a su ubicacion final. Salta al punto de entrada _start del kern
6+ ;; el en 0x100000.
7+ ;;=============================================================================
8+
9+
10+ global bootmode
11+
12+
13+ ;; 1 pagina reservada en 0x8000 para booteo en 16 bits de los ap. Terminado ese
14+ ;; codigo, se salta a 0x800000.
15+
16+
17+ section .text
18+
19+
20+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;BITS 16
21+
22+ ap_startup:
23+ cli
24+ xor eax , eax
25+ xor ebx , ebx
26+ xor ecx , ecx
27+ xor edx , edx
28+ xor esi , esi
29+ xor edi , edi
30+ xor ebp , ebp
31+ mov ds , ax
32+ mov es , ax
33+ mov ss , ax
34+ mov fs , ax
35+ mov gs , ax
36+ mov esp , 0x7000
37+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;jmp 0x0000:init_smp_ap
38+
39+ %include "./asm/init/smp_ap.asm" ;; AP's will start execution at TSL_BASE_ADD
40+ ;; RESS and fall through to this code.
41+
42+ ;;==============================================================================
43+ ;; 32-bit code. Instructions must also be 64 bit compatible. If a 'U' is stored
44+ ;; at 0x5FFF then we know it was a UEFI boot and immediately proceed to start64.
45+ ;; Otherwise we need to set up a minimal 64-bit environment.
46+
47+ BITS 32
48+
49+ bootmode:
50+ cmp bl , 'U' ;; If uefi boot then already in 64 bit mode.
51+ je start64
52+
53+ %ifdef BIOS
54+ %include "./asm/bios/bios_32_64.asm"
55+ %endif
56+
You can’t perform that action at this time.
0 commit comments