[haiku-gsoc] Re: ASSERT fails in ARMPagingMethod32Bit::MapEarly

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Sat, 16 Aug 2014 14:04:06 +0200

On 16.08.2014 10:58, Arvind S Raj wrote:
I'm currently trying to understand the assertion failure in
ARMPagingMethod32Bit::MapEarly[1]. I suppose the assertion ensures
that ptEntry is a page table entry(could someone verify this?).

I'm not actually familiar with the ARM paging specs, but since the code looks very similar to the x86 32 bit code, I'd say the assertion ensures that the PTE doesn't already map something (IOW: is empty).

I
noticed that both ARM_PDE_TYPE_MASK and ARM_PTE_TYPE_MASK are defined
to be 0x3[2]. Could this be the issue? If an entry can be both a page
directory entry and a page table entry at the same time, then the page
directory and page table will be the same wouldn't they? But, they are
distinct aren't they?

I recommend to read up on ARM paging. Given that the ARM port is still in a relatively early phase it will be rather helpful to have a good understanding of how paging works; it's very likely that you'll encounter a few more related issues.

On x86 the 32 bit paging structures are at two different levels (page directories -> page tables) and there is no way of mixing up the two or, conversely, any need to be able to discriminate between a PDE and a PTE based on its content. Both entry types are structurally very similar, but that isn't necessary, just convenient.

CU, Ingo


Other related posts: