Merge https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[platform/kernel/u-boot.git] / include / configs / x86-common.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (c) 2011 The Chromium OS Authors.
4  * (C) Copyright 2008
5  * Graeme Russ, graeme.russ@gmail.com.
6  */
7
8 #include <asm/ibmpc.h>
9
10 #ifndef __CONFIG_X86_COMMON_H
11 #define __CONFIG_X86_COMMON_H
12
13 /*
14  * High Level Configuration Options
15  * (easy to change)
16  */
17 #define CONFIG_PHYSMEM
18
19 #define CONFIG_LMB
20
21 #define CONFIG_SYS_BOOTM_LEN            (16 << 20)
22
23 /* SATA AHCI storage */
24 #ifdef CONFIG_SCSI_AHCI
25 #define CONFIG_LBA48
26 #define CONFIG_SYS_64BIT_LBA
27
28 #endif
29
30 /* Generic TPM interfaced through LPC bus */
31 #define CONFIG_TPM_TIS_BASE_ADDRESS        0xfed40000
32
33 /*-----------------------------------------------------------------------
34  * Real Time Clock Configuration
35  */
36 #define CONFIG_SYS_ISA_IO_BASE_ADDRESS  0
37 #define CONFIG_SYS_ISA_IO      CONFIG_SYS_ISA_IO_BASE_ADDRESS
38
39 /*-----------------------------------------------------------------------
40  * Serial Configuration
41  */
42 #define CONFIG_SYS_NS16550_PORT_MAPPED
43
44 #ifndef CONFIG_BOOTCOMMAND
45 #define CONFIG_BOOTCOMMAND      \
46         "ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
47 #endif
48
49 #if defined(CONFIG_CMD_KGDB)
50 #define CONFIG_KGDB_BAUDRATE                    115200
51 #endif
52
53 /*
54  * Miscellaneous configurable options
55  */
56 #define CONFIG_SYS_CBSIZE                       512
57
58 #define CONFIG_SYS_LOAD_ADDR                    0x20000000
59
60 /*-----------------------------------------------------------------------
61  * CPU Features
62  */
63
64 #define CONFIG_SYS_STACK_SIZE                   (32 * 1024)
65 #define CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_TEXT_BASE
66 #define CONFIG_SYS_MALLOC_LEN                   0x200000
67
68 /*-----------------------------------------------------------------------
69  * Environment configuration
70  */
71
72 /*-----------------------------------------------------------------------
73  * PCI configuration
74  */
75 #define CONFIG_PCI_CONFIG_HOST_BRIDGE
76
77 /*-----------------------------------------------------------------------
78  * USB configuration
79  */
80
81 #define CONFIG_TFTP_TSIZE
82 #define CONFIG_BOOTP_BOOTFILESIZE
83
84 /* Default environment */
85 #define CONFIG_ROOTPATH         "/opt/nfsroot"
86 #define CONFIG_HOSTNAME         "x86"
87 #define CONFIG_BOOTFILE         "bzImage"
88 #define CONFIG_LOADADDR         0x1000000
89 #define CONFIG_RAMDISK_ADDR     0x4000000
90 #if defined(CONFIG_GENERATE_ACPI_TABLE) || defined(CONFIG_EFI_STUB)
91 #define CONFIG_OTHBOOTARGS      "othbootargs=\0"
92 #else
93 #define CONFIG_OTHBOOTARGS      "othbootargs=acpi=off\0"
94 #endif
95
96 #if defined(CONFIG_DISTRO_DEFAULTS)
97 #define DISTRO_BOOTENV          BOOTENV
98 #else
99 #define DISTRO_BOOTENV
100 #endif
101
102 #define CONFIG_EXTRA_ENV_SETTINGS                       \
103         DISTRO_BOOTENV                                  \
104         CONFIG_STD_DEVICES_SETTINGS                     \
105         "pciconfighost=1\0"                             \
106         "netdev=eth0\0"                                 \
107         "consoledev=ttyS0\0"                            \
108         CONFIG_OTHBOOTARGS                              \
109         "scriptaddr=0x7000000\0"                        \
110         "kernel_addr_r=0x1000000\0"                     \
111         "ramdisk_addr_r=0x4000000\0"                    \
112         "ramdiskfile=initramfs.gz\0"
113
114
115 #define CONFIG_RAMBOOTCOMMAND                           \
116         "setenv bootargs root=/dev/ram rw "             \
117         "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
118         "console=$consoledev,$baudrate $othbootargs;"   \
119         "tftpboot $kernel_addr_r $bootfile;"            \
120         "tftpboot $ramdisk_addr_r $ramdiskfile;"        \
121         "zboot $kernel_addr_r 0 $ramdisk_addr_r $filesize"
122
123 #define CONFIG_NFSBOOTCOMMAND                           \
124         "setenv bootargs root=/dev/nfs rw "             \
125         "nfsroot=$serverip:$rootpath "                  \
126         "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
127         "console=$consoledev,$baudrate $othbootargs;"   \
128         "tftpboot $kernel_addr_r $bootfile;"            \
129         "zboot $kernel_addr_r"
130
131
132 #endif  /* __CONFIG_H */