Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2011 The Chromium OS Authors. |
| 4 | * (C) Copyright 2008 |
| 5 | * Graeme Russ, graeme.russ@gmail.com. |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 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 | */ |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 17 | #define CONFIG_PHYSMEM |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 18 | |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 19 | #define CONFIG_SYS_BOOTM_LEN (16 << 20) |
| 20 | |
| 21 | /* SATA AHCI storage */ |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 22 | #ifdef CONFIG_SCSI_AHCI |
Bin Meng | 186e64e | 2015-05-16 09:33:18 +0800 | [diff] [blame] | 23 | #define CONFIG_LBA48 |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 24 | #define CONFIG_SYS_64BIT_LBA |
| 25 | |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 26 | #endif |
| 27 | |
| 28 | /* Generic TPM interfaced through LPC bus */ |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 29 | #define CONFIG_TPM_TIS_BASE_ADDRESS 0xfed40000 |
| 30 | |
| 31 | /*----------------------------------------------------------------------- |
| 32 | * Real Time Clock Configuration |
| 33 | */ |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 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 | */ |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 40 | #define CONFIG_SYS_NS16550_PORT_MAPPED |
| 41 | |
Heinrich Schuchardt | ea2e31b | 2018-01-03 16:23:46 +0100 | [diff] [blame] | 42 | #ifndef CONFIG_BOOTCOMMAND |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 43 | #define CONFIG_BOOTCOMMAND \ |
| 44 | "ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000" |
Heinrich Schuchardt | ea2e31b | 2018-01-03 16:23:46 +0100 | [diff] [blame] | 45 | #endif |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 46 | |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 47 | /* |
| 48 | * Miscellaneous configurable options |
| 49 | */ |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 50 | #define CONFIG_SYS_CBSIZE 512 |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 51 | |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 52 | /*----------------------------------------------------------------------- |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 53 | * CPU Features |
| 54 | */ |
| 55 | |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 56 | #define CONFIG_SYS_STACK_SIZE (32 * 1024) |
| 57 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 58 | |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 59 | /*----------------------------------------------------------------------- |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 60 | * Environment configuration |
| 61 | */ |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 62 | |
| 63 | /*----------------------------------------------------------------------- |
| 64 | * PCI configuration |
| 65 | */ |
Bin Meng | 4dde045 | 2015-08-13 00:29:15 -0700 | [diff] [blame] | 66 | #define CONFIG_PCI_CONFIG_HOST_BRIDGE |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 67 | |
| 68 | /*----------------------------------------------------------------------- |
| 69 | * USB configuration |
| 70 | */ |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 71 | |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 72 | #define CONFIG_BOOTP_BOOTFILESIZE |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 73 | |
Bin Meng | f95a6c8 | 2015-03-12 13:08:46 +0800 | [diff] [blame] | 74 | /* Default environment */ |
| 75 | #define CONFIG_ROOTPATH "/opt/nfsroot" |
Mario Six | 790d844 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 76 | #define CONFIG_HOSTNAME "x86" |
Bin Meng | f95a6c8 | 2015-03-12 13:08:46 +0800 | [diff] [blame] | 77 | #define CONFIG_BOOTFILE "bzImage" |
Bin Meng | 2b81f61 | 2016-05-07 07:46:35 -0700 | [diff] [blame] | 78 | #define CONFIG_RAMDISK_ADDR 0x4000000 |
Bin Meng | dc81d84 | 2018-08-23 08:24:11 -0700 | [diff] [blame] | 79 | #if defined(CONFIG_GENERATE_ACPI_TABLE) || defined(CONFIG_EFI_STUB) |
Bin Meng | 2b81f61 | 2016-05-07 07:46:35 -0700 | [diff] [blame] | 80 | #define CONFIG_OTHBOOTARGS "othbootargs=\0" |
| 81 | #else |
| 82 | #define CONFIG_OTHBOOTARGS "othbootargs=acpi=off\0" |
| 83 | #endif |
Bin Meng | f95a6c8 | 2015-03-12 13:08:46 +0800 | [diff] [blame] | 84 | |
Bin Meng | a5e37ef | 2019-08-14 01:23:05 -0700 | [diff] [blame] | 85 | #if defined(CONFIG_DISTRO_DEFAULTS) |
| 86 | #define DISTRO_BOOTENV BOOTENV |
| 87 | #else |
| 88 | #define DISTRO_BOOTENV |
Bin Meng | 11ca716 | 2019-07-28 08:13:58 -0700 | [diff] [blame] | 89 | #endif |
| 90 | |
Bin Meng | f95a6c8 | 2015-03-12 13:08:46 +0800 | [diff] [blame] | 91 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Bin Meng | a5e37ef | 2019-08-14 01:23:05 -0700 | [diff] [blame] | 92 | DISTRO_BOOTENV \ |
Bin Meng | f95a6c8 | 2015-03-12 13:08:46 +0800 | [diff] [blame] | 93 | CONFIG_STD_DEVICES_SETTINGS \ |
Bin Meng | de5b8b1 | 2015-05-24 00:12:32 +0800 | [diff] [blame] | 94 | "pciconfighost=1\0" \ |
Bin Meng | f95a6c8 | 2015-03-12 13:08:46 +0800 | [diff] [blame] | 95 | "netdev=eth0\0" \ |
| 96 | "consoledev=ttyS0\0" \ |
Bin Meng | 2b81f61 | 2016-05-07 07:46:35 -0700 | [diff] [blame] | 97 | CONFIG_OTHBOOTARGS \ |
Bin Meng | 11ca716 | 2019-07-28 08:13:58 -0700 | [diff] [blame] | 98 | "scriptaddr=0x7000000\0" \ |
| 99 | "kernel_addr_r=0x1000000\0" \ |
| 100 | "ramdisk_addr_r=0x4000000\0" \ |
Bin Meng | a5e37ef | 2019-08-14 01:23:05 -0700 | [diff] [blame] | 101 | "ramdiskfile=initramfs.gz\0" |
| 102 | |
Bin Meng | f95a6c8 | 2015-03-12 13:08:46 +0800 | [diff] [blame] | 103 | |
Tom Rini | 9aed2af | 2021-08-19 14:29:00 -0400 | [diff] [blame] | 104 | #define RAMBOOTCOMMAND \ |
Bin Meng | f95a6c8 | 2015-03-12 13:08:46 +0800 | [diff] [blame] | 105 | "setenv bootargs root=/dev/ram rw " \ |
| 106 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
| 107 | "console=$consoledev,$baudrate $othbootargs;" \ |
Bin Meng | 11ca716 | 2019-07-28 08:13:58 -0700 | [diff] [blame] | 108 | "tftpboot $kernel_addr_r $bootfile;" \ |
| 109 | "tftpboot $ramdisk_addr_r $ramdiskfile;" \ |
| 110 | "zboot $kernel_addr_r 0 $ramdisk_addr_r $filesize" |
Bin Meng | f95a6c8 | 2015-03-12 13:08:46 +0800 | [diff] [blame] | 111 | |
Tom Rini | 9aed2af | 2021-08-19 14:29:00 -0400 | [diff] [blame] | 112 | #define NFSBOOTCOMMAND \ |
Bin Meng | f95a6c8 | 2015-03-12 13:08:46 +0800 | [diff] [blame] | 113 | "setenv bootargs root=/dev/nfs rw " \ |
| 114 | "nfsroot=$serverip:$rootpath " \ |
| 115 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
| 116 | "console=$consoledev,$baudrate $othbootargs;" \ |
Bin Meng | 11ca716 | 2019-07-28 08:13:58 -0700 | [diff] [blame] | 117 | "tftpboot $kernel_addr_r $bootfile;" \ |
| 118 | "zboot $kernel_addr_r" |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 119 | |
Stefan Roese | f381b06 | 2016-01-18 14:49:56 +0100 | [diff] [blame] | 120 | |
Simon Glass | ff7636c | 2014-11-10 18:00:23 -0700 | [diff] [blame] | 121 | #endif /* __CONFIG_H */ |