1 year ago

#307905

test-img

Yanel

The reset of page table

In arch/arm/kernel/head.S,I found following code

__create_page_tables:
pgtbl   r4, r8              
    mov r0, r4
    mov r3, #0
    add r6, r0, #PG_DIR_SIZE
1:  str r3, [r0], #4
    str r3, [r0], #4
    str r3, [r0], #4
    str r3, [r0], #4
    teq r0, r6
    bne 1b

I got that this the operation that resets the page table, but why str r3,[r0], #4 executes four times?why it can't be

      add r6,r0,#PG_DIR_SIZE
1:    str r3, [r0], #4
      teq r0, r6
      bne 1b

I guess it is due to the length of memory unit.

assembly

linux-kernel

arm

page-tables

0 Answers

Your Answer

Accepted video resources