Skip to content

Commit d04a39b

Browse files
carga bien. Falta ver el salto al kernel
1 parent f0fccd2 commit d04a39b

File tree

14 files changed

+21
-15
lines changed

14 files changed

+21
-15
lines changed

.gdb_history

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,7 @@ dashboard
128128
si
129129
QUIT
130130
quit
131+
b to_transient_system
132+
continue
133+
si
134+
quit

asm/tsl.asm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ section .text
2626
TSL_BASE_ADDRESS equ 0x8000
2727

2828
start64:
29-
dw 0xDEFE
30-
dd start64
31-
jmp start64
3229
mov rsp, TSL_BASE_ADDRESS
3330

3431
;; El cursor quedo en el anterior loader.

asm/tsl_start.asm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
;; |^ | | | | | |
1616
;; |<-------------- 4KiB -------------->| |<---- KiB ---->|
1717
;; 0x8000 0x8200 0x2000 0x800000
18+
;;
19+
;; code 0 a 0x200 , data 0x200 a 300\
20+
;; y en 0x300 aparece tsl que se carga en 800000
1821

1922
%include "./asm/include/tsl.inc"
2023

@@ -38,8 +41,8 @@ section .text
3841
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ORG TSL_BASE_ADDRESS
3942

4043
start:
41-
db 0xAA
42-
dq start
44+
;;db 0xAA
45+
;;dq start
4346
jmp bootmode_branch ;; Overwritten with 'NOP's before AP's are started.
4447
nop
4548
db "UEFIBOOT" ;; Marca para un simple chequeo de que hay payload.

asm/uefi.asm

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
;; | | | | low | hi | | |
2020
;; +---------+--------+-------+-----+------+------------+------------+
2121
;; |^ |^ |^ |^ |^ |^ |^ ^|
22-
;; 0x0 0x200 0x1000 0x4000 0x5000 0x7000 0x40000 0xFFFFF
23-
;; 0 512B 4KiB 16KiB 20KiB 28KiB 256KiB 1MiB-1
22+
;; 0x0 0x200 0x1000 0x4000 0x4400 0x7000 0x40000 0xFFFFF
23+
;; 0 512B 4KiB 16KiB 17KiB 28KiB 256KiB 1MiB-1
2424
;;==============================================================================
2525

2626
TSL_BASE_ADDRESS equ 0x800000
@@ -762,20 +762,22 @@ exit_uefi_services:
762762
;; |<--- 12KiB --->|<------------ 228KiB ------------>|
763763
;; |^ |^ |^
764764
;; 0x800000 0x803000 0x83C000
765+
;;;;;;;;;;;;;;;;;;;;;;;;;
766+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
767+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ^^^^^----- TODO: nnooooo ... actualizar!!!!!
765768

766-
767-
;; Low tsl. 4K de los 240 del payload.
769+
;; Low primeros 0x300 bytes de los 240 del payload.
768770
mov rsi, PAYLOAD
769771
mov rdi, TSL_BASE_ADDRESS_LOW
770-
mov rcx, 4 * 1024 ;; 4KiB a partir de TSL_BASE_ADDRESS_LOW.
772+
mov rcx, 0x300 ;; ----KiB a partir de TSL_BASE_ADDRESS_LOW.
771773
rep movsb ;; ---------------------Ultimo byte escrito = TSL_BASE_ADDRESS + (240 * 1
772774
;;---------------------- 024) - 1 = 0x83BFFF
773775

774-
;; Hi tsl. Los restantes 236K.
775-
mov rsi, PAYLOAD + 4 * 1024
776+
;; Hi tsl. Los restantes 239K. Se encuentran alineados a 1K.
777+
mov rsi, PAYLOAD + 1024
776778
mov rdi, TSL_BASE_ADDRESS
777-
mov rcx, (236 * 1024) ;; 240KiB a partir de TSL_BASE_ADDRESS.
778-
rep movsb ;; Ultimo byte escrito = TSL_BASE_ADDRESS + (240 * 1
779+
mov rcx, (239 * 1024) ;; ------------- 240KiB a partir de TSL_BASE_ADDRESS.
780+
rep movsb ;; ---------------Ultimo byte escrito = TSL_BASE_ADDRESS + (240 * 1
779781
;; 024) - 1 = 0x83BFFF
780782

781783
;; mov rsi, PAYLOAD

build/tsl.sys

256 Bytes
Binary file not shown.

build/uefi.sys

0 Bytes
Binary file not shown.

obj/tsl.elf

-8 Bytes
Binary file not shown.

obj/tsl.o

-32 Bytes
Binary file not shown.

obj/tsl_start.o

-32 Bytes
Binary file not shown.

obj/uefi.elf

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)