1 static void spd_set_drb(void)
4 * Effects: Uses serial presence detect to set the
5 * DRB registers which holds the ending memory address assigned
8 unsigned end_of_memory;
11 end_of_memory = 0; /* in multiples of 8MiB */
13 while (device <= 0x53) {
14 unsigned side1_bits, side2_bits;
17 side1_bits = side2_bits = -1;
22 /* now I have the ram size in bits as a power of two (less 1) */
23 /* Make it mulitples of 8MB */
27 /* Compute the end address for the DRB register */
28 /* Only process dimms < 2GB (2^8 * 8MB) */
30 end_of_memory += side1_bits;
32 __builtin_outl(end_of_memory, 0x1234);
35 end_of_memory += side2_bits;