acrn-config: dump iomem info from /proc/iomem

Need more information from iomem, so dump all the iomem information
from /proc/iomem to instead of system ram information.

Tracked-On: #4569
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
This commit is contained in:
Wei Liu
2020-03-04 09:34:17 +08:00
committed by wenlingz
parent 8e7b80fcb2
commit e7726944b1
2 changed files with 10 additions and 9 deletions

View File

@@ -145,19 +145,17 @@ def dump_system_ram(config):
"""This will get systemd ram which are usable
:param config: file pointer that opened for writing board config information
"""
print("\t<SYSTEM_RAM_INFO>", file=config)
print("\t<IOMEM_INFO>", file=config)
with open(MEM_PATH[0], 'rt') as mem_info:
while True:
line = mem_info.readline().strip()
line = mem_info.readline().strip('\n')
if not line:
break
pat_type = line.split(':')[1].strip()
if pat_type == "System RAM":
print("\t{}".format(line), file=config)
print("\t{}".format(line), file=config)
print("\t</SYSTEM_RAM_INFO>", file=config)
print("\t</IOMEM_INFO>", file=config)
print("", file=config)