From d48c9cc35c591d6e225f9e1898138f97b2f840dd Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Fri, 2 Oct 2020 12:26:08 +0000 Subject: [PATCH] Fix random boot issue: 'Failed to start first app' Access to BOOT.dev variable was sometimes done with obsolete offset from non-flat-kernel ages. If you are unlucky, the ramdisk is not loaded and launcher app is not started. git-svn-id: svn://kolibrios.org@8086 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/boot/rdload.inc | 4 ++-- kernel/trunk/kernel.asm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/trunk/boot/rdload.inc b/kernel/trunk/boot/rdload.inc index 9af1795080..366cbd56e9 100644 --- a/kernel/trunk/boot/rdload.inc +++ b/kernel/trunk/boot/rdload.inc @@ -11,7 +11,7 @@ $Revision$ read_ramdisk: ; READ RAMDISK IMAGE FROM HD (only for IDE0, IDE1, IDE2, IDE3) - cmp byte [BOOT.dev+0x10000], 1 + cmp byte [BOOT.dev], 1 jne no_sys_on_hd.1 xor ebp, ebp @@ -112,7 +112,7 @@ no_sys_on_hd: DEBUGF 1, "K : RD not found\n" .1: ; test_to_format_ram_disk (need if not using ram disk) - cmp byte [BOOT.dev+0x10000], 3 + cmp byte [BOOT.dev], 3 jne not_format_ram_disk ; format_ram_disk mov edi, RAMDISK diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 163bb78ff2..61af092dce 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -697,7 +697,7 @@ endg call PIT_init ; Register ramdisk file system - cmp byte [BOOT.dev+0x10000], 1 + cmp byte [BOOT.dev], 1 je @f mov esi, boot_initramdisk