OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:16 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 178 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11, 12  Next
Author Message
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Aug 31, 2015 3:35 pm 
Offline
Member
Member
User avatar

Joined: Wed Jul 13, 2011 7:38 pm
Posts: 558
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.


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Aug 31, 2015 3:47 pm 
Offline
Member
Member

Joined: Mon Feb 02, 2015 7:11 pm
Posts: 898
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.

_________________
https://github.com/kiznit/rainbow-os


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Aug 31, 2015 4:06 pm 
Offline
Member
Member
User avatar

Joined: Wed Aug 05, 2015 5:33 pm
Posts: 159
Location: Drenthe, Netherlands
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.


=D>

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 [-o<
The language that's never let me down

_________________
"Always code as if the guy who ends up maintaining it will be a violent psychopath who knows where you live." - John F. Woods

Failed project: GoOS - https://github.com/nutterts/GoOS


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Sep 01, 2015 1:15 pm 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
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.

_________________
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Sep 01, 2015 1:20 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
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?

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Fri Sep 11, 2015 7:12 pm 
Offline

Joined: Thu Sep 20, 2012 6:46 pm
Posts: 24
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.


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Sep 14, 2015 11:36 am 
Offline
Member
Member

Joined: Mon Apr 09, 2007 12:10 pm
Posts: 775
Location: London, UK
Entering ACPI mode, handling power button events and performing an ACPI shutdown all using my own AML parser (written in C#).

Regards,
John.

_________________
Tysos | rpi-boot


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Sep 15, 2015 1:04 pm 
Offline
Member
Member
User avatar

Joined: Fri Jan 16, 2009 8:34 pm
Posts: 284
Location: Louisiana, USA
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:
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:
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

_________________
BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
Sortie wrote:
  • Don't play the role of an operating systems developer, be one.
  • Be truly afraid of undefined [behavior].
  • Your operating system should be itself, not fight what it is.


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Fri Sep 18, 2015 10:28 am 
Offline
Member
Member
User avatar

Joined: Sun Feb 09, 2014 7:11 pm
Posts: 89
Location: Within a meter of a computer
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.

_________________
"If the truth is a cruel mistress, than a lie must be a nice girl"
Working on Cardinal
Find me at #Cardinal-OS on freenode!


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Sun Sep 20, 2015 3:07 am 
Offline
Member
Member
User avatar

Joined: Fri Apr 03, 2015 9:41 am
Posts: 492
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.

_________________
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing

OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Fri Nov 13, 2015 5:03 pm 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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.

_________________
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott


Last edited by SpyderTL on Tue Nov 17, 2015 2:10 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Sat Nov 14, 2015 6:52 am 
Offline
Member
Member

Joined: Sun Nov 01, 2015 12:19 am
Posts: 28
When i finish my V8086 monitor and my paging driver i was said, AWWWWWWW YEAH! really :D


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Nov 16, 2015 2:58 pm 
Offline
Member
Member

Joined: Wed Sep 07, 2011 3:34 pm
Posts: 112
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!


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Nov 16, 2015 8:31 pm 
Offline
Member
Member

Joined: Mon Oct 11, 2010 11:37 pm
Posts: 52
Location: Milwaukee, Wisconsin
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.

_________________
Microsoft is over if you want it.


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Nov 17, 2015 4:03 pm 
Offline
Member
Member

Joined: Sun Jun 16, 2013 4:09 am
Posts: 333
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:
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);
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 178 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11, 12  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 35 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