OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Nov 21, 2019 5:22 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: what's your development environment?
PostPosted: Thu Aug 29, 2019 6:44 am 
Offline

Joined: Sun Apr 14, 2019 12:19 am
Posts: 6
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.


Top
 Profile  
 
 Post subject: Re: what's your development environment?
PostPosted: Tue Sep 24, 2019 12:23 am 
Offline
Member
Member
User avatar

Joined: Tue Dec 11, 2018 3:13 pm
Posts: 50
notepad, virtualbox, and command prompt 8)


Top
 Profile  
 
 Post subject: Re: what's your development environment?
PostPosted: Tue Sep 24, 2019 5:19 am 
Offline
Member
Member
User avatar

Joined: Thu Oct 13, 2016 4:55 pm
Posts: 408
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


Top
 Profile  
 
 Post subject: Re: what's your development environment?
PostPosted: Tue Sep 24, 2019 10:58 am 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 278
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.


Top
 Profile  
 
 Post subject: Re: what's your development environment?
PostPosted: Tue Sep 24, 2019 5:24 pm 
Offline
Member
Member

Joined: Mon Jul 25, 2016 6:54 pm
Posts: 185
Location: Adelaide, Australia
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.


Top
 Profile  
 
 Post subject: Re: what's your development environment?
PostPosted: Wed Sep 25, 2019 1:53 am 
Offline

Joined: Sun Apr 14, 2019 12:19 am
Posts: 6
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: klange and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group