8000 Minor improvements to memory module by elicn · Pull Request #1012 · qilingframework/qiling · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Minor improvements to memory module #1012

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

Merged
merged 6 commits into from
Nov 19, 2021
Merged

Conversation

elicn
Copy link
Member
@elicn elicn commented Nov 17, 2021

Highlights:

  • Updated stale annotations, comments and debug messages per mmio mapping functionality
  • Enhanced and simplified map_mmio
  • Excluded mmio ranges from search to avoid potential read side effects
  • pagesize is now controlable (instead of fixed 0x1000) to make the memory module easier to adapt to obscure archs and OS in the future

@elicn elicn requested a review from wtdcode November 17, 2021 15:55
8000
self.pagesize = 0x1000

# make sure pagesize is a power of 2
assert self.pagesize & (self.pagesize - 1) == 0, 'pagesize has to be a power of 2'
Copy link
Member

Choose a reason for hiding this comment

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

Maybe assert in @pagesize.setter is better choice?

Copy link
Member Author

Choose a reason for hiding this comment

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

As a first step pagesize can be only configured statically. Other than that, the plan is to have pagesize set only at instance initialization (since allowing pagesize to change during runtime makes little sense to me), so I don't think there will be a setter for it.

@xwings xwings merged commit 67816e2 into qilingframework:dev Nov 19, 2021
@elicn elicn deleted the improv-memory branch November 25, 2021 12:56
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.

3 participants
0