OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 9:16 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Incorrect image in article "GDT"
PostPosted: Mon Nov 23, 2009 5:48 pm 
Offline
Member
Member
User avatar

Joined: Tue Jul 10, 2007 5:27 am
Posts: 2935
Location: York, United Kingdom
I've added a warning underneath a misleading image in the GDT article. The limit and flags fields need to be swapped, also the image doesn't specify the bit ordering and yet uses a nonstandard layout (LSB is usually on the LEFT).

This was brought about by some rightful confusion on IRC. I don't know who owns the image, but a newer version would be awesome.

Cheers ears 8)

_________________
Horizon - a framework and language for SAS-OS development
Project 'Pedigree'
Practical x86 OSDev tutorials


Top
 Profile  
 
 Post subject: Re: Incorrect image in article "GDT"
PostPosted: Mon Nov 23, 2009 8:36 pm 
Offline
Member
Member
User avatar

Joined: Tue Dec 25, 2007 6:03 am
Posts: 734
Location: Perth, Western Australia
You asked, and my graphics tablet and I responded. I have uploaded a new version and have attached the source SVG (for Inkscape) if anyone else wants to edit it.

(Sorry about zipping it up, but the forum doesn't allow .svg's :()


Attachments:
File comment: Source SVG to [wiki]Image:GDT_Entry.png[/wiki]
GDT_Entry.svg.zip [2.22 KiB]
Downloaded 127 times

_________________
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Top
 Profile  
 
 Post subject: Re: Incorrect image in article "GDT"
PostPosted: Tue Nov 24, 2009 1:22 pm 
Offline
Member
Member

Joined: Thu Aug 18, 2005 11:00 pm
Posts: 134
Location: Sol. Earth. Europe. Romania. Bucuresti
The original image was correct with respect to LSB and MSB bit. In English and technical writing Most Significant (Semnificative) Bit (MSB) is left most and Less Significant Bit (LSB) is right most.

This is similar to the way western culture writes the number 1,287 on paper ie: One thousand, two hundred and eighty seven units. MSB is 1 (at most left position) and LSB is 7 (at most right position).

Also... the most significant byte is at higher addresses and the less significant byte is at lower address on Intel CPU and this is the only correct way (technically) but unfortunately it is not very easy to read in a hex dump.

The only notable exception is in network protocols where people that did not understand this simple issue have reversed the correct order presumably for the sole purpose of reading the hex dump of network packets with more ease. And this generated confusion "for ever" in the "IT world".

We...the western people do write numbers in "logical reverse" from the normal text flow because we have copied the numeric system from the Arabic people in early history and did not really understood what we were doing at that time.

_________________
Ambition is a lame excuse for the ones not brave enough to be lazy; Solar_OS http://www.oby.ro/os/


Top
 Profile  
 
 Post subject: Re: Incorrect image in article "GDT"
PostPosted: Tue Nov 24, 2009 1:52 pm 
Offline
Member
Member

Joined: Thu Apr 12, 2007 8:15 am
Posts: 204
Location: Michigan
Umm, the Intel manual places least significant bit on the right, most significant bit on the left, and lowest address on the bottom, highest address on the top. I've attached a screenshot of Figure 3-8 from section 3.4.5 of IntelĀ® 64 and IA-32 Architectures Software Developer's Manual, Volume 3A: System Programming Guide, Part 1 to demonstrate.
Image


Attachments:
gdtentry.jpg
gdtentry.jpg [ 38.88 KiB | Viewed 4760 times ]

_________________
Some people are offended by the verifiable truth; such people tend to remain blissfully unencumbered by fact.
If you are one of these people, my posts may cause considerable discomfort. Read at your own risk.
Top
 Profile  
 
 Post subject: Re: Incorrect image in article "GDT"
PostPosted: Tue Nov 24, 2009 2:02 pm 
Offline
Member
Member

Joined: Thu Aug 18, 2005 11:00 pm
Posts: 134
Location: Sol. Earth. Europe. Romania. Bucuresti
Yes, I say the same as Intel does in his documents with some additional explanations for the cultural and technical reasons behind endian issues.

I have reacted to this statement:
JamesM wrote:
...
(LSB is usually on the LEFT).
...


that I've considered as misleading ...

_________________
Ambition is a lame excuse for the ones not brave enough to be lazy; Solar_OS http://www.oby.ro/os/


Top
 Profile  
 
 Post subject: Re: Incorrect image in article "GDT"
PostPosted: Tue Nov 24, 2009 5:26 pm 
Offline
Member
Member
User avatar

Joined: Fri Jun 13, 2008 3:21 pm
Posts: 1700
Location: Cambridge, United Kingdom
Network Byte Order (AKA Big Endian) predates the common use of Little Endian CPUs by about a decade...

Also, byte ordering is not comparable to how we write numbers, since the comparable unit there is bits. Byte ordering is different, more confusing, but with good technical reasoning.


Top
 Profile  
 
 Post subject: Re: Incorrect image in article "GDT"
PostPosted: Wed Nov 25, 2009 7:28 am 
Offline
Member
Member
User avatar

Joined: Tue Jul 10, 2007 5:27 am
Posts: 2935
Location: York, United Kingdom
bontanu wrote:
Yes, I say the same as Intel does in his documents with some additional explanations for the cultural and technical reasons behind endian issues.

I have reacted to this statement:
JamesM wrote:
...
(LSB is usually on the LEFT).
...


that I've considered as misleading ...


Yes, sorry about that, I meant the opposite. Late night and reacting to comments on IRC!

(LSB is usually on the RIGHT)

Sorry for the confusion! The image was backwards: the LSB *was* on the left, it *should* have been on the right.

_________________
Horizon - a framework and language for SAS-OS development
Project 'Pedigree'
Practical x86 OSDev tutorials


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

All times are UTC - 6 hours


Who is online

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