From e46551eebeeed2e79f1784f1c2b5f48c65d95b1d Mon Sep 17 00:00:00 2001 From: Joursoir Date: Fri, 1 Oct 2021 12:19:08 +0000 Subject: x86/boot/head: check a20 line --- arch/x86/boot/head.s | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/x86/boot') diff --git a/arch/x86/boot/head.s b/arch/x86/boot/head.s index a1bc6d1..d24e36c 100644 --- a/arch/x86/boot/head.s +++ b/arch/x86/boot/head.s @@ -23,5 +23,13 @@ _start: mov $0x90000, %ebp # Update stack position so it is right mov %ebp, %esp # at the top of the free space. +check_a20: + mov $0x112345, %edi # Odd megabyte address + mov $0x012345, %esi # Even megabyte address + mov %esi, (%esi) # If A20 line is disabled two pointers + mov %edi, (%edi) # would point to the address 0x012345 + cmpsd # Compare values at addresses + je . # If equivalent, loop forever + call kernel_main jmp . # infinite loop -- cgit v1.2.3-18-g5258