OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: unreal mode tutorial protected mode parts (in SMP)
PostPosted: Thu Apr 13, 2017 1:36 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
i executed the code on real hardware. also works (the write happens).

i am suspecting what is going on.

its in the name: AP. which means application processors. the cpu0 just *probably* clones all of the settings into then if you bring them up. i am not sure you even can tell to the keyboard controller to make babbies with the a20 gate, since it would be difficult to investigate which core was giving down the signal. the same goes with interrupts, those can end up on any cores, creating a large mess.

so you basically cant even control these. thats why a new interrupt system is introduced for SMP systems, becouse the standard will not work on them. so this probably means the AP-s will not even able to come up in the so called real mode, becouse its not possible to support it properly. they probably always coming up in 32 bit modes.

_________________
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html


Top
 Profile  
 
 Post subject: Re: unreal mode tutorial protected mode parts (in SMP)
PostPosted: Thu Apr 13, 2017 1:46 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

Geri wrote:
i executed the code on real hardware. also works (the write happens).

i am suspecting what is going on.

its in the name: AP. which means application processors. the cpu0 just *probably* clones all of the settings into then if you bring them up.


No, it doesn't "clone" anything from other CPUs.

Geri wrote:
i am not sure you even can tell to the keyboard controller to make babbies with the a20 gate, since it would be difficult to investigate which core was giving down the signal.


The A20 gate is a global thing, and is (logically) part of the chipset and not part of any CPU, and has nothing to do with real mode or unreal mode.

Geri wrote:
so this probably means the AP-s will not even able to come up in the so called real mode, becouse its not possible to support it properly. they probably always coming up in 32 bit modes.


No, the AP CPUs are in real mode, and the "register dump" you posted proves that the segment limits are all "64 KiB".

It's extremely likely that the problem is that you do get a general protection fault (which is "interrupt 0x0D"); but (for historical reasons) the BIOS uses "interrupt 0x0D" for "IRQ 0x05" so the BIOS does nothing useful (and it doesn't crash) and returns to the instruction that caused the general protection fault (which causes another general protection fault, leading to a "continually causing general protection faults" situation). This is why real OSs reprogram the PIC chips (so the same interrupt isn't used for both IRQs and exceptions) and why real OSs have exception handlers.


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: unreal mode tutorial protected mode parts (in SMP)
PostPosted: Thu Apr 13, 2017 1:54 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
well the 0th cpu is in unreal mode for sure, thats setuped by the smallerc runtime and the os itself operates its 512 mbyte sized payload properly.

(i guess this is an another meh situation, since it works on both emulator and both on real hardware. from this point i put this into my pocket of x86 misterys caused by the 2 billion transistors of obfuscated imperialism)

_________________
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html


Top
 Profile  
 
 Post subject: Re: unreal mode tutorial protected mode parts (in SMP)
PostPosted: Thu Apr 13, 2017 2:18 pm 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
Don't forget two things. APs execute some BIOS code and it may leave 4G segment limits. Also, the emulator may not honor segment limits in real mode as usually it doesn't cause any problems.


Top
 Profile  
 
 Post subject: Re: unreal mode tutorial protected mode parts (in SMP)
PostPosted: Thu Apr 13, 2017 2:31 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
alexfru: maybe (but i will test first around) i should add some code on the cores to check if i can actually write some memory around 12 mbyte. and if not, then i try to call for the unreal mode. if unreal mode still not appears working, i halt the cores and continue as unicore.

_________________
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html


Top
 Profile  
 
 Post subject: Re: unreal mode tutorial protected mode parts (in SMP)
PostPosted: Fri Apr 14, 2017 4:40 am 
Offline
Member
Member

Joined: Wed Jan 08, 2014 8:41 am
Posts: 100
Location: Moscow, Russia
How about uploading the binary image somewhere? I'm ready to spend a few minutes to find out what's actually going on.


Top
 Profile  
 
 Post subject: Re: unreal mode tutorial protected mode parts (in SMP)
PostPosted: Fri Apr 14, 2017 5:29 am 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
icee: thankyou for the offer. depending on how my schedule goes, i will send you a link in private message with the disk image file

_________________
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html


Top
 Profile  
 
 Post subject: Re: unreal mode tutorial protected mode parts (in SMP)
PostPosted: Sun Apr 16, 2017 7:13 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
i did investigations. qemu comes up the ap cores in unreal mode. intel atom comes up the aps in unreal mode. amd athlon2 x4 comes up them in real mode, and needs to be switched.

_________________
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 301 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