Skip to content

Update segment sizes for user code and data#275

Closed
sudoheckbeluga wants to merge 1 commit into
codenet:p14-segmentsfrom
sudoheckbeluga:patch-3
Closed

Update segment sizes for user code and data#275
sudoheckbeluga wants to merge 1 commit into
codenet:p14-segmentsfrom
sudoheckbeluga:patch-3

Conversation

@sudoheckbeluga

Copy link
Copy Markdown

No description provided.

@sai-kaushik-s

Copy link
Copy Markdown
Collaborator

The SEG macro performs (lim) >> 12 internally. This shift is done because the granularity bit (g) is set to 1, which tells the CPU to interpret the limit in units of 4KB pages. If PROCSIZE << 12 = 0x100000000 is passed and uint is 32-bit, this overflows to 0. The resulting segment would have a limit of 0, meaning it could only access 4KB.

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.

2 participants