-
Notifications
You must be signed in to change notification settings - Fork 351
qemu: add support for qemu MMU target. #10575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lgirdwood
wants to merge
4
commits into
thesofproject:main
Choose a base branch
from
lgirdwood:qemudc233c
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
cc48aaf
build: app: fix include path
lrgirdwo f3a360c
modules: generic: fix build dependecy for fast_get()
lrgirdwo 7bee513
qemu: add qemu target with and without MMU for CI and developer usage.
lrgirdwo 3124886
boot tests: add support for running boot tests on qemu simulator
lrgirdwo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,5 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| CONFIG_IPC_MAJOR_4=y | ||
| CONFIG_ZTEST=y | ||
| CONFIG_MM_DRV=y | ||
| CONFIG_ZEPHYR_NATIVE_DRIVERS=y | ||
This file contains hidden or 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,7 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| CONFIG_IPC_MAJOR_4=y | ||
| CONFIG_USERSPACE=y | ||
| CONFIG_ZTEST=y | ||
| CONFIG_TEST_USERSPACE=y | ||
| CONFIG_MM_DRV=y | ||
| CONFIG_ZEPHYR_NATIVE_DRIVERS=y | ||
lgirdwood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,3 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof platform.c) |
This file contains hidden or 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,13 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2026 Intel Corporation. | ||
| */ | ||
|
|
||
| #ifndef __PLATFORM_LIB_CLK_H__ | ||
| #define __PLATFORM_LIB_CLK_H__ | ||
|
|
||
| /* Dummy clk header for qemu_xtensa */ | ||
| #define CLK_MAX_CPU_HZ 10000000 | ||
| #define CPU_LOWEST_FREQ_IDX 0 | ||
|
|
||
| #endif /* __PLATFORM_LIB_CLK_H__ */ |
This file contains hidden or 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,11 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2026 Intel Corporation. | ||
| */ | ||
|
|
||
| #ifndef __PLATFORM_LIB_DAI_H__ | ||
| #define __PLATFORM_LIB_DAI_H__ | ||
|
|
||
| /* Dummy dai header for qemu_xtensa */ | ||
|
|
||
| #endif /* __PLATFORM_LIB_DAI_H__ */ |
This file contains hidden or 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,16 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2026 Intel Corporation. | ||
| */ | ||
|
|
||
| #ifndef __PLATFORM_LIB_DMA_H__ | ||
| #define __PLATFORM_LIB_DMA_H__ | ||
|
|
||
| /* Dummy dma header for qemu_xtensa */ | ||
| struct dma; | ||
|
|
||
| struct sof_dma { | ||
| const struct device *z_dev; | ||
| }; | ||
|
|
||
lgirdwood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #endif /* __PLATFORM_LIB_DMA_H__ */ | ||
This file contains hidden or 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,34 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2026 Intel Corporation. | ||
| */ | ||
|
|
||
| #ifndef __PLATFORM_LIB_MAILBOX_H__ | ||
| #define __PLATFORM_LIB_MAILBOX_H__ | ||
|
|
||
| /* Dummy mailbox header for qemu_xtensa */ | ||
| #define MAILBOX_HOSTBOX_BASE 0x10000000 | ||
| #define MAILBOX_HOSTBOX_SIZE 0x1000 | ||
| #define MAILBOX_DSPBOX_BASE 0x10005000 | ||
| #define MAILBOX_DSPBOX_SIZE 0x1000 | ||
| #define MAILBOX_STREAM_BASE 0x10001000 | ||
| #define MAILBOX_STREAM_SIZE 0x1000 | ||
| #define MAILBOX_TRACE_BASE 0x10002000 | ||
| #define MAILBOX_TRACE_SIZE 0x1000 | ||
| #define MAILBOX_EXCEPTION_BASE 0x10003000 | ||
| #define MAILBOX_EXCEPTION_SIZE 0x1000 | ||
| #define MAILBOX_DEBUG_BASE 0x10004000 | ||
| #define MAILBOX_DEBUG_SIZE 0x1000 | ||
| #define MAILBOX_SW_REG_BASE 0x10005000 | ||
lgirdwood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #define MAILBOX_SW_REG_SIZE 0x1000 | ||
|
|
||
| #include <stddef.h> | ||
| #include <stdint.h> | ||
|
|
||
| static inline void mailbox_sw_regs_write(size_t offset, const void *src, size_t bytes) {} | ||
| static inline void mailbox_sw_reg_write(size_t offset, uint32_t val) {} | ||
| static inline void mailbox_sw_reg_write64(size_t offset, uint64_t val) {} | ||
| static inline uint32_t mailbox_sw_reg_read(size_t offset) { return 0; } | ||
| static inline uint64_t mailbox_sw_reg_read64(size_t offset) { return 0; } | ||
|
|
||
| #endif /* __PLATFORM_LIB_MAILBOX_H__ */ | ||
This file contains hidden or 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,20 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2026 Intel Corporation. | ||
| */ | ||
|
|
||
| #ifndef __PLATFORM_LIB_MEMORY_H__ | ||
| #define __PLATFORM_LIB_MEMORY_H__ | ||
|
|
||
| /* Dummy memory header for qemu_xtensa */ | ||
|
|
||
| static inline void *platform_shared_get(void *ptr, int bytes) | ||
| { | ||
| return ptr; | ||
| } | ||
|
|
||
| #define PLATFORM_DCACHE_ALIGN sizeof(void *) | ||
| #define HOST_PAGE_SIZE 4096 | ||
| #define SHARED_DATA | ||
|
|
||
| #endif /* __PLATFORM_LIB_MEMORY_H__ */ |
This file contains hidden or 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,20 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2026 Intel Corporation. | ||
| */ | ||
|
|
||
| #ifndef __PLATFORM_PLATFORM_H__ | ||
| #define __PLATFORM_PLATFORM_H__ | ||
|
|
||
| /* Dummy platform header for qemu_xtensa */ | ||
| #define PLATFORM_CORE_COUNT 1 | ||
| #define PLATFORM_MAX_CHANNELS 8 | ||
| #define PLATFORM_MAX_STREAMS 8 | ||
|
|
||
lgirdwood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #define HW_CFG_VERSION 0x010000 | ||
| #define DMA_TRACE_LOCAL_SIZE HOST_PAGE_SIZE | ||
|
|
||
| struct ipc_msg; | ||
| static inline void ipc_platform_send_msg_direct(const struct ipc_msg *msg) {} | ||
|
|
||
| #endif /* __PLATFORM_PLATFORM_H__ */ | ||
This file contains hidden or 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,12 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2026 Intel Corporation. | ||
| */ | ||
|
|
||
| #ifndef __PLATFORM_TRACE_TRACE_H__ | ||
| #define __PLATFORM_TRACE_TRACE_H__ | ||
|
|
||
| /* Dummy trace header for qemu_xtensa */ | ||
| #define PLATFORM_TRACE_DICT_FRONT 0 | ||
|
|
||
| #endif /* __PLATFORM_TRACE_TRACE_H__ */ |
This file contains hidden or 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,21 @@ | ||
| // SPDX-License-Identifier: BSD-3-Clause | ||
| // | ||
| // Copyright(c) 2026 Intel Corporation. | ||
| // | ||
| #include <sof/lib/mailbox.h> | ||
| #include <sof/ipc/common.h> | ||
| #include <rtos/sof.h> | ||
|
|
||
| void ipc_platform_complete_cmd(struct ipc *ipc) | ||
| { | ||
| } | ||
|
|
||
| int platform_boot_complete(uint32_t boot_message) | ||
| { | ||
| return 0; | ||
| } | ||
|
|
||
| int platform_init(struct sof *sof) | ||
| { | ||
| return 0; | ||
| } | ||
lgirdwood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.