x86-common.h 3.3 KB

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