forked from Minki/linux
e85e335f8f
MMUv3 comes out of reset with identity vaddr -> paddr mapping in the TLB way 6: Way 6 (512 MB) Vaddr Paddr ASID Attr RWX Cache ---------- ---------- ---- ---- --- ------- 0x00000000 0x00000000 0x01 0x03 RWX Bypass 0x20000000 0x20000000 0x01 0x03 RWX Bypass 0x40000000 0x40000000 0x01 0x03 RWX Bypass 0x60000000 0x60000000 0x01 0x03 RWX Bypass 0x80000000 0x80000000 0x01 0x03 RWX Bypass 0xa0000000 0xa0000000 0x01 0x03 RWX Bypass 0xc0000000 0xc0000000 0x01 0x03 RWX Bypass 0xe0000000 0xe0000000 0x01 0x03 RWX Bypass This patch adds remapping code at the reset vector or at the kernel _start (depending on CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX) that reconfigures MMUv3 as MMUv2: Way 5 (128 MB) Vaddr Paddr ASID Attr RWX Cache ---------- ---------- ---- ---- --- ------- 0xd0000000 0x00000000 0x01 0x07 RWX WB 0xd8000000 0x00000000 0x01 0x03 RWX Bypass Way 6 (256 MB) Vaddr Paddr ASID Attr RWX Cache ---------- ---------- ---- ---- --- ------- 0xe0000000 0xf0000000 0x01 0x07 RWX WB 0xf0000000 0xf0000000 0x01 0x03 RWX Bypass Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
35 lines
874 B
Makefile
35 lines
874 B
Makefile
#
|
|
# This file is subject to the terms and conditions of the GNU General Public
|
|
# License. See the file "COPYING" in the main directory of this archive
|
|
# for more details.
|
|
#
|
|
|
|
ifeq ($(BIG_ENDIAN),1)
|
|
OBJCOPY_ARGS := -O elf32-xtensa-be
|
|
else
|
|
OBJCOPY_ARGS := -O elf32-xtensa-le
|
|
endif
|
|
|
|
export OBJCOPY_ARGS
|
|
export CPPFLAGS_boot.lds += -P -C
|
|
export KBUILD_AFLAGS += -mtext-section-literals
|
|
|
|
boot-y := bootstrap.o
|
|
|
|
OBJS := $(addprefix $(obj)/,$(boot-y))
|
|
|
|
$(obj)/Image.o: vmlinux.bin $(OBJS)
|
|
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
|
|
--add-section image=vmlinux.bin \
|
|
--set-section-flags image=contents,alloc,load,load,data \
|
|
$(OBJS) $@
|
|
|
|
$(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds
|
|
$(Q)$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
|
|
-T $(obj)/boot.lds \
|
|
--build-id=none \
|
|
-o $@ $(obj)/Image.o
|
|
$(Q)$(kecho) ' Kernel: $@ is ready'
|
|
|
|
zImage: $(obj)/../Image.elf
|