File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ extern "C" {
2525
2626 extern uintptr_t _end;
2727
28- // Function to deterimine the end of multiboot provided data
28+ // Deterimine the end of multiboot provided data
2929 // (e.g. multiboot's data area as offset to the _end symbol)
3030 uintptr_t _multiboot_free_begin (uintptr_t boot_addr){
3131
@@ -34,8 +34,12 @@ extern "C" {
3434
3535 if (bootinfo->flags & MULTIBOOT_INFO_CMDLINE
3636 and bootinfo->cmdline > multi_end) {
37- debug (" * Multiboot cmdline end: 0x%x \n " , bootinfo->cmdline );
38- multi_end = bootinfo->cmdline ;
37+
38+ debug (" * Multiboot cmdline @ 0x%x: %s \n " , bootinfo->cmdline , (char *)bootinfo->cmdline );
39+
40+ // Set free begin to after the cmdline string
41+ multi_end = bootinfo->cmdline +
42+ strlen (reinterpret_cast <const char *>(bootinfo->cmdline )) + 1 ;
3943 }
4044
4145 debug (" * Multiboot end: 0x%x \n " , multi_end);
You can’t perform that action at this time.
0 commit comments