diff options
Diffstat (limited to 'meta/conf/machine/include/riscv')
-rw-r--r-- | meta/conf/machine/include/riscv/README | 122 | ||||
-rw-r--r-- | meta/conf/machine/include/riscv/arch-riscv.inc | 143 | ||||
-rw-r--r-- | meta/conf/machine/include/riscv/qemuriscv.inc | 14 | ||||
-rw-r--r-- | meta/conf/machine/include/riscv/tune-riscv.inc | 38 |
4 files changed, 281 insertions, 36 deletions
diff --git a/meta/conf/machine/include/riscv/README b/meta/conf/machine/include/riscv/README new file mode 100644 index 0000000000..beef68f523 --- /dev/null +++ b/meta/conf/machine/include/riscv/README | |||
@@ -0,0 +1,122 @@ | |||
1 | 2025/06/08 - Mark Hatle <mark.hatle@amd.com> | ||
2 | - Initial Revision | ||
3 | |||
4 | The RISC-V ISA is broken into two parts, a base ISA and extensions. As | ||
5 | of the writing of this document these are documented at: | ||
6 | |||
7 | https://lf-riscv.atlassian.net/wiki/spaces/HOME/pages/16154769/RISC-V+Technical+Specifications | ||
8 | |||
9 | Specifically "The RISC-V Instruction Set Manual Volume I: Unprivileged ISA" | ||
10 | was used to create this implementation. | ||
11 | |||
12 | Requirements | ||
13 | ------------ | ||
14 | As RISC-V is a “variable” ISA (a base isa plus numerous extensions), a | ||
15 | mechanism is required to specify a series of ISA features that a user or | ||
16 | tune can use to specify a specific CPU instantiation. | ||
17 | |||
18 | Not all ratified or draft features should or can be implemented with the | ||
19 | available resources. | ||
20 | |||
21 | The implementation should work for Linux, baremetal (newlib), zephyr and | ||
22 | other operating systems. Supported extensions should be based on | ||
23 | real-world examples. | ||
24 | |||
25 | Linux | ||
26 | ----- | ||
27 | Linux required base and support extensions should be available. Linux | ||
28 | requires: | ||
29 | * Base: rv32ima & rv64ima | ||
30 | * Optional FPU: fd | ||
31 | * Optional RISCV_ISA_C: c | ||
32 | * Optiona RISCV_ISA_V: v | ||
33 | * Required additional: _zicsr_zifencei | ||
34 | * Optional RISCV_ISA_ZBA: _zba | ||
35 | * Optional RISCV_ISA_ZBB: _zbb | ||
36 | * Optional RISCV_ISA_ZBC: _zbc (not supported by current QEMU design) | ||
37 | |||
38 | See: https://git.yoctoproject.org/linux-yocto/tree/arch/riscv/Makefile?h=v6.12/base | ||
39 | |||
40 | Baremetal | ||
41 | --------- | ||
42 | AMD Microblaze-V FPGA support uses the following static configurations: | ||
43 | Base: rv32e, rv32i, rv64i | ||
44 | Extensions: m, a, f, d, c, b, zicsr, zifencei | ||
45 | |||
46 | Zephyr | ||
47 | ------ | ||
48 | AMD Microblaze-V development for Zephyr is the same as Baremetal, with a | ||
49 | few additional extensions: zbc, zicbom | ||
50 | |||
51 | ABI | ||
52 | --- | ||
53 | The following ABIs are supported GNU tools and some combination of systems. | ||
54 | * ilp32 - Integer, long and pointer are 32-bit | ||
55 | * lp64 - Long and pointer are 64-bit (integer is 32-bit) | ||
56 | |||
57 | The ABI is dependent upon the core system implementation, as ilp32 can | ||
58 | only used on an ‘rv32’ system, while lp64 can only be used on an ‘rv64’ | ||
59 | system. | ||
60 | |||
61 | There are additional variations of each ABI: | ||
62 | * e - used with the Reduced register extension | ||
63 | * f - used when single precision floating point (but not double precision) is | ||
64 | enabled | ||
65 | * d - used when both single and double precision floating point is enabled | ||
66 | |||
67 | Based on the above, the ABI should be automatically determined based on | ||
68 | the selected Base ISA and Extensions. | ||
69 | |||
70 | Implementation | ||
71 | -------------- | ||
72 | To make it easier to generate the RISC-V canonical arch, ISA based -march, | ||
73 | and the ABI string, a few new variables are added for specific RISC-V items. | ||
74 | |||
75 | TUNE_RISCV_ARCH - This contains the canonical GNU style arch, generally this | ||
76 | will evaluate to "riscv32" or "riscv64". | ||
77 | |||
78 | TUNE_RISCV_MARCH - This will contain an ISA based -march string compatible | ||
79 | with gcc and similar toolchains. For example: | ||
80 | rv32imacfd_zicsr_zifencei | ||
81 | |||
82 | TUNE_RISCV_ABI - This is the generated ABI that corresponds to the ARCH and | ||
83 | MARCH/ISA values. For riscv32, the value will be ilp32 | ||
84 | (int, long and pointer is 32-bit) with the ISA | ||
85 | variation. For riscv64, the value will be lp64 (long | ||
86 | and pointer are 64-bit bit, while int is 32-bit) with the | ||
87 | ISA variation. The ISA affects the ABI when the 'e', 'f' | ||
88 | and 'd' extension are used. | ||
89 | |||
90 | TUNE_RISCV_PKGARCH - This is the generated PKGARCH value. | ||
91 | |||
92 | The standard variables are defined as: | ||
93 | |||
94 | TUNE_CCARGS = "${@ '-march=${TUNE_RISCV_MARCH} -mabi=${TUNE_RISCV_ABI}' if not d.getVar('TUNE_CCARGS:tune-${DEFAULTTUNE}') else 'TUNE_CCARGS:tune-${DEFAULTTUNE}'}" | ||
95 | |||
96 | The above will allow the user to specify an implementation specific | ||
97 | TUNE_CCARGS for a given processor tune if the default implementtion is | ||
98 | not adequate for some reason. It is expected that most, if not all, | ||
99 | implementations will use the default behavior. | ||
100 | |||
101 | TUNE_ARCH = "${TUNE_RISCV_ARCH}" | ||
102 | TUNE_PKGARCH = "${TUNE_RISCV_PKGARCH}" | ||
103 | |||
104 | The above two will always base their setting off the standard TUNE_FEATURES. | ||
105 | |||
106 | Ratified and draft extensions should be implemented as TUNE_FEATURES in | ||
107 | the arch-riscv.inc file. | ||
108 | |||
109 | Vendor specific extensions and processor specific settings should go | ||
110 | into a 'tune-<vendor>.inc' file, with tune-riscv.inc being reserved for | ||
111 | general purpose tunes. | ||
112 | |||
113 | TUNE_FEATURE Helper | ||
114 | ------------------- | ||
115 | A special helper function has been written that will convert RISC-V ISA | ||
116 | notation into TUNE_FEATURE notion, for example: | ||
117 | |||
118 | rv32g -> rv 32 i m a f d zicsr zifencei | ||
119 | |||
120 | The helper can be called using oe.tune.riscv_isa_to_tune("<ISA>") such as | ||
121 | oe.tune.riscv_isa_to_tune("rv64gc") which would return: | ||
122 | rv 64 i m a f d c zicsr zifencei | ||
diff --git a/meta/conf/machine/include/riscv/arch-riscv.inc b/meta/conf/machine/include/riscv/arch-riscv.inc index eae2b88778..99bed8fde5 100644 --- a/meta/conf/machine/include/riscv/arch-riscv.inc +++ b/meta/conf/machine/include/riscv/arch-riscv.inc | |||
@@ -1,13 +1,142 @@ | |||
1 | # RISCV Architecture definition | 1 | # RISCV Architecture definition |
2 | 2 | ||
3 | DEFAULTTUNE ?= "riscv64" | 3 | # Based on the RISC-V Instruction Set Manual Volume I: Unprivileged ISA from May 2025 |
4 | # As well as the RISC-V options for using GCC (as of June 2025) | ||
4 | 5 | ||
5 | TUNE_ARCH = "${TUNE_ARCH_tune-${DEFAULTTUNE}}" | 6 | # Note: the following should be implemented in the order that GCC expects |
6 | TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}" | 7 | # -march= values to be defined in. |
7 | TUNE_CCARGS_append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv64nf', ' -mabi=lp64', ' ', d)}" | ||
8 | TUNE_CCARGS_append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv32nf', ' -mabi=ilp32', ' ', d)}" | ||
9 | 8 | ||
9 | # Base ISA | ||
10 | # All supported march strings must start with rv32 or rv64 | ||
11 | TUNEVALID[rv] = "RISC-V" | ||
12 | TUNE_RISCV_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "rv", "riscv", "", d)}" | ||
13 | TUNE_RISCV_MARCH = "${@bb.utils.contains("TUNE_FEATURES", "rv", "rv", "", d)}" | ||
14 | TUNE_RISCV_ABI = "" | ||
15 | |||
16 | # There are two primary ABIs, ilp32 and lp64 | ||
17 | # There are variants of both, that appears to be based on extensions above | ||
18 | # For example: | ||
19 | # rv32i uses ilp32, rv32e uses ilp32e, rv32f uses ilp32f | ||
20 | # rv64i uses lp64, rv64if uses lp64f, rv64id uses lp64d | ||
21 | TUNEVALID[32] = "ISA XLEN - 32-bit" | ||
22 | TUNECONFLICTS[32] = "64" | ||
23 | TUNE_RISCV_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "32", "32", "", d)}" | ||
24 | TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "32", "32", "", d)}" | ||
25 | TUNE_RISCV_ABI .= "${@bb.utils.contains("TUNE_FEATURES", "32", "ilp32", "", d)}" | ||
26 | |||
27 | TUNEVALID[64] = "ISA XLEN - 64-bit" | ||
28 | TUNECONFLICTS[64] = "32" | ||
29 | TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "64", "64", "", d)}" | ||
30 | TUNE_RISCV_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "64", "64", "", d)}" | ||
31 | TUNE_RISCV_ABI .= "${@bb.utils.contains("TUNE_FEATURES", "64", "lp64", "", d)}" | ||
32 | |||
33 | # The package arch starts with the canonical arch, but adds some extensions to make | ||
34 | # package compatibility clear | ||
35 | TUNE_RISCV_PKGARCH = "${TUNE_RISCV_ARCH}" | ||
36 | |||
37 | # i, e, or g are defined by gcc, but 'g' refers to 'i' + extensions 'MAFD Zicsr Zifencei' | ||
38 | # So 'g' will not be defined here as it is an abbreviation of the expanded version | ||
39 | TUNEVALID[e] = "Reduced register base integer extension" | ||
40 | TUNECONFLICTS[e] = "i" | ||
41 | TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "e", "e", "", d)}" | ||
42 | TUNE_RISCV_ABI .= "${@bb.utils.contains("TUNE_FEATURES", "e", "e", "", d)}" | ||
43 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "e", "e", "", d)}" | ||
44 | |||
45 | TUNEVALID[i] = "Base integer extension" | ||
46 | TUNECONFLICTS[i] = "e" | ||
47 | TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "i", "i", "", d)}" | ||
48 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "i", "i", "", d)}" | ||
49 | |||
50 | # Extensions | ||
51 | TUNEVALID[m] = "Integer multiplication and division extension" | ||
52 | TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m", "m", "", d)}" | ||
53 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m", "m", "", d)}" | ||
54 | |||
55 | TUNEVALID[a] = "Atomic extension" | ||
56 | TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "a", "a", "", d)}" | ||
57 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "a", "a", "", d)}" | ||
58 | |||
59 | TUNEVALID[f] = "Single-precision floating-point extension" | ||
60 | TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "f d", "f", "", d)}" | ||
61 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "f d", "f", "", d)}" | ||
62 | |||
63 | TUNEVALID[d] = "Double-precision floating-point extension" | ||
64 | TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "d", "d", "", d)}" | ||
65 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "d", "d", "", d)}" | ||
66 | |||
67 | # Only f OR d, but just one | ||
68 | TUNE_RISCV_ABI .= "${@bb.utils.contains("TUNE_FEATURES", "d", "d", bb.utils.contains("TUNE_FEATURES", "f", "f", "", d), d)}" | ||
69 | |||
70 | TUNEVALID[c] = "Compressed extension" | ||
71 | TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "c", "c", "", d)}" | ||
72 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "c", "c", "", d)}" | ||
73 | |||
74 | TUNEVALID[b] = "Bit Manipulation extension" | ||
75 | # Handled below via zba, zbb, zbs | ||
76 | # This matches current Linux kernel behavior | ||
77 | #TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "b", "b", "", d)}" | ||
78 | #TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "b", "b", "", d)}" | ||
79 | |||
80 | TUNEVALID[v] = "Vector operations extension" | ||
81 | TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "v", "v", "", d)}" | ||
82 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "v", "v", "", d)}" | ||
83 | |||
84 | # Now the special Z extensions | ||
85 | TUNEVALID[zicbom] = "Cache-block management extension" | ||
86 | TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zicbom", "_zicbom", "", d)}" | ||
87 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zicbom", "_zicbom", "", d)}" | ||
88 | |||
89 | TUNEVALID[zicsr] = "Control and status register access extension" | ||
90 | TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zicsr f d", "_zicsr", "", d)}" | ||
91 | # If zicsr (or zifencei) is in the path, OpenSBI fails to use the extensions, do to (Makefile): | ||
92 | # # Check whether the assembler and the compiler support the Zicsr and Zifencei extensions | ||
93 | # CC_SUPPORT_ZICSR_ZIFENCEI := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -march=rv$(OPENSBI_CC_XLEN)imafd_zicsr_zifencei -x c /dev/null -o /dev/null 2>&1 | grep -e "zicsr" -e "zifencei" > /dev/null && echo n || echo y) | ||
94 | # this will match on the path containing zicsr or zifencei when an error is reported, which | ||
95 | # will always happens in this check. | ||
96 | # | ||
97 | # Yocto Project Bugzilla 15897 | ||
98 | # | ||
99 | #TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zicsr f d", "_zicsr", "", d)}" | ||
100 | |||
101 | TUNEVALID[zifencei] = "Instruction-fetch fence extension" | ||
102 | TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "zifencei", "_zifencei", "", d)}" | ||
103 | # See above Bug 15897 | ||
104 | #TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "zifencei", "_zifencei", "", d)}" | ||
105 | |||
106 | TUNEVALID[zba] = "Address bit manipulation extension" | ||
107 | TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zba", "_zba", "", d)}" | ||
108 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zba", "_zba", "", d)}" | ||
109 | |||
110 | TUNEVALID[zbb] = "Basic bit manipulation extension" | ||
111 | TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zbb", "_zbb", "", d)}" | ||
112 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zbb", "_zbb", "", d)}" | ||
113 | |||
114 | TUNEVALID[zbc] = "Carry-less multiplication extension" | ||
115 | TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zbc", "_zbc", "", d)}" | ||
116 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zbc", "_zbc", "", d)}" | ||
117 | |||
118 | TUNEVALID[zbs] = "Single-bit manipulation extension" | ||
119 | TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zbs", "_zbs", "", d)}" | ||
120 | TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zbs", "_zbs", "", d)}" | ||
121 | |||
122 | # Construct TUNE_CCARGS | ||
123 | # This should result in a CCARG similar to: | ||
124 | # -march=rv32imac -mabi=ilp32 | ||
125 | TUNE_CCARGS = "${@ '-march=${TUNE_RISCV_MARCH} -mabi=${TUNE_RISCV_ABI}' if not d.getVar('TUNE_CCARGS:tune-${DEFAULTTUNE}') else 'TUNE_CCARGS:tune-${DEFAULTTUNE}'}" | ||
126 | |||
127 | # Construct TUNE_ARCH | ||
128 | # This should result in an arch string similar to: | ||
129 | # riscv32 | ||
130 | TUNE_ARCH = "${TUNE_RISCV_ARCH}" | ||
131 | |||
132 | # Construct TUNE_PKGARCH | ||
133 | # This should result in a package are like: | ||
134 | # riscv32imac | ||
135 | TUNE_PKGARCH = "${TUNE_RISCV_PKGARCH}" | ||
136 | |||
137 | # Misc settings | ||
10 | # Fix: ld: unrecognized option '--hash-style=sysv' | 138 | # Fix: ld: unrecognized option '--hash-style=sysv' |
11 | LINKER_HASH_STYLE_libc-newlib = "" | 139 | LINKER_HASH_STYLE:libc-newlib = "" |
140 | LINKER_HASH_STYLE:libc-picolibc = "" | ||
12 | # Fix: ld: unrecognized option '--hash-style=gnu' | 141 | # Fix: ld: unrecognized option '--hash-style=gnu' |
13 | LINKER_HASH_STYLE_libc-baremetal = "" | 142 | LINKER_HASH_STYLE:libc-baremetal = "" |
diff --git a/meta/conf/machine/include/riscv/qemuriscv.inc b/meta/conf/machine/include/riscv/qemuriscv.inc index 47d7e9b174..65cbfd66ee 100644 --- a/meta/conf/machine/include/riscv/qemuriscv.inc +++ b/meta/conf/machine/include/riscv/qemuriscv.inc | |||
@@ -3,14 +3,13 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" | |||
3 | require conf/machine/include/qemu.inc | 3 | require conf/machine/include/qemu.inc |
4 | require conf/machine/include/riscv/tune-riscv.inc | 4 | require conf/machine/include/riscv/tune-riscv.inc |
5 | 5 | ||
6 | MACHINE_FEATURES = "screen keyboard ext2 ext3 serial" | 6 | MACHINE_FEATURES += "keyboard ext2 ext3 serial" |
7 | 7 | ||
8 | KERNEL_IMAGETYPE = "Image" | 8 | KERNEL_IMAGETYPE = "Image" |
9 | KERNEL_IMAGETYPES += "uImage" | 9 | KERNEL_IMAGETYPES += "uImage" |
10 | KEEPUIMAGE = "no" | 10 | KEEPUIMAGE = "no" |
11 | 11 | ||
12 | SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0" | 12 | SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0" |
13 | SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" | ||
14 | 13 | ||
15 | IMAGE_FSTYPES += "ext4 wic.qcow2" | 14 | IMAGE_FSTYPES += "ext4 wic.qcow2" |
16 | 15 | ||
@@ -22,15 +21,20 @@ EXTRA_IMAGEDEPENDS += "opensbi" | |||
22 | RISCV_SBI_PLAT ?= "generic" | 21 | RISCV_SBI_PLAT ?= "generic" |
23 | RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin" | 22 | RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin" |
24 | 23 | ||
25 | UBOOT_ENTRYPOINT_riscv32 = "0x80400000" | 24 | UBOOT_ENTRYPOINT:riscv32 = "0x80400000" |
26 | UBOOT_ENTRYPOINT_riscv64 = "0x80200000" | 25 | UBOOT_ENTRYPOINT:riscv64 = "0x80200000" |
27 | 26 | ||
28 | # qemuboot options | 27 | # qemuboot options |
28 | QB_SMP ?= "-smp 4" | ||
29 | QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi" | 29 | QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi" |
30 | QB_CPU:riscv64 ?= "-cpu rva22s64" | ||
30 | QB_MACHINE = "-machine virt" | 31 | QB_MACHINE = "-machine virt" |
31 | QB_DEFAULT_BIOS = "fw_jump.elf" | 32 | QB_DEFAULT_BIOS = "fw_jump.elf" |
32 | QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" | 33 | QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" |
33 | QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@" | 34 | QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@" |
34 | QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0" | 35 | QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0" |
35 | QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon" | 36 | QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon" |
36 | QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon" | 37 | QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1,nodelay=on -device virtconsole,chardev=virtcon" |
38 | QB_GRAPHICS = "-device bochs-display" | ||
39 | QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd" | ||
40 | QB_OPT_APPEND:riscv32 = "-device virtio-tablet-pci -device virtio-keyboard-pci" | ||
diff --git a/meta/conf/machine/include/riscv/tune-riscv.inc b/meta/conf/machine/include/riscv/tune-riscv.inc index 028548bf56..12c1125c8b 100644 --- a/meta/conf/machine/include/riscv/tune-riscv.inc +++ b/meta/conf/machine/include/riscv/tune-riscv.inc | |||
@@ -1,33 +1,23 @@ | |||
1 | require conf/machine/include/riscv/arch-riscv.inc | 1 | require conf/machine/include/riscv/arch-riscv.inc |
2 | 2 | ||
3 | TUNEVALID[riscv64] = "Enable 64-bit RISC-V optimizations" | 3 | DEFAULTTUNE ?= "riscv64" |
4 | TUNEVALID[riscv32] = "Enable 32-bit RISC-V optimizations" | ||
5 | 4 | ||
6 | TUNEVALID[riscv64nf] = "Enable 64-bit RISC-V optimizations no floating point" | 5 | AVAILTUNES += "riscv64 riscv32 riscv64nc riscv64nf riscv32nf" |
7 | TUNEVALID[riscv32nf] = "Enable 32-bit RISC-V optimizations no floating point" | ||
8 | |||
9 | TUNEVALID[bigendian] = "Big endian mode" | ||
10 | |||
11 | AVAILTUNES += "riscv64 riscv32 riscv64nf riscv32nf" | ||
12 | 6 | ||
13 | # Default | 7 | # Default |
14 | TUNE_FEATURES_tune-riscv64 = "riscv64" | 8 | TUNE_FEATURES:tune-riscv64 := "${@oe.tune.riscv_isa_to_tune("rv64gc")}" |
15 | TUNE_ARCH_tune-riscv64 = "riscv64" | 9 | PACKAGE_EXTRA_ARCHS:tune-riscv64 = "${TUNE_RISCV_PKGARCH}" |
16 | TUNE_PKGARCH_tune-riscv64 = "riscv64" | ||
17 | PACKAGE_EXTRA_ARCHS_tune-riscv64 = "riscv64" | ||
18 | 10 | ||
19 | TUNE_FEATURES_tune-riscv32 = "riscv32" | 11 | TUNE_FEATURES:tune-riscv32 := "${@oe.tune.riscv_isa_to_tune("rv32gc")}" |
20 | TUNE_ARCH_tune-riscv32 = "riscv32" | 12 | PACKAGE_EXTRA_ARCHS:tune-riscv32 = "${TUNE_RISCV_PKGARCH}" |
21 | TUNE_PKGARCH_tune-riscv32 = "riscv32" | ||
22 | PACKAGE_EXTRA_ARCHS_tune-riscv32 = "riscv32" | ||
23 | 13 | ||
24 | # No float | 14 | # No float |
25 | TUNE_FEATURES_tune-riscv64nf = "${TUNE_FEATURES_tune-riscv64} riscv64nf" | 15 | TUNE_FEATURES:tune-riscv64nf := "${@oe.tune.riscv_isa_to_tune("rv64imac_zicsr_zifencei")}" |
26 | TUNE_ARCH_tune-riscv64nf = "riscv64" | 16 | PACKAGE_EXTRA_ARCHS:tune-riscv64nf = "${TUNE_RISCV_PKGARCH}" |
27 | TUNE_PKGARCH_tune-riscv64nf = "riscv64nf" | 17 | |
28 | PACKAGE_EXTRA_ARCHS_tune-riscv64nf = "riscv64nf" | 18 | TUNE_FEATURES:tune-riscv32nf := "${@oe.tune.riscv_isa_to_tune("rv32imac_zicsr_zifencei")}" |
19 | PACKAGE_EXTRA_ARCHS:tune-riscv32nf = "${TUNE_RISCV_PKGARCH}" | ||
29 | 20 | ||
30 | TUNE_FEATURES_tune-riscv32nf = "${TUNE_FEATURES_tune-riscv32} riscv32nf" | 21 | # no compressed |
31 | TUNE_ARCH_tune-riscv32nf = "riscv32" | 22 | TUNE_FEATURES:tune-riscv64nc := "${@oe.tune.riscv_isa_to_tune("rv64imafd_zicsr_zifencei")}" |
32 | TUNE_PKGARCH_tune-riscv32nf = "riscv32nf" | 23 | PACKAGE_EXTRA_ARCHS:tune-riscv64nc = "${TUNE_RISCV_PKGARCH}" |
33 | PACKAGE_EXTRA_ARCHS_tune-riscv32nf = "riscv32nf" | ||