Merge tag 'mips-pull-2021-04-24' of https://source.denx.de/u-boot/custodians/u-boot...
[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_SYS_BOOTM_LEN            (16 << 20)
20
21 /* SATA AHCI storage */
22 #ifdef CONFIG_SCSI_AHCI
23 #define CONFIG_LBA48
24 #define CONFIG_SYS_64BIT_LBA
25
26 #endif
27
28 /* Generic TPM interfaced through LPC bus */
29 #define CONFIG_TPM_TIS_BASE_ADDRESS        0xfed40000
30
31 /*-----------------------------------------------------------------------
32  * Real Time Clock Configuration
33  */
34 #define CONFIG_SYS_ISA_IO_BASE_ADDRESS  0
35 #define CONFIG_SYS_ISA_IO      CONFIG_SYS_ISA_IO_BASE_ADDRESS
36
37 /*-----------------------------------------------------------------------
38  * Serial Configuration
39  */
40 #define CONFIG_SYS_NS16550_PORT_MAPPED
41
42 #ifndef CONFIG_BOOTCOMMAND
43 #define CONFIG_BOOTCOMMAND      \
44         "ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
45 #endif
46
47 #if defined(CONFIG_CMD_KGDB)
48 #define CONFIG_KGDB_BAUDRATE                    115200
49 #endif
50
51 /*
52  * Miscellaneous configurable options
53  */
54 #define CONFIG_SYS_CBSIZE                       512
55
56 #define CONFIG_SYS_LOAD_ADDR                    0x20000000
57
58 /*-----------------------------------------------------------------------
59  * CPU Features
60  */
61
62 #define CONFIG_SYS_STACK_SIZE                   (32 * 1024)
63 #define CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_TEXT_BASE
64 #define CONFIG_SYS_MALLOC_LEN                   0x200000
65
66 /*-----------------------------------------------------------------------
67  * Environment configuration
68  */
69
70 /*-----------------------------------------------------------------------
71  * PCI configuration
72  */
73 #define CONFIG_PCI_CONFIG_HOST_BRIDGE
74
75 /*-----------------------------------------------------------------------
76  * USB configuration
77  */
78
79 #define CONFIG_TFTP_TSIZE
80 #define CONFIG_BOOTP_BOOTFILESIZE
81
82 /* Default environment */
83 #define CONFIG_ROOTPATH         "/opt/nfsroot"
84 #define CONFIG_HOSTNAME         "x86"
85 #define CONFIG_BOOTFILE         "bzImage"
86 #define CONFIG_LOADADDR         0x1000000
87 #define CONFIG_RAMDISK_ADDR     0x4000000
88 #if defined(CONFIG_GENERATE_ACPI_TABLE) || defined(CONFIG_EFI_STUB)
89 #define CONFIG_OTHBOOTARGS      "othbootargs=\0"
90 #else
91 #define CONFIG_OTHBOOTARGS      "othbootargs=acpi=off\0"
92 #endif
93
94 #if defined(CONFIG_DISTRO_DEFAULTS)
95 #define DISTRO_BOOTENV          BOOTENV
96 #else
97 #define DISTRO_BOOTENV
98 #endif
99
100 #define CONFIG_EXTRA_ENV_SETTINGS                       \
101         DISTRO_BOOTENV                                  \
102         CONFIG_STD_DEVICES_SETTINGS                     \
103         "pciconfighost=1\0"                             \
104         "netdev=eth0\0"                                 \
105         "consoledev=ttyS0\0"                            \
106         CONFIG_OTHBOOTARGS                              \
107         "scriptaddr=0x7000000\0"                        \
108         "kernel_addr_r=0x1000000\0"                     \
109         "ramdisk_addr_r=0x4000000\0"                    \
110         "ramdiskfile=initramfs.gz\0"
111
112
113 #define CONFIG_RAMBOOTCOMMAND                           \
114         "setenv bootargs root=/dev/ram rw "             \
115         "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
116         "console=$consoledev,$baudrate $othbootargs;"   \
117         "tftpboot $kernel_addr_r $bootfile;"            \
118         "tftpboot $ramdisk_addr_r $ramdiskfile;"        \
119         "zboot $kernel_addr_r 0 $ramdisk_addr_r $filesize"
120
121 #define CONFIG_NFSBOOTCOMMAND                           \
122         "setenv bootargs root=/dev/nfs rw "             \
123         "nfsroot=$serverip:$rootpath "                  \
124         "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
125         "console=$consoledev,$baudrate $othbootargs;"   \
126         "tftpboot $kernel_addr_r $bootfile;"            \
127         "zboot $kernel_addr_r"
128
129
130 #endif  /* __CONFIG_H */