Skip to content

Add x86 syscalls#56

Merged
SamTebbs33 merged 1 commit intodevelopfrom
feature/syscalls
Sep 2, 2019
Merged

Add x86 syscalls#56
SamTebbs33 merged 1 commit intodevelopfrom
feature/syscalls

Conversation

@SamTebbs33
Copy link
Collaborator

@SamTebbs33 SamTebbs33 commented Aug 3, 2019

This patch adds syscalls for x86. They are triggered by putting the syscall number in eax then trriggering interrupt 128 (The same as linux). It adds support for calling syscalls with a maximum of 5 arguments. Closes #36

@SamTebbs33 SamTebbs33 requested a review from DrDeano August 3, 2019 19:41
@SamTebbs33 SamTebbs33 force-pushed the feature/syscalls branch 3 times, most recently from 05d36a7 to 5db0df5 Compare August 4, 2019 16:32
Copy link
Member

@DrDeano DrDeano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the brutal commenting

Copy link
Member

@DrDeano DrDeano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering, is it possible to have a run time test for calling a fake syscall, could just have something hard coded for now, but then could extend this out to a proper runtime testing that can call test functions. So could pass a boolean into the build of the kernel which it can check

@SamTebbs33
Copy link
Collaborator Author

I was wondering, is it possible to have a run time test for calling a fake syscall, could just have something hard coded for now, but then could extend this out to a proper runtime testing that can call test functions. So could pass a boolean into the build of the kernel which it can check

Yeah I could add a test that always runs when the kernel boots, and later move it to a proper runtime test when we figure out how to pass options to the build.

@SamTebbs33
Copy link
Collaborator Author

SamTebbs33 commented Aug 27, 2019

I was wondering, is it possible to have a run time test for calling a fake syscall, could just have something hard coded for now, but then could extend this out to a proper runtime testing that can call test functions. So could pass a boolean into the build of the kernel which it can check

Yeah I could add a test that always runs when the kernel boots, and later move it to a proper runtime test when we figure out how to pass options to the build.

I've actually found out how to pass options to the build so I will make a PR for that and add a syscall runtime test as part of #60

@SamTebbs33
Copy link
Collaborator Author

I actually don't think this is quite ready to be merged yet since I need to do some more investigation on how syscall arguments should be handled.

@SamTebbs33
Copy link
Collaborator Author

Ok I did some experimentation and made the syscall triggering much better and able to pass arguments. Ready for a review!

Copy link
Member

@DrDeano DrDeano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, wheres those runtime tests :P

@SamTebbs33
Copy link
Collaborator Author

Also, wheres those runtime tests :P

Waiting for the build options to be merged :p I actually need to improve that patch a little. Will do so when I can.

@DrDeano
Copy link
Member

DrDeano commented Aug 31, 2019

No problem, shall I'll wait until the build options PR is done

@SamTebbs33
Copy link
Collaborator Author

No problem, shall I'll wait until the build options PR is done

Alright that one should be ready now. I added some replies here too

Copy link
Member

@DrDeano DrDeano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep finding things soz. Have a small change, I have a lot of comments lol

Copy link
Member

@DrDeano DrDeano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm :)

@SamTebbs33 SamTebbs33 merged commit 8e55b06 into develop Sep 2, 2019
@SamTebbs33 SamTebbs33 deleted the feature/syscalls branch September 2, 2019 19:38
SamTebbs33 added a commit that referenced this pull request Oct 7, 2019
SamTebbs33 added a commit that referenced this pull request Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System calls

2 participants