Merge git://git.denx.de/u-boot-x86
- Allow coreboot to process unhandled tags - Enable NVMe on QEMU x86_64 target
This commit is contained in:
@@ -109,6 +109,10 @@ static void cb_parse_string(unsigned char *ptr, char **info)
|
|||||||
*info = (char *)((struct cb_string *)ptr)->string;
|
*info = (char *)((struct cb_string *)ptr)->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__weak void cb_parse_unhandled(u32 tag, unsigned char *ptr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
|
static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
|
||||||
{
|
{
|
||||||
struct cb_header *header;
|
struct cb_header *header;
|
||||||
@@ -211,6 +215,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
|
|||||||
case CB_TAG_VBNV:
|
case CB_TAG_VBNV:
|
||||||
cb_parse_vbnv(ptr, info);
|
cb_parse_vbnv(ptr, info);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
cb_parse_unhandled(rec->tag, ptr);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr += rec->size;
|
ptr += rec->size;
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ CONFIG_SPL_REGMAP=y
|
|||||||
CONFIG_SYSCON=y
|
CONFIG_SYSCON=y
|
||||||
CONFIG_SPL_SYSCON=y
|
CONFIG_SPL_SYSCON=y
|
||||||
CONFIG_CPU=y
|
CONFIG_CPU=y
|
||||||
|
CONFIG_NVME=y
|
||||||
CONFIG_SPL_DM_RTC=y
|
CONFIG_SPL_DM_RTC=y
|
||||||
CONFIG_SPI=y
|
CONFIG_SPI=y
|
||||||
CONFIG_SPL_TIMER=y
|
CONFIG_SPL_TIMER=y
|
||||||
|
|||||||
@@ -577,7 +577,7 @@ static int nvme_get_info_from_identify(struct nvme_dev *dev)
|
|||||||
int ret;
|
int ret;
|
||||||
int shift = NVME_CAP_MPSMIN(dev->cap) + 12;
|
int shift = NVME_CAP_MPSMIN(dev->cap) + 12;
|
||||||
|
|
||||||
ret = nvme_identify(dev, 0, 1, (dma_addr_t)ctrl);
|
ret = nvme_identify(dev, 0, 1, (dma_addr_t)(long)ctrl);
|
||||||
if (ret)
|
if (ret)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
@@ -646,7 +646,7 @@ static int nvme_blk_probe(struct udevice *udev)
|
|||||||
ns->dev = ndev;
|
ns->dev = ndev;
|
||||||
/* extract the namespace id from the block device name */
|
/* extract the namespace id from the block device name */
|
||||||
ns->ns_id = trailing_strtol(udev->name) + 1;
|
ns->ns_id = trailing_strtol(udev->name) + 1;
|
||||||
if (nvme_identify(ndev, ns->ns_id, 0, (dma_addr_t)id))
|
if (nvme_identify(ndev, ns->ns_id, 0, (dma_addr_t)(long)id))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
flbas = id->flbas & NVME_NS_FLBAS_LBA_MASK;
|
flbas = id->flbas & NVME_NS_FLBAS_LBA_MASK;
|
||||||
|
|||||||
@@ -111,14 +111,14 @@ int nvme_print_info(struct udevice *udev)
|
|||||||
ALLOC_CACHE_ALIGN_BUFFER(char, buf_ctrl, sizeof(struct nvme_id_ctrl));
|
ALLOC_CACHE_ALIGN_BUFFER(char, buf_ctrl, sizeof(struct nvme_id_ctrl));
|
||||||
struct nvme_id_ctrl *ctrl = (struct nvme_id_ctrl *)buf_ctrl;
|
struct nvme_id_ctrl *ctrl = (struct nvme_id_ctrl *)buf_ctrl;
|
||||||
|
|
||||||
if (nvme_identify(dev, 0, 1, (dma_addr_t)ctrl))
|
if (nvme_identify(dev, 0, 1, (dma_addr_t)(long)ctrl))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
print_optional_admin_cmd(le16_to_cpu(ctrl->oacs), ns->devnum);
|
print_optional_admin_cmd(le16_to_cpu(ctrl->oacs), ns->devnum);
|
||||||
print_optional_nvm_cmd(le16_to_cpu(ctrl->oncs), ns->devnum);
|
print_optional_nvm_cmd(le16_to_cpu(ctrl->oncs), ns->devnum);
|
||||||
print_format_nvme_attributes(ctrl->fna, ns->devnum);
|
print_format_nvme_attributes(ctrl->fna, ns->devnum);
|
||||||
|
|
||||||
if (nvme_identify(dev, ns->ns_id, 0, (dma_addr_t)id))
|
if (nvme_identify(dev, ns->ns_id, 0, (dma_addr_t)(long)id))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
print_formats(id, ns);
|
print_formats(id, ns);
|
||||||
|
|||||||
Reference in New Issue
Block a user