x86-common.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. #include <asm/ibmpc.h>
  8. #ifndef __CONFIG_X86_COMMON_H
  9. #define __CONFIG_X86_COMMON_H
  10. /*
  11. * High Level Configuration Options
  12. * (easy to change)
  13. */
  14. #define CONFIG_PHYSMEM
  15. #define CONFIG_LMB
  16. #undef CONFIG_ZLIB
  17. #undef CONFIG_GZIP
  18. #define CONFIG_SYS_BOOTM_LEN (16 << 20)
  19. /* SATA AHCI storage */
  20. #ifdef CONFIG_SCSI_AHCI
  21. #define CONFIG_LBA48
  22. #define CONFIG_SYS_64BIT_LBA
  23. #endif
  24. /* Generic TPM interfaced through LPC bus */
  25. #define CONFIG_TPM_TIS_BASE_ADDRESS 0xfed40000
  26. /*-----------------------------------------------------------------------
  27. * Real Time Clock Configuration
  28. */
  29. #define CONFIG_SYS_ISA_IO_BASE_ADDRESS 0
  30. #define CONFIG_SYS_ISA_IO CONFIG_SYS_ISA_IO_BASE_ADDRESS
  31. /*-----------------------------------------------------------------------
  32. * Serial Configuration
  33. */
  34. #define CONFIG_SYS_NS16550_PORT_MAPPED
  35. /*-----------------------------------------------------------------------
  36. * Command line configuration.
  37. */
  38. #ifndef CONFIG_BOOTCOMMAND
  39. #define CONFIG_BOOTCOMMAND \
  40. "ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
  41. #endif
  42. #if defined(CONFIG_CMD_KGDB)
  43. #define CONFIG_KGDB_BAUDRATE 115200
  44. #endif
  45. /*
  46. * Miscellaneous configurable options
  47. */
  48. #define CONFIG_SYS_CBSIZE 512
  49. #define CONFIG_SYS_MEMTEST_START 0x00100000
  50. #define CONFIG_SYS_MEMTEST_END 0x01000000
  51. #define CONFIG_SYS_LOAD_ADDR 0x20000000
  52. /*-----------------------------------------------------------------------
  53. * CPU Features
  54. */
  55. #define CONFIG_SYS_STACK_SIZE (32 * 1024)
  56. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
  57. #define CONFIG_SYS_MALLOC_LEN 0x200000
  58. /* allow to overwrite serial and ethaddr */
  59. #define CONFIG_ENV_OVERWRITE
  60. /*-----------------------------------------------------------------------
  61. * Environment configuration
  62. */
  63. /*-----------------------------------------------------------------------
  64. * PCI configuration
  65. */
  66. #define CONFIG_PCI_CONFIG_HOST_BRIDGE
  67. /*-----------------------------------------------------------------------
  68. * USB configuration
  69. */
  70. #define CONFIG_TFTP_TSIZE
  71. #define CONFIG_BOOTP_BOOTFILESIZE
  72. /* Default environment */
  73. #define CONFIG_ROOTPATH "/opt/nfsroot"
  74. #define CONFIG_HOSTNAME "x86"
  75. #define CONFIG_BOOTFILE "bzImage"
  76. #define CONFIG_LOADADDR 0x1000000
  77. #define CONFIG_RAMDISK_ADDR 0x4000000
  78. #if defined(CONFIG_GENERATE_ACPI_TABLE) || defined(CONFIG_EFI_STUB)
  79. #define CONFIG_OTHBOOTARGS "othbootargs=\0"
  80. #else
  81. #define CONFIG_OTHBOOTARGS "othbootargs=acpi=off\0"
  82. #endif
  83. #if defined(CONFIG_DISTRO_DEFAULTS)
  84. #define DISTRO_BOOTENV BOOTENV
  85. #else
  86. #define DISTRO_BOOTENV
  87. #endif
  88. #define CONFIG_EXTRA_ENV_SETTINGS \
  89. DISTRO_BOOTENV \
  90. CONFIG_STD_DEVICES_SETTINGS \
  91. "pciconfighost=1\0" \
  92. "netdev=eth0\0" \
  93. "consoledev=ttyS0\0" \
  94. CONFIG_OTHBOOTARGS \
  95. "scriptaddr=0x7000000\0" \
  96. "kernel_addr_r=0x1000000\0" \
  97. "ramdisk_addr_r=0x4000000\0" \
  98. "ramdiskfile=initramfs.gz\0"
  99. #define CONFIG_RAMBOOTCOMMAND \
  100. "setenv bootargs root=/dev/ram rw " \
  101. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  102. "console=$consoledev,$baudrate $othbootargs;" \
  103. "tftpboot $kernel_addr_r $bootfile;" \
  104. "tftpboot $ramdisk_addr_r $ramdiskfile;" \
  105. "zboot $kernel_addr_r 0 $ramdisk_addr_r $filesize"
  106. #define CONFIG_NFSBOOTCOMMAND \
  107. "setenv bootargs root=/dev/nfs rw " \
  108. "nfsroot=$serverip:$rootpath " \
  109. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  110. "console=$consoledev,$baudrate $othbootargs;" \
  111. "tftpboot $kernel_addr_r $bootfile;" \
  112. "zboot $kernel_addr_r"
  113. #endif /* __CONFIG_H */