|
1 | | -; ============================================================================= |
2 | | -; Pure64 -- a 64-bit OS/software loader written in Assembly for x86-64 systems |
3 | | -; Copyright (C) 2008-2025 Return Infinity -- see LICENSE.TXT |
4 | | -; |
5 | | -; The first stage loader is required to gather information about the system |
6 | | -; while the BIOS or UEFI is still available and load the Pure64 binary to |
7 | | -; 0x00008000. Setup a minimal 64-bit environment, copy the 64-bit kernel from |
8 | | -; the end of the Pure64 binary to the 1MiB memory mark and jump to it. |
| 1 | +;;============================================================================= |
| 2 | +;; The first stage loader is required to gather information about the system |
| 3 | +;; while the BIOS or UEFI is still available and load the payload binary to |
| 4 | +;; 0x00008000. Setup a minimal 64-bit environment, copy the 64-bit kernel from |
| 5 | +;; the end of the payload binary to the 1MiB memory mark and jump to it. |
9 | 6 | ;;1Mib mark se refiere a copiar nuestro kernel a la dir 100000 donde a donde luego salta yendo a _start en 0x100000 |
10 | | -; |
11 | | -; Pure64 requires a payload for execution! The stand-alone pure64.sys file |
12 | | -; is not sufficient. You must append your kernel or software to the end of |
13 | | -; the Pure64 binary. The maximum size of the kernel or software is 26KiB. |
14 | | -; |
15 | | -; Windows - copy /b pure64.sys + kernel64.sys |
16 | | -; Unix - cat pure64.sys kernel64.sys > pure64.sys |
17 | | -; Max size of the resulting pure64.sys is 32768 bytes (32KiB) |
18 | | -; ============================================================================= |
| 7 | +;; |
| 8 | +;; requires a payload for execution! The stand-alone bootloader.sys file |
| 9 | +;; is not sufficient. You must append your kernel or software to the end of |
| 10 | +;; the bootloader binary. The maximum size of the kernel or software is 26KiB (a definir!!!) |
| 11 | +;;============================================================================= |
19 | 12 |
|
20 | 13 |
|
21 | 14 |
|
@@ -591,7 +584,7 @@ make_interrupt_gates: ; make gates for the other interrupts |
591 | 584 |
|
592 | 585 | lidt [IDTR64] ; load IDT register |
593 | 586 |
|
594 | | -; Patch Pure64 AP code ; The AP's will be told to start execution at 0x8000 |
| 587 | +; Patch bootloader AP code ; The AP's will be told to start execution at 0x8000 |
595 | 588 | mov edi, start ; We need to remove the BSP Jump call to get the AP's |
596 | 589 | mov eax, 0x90909090 ; to fall through to the AP Init code |
597 | 590 | stosd |
@@ -859,7 +852,7 @@ pde_end: |
859 | 852 | shr rax, 24 ; Shift to the right and AL now holds the CPU's APIC ID |
860 | 853 | shl rax, 10 ; shift left 10 bits for a 1024byte stack |
861 | 854 | add rax, 0x0000000000050400 ; stacks decrement when you "push", start at 1024 bytes in |
862 | | - mov rsp, rax ; Pure64 leaves 0x50000-0x9FFFF free so we use that |
| 855 | + mov rsp, rax ; leave 0x50000-0x9FFFF free so we use that |
863 | 856 |
|
864 | 857 | ; Build the InfoMap |
865 | 858 | xor edi, edi |
@@ -1004,7 +997,7 @@ lfb_wc_end: |
1004 | 997 | wbinvd ; Flush Cache |
1005 | 998 |
|
1006 | 999 | ; Move the trailing binary to its final location |
1007 | | - mov esi, 0x8000+UEFI_BOOTLOADER_SIZE ; Memory offset to end of pure64.sys |
| 1000 | + mov esi, 0x8000+UEFI_BOOTLOADER_SIZE ; Memory offset to end of bootloader.sys |
1008 | 1001 | |
1009 | 1002 | ;; esto es la direccion a la cual nuestro kernel se copia, tal como luego comienza ejecutando en _start en 100000 |
1010 | 1003 | mov edi, 0x100000 ; Destination address at the 1MiB mark |
@@ -1062,7 +1055,7 @@ clear_regs: |
1062 | 1055 |
|
1063 | 1056 |
|
1064 | 1057 | ;;;;;;;;;;;;;;;;;;;;;;;;hlt;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1065 | | - jmp 0x00100000 ; Done with Pure64, jump to the kernel |
| 1058 | + jmp 0x00100000 ; Done with bootloader, jump to the kernel |
1066 | 1059 |
|
1067 | 1060 |
|
1068 | 1061 | %include "init/acpi.asm" |
@@ -1329,7 +1322,7 @@ debug_progressbar: |
1329 | 1322 | %endif |
1330 | 1323 |
|
1331 | 1324 |
|
1332 | | -;;;;;;;;;;; para generar un loop y dejar q se vea mensaje antes de ir a pure |
| 1325 | +;;;;;;;;;;; para generar un loop y dejar q se vea mensaje antes de ir a bootloader |
1333 | 1326 | ;;; sacar, no va |
1334 | 1327 | ;;;time_delay dq 800000 |
1335 | 1328 |
|
|
0 commit comments