-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards/arm/qemu: enable kernel build for armv7a
See Documentation/platforms/arm/qemu/boards/qemu-armv7a/README.txt for details Signed-off-by: fangxinyong <[email protected]>
- Loading branch information
1 parent
6c90400
commit b2f9ff7
Showing
7 changed files
with
267 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/**************************************************************************** | ||
* arch/arm/src/qemu/hardware/qemu_memorymap.h | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. The | ||
* ASF licenses this file to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
****************************************************************************/ | ||
|
||
#ifndef __ARCH_ARM_SRC_QEMU_HARDWARE_QEMU_MEMORYMAP_H | ||
#define __ARCH_ARM_SRC_QEMU_HARDWARE_QEMU_MEMORYMAP_H | ||
|
||
/**************************************************************************** | ||
* Included Files | ||
****************************************************************************/ | ||
|
||
/**************************************************************************** | ||
* Pre-processor Definitions | ||
****************************************************************************/ | ||
|
||
#undef ARMV7A_PGTABLE_MAPPING /* We do not remap the page table */ | ||
|
||
/* Check if the user has configured the page table address */ | ||
|
||
#if !defined(PGTABLE_BASE_PADDR) || !defined(PGTABLE_BASE_VADDR) | ||
|
||
/* Sanity check.. if one is undefined, both should be undefined */ | ||
|
||
# if defined(PGTABLE_BASE_PADDR) || defined(PGTABLE_BASE_VADDR) | ||
# error "Only one of PGTABLE_BASE_PADDR or PGTABLE_BASE_VADDR is defined" | ||
# endif | ||
|
||
/* A sanity check, if the configuration says that the page table is read-only | ||
* and pre-initialized (maybe ROM), then it should have also defined both of | ||
* the page table base addresses. | ||
*/ | ||
|
||
# ifdef CONFIG_ARCH_ROMPGTABLE | ||
# error "CONFIG_ARCH_ROMPGTABLE defined; PGTABLE_BASE_P/VADDR not defined" | ||
# endif | ||
|
||
#define ARMV7A_PGTABLE_MAPPING 1 | ||
|
||
#else /* !PGTABLE_BASE_PADDR || !PGTABLE_BASE_VADDR */ | ||
|
||
/* Sanity check.. if one is defined, both should be defined */ | ||
|
||
# if !defined(PGTABLE_BASE_PADDR) || !defined(PGTABLE_BASE_VADDR) | ||
# error "One of PGTABLE_BASE_PADDR or PGTABLE_BASE_VADDR is undefined" | ||
# endif | ||
|
||
#endif /* !PGTABLE_BASE_PADDR || !PGTABLE_BASE_VADDR */ | ||
|
||
#endif /* __ARCH_ARM_SRC_QEMU_HARDWARE_QEMU_MEMORYMAP_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/**************************************************************************** | ||
* arch/arm/src/qemu/qemu_pgalloc.c | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. The | ||
* ASF licenses this file to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
****************************************************************************/ | ||
|
||
/**************************************************************************** | ||
* Included Files | ||
****************************************************************************/ | ||
|
||
#include <nuttx/arch.h> | ||
#include <nuttx/config.h> | ||
|
||
#include <assert.h> | ||
#include <debug.h> | ||
|
||
#ifdef CONFIG_MM_PGALLOC | ||
|
||
/**************************************************************************** | ||
* Pre-processor Definitions | ||
****************************************************************************/ | ||
|
||
/* Currently, page cache memory must be allocated in DRAM. There are other | ||
* possibilities, but the logic in this file will have to extended in order | ||
* handle any other possibility. | ||
*/ | ||
|
||
#ifndef CONFIG_ARCH_PGPOOL_MAPPING | ||
# error CONFIG_ARCH_PGPOOL_MAPPING must be selected | ||
#endif | ||
|
||
/**************************************************************************** | ||
* Public Functions | ||
****************************************************************************/ | ||
|
||
/**************************************************************************** | ||
* Name: up_allocate_pgheap | ||
* | ||
* Description: | ||
* If there is a page allocator in the configuration, then this function | ||
* must be provided by the platform-specific code. The OS initialization | ||
* logic will call this function early in the initialization sequence to | ||
* get the page heap information needed to configure the page allocator. | ||
* | ||
* Input parameters: | ||
* heap_start - A double pointer to the start address of the pgheap | ||
* heap_size - A pointer to the size of the pgheap | ||
* | ||
* Returned Value: | ||
* None | ||
* | ||
****************************************************************************/ | ||
|
||
void up_allocate_pgheap(void **heap_start, size_t *heap_size) | ||
{ | ||
DEBUGASSERT(heap_start && heap_size); | ||
|
||
*heap_start = (void *)CONFIG_ARCH_PGPOOL_PBASE; | ||
*heap_size = (size_t)CONFIG_ARCH_PGPOOL_SIZE; | ||
} | ||
|
||
#endif /* CONFIG_MM_PGALLOC */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# | ||
# This file is autogenerated: PLEASE DO NOT EDIT IT. | ||
# | ||
# You can use "make menuconfig" to make any modifications to the installed .config file. | ||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your | ||
# modifications. | ||
# | ||
# CONFIG_TLS_ALIGNED is not set | ||
CONFIG_ALARM_ARCH=y | ||
CONFIG_ARCH="arm" | ||
CONFIG_ARCH_ADDRENV=y | ||
CONFIG_ARCH_BOARD="qemu-armv7a" | ||
CONFIG_ARCH_BOARD_QEMU_ARMV7A=y | ||
CONFIG_ARCH_CHIP="qemu" | ||
CONFIG_ARCH_CHIP_QEMU_ARM=y | ||
CONFIG_ARCH_CHIP_QEMU_CORTEXA7=y | ||
CONFIG_ARCH_DATA_NPAGES=256 | ||
CONFIG_ARCH_DATA_VBASE=0x80100000 | ||
CONFIG_ARCH_HEAP_NPAGES=256 | ||
CONFIG_ARCH_HEAP_VBASE=0x80200000 | ||
CONFIG_ARCH_INTERRUPTSTACK=2048 | ||
CONFIG_ARCH_KERNEL_STACKSIZE=3072 | ||
CONFIG_ARCH_LOWVECTORS=y | ||
CONFIG_ARCH_PGPOOL_MAPPING=y | ||
CONFIG_ARCH_PGPOOL_PBASE=0x48000000 | ||
CONFIG_ARCH_PGPOOL_SIZE=134217728 | ||
CONFIG_ARCH_PGPOOL_VBASE=0x48000000 | ||
CONFIG_ARCH_STACKDUMP=y | ||
CONFIG_ARCH_TEXT_NPAGES=256 | ||
CONFIG_ARCH_TEXT_VBASE=0x80000000 | ||
CONFIG_ARM_SEMIHOSTING_HOSTFS=y | ||
CONFIG_ARM_THUMB=y | ||
CONFIG_BUILD_KERNEL=y | ||
CONFIG_DEBUG_ASSERTIONS=y | ||
CONFIG_DEBUG_FEATURES=y | ||
CONFIG_DEBUG_FULLOPT=y | ||
CONFIG_DEBUG_SYMBOLS=y | ||
CONFIG_DEFAULT_TASK_STACKSIZE=4096 | ||
CONFIG_DEV_ZERO=y | ||
CONFIG_ELF=y | ||
CONFIG_EXAMPLES_HELLO=m | ||
CONFIG_EXPERIMENTAL=y | ||
CONFIG_FLASH_SIZE=134217728 | ||
CONFIG_FLASH_START=0 | ||
CONFIG_FLASH_VSTART=0 | ||
CONFIG_FS_HOSTFS=y | ||
CONFIG_FS_PROCFS=y | ||
CONFIG_HAVE_CXX=y | ||
CONFIG_HAVE_CXXINITIALIZE=y | ||
CONFIG_IDLETHREAD_STACKSIZE=4096 | ||
CONFIG_INIT_FILEPATH="/system/bin/init" | ||
CONFIG_INIT_MOUNT=y | ||
CONFIG_INIT_MOUNT_DATA="fs=../apps" | ||
CONFIG_INIT_MOUNT_FLAGS=0x1 | ||
CONFIG_INIT_MOUNT_FSTYPE="hostfs" | ||
CONFIG_INIT_MOUNT_SOURCE="" | ||
CONFIG_INIT_MOUNT_TARGET="/system" | ||
CONFIG_INIT_STACKSIZE=3072 | ||
CONFIG_INTELHEX_BINARY=y | ||
CONFIG_LIBC_ENVPATH=y | ||
CONFIG_LIBC_EXECFUNCS=y | ||
CONFIG_MM_PGALLOC=y | ||
CONFIG_NSH_ARCHINIT=y | ||
CONFIG_NSH_FILEIOSIZE=512 | ||
CONFIG_NSH_FILE_APPS=y | ||
CONFIG_NSH_READLINE=y | ||
CONFIG_ONESHOT=y | ||
CONFIG_PATH_INITIAL="/system/bin" | ||
CONFIG_PREALLOC_TIMERS=4 | ||
CONFIG_RAM_SIZE=536870912 | ||
CONFIG_RAM_START=0x40000000 | ||
CONFIG_RAM_VSTART=0x40000000 | ||
CONFIG_RAW_BINARY=y | ||
CONFIG_READLINE_CMD_HISTORY=y | ||
CONFIG_RR_INTERVAL=200 | ||
CONFIG_SCHED_LPWORK=y | ||
CONFIG_STACK_COLORATION=y | ||
CONFIG_START_DAY=25 | ||
CONFIG_START_MONTH=4 | ||
CONFIG_START_YEAR=2023 | ||
CONFIG_SYMTAB_ORDEREDBYNAME=y | ||
CONFIG_SYSLOG_TIMESTAMP=y | ||
CONFIG_SYSTEM_NSH=y | ||
CONFIG_SYSTEM_NSH_PROGNAME="init" | ||
CONFIG_TESTING_GETPRIME=y | ||
CONFIG_TESTING_OSTEST=y | ||
CONFIG_UART1_BASE=0x9000000 | ||
CONFIG_UART1_IRQ=33 | ||
CONFIG_UART1_PL011=y | ||
CONFIG_UART1_SERIAL_CONSOLE=y | ||
CONFIG_UART_PL011=y | ||
CONFIG_USEC_PER_TICK=1000 |