x86-common.h 3.3 KB

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