Is it me, or am I missing something on Ports ??




Is it me, or am I missing something on Ports ??

Postby Marty Geist » 5. Apr 2017, 22:21

Hi All;

I have been working through Video number 4 on Ports, And I have as near as I can tell Types in what is shown in the Video number 4..

And I get some errors, So when I Looked at the Listings for port.cpp and port.h, what I see in the listing is different than the Video..

Mainly in the Video port.cpp has the Assembly code included in it and the port.h does not have the Assembly code included in it..

BUT..

In the Listings the port.cpp doesn't have the Assembly code in it and the port.h has the Assembly code in it..

So, which one is correct ??????????

THANK YOU Marty
Marty Geist
 
Posts: 15
Joined: 5. Apr 2017, 22:12

by Advertising » 5. Apr 2017, 22:21

Advertising
 

Re: Is it me, or am I missing something on Ports ??

Postby algorithman » 6. Apr 2017, 14:09

it shouldn't matter. When they are in the header, they become inline, which might be a little bit faster (and I wanted to squeeze this little bit out because port communication is done so often)
User avatar
algorithman
Administrator
 
Posts: 49
Joined: 2. Mar 2017, 11:40

Re: Is it me, or am I missing something on Ports ??

Postby Marty Geist » 6. Apr 2017, 19:58

Hi All;

AlgorithMan, Thank You for Your Prompt Response..

I got it fixed Yesterday Afternoon, I have found that usually it is the Kate Editor putting something in a file when I am not looking i.e., when I accidently hit a key and it unknown to me changes something in the file, which is the most of my problem..

Otherwise, its me not able to tell what was typed and when I looked at the Listing and try to find what was listed, and they are not what You present in the Video, I am not sure which is correct..

At Present I am trying to find where the Mistake is in the Interrupt Files..
At present it is complaining about interrupt.cpp..

interrupts.cpp:20:72: error: 'codeSegmentSelectorOffset' was not declared in this scope
interruptDescriptorTable[interruptNumber].gdt_codeSegmentSelector = codeSegmentSelectorOffset;
^
It has three of these same type of Errors, I have only copied one of them to You, as this is being sent from a Windows Machine and the Linux Mint is on a Different Machine.. Therefore I have to Read from the one and type what I see to the Other machine..

Any Help on which file and where to look in that file Would be greatly appreciated..

Also, it would be alot of Help if the Files that are Listed Would be the same as what You Presented in the Video's, Otherwise I have NO complaints and just ask for more Video's as You are a great Presenter and Teacher..

THANK YOU Marty
Marty Geist
 
Posts: 15
Joined: 5. Apr 2017, 22:12

Re: Is it me, or am I missing something on Ports ??

Postby algorithman » 7. Apr 2017, 10:19

In https://github.com/AlgorithMan-de/wyoos ... dbe627ce3d
interruptDescriptorTable[interrupt].gdt_codeSegmentSelector is set to CodeSegment, which is the second parameter of the method.
User avatar
algorithman
Administrator
 
Posts: 49
Joined: 2. Mar 2017, 11:40

Re: Is it me, or am I missing something on Ports ??

Postby Marty Geist » 7. Apr 2017, 11:56

Hi All;

Algorithman, Thank You for Your response..

So, Where do I Look for what is causing my problem, where it says "" it is Not Declared in this Scope" What does that mean and where do I look to find why it isn't being declared ??
So, should I look in interrupt.cpp
or interrupt.h or interruptstubs.s ?? For the Problem..

I got it Working Correctly !!! I was basically a spelling Error and a not all of the name where It was supposed to be..

Next is Getting or finding out Why Virtual Box is going to GURU mediation mode and Not Vm mode..

As, in the comments under Part 5, it Says to used Your gdt.cpp and gdt.h files from Your Listing and Hopefully that will fix that Problem !!

I changed the gdt files, but, no change VirtualBox will not fully work, it does Display the "Hello World" but, then it goes into GURU Mediation mode.. And it doesn't show Interrupt "INTERRUPT " message, and I don't know if it's because of the faulty VirtualBox or if it is the Code..

I have tried to install two different versions 4.3 and 5.1 and it does the same for both of them.. I tried it with less memory as suggested by one site, as to why I am getting this error,I went from 64mb to 32 mb..

I Have Isolated the PROBLEM !!! Well not completely..

When I re-run all of the needed files WITHOUT the Interrupt files, THEN VirtualBox WORKS !!! And doesn't go into GURU Meditation Mode..

PROGRESS !!!

Well more progress, I slowly turned on things that I had Commented out and remade (Make)ed, the kernel.o, mykernel.bin, mykernel.iso and the run file, removing kernel.o after each run..
And I was able to Isolate what what Causing VirtualBox to upchuck !!
I was the "" interrupts.Active(); "" line in the Kernel.cpp file !! For some reason when that line line is commented out VirtualBox is OK,
BUT, if I uncomment that line then VirtualBox Upchucks !!

Any Ideas ????

I GOT IT TO WORK !!!!

I Looked at the postings for Interrupt and I saw the changes made on the gdt.cpp file, and it worked..
I didn't know that mistakes in the gdt file would affect the interrupts..

THANK YOU Marty
Marty Geist
 
Posts: 15
Joined: 5. Apr 2017, 22:12


Return to General Discussion

Who is online

No registered users

cron