Debian Codegraph @

purgatory/arch/x86_64/purgatory-x86_64.c

raw
1 #include <stdint.h>
2 #include <stddef.h>
3 #include <purgatory.h>
4 #include "purgatory-x86_64.h"
5
6 uint8_t reset_vga = 0;
7 uint8_t legacy_pic = 0;
8 uint8_t panic_kernel = 0;
9 unsigned long jump_back_entry = 0;
10 char *cmdline_end = NULL;
11
12 void setup_arch(void)
13 {
14 if (reset_vga) x86_reset_vga();
15 if (legacy_pic) x86_setup_legacy_pic();
16 }
17
18 void x86_setup_jump_back_entry(void)
19 {
20 if (cmdline_end)
21 sprintf(cmdline_end, " kexec_jump_back_entry=0x%lx",
22 jump_back_entry);
23 }
24
25 /* This function can be used to execute after the SHA256 verification. */
26 void post_verification_setup_arch(void)
27 {
28 if (panic_kernel) crashdump_backup_memory();
29 if (jump_back_entry) x86_setup_jump_back_entry();
30 }