Skip to content
Snippets Groups Projects
  1. May 12, 2024
  2. Jan 05, 2024
  3. Dec 18, 2023
  4. Nov 13, 2023
    • Nicholas Chin's avatar
      README.md: Add references to Open Security Training · dcc9d41e
      Nicholas Chin authored
      The old Open Security Training site had a course called Advanced x86:
      BIOS and SMM Internals, which had a set of slides outlining the method
      to supress SMIs by changing the GBL_SMI_EN bit. Add a reference to it as
      this is where I originally learned of this method.
      dcc9d41e
  5. Oct 12, 2023
    • Nicholas Chin's avatar
      Rename to dell_flash_unlock · 00f76f79
      Nicholas Chin authored
      This is no longer limited to the E6400 so change it to a more general
      name. While it currrently only seems to support Dell's business laptops
      with MEC5035 derived ECs, it is possible other lineups will also work
      with this, or this utility could be extended to support those if they
      provide a similar FDO feature.
      00f76f79
  6. Oct 10, 2023
    • Nicholas Chin's avatar
      README.md: Update with info about broader device support · c5567fec
      Nicholas Chin authored
      This utility is no longer specific to the E6400, so update the README
      with info about support for other devices and any differences in
      behavior between them.
      c5567fec
    • Nicholas Chin's avatar
      e6400_flash_unlock.c: Clean up code · ca0b0b40
      Nicholas Chin authored
      Remove the commented out read_ec_reg as it is not currently planned to
      be utilized. Simply the function to send the EC FDO command, as the
      other arguments to query and unset the FDO as well as the return value
      are never used. The enums for the different arguments were removed,
      though the values were moved to a comment for reference.
      ca0b0b40
    • Nicholas Chin's avatar
      Add SPDX Copyright headers · 698f737d
      Nicholas Chin authored
      698f737d
    • Nicholas Chin's avatar
      a9e56b4f
    • Nicholas Chin's avatar
      Switch to SPDX license headers · 8544dbd0
      Nicholas Chin authored
      The license boilerplate just inflates the length of the files, and is
      often the majority of the lines in some of the files. coreboot also
      prefers SPDX headers only for any new files added to the project, and
      I may add this to coreboot's utils in the future.
      8544dbd0
    • Nicholas Chin's avatar
      Implement abstracted interface to request port I/O permissions · 6048d2bd
      Nicholas Chin authored
      This adds an operating system agnostic calling interface to accessors.c
      for requesting permissions to the x86 io ports. Previously Linux's
      ioperm was used. OpenBSD seems to have removed the ioperm system call,
      which allows access to specific IO ports. The previous implementation
      also did not support the full range of ports, which means it wouldn't
      have worked for e6400-flash-unlock anyway. Only iopl remains, which
      grants access to all ports. Linux implements both, though iopl is marked
      as deprecated. It still remains as some old X servers rely on it. Just
      use iopl to simplify the code across systems, even though only allowing
      access to specific ports is theoretically safer.
      6048d2bd
    • Nicholas Chin's avatar
      Add abstracted calls for port I/O instructions · 2971986f
      Nicholas Chin authored
      The functions to do these are OS dependent, so abstract this out with a
      common calling interface. This also uses the much better (address, data)
      format for the out instructions instead of the (data, address) order
      that the Linux functions use. This currently supports Linux and OpenBSD.
      2971986f
  7. Sep 05, 2023
  8. Sep 04, 2023
    • Nicholas Chin's avatar
      Check that the LPC interface forwards the EC I/O ports · f589a43a
      Nicholas Chin authored
      On the E6430, it seems like the firmware sets up the LPC Generic Decode
      Range registers such that ports 0x910 and 0x911 aren't forwarded over
      LPC. I suspect it enables these for itself during boot and SMM, but then
      disables them once the OS is running. To get around this, the program
      can just set its own decode range at a free decode register. Note that
      kernel modules like dell_smm_hwmon seems to cause these registers to be
      reset periodically, as these communicate with SMM which seems to set up
      these register for itself as previously noted. Setting up these
      registers and communicating with the EC shortly afterwards in the same
      program seems to be fast enough to work around this, though
      theoretically an SMI at the right moment could disrupt this.
      f589a43a
    • Nicholas Chin's avatar
      e6400_flash_unlock.c: Don't hardcode RCBA and PMBASE · b6d975e5
      Nicholas Chin authored
      Since the EC command seems to work on systems other than the E6400, the
      values of these base address registers should not be hardcoded, since
      the firmware of other systems may set them differently. Read them from
      the PCI config registers from the LPC device where they are located.
      b6d975e5
  9. Aug 24, 2023
    • Nicholas Chin's avatar
      Add a timeout to wait_ec() · dfa356e2
      Nicholas Chin authored
      This prevents the unlock utility from hanging forever if the
      host can't communicate to the EC, such as the IO ports not
      being forwarded over LPC. Also add a message before sending
      EC commands so that the user isn't left with no output when
      waiting for the EC.
      dfa356e2
  10. Apr 19, 2023
    • Nicholas Chin's avatar
      Small fixes · e87938e0
      Nicholas Chin authored
      - Sort includes
      - The EC command enum exists for a reason,
        so use it in calls to ec_fdo_command()
      e87938e0
  11. Apr 15, 2023
Loading