SDRAM 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. README on the SDRAM Controller for the LH7a40X
  2. ==============================================
  3. The standard configuration for the SDRAM controller generates a sparse
  4. memory array. The precise layout is determined by the SDRAM chips. A
  5. default kernel configuration assembles the discontiguous memory
  6. regions into separate memory nodes via the NUMA (Non-Uniform Memory
  7. Architecture) facilities. In this default configuration, the kernel
  8. is forgiving about the precise layout. As long as it is given an
  9. accurate picture of available memory by the bootloader the kernel will
  10. execute correctly.
  11. The SDRC supports a mode where some of the chip select lines are
  12. swapped in order to make SDRAM look like a synchronous ROM. Setting
  13. this bit means that the RAM will present as a contiguous array. Some
  14. programmers prefer this to the discontiguous layout. Be aware that
  15. may be a penalty for this feature where some some configurations of
  16. memory are significantly reduced; i.e. 64MiB of RAM appears as only 32
  17. MiB.
  18. There are a couple of configuration options to override the default
  19. behavior. When the SROMLL bit is set and memory appears as a
  20. contiguous array, there is no reason to support NUMA.
  21. CONFIG_LH7A40X_CONTIGMEM disables NUMA support. When physical memory
  22. is discontiguous, the memory tables are organized such that there are
  23. two banks per nodes with a small gap between them. This layout wastes
  24. some kernel memory for page tables representing non-existent memory.
  25. CONFIG_LH7A40X_ONE_BANK_PER_NODE optimizes the node tables such that
  26. there are no gaps. These options control the low level organization
  27. of the memory management tables in ways that may prevent the kernel
  28. from booting or may cause the kernel to allocated excessively large
  29. page tables. Be warned. Only change these options if you know what
  30. you are doing. The default behavior is a reasonable compromise that
  31. will suit all users.
  32. --
  33. A typical 32MiB system with the default configuration options will
  34. find physical memory managed as follows.
  35. node 0: 0xc0000000 4MiB
  36. 0xc1000000 4MiB
  37. node 1: 0xc4000000 4MiB
  38. 0xc5000000 4MiB
  39. node 2: 0xc8000000 4MiB
  40. 0xc9000000 4MiB
  41. node 3: 0xcc000000 4MiB
  42. 0xcd000000 4MiB
  43. Setting CONFIG_LH7A40X_ONE_BANK_PER_NODE will put each bank into a
  44. separate node.