what's your development environment?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
jmkerdal
Posts: 8
Joined: Sun Apr 14, 2019 12:19 am
Libera.chat IRC: jmkerdal

what's your development environment?

Post by jmkerdal »

Hello,

I made this post after read the forum et make my own test whitout got a good answer.

Why I ask you this:

1) I'm working in Windows 10 with a WMWare workstation using KUbuntu. In KUbuntu I've installed QEMU and it's booting under GRUB2 with ISO image.
All is great for the moment, got a VGA screen, keyboard and mouse, interruptions, but I got an issue.

I'm looking for LAPIC into QEMU. APIC is OK but bank memory @ 0xfee00000 (for LAPIC) is not here (no HPET too). See bank memory available:

Start End Size Type
0x0 0x9fbff 654336 1
0x9fc00 0x9ffff 1024 2
0xf0000 0xfffff 65536 2
0x100000 0xfdffff 15597568 1
0xfe0000 0xffffff 131072 2
0xfffc0000 0xffffffff 362144 2

Probably I got a problem with KVM too because it won't install correctly for the moment.

2) When I boot the ISO directly with WMWare I got this bank memory map:

Start End Size Type
0x0 0x9e7ff 649216 1
0x9e800 0x9ffff 6144 2
0xdc000 0xfffff 147456 2
0x100000 0xedffff 14548992 1
0xee0000 0xefefff 126976 3
0xeff000 0xefffff 4096 4
0xf00000 0xffffff 1048576 1
0xf0000000 0xf7ffffff 134217728 2
0xfec00000 0xfec0ffff 65536 2
0xfee00000 0xfee00fff 4096 2
0xfffe0000 0xffffffff 131072 2

As you see LAPIC memory zone is present, but at initialisation APIC is not available. So I can't make it running.


3) All that to ask you:

What environment are you using to developp and test your OS with full capacity (APIC/LAPIC/HPET/...)?
I'm imaging using a real PC with a native Ubuntu but I'm not sure that I'll be the good way.

Thanks.
User avatar
saltlamp
Member
Member
Posts: 50
Joined: Tue Dec 11, 2018 3:13 pm

Re: what's your development environment?

Post by saltlamp »

notepad, virtualbox, and command prompt 8)
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: what's your development environment?

Post by bzt »

Hi,
jmkerdal wrote:I'm looking for LAPIC into QEMU. APIC is OK but bank memory @ 0xfee00000 (for LAPIC) is not here (no HPET too).
Those are not necessarily listed (should be, but they are more often left out than included). They have their ACPI tables for sure. Just for the records, ACPI tables are often not listed in memory map either (E820), yet they are there, so you have to scan for RSDT manually.

To find the LAPIC, look for the MADT, which has the magic 'APIC'.
Same for the HPET, look for the table with 'HPET' magic.

If you find those, you can be sure they are supported on your machine, regardless what memory map or memory bank list say.
jmkerdal wrote:Probably I got a problem with KVM too because it won't install correctly for the moment.
Try to add "-enable-kvm -cpu host" to the qemu arguments. For Linux, you'll need the kvm kernel module too, which is usually part of the distros these days. Check with "lsmod | grep kvm". You can manually add that, but installing VirtualBox from your package manager will automatically call dkms to install the latest version of the kvm module. Not sure about Win, I assume there must be a .dll or something?
jmkerdal wrote:What environment are you using to developp and test your OS with full capacity (APIC/LAPIC/HPET/...)?
I'm imaging using a real PC with a native Ubuntu but I'm not sure that I'll be the good way.
I use qemu, bochs and VirtualBox with both BIOS and UEFI (TianoCore) firmware (except for bochs, I only test with BIOS there). I regularly check my OS on real PC too, especially after some driver fix / upgrade.

Using a POSIX compliant OS for development (like Linux) will make your life easier, as the cross-compilers and build environments are primarily written for UNIX (like gcc, make, clang, etc.). Lot of tools which need third-party solutions under Win are actually built-in UNIX commands (like 'dd', 'hexdump' etc.) I'm not saying you can't do OS development under Win (many members on this forum doing that), but setting up your environment properly and finding support on forums is definitely harder. Our wiki too is mostly written assuming Linux. I'd say dual booting Win (everyday OS) and Linux (development OS) probably is the best solution for you (alternatively you could run Linux in a VM, but you'll see that it is not efficient nor comfortable for development. Running Linux natively is much better).

Cheers,
bzt
nullplan
Member
Member
Posts: 1798
Joined: Wed Aug 30, 2017 8:24 am

Re: what's your development environment?

Post by nullplan »

I use Linux on my laptop, which gives me access to loop devices (a godsend). Editing with vim, compiling with make. Testing against Bochs and QEMU.
Carpe diem!
StudlyCaps
Member
Member
Posts: 232
Joined: Mon Jul 25, 2016 6:54 pm
Location: Adelaide, Australia

Re: what's your development environment?

Post by StudlyCaps »

I use Visual Studio Code, Windows Subsystem for Linux with Ubuntu, make for C but I've been experimenting lately with Rust and Cargo. I test with both Bochs and Qemu, occasionally I also test in VBox.
jmkerdal
Posts: 8
Joined: Sun Apr 14, 2019 12:19 am
Libera.chat IRC: jmkerdal

Re: what's your development environment?

Post by jmkerdal »

Good, thank for your reponses. It's what I expected, some different type of environnement but It's possible to use LAPIC from emulator or virtualizer. But it's a hard work.

I'll try later to find those memory bank. Too much work for the moment.

Thanks
Post Reply