Lines Matching +full:line +full:- +full:addresses
5 # SPDX-License-Identifier: Apache-2.0
15 sizes, certain memory addresses, and configuration values.
23 - By default, the Present, Write, and Execute Disable bits are
25 - The __text_region region will have Present and User bits set
26 - The __rodata_region region will have Present, User, and Execute
28 - On x86_64, the _locore region will have Present set and
34 - The double-mapping is used to transition the
38 - The mapping is always double-mapped at the top-level paging structure
39 and the physical/virtual base addresses must have the same alignment
40 with respect to the scope of top-level paging structure entries.
41 This allows the same second-level paging structure(s) to be used for
44 - The double-mapping is needed so that we can still fetch instructions
45 from identity-mapped physical addresses after we program this table
57 64-bit systems will always build IA-32e page tables. 32-bit systems
59 32-bit page tables are built.
61 The kernel will expect to find the top-level structure of the produced
65 top-level paging structure as it is written out last.
111 PD_LEVEL = -2
112 PT_LEVEL = -1
123 """Display --verbose --verbose message"""
134 """Make sure base and size are page-aligned"""
171 return (val + (align - 1)) & (~(align - 1))
176 return val & (~(align - 1))
179 # Hard-coded flags for intermediate paging levels. Permissive, we only control
192 # Always little-endian
208 """Class property for how much to shift virtual addresses to obtain
221 32-bit entries, or Q for PAE/IA-32e"""
233 return (virt_addr >> self.addr_shift) & (self.num_entries - 1)
283 """Page mapping level 4 for IA-32e"""
291 """Page directory pointer table for IA-32e"""
303 """Page directory for 32-bit"""
311 """Page directory for either PAE or IA-32e"""
318 """Page table for 32-bit"""
327 """Page table for either PAE or IA-32e"""
348 # MMUTable objects, excluding the top-level table which is tracked
350 # the top-level table is tracked separately.
389 # pylint doesn't like break in the above if-block
457 mem_size = mem_end - mem_start
482 vaddr = virt_base + (paddr - phys_base)
492 phys_aligned_size = phys_aligned_end - phys_aligned_base
504 region_size = region_end - region_start
518 is unchanged and this will not disturb any double-mapping."""
531 size = region_end - base
569 # We always have the top-level table be last. This is because
570 # in PAE, the top-level PDPT has only 4 entries and is not a
573 debug("top-level %s at physical addr 0x%x" %
584 """32-bit Page Tables"""
597 """Parse command line arguments"""
604 parser.add_argument("-k", "--kernel", required=True,
606 parser.add_argument("-o", "--output", required=True,
608 parser.add_argument("--map", action='append',
613 L - Large page (2MB or 4MB),
614 U - Userspace accessible,
615 W - Writable,
616 X - Executable,
617 D - Cache disabled.
624 parser.add_argument("-v", "--verbose", action="count",
657 """Map extra regions specified in command line"""
658 # Extract command line arguments
665 error("Not enough arguments for --map %s" % entry)
712 # Check if addresses have already been mapped.
716 "for --map %s" % (virt, size, one_map['cmdline'])))
762 # Figure out if there is any need to do virtual-to-physical
764 virt_to_phys_offset = (sram_base + sram_offset) - (vm_base + vm_offset)
777 debug("Address space: 0x%x - 0x%x size 0x%x" %
778 (vm_base, vm_base + vm_size - 1, vm_size))
780 debug("Zephyr image: 0x%x - 0x%x size 0x%x" %
781 (image_base, image_base + image_size - 1, image_size))
784 debug("Physical address space: 0x%x - 0x%x size 0x%x" %
785 (sram_base, sram_base + sram_size - 1, sram_size))
789 # Are pages in non-boot, non-pinned sections present at boot.
811 # the corresponding virtual pages should not be mapped to non-existent
830 # 64-bit has a special region in the first 64K to bootstrap other CPUs
833 locore_size = syms["_lodata_end"] - locore_base
834 debug("Base addresses: physical 0x%x size 0x%x" % (locore_base,
839 # Additionally identity-map all ROM as read-only
856 # - Text regions need the XD flag cleared and RW flag removed
858 # - Rodata regions need the RW flag cleared
859 # - User mode needs access as we currently do not separate application
900 # Set the User bit for the read-only locore/lorodata areas.
918 size_diff = written_size - reserved_pt_size