Skip to content

Commit

Permalink
Remove igd hal from chipset as not all systems have it
Browse files Browse the repository at this point in the history
Signed-off-by: Nathaniel Mitchell <[email protected]>
  • Loading branch information
npmitche committed Feb 21, 2024
1 parent 5f1b1d9 commit 6e0ad6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions chipsec/chipset.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from chipsec.helper.oshelper import helper as os_helper
from chipsec.helper.basehelper import Helper
from chipsec.helper.nonehelper import NoneHelper
from chipsec.hal import cpu, io, iobar, mmio, msgbus, msr, pci, physmem, ucode, igd, cpuid
from chipsec.hal import cpu, io, iobar, mmio, msgbus, msr, pci, physmem, ucode, cpuid
from chipsec.hal.pci import PCI_HDR_RID_OFF
from chipsec.exceptions import UnknownChipsetError, DeviceNotFoundError, CSReadError
from chipsec.exceptions import RegisterTypeNotFoundError, OsHelperError
Expand Down Expand Up @@ -97,7 +97,7 @@ def set_hal_objects(self):
self.msgbus = msgbus.MsgBus(self)
self.mmio = mmio.MMIO(self)
self.iobar = iobar.IOBAR(self)
self.igd = igd.IGD(self)

#
# All HAL components which use above 'basic primitive' HAL components
# should be instantiated in modules/utilcmd with an instance of chipset
Expand Down
8 changes: 4 additions & 4 deletions chipsec/utilcmd/igd_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def parse_arguments(self) -> None:

def read_dma(self) -> None:
self.logger.log(f'[CHIPSEC] Reading buffer from memory: PA = 0x{self.address:016X}, len = 0x{self.width:X}..')
buffer = self.cs.igd.gfx_aperture_dma_read_write(self.address, self.width)
buffer = self._igd.gfx_aperture_dma_read_write(self.address, self.width)
if self.file_name:
write_file(self.file_name, buffer)
self.logger.log(f'[CHIPSEC] Written 0x{len(buffer):X} bytes to \'{self.file_name}\'')
Expand All @@ -93,11 +93,11 @@ def write_dma(self) -> None:
return

self.logger.log(f'[CHIPSEC] Writing buffer to memory: PA = 0x{self.address:016X}, len = 0x{self.size:X}..')
self.cs.igd.gfx_aperture_dma_read_write(self.address, self.size, buffer)
self._igd.gfx_aperture_dma_read_write(self.address, self.size, buffer)

def run(self) -> None:

if not self.cs.igd.is_device_enabled():
self._igd = igd.IGD(self.cs)
if not self._igd.is_device_enabled():
self.logger.log('[CHIPSEC] Looks like internal graphics device is not enabled')
return

Expand Down

0 comments on commit 6e0ad6e

Please sign in to comment.