Hi

My only current machine is an Opteron :-), u know : that 64-bit uproc from AMD. I use Win9x and DOS and FASM/yasm.

I am currently coding a tiny kernel, first step is to enter long-mode... and it is *not* easy.
Well, I start from MS-DOS, I go from RM to 16-bit PM, then to 32-bit PM, (copying my kernel code to XMS) then to "compatibility (32-bit) long-mode".
Now to enter "64-bit long-mode", I have a pb. AMD docs say u cannot make a "direct jmp far", u must use an "indirect jmp far". So I put a fword ptr to memory and I make a "jmp far fword ptr" but it reboots :-(
jmp near works fine. Certainly a pb with segment selectors :confused:

Now I hope I'll find the bug. Then I'll be able to execute code generated by fantastic yasm :-) !!!

BUT MY REAL PB IS ... IS THERE ANYONE ON EARTH THAT DOES/DID THE SAME THING AS ME ?!
(I respect Linux but I just want sthg simpler and full ring0)

Thx
Posted on 2004-01-19 05:45:00 by valy
Why the heck have you bought an Opteron if you're running 9x on it?
Posted on 2004-01-19 06:31:20 by f0dder
I am working on such an OS also but curently i do NOT have an Opteron to test on :(
so i stopped at 32 bits ring0 until i get my Opteron :tongue:
Posted on 2004-01-19 10:16:55 by BogdanOntanu
f0dder, because XP-64 isn't out :P
he could try linux though ..
Posted on 2004-01-19 11:51:13 by wizzra
Well, what's the point of a 64bit CPU and not even running full 32bit?
Posted on 2004-01-19 11:56:21 by f0dder

Why the heck have you bought an Opteron if you're running 9x on it?

Maybe because he had it already and don't want to waste his money :)
Posted on 2004-01-19 21:12:53 by pelaillo
valy, what have you set-up? Volume 2, page 426 lists the code to get into long mode. Please read very carefully as there are many pitfalls on your way. I will hopefully get a Opteron soon.
Posted on 2004-01-19 21:31:49 by bitRAKE

Maybe because he had it already and don't want to waste his money :)

But then he has wasted his money on a CPU which he's not taking very much advantage of :P
Posted on 2004-01-20 01:28:30 by f0dder
I think that very little peope has knowledge about 64-bit asm.
Posted on 2004-01-20 04:47:30 by Vortex

I think that very little peope has knowledge about 64-bit asm.
There is nothing more fun then undiscovered country.
Pioneers all around! ;)
Posted on 2004-01-20 09:23:19 by bitRAKE
RTFM (that's what the linux-developers for x86-64 told me)
Posted on 2004-01-20 18:06:38 by Jan
There is nothing more fun then undiscovered country.
Pioneers all around!

YES !!!


Well, I have all AMD64 pdf's, I do not like big O/S, I like simplicity and freedom. I just want to code pure 64-bit assembler.
I also look at linux kernel pages on the Web, I hope it will help. A pb with CS segment selector, I think.

I only updated my CPU and a few things around, so it costed me less than 1000 $ ;)

I like your OS, Bogdan, but my SVGA card not (1.2 VESA) :(
Posted on 2004-01-21 06:03:20 by valy
Bogdan still hasn't implemented paging-based bank-switching emulation of LFB for non-lfb cards/vesa versions? shame.
Posted on 2004-01-21 08:21:52 by f0dder
Hi valy,

you said AMD docu, do you refer to x86-64_overview.pdf from AMD?

and BTW, yes I'm trying the same on my Athlon64 :-)

Miracle
Posted on 2004-02-05 10:11:38 by miracle
Well Fodder i do not need paging to enable bank switching VESA 1.2 old video boards
All i need is a bank switch routine for doing the finnal video copy from system backbuffer into video memory.

This can be very easy done IF you have the code to do bank switch for your video card. It is only ONE single and simple function to change in the whole OS.

This is because i do all my drawing in a system backbuffer first so copying to banked memory can not be that hard: bank0 -> copy big part 1; bank1-> copy part1 etc.. .pretty simple function IMHO, no need for paging trick and generating a pagefault every now and then :grin:

But since i do not have the code to bank switch his card... and i did not fell like researching this code for every video board out there.... i have left this task for each user of old cards.

I will be more than happy to implement it into next SOLOS version if somebody has the code and dosent know how to do it. If somebody needs is fast is will do a fast version for himself alone.


As we have talked before I do NOT like paging. It is my right to be different! And i see no point to make the things i do no like first.

But i have stated before that i will make them for ppl that like it... and i will in due time

I know i will be forced into paging in AMD64bits mode and then i will make it so (not that i like beeing forced very much)

I feel no shame i know no shame :tongue: for nothing on this Earth.

So valy if you need a bank routine for SolOS on your PC please let me know

Besides that i would really like to have an AMD64 myself for testing
:rolleyes:
Posted on 2004-02-05 11:00:16 by BogdanOntanu

But since i do not have the code to bank switch his card... and i did not fell like researching this code for every video board out there.... i have left this task for each user of old cards.

Using vesa bank switching routines should be enough, shouldn't it? And old cards not supporting vesa... oh well.
Posted on 2004-02-05 11:06:16 by f0dder
Hi f0dder,

Unfortunately, bank switching for VESA 1.2 is NOT running in full 32bits modes and i will hate to have to return to real mode just to do the switch... i hardly imagine returning from 64bits to realmode

I also presume i could also do a V86 machine just for that also :P .

Also theoretically it is possible to define some 16bits segments and then call some VESA 1.2 protected mode interfaces, but they are usually buggy (since they are almost never used) and some VESA 1.2 do not have those interfaces neither...

That is why i would need a simple routine (for each video board) to switch banks while beeing in 32bit protected mode (aka in ring-0). This routine is usually just a few OUTs but it is hardware dependant :grin:

But since having your own OS means most likely having your own 32bit drivers anyway (and lately 64bit)...
i will prefer maing my own drivers and/or users with specific hardware send me such routines or implement them themselves

If i have no other solution i will return to realmode for a small timeslice just to controll such devices but that is hardly a priority for me now... since i feel very well in flat 32bit mode as it is :grin:
Posted on 2004-02-05 12:53:28 by BogdanOntanu
! Somebody, making what I currently make... it's miracle !
I have the whole collection : the 5 volumes, the 20734, 30888 and other nice AMD manuals.
I upload my current code ASAP.

I do not like paging too, just doing it for entering 64-bit long mode.
And no thx bogdan, I should buy a more modern video card, no modern OS should support oldish material like that.
Posted on 2004-02-06 06:39:35 by valy
Here it is.
Posted on 2004-02-08 12:48:52 by valy
I just buy a 64 bit OS built by professionals.
Posted on 2004-02-08 15:28:00 by Henk-Jan