[Bug 292156] [patch] Fix conditional jump to incorrect label in 'build_l3_page_pagetable' for 0 entries

[email protected]
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292156

            Bug ID: 292156
           Summary: [patch] Fix conditional jump to incorrect label in
                    'build_l3_page_pagetable' for 0 entries
           Product: Base System
           Version: CURRENT
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 266785
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=266785&action=edit
fix jump to correct label

Hello,

I'm using qemu-system-aarch64 with kernel build from current 'main', based on
VIRT kernconf - and it does not boot. The fix is in attachment.

The kernel code has size 8M (etext), ergo perfectly aligned to 2M leaves.
The 'build_l3_page_pagetable' function - which populates 4K leaves - is called
with argument entries = 0 in register x10.

The first instruction (cbz x10, 2f) compares x10 against 0 and in case of match
it jumps to '2f' - which is a *first forward* label named '2' - which stores
the entry (not-yet-configured x13) into the page table (str x13, [x6, x11, lsl
#3]).

In the function, there is a second '2' label, right before 'ret' instruction,
which is where the conditional 'cbz x10, 2f' should aim.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.