scons: Update the Kconfig build options
The CL updates the Kconfig: 1. Replace the USE_NULL_ISA with BUILD_ISA 2. The USE_XXX_ISAs are depends on BUILD_ISA 3. If the BUILD_ISA is set, at least one of USE_XXX_ISAs must be set 4. Refactor the USE_KVM option Change-Id: I2a600dea9fb671263b0191c46c5790ebbe91a7b8
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MESI_TWO_LEVEL=y
|
||||
BUILD_ISA=y
|
||||
USE_ARM_ISA=y
|
||||
USE_MIPS_ISA=y
|
||||
USE_POWER_ISA=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
BUILD_ISA=y
|
||||
USE_ARM_ISA=y
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_CHI=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
BUILD_ISA=y
|
||||
USE_ARM_ISA=y
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MESI_THREE_LEVEL=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
BUILD_ISA=y
|
||||
USE_ARM_ISA=y
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MESI_THREE_LEVEL_HTM=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
BUILD_ISA=y
|
||||
USE_ARM_ISA=y
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MOESI_HAMMER=y
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_GPU_VIPER=y
|
||||
BUILD_ISA=y
|
||||
USE_X86_ISA=y
|
||||
GCN3_GPU_ISA=y
|
||||
BUILD_GPU=y
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_GARNET_STANDALONE=y
|
||||
USE_NULL_ISA=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MI_EXAMPLE=y
|
||||
BUILD_ISA=y
|
||||
USE_MIPS_ISA=y
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MI_EXAMPLE=y
|
||||
USE_NULL_ISA=y
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MESI_TWO_LEVEL=y
|
||||
USE_NULL_ISA=y
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MOESI_CMP_DIRECTORY=y
|
||||
USE_NULL_ISA=y
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MOESI_CMP_TOKEN=y
|
||||
USE_NULL_ISA=y
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MOESI_HAMMER=y
|
||||
USE_NULL_ISA=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MI_EXAMPLE=y
|
||||
BUILD_ISA=y
|
||||
USE_POWER_ISA=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MI_EXAMPLE=y
|
||||
BUILD_ISA=y
|
||||
USE_RISCV_ISA=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MI_EXAMPLE=y
|
||||
BUILD_ISA=y
|
||||
USE_SPARC_ISA=y
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_GPU_VIPER=y
|
||||
BUILD_ISA=y
|
||||
USE_X86_ISA=y
|
||||
VEGA_GPU_ISA=y
|
||||
BUILD_GPU=y
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
RUBY=y
|
||||
NUMBER_BITS_PER_SET=128
|
||||
RUBY_PROTOCOL_MESI_TWO_LEVEL=y
|
||||
BUILD_ISA=y
|
||||
USE_X86_ISA=y
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
RUBY=y
|
||||
NUMBER_BITS_PER_SET=128
|
||||
RUBY_PROTOCOL_MESI_TWO_LEVEL=y
|
||||
BUILD_ISA=y
|
||||
USE_X86_ISA=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MI_EXAMPLE=y
|
||||
BUILD_ISA=y
|
||||
USE_X86_ISA=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
RUBY=y
|
||||
RUBY_PROTOCOL_MOESI_AMD_BASE=y
|
||||
BUILD_ISA=y
|
||||
USE_X86_ISA=y
|
||||
|
||||
@@ -28,10 +28,21 @@ config TARGET_GPU_ISA
|
||||
|
||||
rsource "amdgpu/Kconfig"
|
||||
|
||||
config BUILD_ISA
|
||||
bool "Build the arch ISA"
|
||||
default n
|
||||
|
||||
menu "ISA"
|
||||
|
||||
if BUILD_ISA
|
||||
|
||||
rsource "arm/Kconfig"
|
||||
rsource "mips/Kconfig"
|
||||
rsource "null/Kconfig"
|
||||
rsource "power/Kconfig"
|
||||
rsource "riscv/Kconfig"
|
||||
rsource "sparc/Kconfig"
|
||||
rsource "x86/Kconfig"
|
||||
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -56,20 +56,17 @@ Import('*')
|
||||
#
|
||||
#################################################################
|
||||
|
||||
if env['CONF']['USE_ARM_ISA']:
|
||||
isa = 'arm'
|
||||
elif env['CONF']['USE_MIPS_ISA']:
|
||||
isa = 'mips'
|
||||
elif env['CONF']['USE_POWER_ISA']:
|
||||
isa = 'power'
|
||||
elif env['CONF']['USE_RISCV_ISA']:
|
||||
isa = 'riscv'
|
||||
elif env['CONF']['USE_SPARC_ISA']:
|
||||
isa = 'sparc'
|
||||
elif env['CONF']['USE_X86_ISA']:
|
||||
isa = 'x86'
|
||||
elif env['CONF']['USE_NULL_ISA']:
|
||||
isa = 'null'
|
||||
if env['CONF']['BUILD_ISA']:
|
||||
if (
|
||||
not env['CONF']['USE_ARM_ISA'] and
|
||||
not env['CONF']['USE_MIPS_ISA'] and
|
||||
not env['CONF']['USE_POWER_ISA'] and
|
||||
not env['CONF']['USE_RISCV_ISA'] and
|
||||
not env['CONF']['USE_SPARC_ISA'] and
|
||||
not env['CONF']['USE_X86_ISA']
|
||||
):
|
||||
error("At least one ISA need to be set")
|
||||
|
||||
|
||||
amdgpu_isa = ['gcn3', 'vega']
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met: redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer;
|
||||
# redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution;
|
||||
# neither the name of the copyright holders nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
config USE_NULL_ISA
|
||||
bool "Null ISA support"
|
||||
@@ -30,5 +30,4 @@ config KVM_ISA
|
||||
config USE_KVM
|
||||
depends on KVM_ISA != ""
|
||||
bool "Enable hardware virtualized (KVM) CPU models"
|
||||
default y if KVM_ISA != ""
|
||||
default n
|
||||
default y
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if not env['CONF']['USE_NULL_ISA']:
|
||||
if env['CONF']['BUILD_ISA']:
|
||||
SimObject('BaseMinorCPU.py', sim_objects=[
|
||||
'MinorOpClass', 'MinorOpClassSet', 'MinorFUTiming', 'MinorFU',
|
||||
'MinorFUPool', 'BaseMinorCPU'],
|
||||
|
||||
@@ -30,7 +30,7 @@ import sys
|
||||
|
||||
Import('*')
|
||||
|
||||
if not env['CONF']['USE_NULL_ISA']:
|
||||
if env['CONF']['BUILD_ISA']:
|
||||
SimObject('FUPool.py', sim_objects=['FUPool'])
|
||||
SimObject('FuncUnitConfig.py', sim_objects=[])
|
||||
SimObject('BaseO3CPU.py', sim_objects=['BaseO3CPU'], enums=[
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if not env['CONF']['USE_NULL_ISA']:
|
||||
if env['CONF']['BUILD_ISA']:
|
||||
SimObject('SimpleTrace.py', sim_objects=['SimpleTrace'])
|
||||
Source('simple_trace.cc')
|
||||
DebugFlag('SimpleTrace')
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if not env['CONF']['USE_NULL_ISA']:
|
||||
if env['CONF']['BUILD_ISA']:
|
||||
SimObject('BaseAtomicSimpleCPU.py', sim_objects=['BaseAtomicSimpleCPU'])
|
||||
Source('atomic.cc')
|
||||
|
||||
|
||||
@@ -28,6 +28,6 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if not env['CONF']['USE_NULL_ISA']:
|
||||
if env['CONF']['BUILD_ISA']:
|
||||
SimObject('SimPoint.py', sim_objects=['SimPoint'])
|
||||
Source('simpoint.cc')
|
||||
|
||||
@@ -42,6 +42,9 @@ def get_supported_isas() -> Set[ISA]:
|
||||
"""
|
||||
supported_isas = set()
|
||||
|
||||
if not buildEnv["BUILD_ISA"]:
|
||||
return {ISA.NULL}
|
||||
|
||||
if "TARGET_ISA" in buildEnv.keys():
|
||||
supported_isas.add(get_isa_from_str(buildEnv["TARGET_ISA"]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user