-
Notifications
You must be signed in to change notification settings - Fork 8.2k
soc: x86: add Lakemont SoC #32104
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
Merged
Merged
soc: x86: add Lakemont SoC #32104
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2758064
x86: add kconfig CONFIG_X86_PC_COMPATIBLE
dcpleung a9fc5bd
x86: add kconfig CONFIG_X86_MEMMAP
dcpleung 5f57270
boards: x86/qemu: enable CPU flags for MMX/SSE
dcpleung 09a44bf
soc: x86: add Lakemont SoC
dcpleung 9f7aaa8
board: x86: add new board qemu_x86_lakemont
dcpleung 0cd1f8c
tests: fpu_sharing: allow board qemu_x86_lakemont
dcpleung 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
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,62 @@ | ||
| /* | ||
| * Copyright (c) 2021 Intel Corporation. | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
|
|
||
| #include <mem.h> | ||
|
|
||
| #ifndef DT_DRAM_BASE | ||
| #define DT_DRAM_BASE 0 | ||
| #endif | ||
| #ifndef DT_DRAM_SIZE | ||
| #define DT_DRAM_SIZE DT_SIZE_K(4096) | ||
| #endif | ||
|
|
||
| #include <lakemont.dtsi> | ||
|
|
||
| / { | ||
| model = "QEMU X86 (Lakemont) emulator"; | ||
| compatible = "qemu,x86_lakemont_emulator"; | ||
|
|
||
| aliases { | ||
| uart-0 = &uart0; | ||
| }; | ||
|
|
||
| chosen { | ||
| zephyr,sram = &dram0; | ||
| zephyr,console = &uart0; | ||
| zephyr,shell-uart = &uart0; | ||
| }; | ||
|
|
||
| dram0: memory@0 { | ||
| device_type = "memory"; | ||
| reg = <DT_DRAM_BASE DT_DRAM_SIZE>; | ||
| }; | ||
|
|
||
| soc { | ||
| uart0: uart@3f8 { | ||
| compatible = "ns16550"; | ||
| reg = <0x000003f8 0x100>; | ||
| label = "UART_0"; | ||
| clock-frequency = <1843200>; | ||
| interrupts = <4 IRQ_TYPE_LOWEST_EDGE_RISING 3>; | ||
| interrupt-parent = <&intc>; | ||
| current-speed = <115200>; | ||
|
|
||
| status = "okay"; | ||
| }; | ||
|
|
||
| hpet: hpet@fed00000 { | ||
| label = "HPET"; | ||
| compatible = "intel,hpet"; | ||
| reg = <0xfed00000 0x400>; | ||
| interrupts = <2 IRQ_TYPE_FIXED_EDGE_RISING 4>; | ||
| interrupt-parent = <&intc>; | ||
|
|
||
| status = "okay"; | ||
| }; | ||
| }; | ||
| }; |
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 @@ | ||
| identifier: qemu_x86_lakemont | ||
| name: QEMU Emulation for X86 (Lakemont) | ||
| type: qemu | ||
| simulation: qemu | ||
| arch: x86 | ||
| toolchain: | ||
| - zephyr | ||
| - xtools | ||
| - llvm | ||
| testing: | ||
| default: true | ||
| only_tags: | ||
| - kernel | ||
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,19 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| CONFIG_SOC_LAKEMONT=y | ||
| CONFIG_BOARD_QEMU_X86_LAKEMONT=y | ||
| CONFIG_HPET_TIMER=y | ||
| CONFIG_PIC_DISABLE=y | ||
| CONFIG_LOAPIC=y | ||
| CONFIG_CONSOLE=y | ||
| CONFIG_SERIAL=y | ||
| CONFIG_UART_NS16550=y | ||
| CONFIG_UART_CONSOLE=y | ||
| CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=25000000 | ||
| CONFIG_TEST_RANDOM_GENERATOR=y | ||
| CONFIG_X86_MMU=y | ||
| CONFIG_DEBUG_INFO=y | ||
| CONFIG_SCHED_SCALABLE=y | ||
| CONFIG_WAITQ_SCALABLE=y | ||
| CONFIG_X86_VERY_EARLY_CONSOLE=y | ||
| CONFIG_QEMU_ICOUNT_SHIFT=5 |
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,8 @@ | ||
| # Copyright (c) 2021 Intel Corp. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| description: Intel Lakemont CPU | ||
|
|
||
| compatible: "intel,lakemont" | ||
|
|
||
| include: cpu.yaml |
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,42 @@ | ||
| /* | ||
| * Copyright (c) 2021 Intel Corporation. | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #include "skeleton.dtsi" | ||
| #include <dt-bindings/interrupt-controller/intel-ioapic.h> | ||
|
|
||
| / { | ||
| cpus { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| cpu@0 { | ||
| device_type = "cpu"; | ||
| compatible = "intel,lakemont"; | ||
| d-cache-line-size = <64>; | ||
| reg = <0>; | ||
| }; | ||
|
|
||
| }; | ||
|
|
||
| intc: ioapic@fec00000 { | ||
| compatible = "intel,ioapic"; | ||
| reg = <0xfec00000 0x1000>; | ||
| interrupt-controller; | ||
| #interrupt-cells = <3>; | ||
| }; | ||
|
|
||
| /* | ||
| * Platforms with Lakemont SoC can have different hardware | ||
| * configurations. So RAM and peripherals need to be | ||
| * defined in the board configuration's DTS. | ||
| */ | ||
| soc { | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
| compatible = "simple-bus"; | ||
| ranges; | ||
| }; | ||
| }; |
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 @@ | ||
| # Copyright (c) 2021 Intel Corporation | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| zephyr_cc_option(-march=pentium) |
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,23 @@ | ||
| # Copyright (c) 2021 Intel Corporation | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| if SOC_LAKEMONT | ||
|
|
||
| config SOC | ||
| default "lakemont" | ||
|
|
||
| config SYS_CLOCK_HW_CYCLES_PER_SEC | ||
| default 32768 | ||
|
|
||
| # Can be enabled once UART is defined in board | ||
| # configuration. | ||
| config X86_VERY_EARLY_CONSOLE | ||
| default n | ||
|
|
||
| # Target platforms are usually not PC-compatible | ||
| # (e.g. without BIOS, ACPI, etc.). | ||
| config X86_PC_COMPATIBLE | ||
| default n | ||
|
|
||
| endif |
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,14 @@ | ||
| # Copyright (c) 2021 Intel Corporation | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config SOC_LAKEMONT | ||
| bool "Intel Lakemont SoC" | ||
| select X86 | ||
| select CPU_LAKEMONT | ||
| select X86_MMU if FPU | ||
| select X86_SSE if FPU | ||
| select X86_SSE2 if FPU | ||
| select X86_SSE3 if FPU | ||
| select X86_SSSE3 if FPU | ||
| select ARCH_HAS_USERSPACE |
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,8 @@ | ||
| /* | ||
| * Copyright (c) 2011-2014, Wind River Systems, Inc. | ||
| * | ||
jenmwms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #include <arch/x86/memory.ld> | ||
| #include <arch/x86/ia32/linker.ld> | ||
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.