OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Aug 03, 2020 9:59 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Designing a hard-realtime addon to an operating system
PostPosted: Sun Dec 22, 2019 4:01 pm 
Offline
Member
Member

Joined: Wed Oct 01, 2008 1:55 pm
Posts: 2249
Finished with settting up the 64-bit environment, booting a core and setting up fault handlers. I have also integrated it into the kernel debugger and so I can step and run the 64-bit code from RDOS. I initially used my CPU emulator, but at this stage I think running it on real hardware is so much better. I use an interrupt from RDOS to the realtime core to implement debugging.

I think I will buy a two CPU server board using AMD Ryzen class processors and start trying to boot RDOS on it.

It would be nice to have a C compiler for the actual project, but I think I could also write it in x64 assembler.


Top
 Profile  
 
 Post subject: Re: Designing a hard-realtime addon to an operating system
PostPosted: Wed Dec 25, 2019 4:11 pm 
Offline
Member
Member

Joined: Wed Oct 01, 2008 1:55 pm
Posts: 2249
So, the realtime monitor boots up in 64-bit mode, the trap gates work, and it's all seemlessly integrated with normal kernel debugger. The monitor has a function to request physical memory from the operating system, and the page fault handler will automatically fill-up the 3 higher levels of the page table structure. The operating system can request that a linear address be mapped, and then get back the page entry. Using that page entry, the operating system can easily load application code in the realtime core context before starting the realtime program. The realtime program will run at user level.

I also started to implement signals from the realtime program to the operating system. These must have known maximum execution times, and this is achieved by setting a signal bit (with lock prefix), and then send an interrupt to the server core if the APIC is idle. To be able to run this as quickly as possible I mapped the APIC and monitor data for the application. There are 1024 different signals that each has it's own bit. On the operating system side, I have a C++ class that can be used to write an application that can interface with the realtime program. For the moment, the realtime program must be written in x64 assembler, but has a macro to send a signal.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

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