Attention is currently required from: Hung-Te Lin, Yidi Lin.
Yu-Ping Wu has posted comments on this change by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/85828?usp=email )
Change subject: mb/google/rauru: Determine PCIe init by storage_id ......................................................................
Patch Set 2:
(1 comment)
File src/mainboard/google/rauru/mainboard.c:
https://review.coreboot.org/c/coreboot/+/85828/comment/71713349_9ed688b7?usp... : PS2, Line 52: return storage_id() == 3; Can we modify `storage_type()` to return `enum storage_type` (by renaming `ufs_type`)? We could use the high bits to differentiate between UFS and NVMe.
``` # Bits [31:28] for base type (e.g. UFS). #define _BASE_TYPE_SHIFT 28 #define _BASE_TYPE_MASK (0xf << _BASE_TYPE_SHIFT) #define _BASE_TYPE(x) ((x & 0xf) << _BASE_TYPE_SHIFT)
#define _BASE_TYPE_UFS _BASE_TYPE(0x0) #define _BASE_TYPE_NVME _BASE_TYPE(0x1)
enum storage_type { STORAGE_UNKNOWN = 0, STORAGE_UFS_31 = _BASE_TYPE_UFS | 0x310, ... STORAGE_NVME = _BASE_TYPE_NVME, };
enum storage_type storage_type(void) { uint32_t index = storage_id(); switch (index) ... }
static inline storage_is_nvme(void) { return (storage_type() & _BASE_TYPE_MASK) == _BASE_TYPE_NVME; } ```
Then we can use `storage_is_nvme` here.