]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg RamDiskDxe: Fix wrong HII behavior for more than 8 RAM disks
authorHao Wu <hao.a.wu@intel.com>
Wed, 20 Apr 2016 05:23:59 +0000 (13:23 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 10 May 2016 03:08:57 +0000 (11:08 +0800)
commit09abc636756b5d1f29224402181f7fd34f736c5f
treea24b8781b49f6032f1a285e6eb19fc6099c8dee8
parent259d87146b07c5d95f301dfffca6f00b32d2c74b
MdeModulePkg RamDiskDxe: Fix wrong HII behavior for more than 8 RAM disks

The RamDiskDxe driver originally uses a variable-length HII varstore to
retrieve the HII checkbox status of each registered RAM disk.

However, HII does not support the variable-length varstore feature.
Therefore, only the checkbox status for the first 8 RAM disks are tracked
for the following definition of HII varstore structure considering the
alignment:

typedef struct {
  UINT64    Size;
  UINT8     RamDiskList[0];
  } RAM_DISK_CONFIGURATION;

This commit uses the private data of each registered RAM disks to track
the HII checkbox status instead to resolve the issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDriver.c
MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskImpl.c
MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskImpl.h
MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskNVData.h
MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c