[BUG] Running the boot code using qemu hangs PC
hbina opened this issue · 3 comments
hbina commented
Describe the bug
Running the boot code hangs my PC.
To Reproduce
- Copy the code from https://github.com/0xAX/linux-insides/blob/54f9314a5677c29a42eb0a304321a48361da3e24/Booting/linux-bootstrap-1.md
- Compile and run using
nasm -f bin boot.nasm && qemu-system-x86_64 boot
. - Computer hangs
Expected behavior
It runs and shouldn't hang my PC.
Additional context
hbina@akarin:~$ screenfetch -n
hbina@akarin
OS: Ubuntu 20.04 focal
Kernel: x86_64 Linux 5.15.0-46-generic
Uptime: 7m
Packages: 2076
Shell: bash 5.0.17
Resolution: 1920x1080
DE: GNOME 3.36.5
WM: Mutter
WM Theme: Adwaita
GTK Theme: Yaru [GTK2/3]
Icon Theme: Yaru
Font: Ubuntu 11
Disk: 104G / 453G (25%)
CPU: AMD Ryzen 7 4800U with Radeon Graphics @ 16x 1.8GHz
GPU: AMD/ATI
RAM: 2834MiB / 31518MiB
hbina@akarin:~$ qemu-system-x86_64 --version
QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.23)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
hbina@akarin:~$ nasm --version
NASM version 2.14.02
luohuang commented
这是来自QQ邮箱的自动回复邮件。
您好,您的邮件我已经收到。
谢谢!
bnjmnjrk commented
Try adding [org 0x7c00]
as the second line
luohuang commented
这是来自QQ邮箱的自动回复邮件。
您好,您的邮件我已经收到。
谢谢!