memory.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. * Memory binding
  2. The memory binding for U-Boot is as in the ePAPR with the following additions:
  3. Optional subnodes can be used defining the memory layout for different board
  4. ID masks. To match a set of board ids, a board-id node may define match-mask
  5. and match-value ints to define a mask to apply to the board id, and the value
  6. that the result should have for the match to be considered valid. The mask
  7. defaults to -1, meaning that the value must fully match the board id.
  8. If subnodes are present, then the /memory node must define these properties:
  9. - #address-cells: should be 1.
  10. - #size-cells: should be 0.
  11. Each subnode must define
  12. reg - board ID or mask for this subnode
  13. memory-banks - list of memory banks in the same format as normal
  14. Each subnode may optionally define:
  15. match-mask - A mask to apply to the board id. This must be accompanied by
  16. match-value.
  17. match-value - The required resulting value of the board id mask for the given
  18. node to be considered a match.
  19. auto-size - Indicates that the value given for a bank is the maximum size,
  20. each bank is probed to determine its actual size, which may be
  21. smaller
  22. The board id determination is up to the vendor and is not defined by this
  23. binding.
  24. Example:
  25. memory {
  26. #address-cells = <1>;
  27. #size-cells = <1>;
  28. reg = <0x20000000 0x20000000
  29. 0x40000000 0x20000000
  30. 0x60000000 0x20000000
  31. 0x80000000 0x20000000>;
  32. auto-size;
  33. board-id@0 {
  34. match-value = <17>;
  35. reg = <0x20000000 0x20000000
  36. 0x40000000 0x20000000>;
  37. };
  38. board-id@1 {
  39. match-mask = <2>;
  40. match-value = <2>;
  41. reg = <0x20000000 0x20000000
  42. 0x40000000 0x20000000
  43. 0x60000000 0x20000000
  44. 0x80000000 0x20000000
  45. 0xa0000000 0x20000000
  46. 0xc0000000 0x20000000
  47. 0xe0000000 0x20000000>;
  48. };
  49. };
  50. This shows a system with the following properties:
  51. * Default of 2GB of memory, auto-sized, so could be smaller
  52. * 3.5GB of memory (with no auto-size) if (board id & 2) is 2
  53. * 1GB of memory (with no auto-size) if board id is 17.