Increased TX buffer size
This commit is contained in:
parent
43a0d9017c
commit
be2d14de91
1 changed files with 44 additions and 15 deletions
59
lboot.S
59
lboot.S
|
|
@ -22,6 +22,7 @@
|
||||||
.code16
|
.code16
|
||||||
|
|
||||||
.set PACKET_SIZE, 512
|
.set PACKET_SIZE, 512
|
||||||
|
.set TX_BUF_SIZE, 4096
|
||||||
|
|
||||||
.macro pxe_call, opcode
|
.macro pxe_call, opcode
|
||||||
push %eax
|
push %eax
|
||||||
|
|
@ -38,7 +39,8 @@
|
||||||
lcall *pxe_api
|
lcall *pxe_api
|
||||||
add $6, %sp
|
add $6, %sp
|
||||||
|
|
||||||
or %ss:(%bx), %ax
|
mov %ss:(%bx), %cx
|
||||||
|
or %cx, %ax
|
||||||
jnz _pcerr
|
jnz _pcerr
|
||||||
|
|
||||||
pop %edx
|
pop %edx
|
||||||
|
|
@ -76,6 +78,18 @@ _start: cli
|
||||||
call print
|
call print
|
||||||
call enable_a20
|
call enable_a20
|
||||||
|
|
||||||
|
.set PXE_GET_CACHED_INFO, 0x0071
|
||||||
|
push $0
|
||||||
|
push %cs
|
||||||
|
push $tx_buf
|
||||||
|
push $TX_BUF_SIZE
|
||||||
|
push $2
|
||||||
|
push $0
|
||||||
|
pxe_call PXE_GET_CACHED_INFO
|
||||||
|
add $12, %sp
|
||||||
|
mov tx_buf+20, %eax
|
||||||
|
mov %eax, server_ip
|
||||||
|
|
||||||
mov $msg_unreal, %si
|
mov $msg_unreal, %si
|
||||||
call print
|
call print
|
||||||
call unreal
|
call unreal
|
||||||
|
|
@ -92,18 +106,6 @@ _start: cli
|
||||||
call print
|
call print
|
||||||
call paging
|
call paging
|
||||||
|
|
||||||
.set PXE_GET_CACHED_INFO, 0x0071
|
|
||||||
push $0
|
|
||||||
push %cs
|
|
||||||
push $tx_buf
|
|
||||||
push $PACKET_SIZE
|
|
||||||
push $2
|
|
||||||
push $0
|
|
||||||
pxe_call PXE_GET_CACHED_INFO
|
|
||||||
add $12, %sp
|
|
||||||
mov tx_buf+20, %eax
|
|
||||||
mov %eax, server_ip
|
|
||||||
|
|
||||||
mov $msg_read, %si
|
mov $msg_read, %si
|
||||||
call print
|
call print
|
||||||
mov $fn_initrd, %esi
|
mov $fn_initrd, %esi
|
||||||
|
|
@ -432,8 +434,33 @@ long:
|
||||||
hang: hlt
|
hang: hlt
|
||||||
jmp hang
|
jmp hang
|
||||||
|
|
||||||
_pcerr: mov $msg_pcerr, %si
|
_pcerr: push %cx
|
||||||
|
|
||||||
|
mov $msg_pcerr, %si
|
||||||
call print
|
call print
|
||||||
|
|
||||||
|
pop %cx
|
||||||
|
push %cx
|
||||||
|
|
||||||
|
xor %bx, %bx
|
||||||
|
mov %ch, %bl
|
||||||
|
mov hex_digits(%bx), %bl
|
||||||
|
mov %bx, tx_buf
|
||||||
|
mov $tx_buf, %si
|
||||||
|
call print
|
||||||
|
|
||||||
|
pop %cx
|
||||||
|
push %cx
|
||||||
|
|
||||||
|
xor %bx, %bx
|
||||||
|
mov %cl, %bl
|
||||||
|
mov hex_digits(%bx), %bl
|
||||||
|
mov %bx, tx_buf
|
||||||
|
mov $tx_buf, %si
|
||||||
|
call print
|
||||||
|
|
||||||
|
pop %cx
|
||||||
|
|
||||||
jmp hang
|
jmp hang
|
||||||
|
|
||||||
// gdt16: Protected mode / Unreal mode 16-bit GDT
|
// gdt16: Protected mode / Unreal mode 16-bit GDT
|
||||||
|
|
@ -513,7 +540,7 @@ pml4_ptr: .long 0
|
||||||
// Points to the end of the memory map
|
// Points to the end of the memory map
|
||||||
memmap_end: .short 0
|
memmap_end: .short 0
|
||||||
|
|
||||||
tx_buf: .space PACKET_SIZE
|
tx_buf: .space TX_BUF_SIZE
|
||||||
|
|
||||||
.code64
|
.code64
|
||||||
// trampo64: Trampoline function to load long-mode segments
|
// trampo64: Trampoline function to load long-mode segments
|
||||||
|
|
@ -579,6 +606,8 @@ type_table: .byte 0
|
||||||
// - Sanitizing the memmap
|
// - Sanitizing the memmap
|
||||||
// - Parsing a config file
|
// - Parsing a config file
|
||||||
|
|
||||||
|
hex_digits: .ascii "0123456789ABCDEF"
|
||||||
|
|
||||||
.section .data.bootboot
|
.section .data.bootboot
|
||||||
bootboot: .ascii "BOOT"
|
bootboot: .ascii "BOOT"
|
||||||
bb_size: .long 128
|
bb_size: .long 128
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue