Edward Hyunkoo Jee | 834f184 | 2018-03-01 22:38:13 -0500 | [diff] [blame] | 1 | /* |
| 2 | * GRUB -- GRand Unified Bootloader |
| 3 | * Copyright (C) 2010 Free Software Foundation, Inc. |
| 4 | * |
| 5 | * GRUB is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * GRUB is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with GRUB. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #ifndef GRUB_SMBUS_HEADER |
| 20 | #define GRUB_SMBUS_HEADER 1 |
| 21 | |
| 22 | #define GRUB_SMB_RAM_START_ADDR 0x50 |
| 23 | #define GRUB_SMB_RAM_NUM_MAX 0x08 |
| 24 | |
| 25 | #define GRUB_SMBUS_SPD_MEMORY_TYPE_ADDR 2 |
| 26 | #define GRUB_SMBUS_SPD_MEMORY_TYPE_DDR2 8 |
| 27 | #define GRUB_SMBUS_SPD_MEMORY_NUM_BANKS_ADDR 17 |
| 28 | #define GRUB_SMBUS_SPD_MEMORY_NUM_ROWS_ADDR 3 |
| 29 | #define GRUB_SMBUS_SPD_MEMORY_NUM_COLUMNS_ADDR 4 |
| 30 | #define GRUB_SMBUS_SPD_MEMORY_NUM_OF_RANKS_ADDR 5 |
| 31 | #define GRUB_SMBUS_SPD_MEMORY_NUM_OF_RANKS_MASK 0x7 |
| 32 | #define GRUB_SMBUS_SPD_MEMORY_CAS_LATENCY_ADDR 18 |
| 33 | #define GRUB_SMBUS_SPD_MEMORY_CAS_LATENCY_MIN_VALUE 5 |
| 34 | #define GRUB_SMBUS_SPD_MEMORY_TRAS_ADDR 30 |
| 35 | #define GRUB_SMBUS_SPD_MEMORY_TRTP_ADDR 38 |
| 36 | |
| 37 | #ifndef ASM_FILE |
| 38 | |
| 39 | struct grub_smbus_spd |
| 40 | { |
| 41 | grub_uint8_t written_size; |
| 42 | grub_uint8_t log_total_flash_size; |
| 43 | grub_uint8_t memory_type; |
| 44 | union |
| 45 | { |
| 46 | grub_uint8_t unknown[253]; |
| 47 | struct { |
| 48 | grub_uint8_t num_rows; |
| 49 | grub_uint8_t num_columns; |
| 50 | grub_uint8_t num_of_ranks; |
| 51 | grub_uint8_t unused1[12]; |
| 52 | grub_uint8_t num_of_banks; |
| 53 | grub_uint8_t unused2[2]; |
| 54 | grub_uint8_t cas_latency; |
| 55 | grub_uint8_t unused3[9]; |
| 56 | grub_uint8_t rank_capacity; |
| 57 | grub_uint8_t unused4[1]; |
| 58 | grub_uint8_t tras; |
| 59 | grub_uint8_t unused5[7]; |
| 60 | grub_uint8_t trtp; |
| 61 | grub_uint8_t unused6[31]; |
| 62 | grub_uint8_t part_number[18]; |
| 63 | grub_uint8_t unused7[165]; |
| 64 | } ddr2; |
| 65 | }; |
| 66 | }; |
| 67 | |
| 68 | #endif |
| 69 | |
| 70 | #endif |