Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revised Virtual Memory #45

Merged
merged 28 commits into from
Mar 11, 2020
Merged

Revised Virtual Memory #45

merged 28 commits into from
Mar 11, 2020

Conversation

jdonszelmann
Copy link
Collaborator

No description provided.

jdonszelmann and others added 3 commits March 3, 2020 11:39
Co-authored-by: Victor Roest <victor@xirion.net>
Co-authored-by: Victor Roest <victor@xirion.net>
@NULLx76 NULLx76 mentioned this pull request Mar 6, 2020
@NULLx76 NULLx76 linked an issue Mar 6, 2020 that may be closed by this pull request
jdonszelmann and others added 2 commits March 8, 2020 14:18
Co-authored-by: Victor Roest <victor@xirion.net>
Co-authored-by: Victor Roest <victor@xirion.net>
@NULLx76 NULLx76 changed the title Newvm Revised Virtual Memory Mar 8, 2020
Co-authored-by: Victor Roest <victor@xirion.net>
@jdonszelmann jdonszelmann force-pushed the newvm branch 2 times, most recently from 29c0a89 to 952cda6 Compare March 8, 2020 16:20
Co-authored-by: Victor Roest <victor@xirion.net>
jdonszelmann and others added 2 commits March 9, 2020 10:30
Co-authored-by: Victor Roest <victor@xirion.net>
Co-authored-by: Jonathan Dönszelmann <jonabent@gmail.com>
@NULLx76 NULLx76 marked this pull request as ready for review March 9, 2020 11:14
@NULLx76 NULLx76 requested review from dsluijk, Zedfrigg and timanema March 9, 2020 11:15
* Resolved easy TODOs where possible
* Converted `panic` calls to `FATAL` (for better logging)
* Resolved some code analysis issues CLion flagged
.gitignore Outdated Show resolved Hide resolved
kernel/src/allocator/llist.c Outdated Show resolved Hide resolved
kernel/src/allocator/mem_alloc.c Outdated Show resolved Hide resolved
kernel/src/common/hardwareinfo.c Show resolved Hide resolved
kernel/src/common/interrupt.c Show resolved Hide resolved
kernel/src/common/interrupt.c Show resolved Hide resolved
kernel/src/common/interrupt.c Show resolved Hide resolved
kernel/src/vm/vas2.c Show resolved Hide resolved
kernel/src/vm/vas2.c Show resolved Hide resolved
kernel/src/vm/vm2.c Outdated Show resolved Hide resolved
@NULLx76 NULLx76 linked an issue Mar 10, 2020 that may be closed by this pull request
@NULLx76 NULLx76 mentioned this pull request Mar 10, 2020
@NULLx76 NULLx76 linked an issue Mar 10, 2020 that may be closed by this pull request
jdonszelmann and others added 3 commits March 10, 2020 10:48
Co-authored-by: Victor Roest <victor@xirion.net>
…om the OS pagetable.

This saves 8KiB (!) per process. It also makes caching more efficient.

Co-authored-by: Jonathan Dönszelmann <jonabent@gmail.com>
@NULLx76 NULLx76 requested a review from dsluijk March 10, 2020 12:15
@NULLx76
Copy link
Collaborator

NULLx76 commented Mar 10, 2020

@dsluijk I think we addressed most if not all of your issues, if you could look at the changes again that would be appreciated.

@NULLx76 NULLx76 added the task label Mar 10, 2020
@NULLx76 NULLx76 added this to the Virtual Memory milestone Mar 10, 2020
Victor Roest added 2 commits March 10, 2020 13:51
And removed some unused header files.
@NULLx76 NULLx76 requested a review from redshiftss March 10, 2020 15:09
.github/workflows/os_test.yml Show resolved Hide resolved
kernel/Makefile Outdated Show resolved Hide resolved
kernel/src/fs/path.c Show resolved Hide resolved
Copy link
Collaborator

@timanema timanema left a comment

Choose a reason for hiding this comment

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

I'll try and test it later. Apart from some very minor things it looks good!


// Switch back SVC/Kernel
MSR CPSR_c, #Mode_SVC
ADD fp, sp, #0 // ???
Copy link
Collaborator

Choose a reason for hiding this comment

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

What the difference with a regular mov here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I do not know, this was there in the original and I'm too scared to change it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

according to 10 minutes of research it's faster nor different to a simple mov. Compilers may generate it as part of a function header to help debuggers identify them. the #0 can be replaced by n for n variables in the stackframe. In this position it's confusing and useless and can be replaced by a simple mov.

Copy link
Collaborator Author

@jdonszelmann jdonszelmann Mar 10, 2020

Choose a reason for hiding this comment

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

2 more minutes of research found that add is actually faster in 1 nonsequential cycle.
paraphrased from the arm manual:

The data operations ADD, SUB, RSB, ADC, SBC are 2S + 1I while RSC, ORR, EOR, MOV, BIC are 2S + 1N + 1I where I means internal cycle, N means nonsequential cycle and S means sequential cycle

Shouldn't make much of a difference here though, and is mostly confusing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should be a mov imo

kernel/src/vm/vm2.c Show resolved Hide resolved
@jdonszelmann jdonszelmann mentioned this pull request Mar 10, 2020
Copy link
Collaborator

@dsluijk dsluijk left a comment

Choose a reason for hiding this comment

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

LGTM

@NULLx76 NULLx76 merged commit 28bb277 into refactor Mar 11, 2020
@NULLx76 NULLx76 deleted the newvm branch March 11, 2020 10:39
@NULLx76 NULLx76 mentioned this pull request Mar 11, 2020
NULLx76 added a commit that referenced this pull request Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Virtual Memory GDB Breakpoint Support GDB Support
5 participants