Page 2 of 4

Re:CPU Identification For OS Developers...

Posted: Fri Sep 29, 2006 10:59 pm
by earlz
yes good code...(been using it before this post from a "private" release of it)
I have hated warning in OS deving since I made my interrupt code and got 50+ warning over converting functions to an unsigned int(otherwise it'd be like converting unsigned int to void * and back which is pointless)

Re:CPU Identification For OS Developers...

Posted: Sat Sep 30, 2006 7:42 am
by smiddy
Brynet-Inc,

I'm torn here as to where to start because I get the impression you basically slapped me in the face. That is not nice! Especially when my intention was to point out the lack of portability to which the code is not. Your contentions with Windows may have there place, but I wasn't pointing out what to use to write an OS, your assumption writing code with for an OS, from my perspective, is wrong.

I personally write my code with assembly language. Why anyone would want to write their OS in anything else is beyond me, but I don't flaunt that fact (as you do, like you want to pick a fight). I generally respect other people's way of enjoying their hobby. Please do the same and don't take someone else's email out of context and see it for what it is, not a poke in the eye, but to give further understanding of what is going on...

:-*

Re:CPU Identification For OS Developers...

Posted: Sat Sep 30, 2006 8:43 am
by Brynet-Inc
smiddy wrote: Brynet-Inc,

I'm torn here as to where to start because I get the impression you basically slapped me in the face. That is not nice! Especially when my intention was to point out the lack of portability to which the code is not. Your contentions with Windows may have there place, but I wasn't pointing out what to use to write an OS, your assumption writing code with for an OS, from my perspective, is wrong.

I personally write my code with assembly language. Why anyone would want to write their OS in anything else is beyond me, but I don't flaunt that fact (as you do, like you want to pick a fight). I generally respect other people's way of enjoying their hobby. Please do the same and don't take someone else's email out of context and see it for what it is, not a poke in the eye, but to give further understanding of what is going on...

:-*
My intention was not to insult you, But I use GCC therefore I used GCC's inline assembly. I have no intention to support MSVC.

While the code won't compile in anything else besides GCC without modification, That doesn't mean its not portable between Operating Systems, As long as the OS has a GCC port and is x86 then this should compile successfully.

Sorry for sounding rude, But this code is for OSDev projects.. If you would like a Windows binary, I'd be happy to cross compile one for you ;)

Re:CPU Identification For OS Developers...

Posted: Sat Sep 30, 2006 9:13 am
by Kemp
I do not care for Windows, This is for OSdev projects
Why anyone would want to use MSVC for OS Development is beyond me..
Sorry for sounding rude, But this code is for OSDev projects..
An attitude adjustment would be very welcome. You'll find plenty of people deving under Windows, and several on this forum doing it in MSVC, so unless your intention really is to make them think bad thoughts about you I'd advise you tone the sentiments down slightly. The correct phrasing of what you said:
I didn't intend this to be used under MSVC, so it may require some editing. Cross-compatibility isn't a big concern for me at the moment, but if anyone wants to try it out themselves then they're welcome.
Simple, gets the message across, and (most importantly) doesn't insult anyone.

Re:CPU Identification For OS Developers...

Posted: Sat Sep 30, 2006 9:13 am
by Candy
Brynet-Inc wrote: Sorry for sounding rude, But this code is for OSDev projects.. If you would like a Windows binary, I'd be happy to cross compile one for you ;)
Just for your information, not all OS dev projects are in GCC. Not all OS developers prefer AT&T assembly, nor do all OS developers agree a microkernel is best. They can all benefit from your code, however, and simply insulting somebody as not being a serious OS developer for not doing something the way you do is bad. Your way may work but it's very likely not the only way.

Re:CPU Identification For OS Developers...

Posted: Sat Sep 30, 2006 9:36 am
by Brynet-Inc
Alright, I respect your opinions.

I've been using GCC and UNIX-like systems for quite some time, I've never Supported Windows or it's bizarre Compilers.

The code is BSD licensed so if someone really wished to make a MSVC port they are welcome, But it won't have my support (Or any genuine respect from me).

Sorry, But I'm not going to change my opinion on an OS just because somebody was offended by one of my statements.

Re:CPU Identification For OS Developers...

Posted: Sat Sep 30, 2006 9:46 am
by earlz
I don't like MSVC because it doesn't follow standards completely but really if someone ports it then good for them all you should have to change is asm and asm syntax which should be fairly staight-foward even for evil AT&T syntax

but really I don't think MSVC is good for OS deving as it seems to bloat code but if it works and it's stable(your OS)... it doesn't really matter

Re:CPU Identification For OS Developers...

Posted: Sat Sep 30, 2006 11:05 am
by Kemp
Heh, I'm not going to enter into a "which compiler/language/host OS/widget is best" argument, as they've been done a million times on this forum alone :P. Suffice to say, I'm using MSVC (actually MSVC++ I suppose) myself and I can say it doesn't bloat code unless you tell it to, and most of the non-standard behaviour is recognised by MS and there are switches to make it a bit more standards compliant. I don't think it's The Best (tm), but it was the best choice for me and I'm happy with that :)

Re:CPU Identification For OS Developers...

Posted: Sat Sep 30, 2006 7:25 pm
by Ryu
Brynet-Inc wrote: The code is BSD licensed so if someone really wished to make a MSVC port they are welcome, But it won't have my support (Or any genuine respect from me).
Hmm this almost sounds like you don't want people to port your work to MSVC, but in fact that would be a plus on your end to promote your work over differnt platforms without having to do anything. Please, respect people regardless of what tools they use for OS developement, everyones has thier opinions and thank God for that or it will be one boring world.

For the record I use the MSVC IDE + MASM to compile my OS work. I find MSVC is bloated under debug builds but thats expected, in release builds theres nothing wrong with it in my opinion, and I think I'm quite a picky person with code efficiency. Anything that requires more care on time critical or instruction efficiency, I write them in assembly regardless (which is so far everything in my OS project).

Re:CPU Identification For OS Developers...

Posted: Sun Oct 01, 2006 1:01 pm
by earlz
wow this usually don't happen... usually people crowd up on MSVC people but now it's opposite

Re:CPU Identification For OS Developers...

Posted: Sun Oct 01, 2006 1:35 pm
by Candy
Brynet-Inc wrote: Alright, I respect your opinions.
Then it's ok.
I've been using GCC and UNIX-like systems for quite some time, I've never Supported Windows or it's bizarre Compilers.

The code is BSD licensed so if someone really wished to make a MSVC port they are welcome, But it won't have my support (Or any genuine respect from me).

Sorry, But I'm not going to change my opinion on an OS just because somebody was offended by one of my statements.
I'm not asking you to change your opinion, I'm asking you to respect other people's opinions, which includes not calling them names for disagreeing.

In my opinion, gcc is closest to c++ conformance from the compilers I've used. I've started to rely on a few of the basic things in there that I've found lacking or completely missing in other compilers. And yes, I've had to use visual C++ in more than one occasion in which it's stumped me about something trivial. Most recent annoyance was it giving warnings because I didn't use brackets for some boolean expressions that were pretty trivial and correct. So, long story short, I agree with you on the gcc note, but I disagree on the AT&T syntax. I prefer mov ax, [8*ebx + eax + 1512] instead of mov $1512(%eax, %ebx, $8), %ax.

Re:CPU Identification For OS Developers...

Posted: Sun Oct 01, 2006 4:55 pm
by Brynet-Inc
Candy, I didn't call anyone names.. And I never said anything about Intel Syntax Vs. AT&T syntax, The last time I checked GAS supports .intel_syntax while this only switches out the instructions with vaild Intel ones CPUID seems to be the same instruction in AT&T and Intel :-*, And in any extreme cases when I need to use large portions Intel Assembly I usually link with an NASM or FASM compiled object to cut down on the inline clutter.

Seriously though this code only contains 1 line of inline Assembly which was easier at the time of writing and still is in my eyes.

On another note maybe you thought my dislike of MSVC was calling someone a name? ::)

I'm happy everyone here is attacking me, I was only clarifying I wrote with code with GCC and OSDev in mind (Which I mentioned), not MSVC. And I think in my time I've determined it's an insulting compiler thus I defend my current opinion. ;)

Re:CPU Identification For OS Developers...

Posted: Sun Oct 01, 2006 5:30 pm
by Brynet-Inc
Right :),

Now that this conversation is over back to the topic of conversation.

If anyone plans to use my work in their OS (And you have a project page) please post here, It'd be really nice to know who all plans to use my code.

Thanks :-*

Re:CPU Identification For OS Developers...

Posted: Tue Oct 10, 2006 7:10 pm
by Brynet-Inc
I'm considering adding support for detecting newer chips then the Pentium 4 and the Athlon/Duron chips.

Does anyone have any information on the CoreDuo chips?

And is anyone at all interested in classic Cyrix CPU detection support?

Re:CPU Identification For OS Developers...

Posted: Tue Oct 10, 2006 7:51 pm
by smiddy
I can't say I know recently, but this site is generally upto date with the many different processors:

http://www.sandpile.org/

Enjoy!