Skip to content

Commit ad5763d

Browse files
Cleanup code and added SS register
1 parent 75078dc commit ad5763d

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

source/includes/isr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ typedef struct InterruptFrame
2020
uint64_t r11, r10, r9, r8;
2121
uint64_t rsi, rdi, rdx, rcx, rax;
2222
uint64_t int_no, err_code;
23-
uint64_t rsp, rflags, cs, rip;
23+
uint64_t rip, cs, rflags, rsp, ss;
2424
}__attribute__((packed)) InterruptFrame;
2525

2626
/**

source/kernel/C/executables/elf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111
#include <executables/elf.h>
1212
#include <fdlfcn.h>
13+
#include <graphics.h>
1314
#include <memory.h>
1415
#include <stdint.h>
1516
#include <heap.h>
@@ -285,7 +286,7 @@ static void elf_log_load_progress(uint16_t current, uint16_t total, Elf64_Phdr*
285286
bar[i] = (i < filled) ? '#' : '-';
286287
bar[20] = '\0';
287288

288-
printf("elf: [%s] %u%% (%u/%u) type=%u vaddr=%x off=%x",
289+
printf(blue_color "elf: [%s] %u% (%02u/%02u) type=%u vaddr=%x off=%x" reset_color,
289290
bar,
290291
pct,
291292
(uint32_t)(current + 1),

source/kernel/C/meltdown.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @copyright Copyright (c) Pradosh 2023
99
*
1010
*/
11+
#include <graphics.h>
1112
#include <meltdown.h>
1213
#include <isr.h> // For InterruptFrame
1314

@@ -81,6 +82,7 @@ if (frame) {
8182
frame->r9,
8283
frame->r10,
8384
frame->r11);
85+
eprintf("[MELTDOWN] regs SS = 0x%X", frame->ss);
8486
}
8587
#endif
8688
}

0 commit comments

Comments
 (0)