OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Nov 20, 2017 11:27 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Sample 64-bit Kernel
PostPosted: Tue Aug 30, 2016 9:27 pm 
Online
Member
Member
User avatar

Joined: Tue Mar 06, 2007 11:17 am
Posts: 1018
This is a test kernel I wrote for an AMD64 3000+ around year 2007 in an MSI K8MM-V motherboard with 2 Gigabytes of RAM and an AGP NVidia graphics card with 512 Megabytes of RAM.

This is a 64-bit kernel, so it could be useful to show how to set it up.

It boots from Real Mode boot code to 32-bit mode.
From there, it enables paging, PAE and a 64-bit code selector to enter Long Mode.

I have learned several things since then, like implementing portable assembly code, starting my kernels/OSes from DOS and trying to go back, invoking my own programs from a console of my own OS from a floppy...; so I plan to add those features to a minimal driver-like kernel core module that I will have to rewrite for 16/32/64-bit.


Meanwhile, here is the source code I wrote as a sample to enter 64-bit mode around years 2007-2009 at the same time of a more capable but equally tiny 32-bit kernel and other projects to handle several file formats. I hope it serves as a simple and good enough example on writing a 64-bit kernel that is portable despite being written in assembly.
Image http://archive.org/download/amd64_devel/ArcheFireOS64__2009-10-06.zip

_________________
Image http://www.archefire.org/_PROJECTS_/ (udocproject@yahoo.com)

YouTube Development Videos:
http://www.youtube.com/user/AltComp126/videos

Current IP address for hosts file (all subdomains):
190.150.9.244 archefire.org


Top
 Profile  
 
 Post subject: Re: Sample 64-bit Kernel
PostPosted: Thu Sep 29, 2016 3:34 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 366
Location: Serbia
As long you use archive.org as cloud no one will ever post to your threads.

_________________
Website


Top
 Profile  
 
 Post subject: Re: Sample 64-bit Kernel
PostPosted: Mon Oct 17, 2016 11:22 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 979
Location: Athens, GA, USA
I know it is a bit late to be adding my two cents, but I agree with Lukand. At the very least, you should have to courtesy to post it to somewhere that is set up for viewing code in some manner - Github, Cloudforge, Bitbucket, anything like that. At this point, even Pastebin would be an improvement.

I get that this is your old site, and that for what ever reason you cannot or will not pay for the hosting of it, or find a new host. But what you are doing right now is both counter-productive, and a misuse - nay, misunderstanding - of archive.org and the Wayback Machine service.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Top
 Profile  
 
 Post subject: Re: Sample 64-bit Kernel
PostPosted: Tue Oct 18, 2016 11:08 pm 
Offline
Member
Member
User avatar

Joined: Thu Apr 16, 2015 7:37 am
Posts: 64
I had a look at the code, your commenting style sure is... interesting. The comments alone are worth a look.
I had a look at the code, your commenting style sure is... interesting. The comments alone are worth a look.
I had a look at the code, your commenting style sure is... interesting. The comments alone are worth a look.
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;


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

All times are UTC - 6 hours


Who is online

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