Page 8 of 12
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Aug 31, 2015 3:35 pm
by Kazinsal
onlyonemac wrote:@Nutterts: Please don't tell me you're planning on writing your OS in *pascal*... *shudder*
Fairly large chunks of classic Macintosh system software were written in Pascal, IIRC. It's not a braindead language for OS development, just not usually the first choice people make.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Aug 31, 2015 3:47 pm
by kzinti
onlyonemac wrote:@Nutterts: Please don't tell me you're planning on writing your OS in *pascal*... *shudder*
Why not? It's a very good language.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Aug 31, 2015 4:06 pm
by Nutterts
kiznit wrote:onlyonemac wrote:@Nutterts: Please don't tell me you're planning on writing your OS in *pascal*... *shudder*
Why not? It's a very good language.
And it's by nature very readable. Basically using it in a way like others would use direct ASM. You can't do with out assembly but pascal is much more readable but you can still inline it & it is just as easy to call as a C function from Go.
Kazinsal wrote:It's not a braindead language for OS development, just not usually the first choice people make.
Not only for OS development.
Pascal
The language that's never let me down
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Tue Sep 01, 2015 1:15 pm
by onlyonemac
Kazinsal wrote:Fairly large chunks of classic Macintosh system software were written in Pascal, IIRC.
Yeah that doesn't mean that it's a good language. Frankly it's antiquated and it sucks, and every time I've tried to use it I just can't THINK straight!!! Really, with such elegant languages as C available to us, there's no need to fuss with the incoherencies of a language like Pascal that was designed for a previous era. And once you've written everything in Pascal, you'll have to keep it that way or at least make a lot of changes to any code that you use that is written in other languages, as the calling style is significantly different from the ubiquitous C style.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Tue Sep 01, 2015 1:20 pm
by Combuster
onlyonemac wrote:it's antiquated and it sucks
May I remind you that we have an explicit rule about both offtopicness and programming language discussions?
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Fri Sep 11, 2015 7:12 pm
by Unsigned
Unsigned wrote:The floppy drive LED turned off automatically... AWWWW YEAH!
I'm implementing virtual mode to read sectors using BIOS interrupts, and i need the v86 task to intercept the IRQs. After using a separate task for the v86 monitor and having trouble with it (it gave warnings in Bochs and just locked in real hardware), I finally got it working by implementing the monitor in kernel mode and having it called exactly when an IRQ or interrupt happened. Now the BIOS code gets all the hardware interrupts and turns the floppy drive LED off after a few timer ticks. It also turns the keyboard LEDs on and off when pressing the lock keys, and it's the first time Ctrl+Alt+Del is able to restart the computer while my protected mode code is running.
For those wanting to do like me and use virtual mode to call BIOS interrupts like read sectors from the disk, DON'T do that. It worked for me when getting the memory map and reading sectors using CHS, but it failed on real hardware when reading sectors using LBA and even when just testing the availability of the LBA extensions. I haven't debugged it, but I think the problem is that the BIOS needs to go to protected mode momentarily, which can't be done from within VM. My new code now exits to real mode to do the BIOS interrupt and then it goes to PM again. It works for the memory map, reading CHS, reading LBA, etc.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Sep 14, 2015 11:36 am
by jnc100
Entering ACPI mode,
handling power button events and performing an ACPI shutdown all using my own AML parser (written in C#).
Regards,
John.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Tue Sep 15, 2015 1:04 pm
by BASICFreak
Here's my latest.
Trying to get position independent flat binary (it is the ELF loader)
Linked to address 0x00000000
which will first run at 0x01000000
Sets itself to an API function (somewhere between 0xE4200000 and 0xFF000000)
Then load the ELF modules attached to the tail of the binary (at the 0x01000000 position)
---- The modules actually start at 0x01001000 due to the binary being 4KB
And again this is flat binary and written in C.
Turns out only line I needed to add was for the name pointer:
Code: Select all
char *ModVirt = (char*) ((uint32_t)ModName + 0x01000000); // Fix the pointer
*Note this line is only ever run from the base of 0x01000000 - that's how I got away with it
And everything else relies on pointers provided by other applications (which hopefully are valid and mapped in said apps space)
So, two days of trying to compile PIC to find it is easier than I thought.
And to think an hour before I tried this I was about to call it quits on C - but I dislike data management in ASM
Looks like we are getting somewhere now. For the kernel only being two weeks old (and my first Exo) not too bad.
Hopefully tonight's update will have at least some of my old modules ported over.
So here are my test result:
Code: Select all
BOS v. 0.0.4 SRC/i386/memory/virtual.c Compiled at 13:25:36 on Sep 14 2015 Line 334 Function "_VMM_PageFaultManager"
User Task Attempted to Write a Non-Present page!
Virtual Address: 0xCFFFFFFB
User Task Faulted In User Stack
Expanding Stack
EAX = 0x26000
aaaaa.....a
Yes my first elf just puts 'a' and yields. And the EAX refers to the new Page Directory (Physical Address) created for the ELF
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Fri Sep 18, 2015 10:28 am
by hgoel
Finally getting threading and process management to play well together without the thread code even knowing about the process code. Also, loading elfs from disk (using AHCI), EXT2 reading/deleting files, making syscalls, along with full 1920x1080 rendering at decent framerates, and the standard input stuff, all in 45 days. Never worked that long on a project before! Still have a bunch of small things to finish setting up before my newlib port can actually be useful. Although, every time I fix another obscure bug or add a new feature is an 'AWWWW YEAH!' moment.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Sun Sep 20, 2015 3:07 am
by osdever
1. When i'm finished the Bare Bones.
2. When i finished the window system in text mode.
3. When i'm entered graphics 640x480 with 16 colors mode.
4. When i'm drawn a first line in graphics mode.
5. When i'm displayed text in graphics mode.
6. When i'm ported window system to graphics mode.
7. When i'm finished desktop.
8. When i'm make the wallpaper changing and language changing.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Fri Nov 13, 2015 5:03 pm
by SpyderTL
Just got my first "noise" playing from my HD Audio device in VirtualBox. It took me a while to figure out all of the various node parameters to set, and that the amplifier gain controls are inverted. (127 = -0 dB = Full Volume / 0 = Minimum Volume / 128 = Mute Flag).
I'll be working on the HD Audio wiki page here shortly to get everything that I've learned down on paper.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Sat Nov 14, 2015 6:52 am
by CrafterMan24
When i finish my V8086 monitor and my paging driver i was said, AWWWWWWW YEAH! really
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Nov 16, 2015 2:58 pm
by intx13
I recently wrote UEFI implementations of common legacy BIOS interrupts, and then made resident a bunch of real-mode to UEFI thunks so that legacy real mode BIOS-dependent code could run on a UEFI class 3 system. For example, invoking INT15H would thunk back to long mode, use the System Table to examine the UEFI memory map, create a legacy BIOS-style memory map matching it, and then return back to real mode. It was immensely satisfying when there were enough emulated pieces in place to boot a legacy OS for the first time!
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Mon Nov 16, 2015 8:31 pm
by CelestialMechanic
Two of these moments:
On September 9 I got my loader to load my microkernel to 100000H and executed functions from it after jumping to E0100100H. This was the first time I had touched anything in extended memory and the first time I had run anything from a high virtual address. Also the first time I had executed code in an ELF32 binary. And on my 63rd birthday too.
I'm still working on the physical and virtual memory management and I kept getting a lot of triple faults. I don't really have the code yet to handle these things, so I created code that would at least display a BSOD (Blue Screen Of Death) before Bochs gives me my lumps.
Re: What's your OSDev AWWWW YEAH! moment?
Posted: Tue Nov 17, 2015 4:03 pm
by tsdnz
Today tested the message queue, similar to Windows PostMessage.
With a 1.9 GHz machine
- If no context switching is required the Kernel can process just over 2 million queued message per second per core.
- If a context switch is required the Kernel can process just over 1 million queued message per second per core.
Used SysRetQ instead of IRETQ to enter ring 3, gaining around more speed.
Here is the User Program.
Code: Select all
volatile QWORD Me = 0x0;
void TestReentry()
{
auto t = (volatile QWORD*)Util.GetVirtualAddress_2m(100, 0, 0, 0);
*t = Me;
Me++;
Cloud::SysCall_Queue(Cloud::tSysCall_Yeild_Option::YeildAlways, Cloud::tSysCall_Queue_Where::Append, TestReentry);
};
void StartUserCode(void)
{
auto t = (volatile QWORD*)Util.GetVirtualAddress_2m(100, 0, 0, 0);
Me = 0x0;
*t = 0x44;
Cloud::SysCall_Queue(Cloud::tSysCall_Yeild_Option::YeildAlways, Cloud::tSysCall_Queue_Where::Append, TestReentry);
}