Skip to content

bootloader v0.11 broken under bochs and qemu/kvm #327

Description

@Stary2001

Two issues here:

  • enter_unreal_mode should be the very first thing in stage2 main, because the screen write call touches some memory above 64k (movzx ebx, byte ptr ds:[ecx] with ecx=0x13ccc)
    error output in bochs: 00017458470e[CPU0 ] read_virtual_checks(): read beyond limit

  • Rust generates some code that uses ss for accesses (mov eax, dword ptr ss:[ebp+edi*8+4], where ss is the default for ebp), and enter_unreal_mode only sets up ds. Unsure how this should be fixed properly - set ss to 32 bit as well?
    error output in bochs: 00695082304e[CPU0 ] stackPrefetch(4): access [0x00013ff8] > SS.limit [0x0000ffff]

As for why this works in qemu in emulation mode: qemu is really inaccurate :(

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions