blob: 07d86bb8be669d0b0f0ccc4788246e67f0caa2b6 [file] [log] [blame]
Martin Roth7687e772023-08-22 16:32:20 -06001/* SPDX-License-Identifier: BSD-3-Clause */
2
Marc Jones9ef6e522016-09-20 20:16:20 -06003/* $NoKeywords:$ */
4/**
5 * @file
6 *
7 * IDS Option File
8 *
9 * This file is used to switch on/off IDS features.
10 *
11 * @xrefitem bom "File Content Label" "Release Content"
12 * @e project: AGESA
13 * @e sub-project: Core
14 * @e \$Revision: 192403 $ @e \$Date: 2012-12-12 15:46:25 -0600 (Wed, 12 Dec 2012) $
15 */
16 /*****************************************************************************
17 *
Marc Jones823dbde2018-01-25 17:05:46 -070018 * Copyright (c) 2008 - 2017, Advanced Micro Devices, Inc.
Marc Jones9ef6e522016-09-20 20:16:20 -060019 * All rights reserved.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions are met:
23 * * Redistributions of source code must retain the above copyright
24 * notice, this list of conditions and the following disclaimer.
25 * * Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in the
27 * documentation and/or other materials provided with the distribution.
28 * * Neither the name of Advanced Micro Devices, Inc. nor the names of
29 * its contributors may be used to endorse or promote products derived
30 * from this software without specific prior written permission.
31 *
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
33 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35 * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
36 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
39 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 *
43 ***************************************************************************/
Martin Rothae016342017-11-16 22:46:56 -070044
45#include <check_for_wrapper.h>
46
Marc Jones9ef6e522016-09-20 20:16:20 -060047#include "Ids.h"
48
49#ifndef _OPTION_IDS_H_
50#define _OPTION_IDS_H_
51
52/**
53 *
54 * This file generates the defaults tables for the Integrated Debug Support
55 * Module. The documented build options are imported from a user controlled
56 * file for processing. The build options for the Integrated Debug Support
57 * Module are listed below:
58 *
59 * IDSOPT_IDS_ENABLED
Marc Jones9ef6e522016-09-20 20:16:20 -060060 * IDSOPT_CONTROL_ENABLED
61 *
62 * Warning: When you enable the IDSOPT_CONTROL_NV_TO_CMOS feature.
63 * please make the cmos region defined by IDS_OPT_CMOS_REGION_START &
64 * IDS_OPT_CMOS_REGION_END can be touched between IDS HOOK point
65 * IDS_CPU_Early_Override and IDS_BEFORE_AP_EARLY_HALT of BSP
66 *
67 * IDSOPT_CONTROL_NV_TO_CMOS
68 * IDS_OPT_CMOS_INDEX_PORT
69 * IDS_OPT_CMOS_DATA_PORT
70 * IDS_OPT_CMOS_REGION_START
71 * IDS_OPT_CMOS_REGION_END
72 *
73 * IDSOPT_TRACING_ENABLED
74 * IDSOPT_TRACING_CONSOLE_HDTOUT
75 * IDSOPT_TRACING_CONSOLE_SERIALPORT
76 * IDSOPT_SERIAL_PORT (default 0x3F8)
77 * IDSOPT_TRACING_CONSOLE_REDIRECT_IO
78 * IDSOPT_DEBUG_PRINT_IO_PORT (default 0x80)
79 * IDSOPT_TRACING_CONSOLE_RAM
80 * IDSOPT_DPRAM_BASE
81 * IDSOPT_DPRAM_SIZE
82 * IDSOPT_DPRAM_STOP_LOGGING_WHEN_BUFFER_FULL (default FALSE)
83 * IDSOPT_CUSTOMIZE_TRACING_SERVICE
84 * IDSOPT_CUSTOMIZE_TRACING_SERVICE_INIT
85 * IDSOPT_CUSTOMIZE_TRACING_SERVICE_EXIT
86 *
87 * IDSOPT_TRACE_BLD_CFG
88 * IDSOPT_PERF_ANALYSIS
89 * IDSOPT_ASSERT_ENABLED
90 * IDS_DEBUG_PORT
Marc Jones823dbde2018-01-25 17:05:46 -070091 * IDS_DEBUG_PORT_SIZE_IN_BYTES
92 * IDS_DEBUG_TP_PREFIX
Marc Jones9ef6e522016-09-20 20:16:20 -060093 * IDSOPT_CAR_CORRUPTION_CHECK_ENABLED
94 * IDSOPT_DEBUG_CODE_ENABLED
95 * IDSOPT_IDT_EXCEPTION_TRAP
96 * IDSOPT_C_OPTIMIZATION_DISABLED
97 *
98 **/
99
Marc Jones823dbde2018-01-25 17:05:46 -0700100#define IDS_MMAP_SERIAL_PORT
101
Marc Jones9ef6e522016-09-20 20:16:20 -0600102#ifdef DEBUG
103#define IDSOPT_IDS_ENABLED TRUE
104//#define IDSOPT_CONTROL_ENABLED FALSE
105#define IDSOPT_TRACING_ENABLED TRUE
106#define IDSOPT_TRACING_CONSOLE_SERIALPORT TRUE
107#ifdef IDS_DEBUG_PRINT_MASK
108#undef IDS_DEBUG_PRINT_MASK
109#endif
110#define IDS_DEBUG_PRINT_MASK (GNB_TRACE_ALL | GFX_MISC | CPU_TRACE_ALL | MEM_STATUS | TOPO_TRACE_ALL | FCH_TRACE_ALL | MAIN_FLOW | IDS_TRACE_DEFAULT | TEST_POINT)
Marc Jones823dbde2018-01-25 17:05:46 -0700111#ifdef IDS_MMAP_SERIAL_PORT
112#define IDSOPT_SERIAL_PORT 0xfedc6000
113#else
Marc Jones9ef6e522016-09-20 20:16:20 -0600114#define IDSOPT_SERIAL_PORT 0x3F8
Marc Jones823dbde2018-01-25 17:05:46 -0700115#endif
Marc Jones9ef6e522016-09-20 20:16:20 -0600116#define IDSOPT_HEAP_CHECKING TRUE
117#define IDSOPT_TRACE_BLD_CFG TRUE
118#define IDSOPT_CAR_CORRUPTION_CHECK_ENABLED FALSE
119#define IDSOPT_DEBUG_CODE_ENABLED TRUE
120#define IDSOPT_C_OPTIMIZATION_DISABLED TRUE
Marc Jones823dbde2018-01-25 17:05:46 -0700121//#define IDSOPT_ASSERT_ENABLED TRUE
Marc Jones9ef6e522016-09-20 20:16:20 -0600122#else
123#define IDSOPT_IDS_ENABLED FALSE
Marc Jones9ef6e522016-09-20 20:16:20 -0600124//#define IDSOPT_CONTROL_ENABLED FALSE
125#define IDSOPT_TRACING_ENABLED FALSE
126#define IDSOPT_TRACING_CONSOLE_SERIALPORT TRUE
127#define IDS_DEBUG_PRINT_MASK (0)
128#endif
129
130#endif