From 35d39cd1f581d4f83eb67232eb869210ee7e24ba Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 21 Aug 2025 13:59:49 +0000 Subject: [PATCH] Revert "stand: add EFI support for mmio serial consoles" This reverts commit 56b85fc10c2a83e59820860f2446bbfbb2edfdf4. --- stand/efi/loader/bootinfo.c | 8 -------- stand/efi/loader/main.c | 18 ------------------ 2 files changed, 26 deletions(-) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 41656399cfa..2961b8b97fb 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -134,14 +134,6 @@ bi_getboothowto(char *kargs) NULL, NULL); } } - if (getenv("efi_com_mmio") != NULL && - getenv("efi_com_speed") != NULL && /* verifies uart mode */ - getenv("hw.uart.console") == NULL) { - snprintf(buf, sizeof(buf), "mm:%s,rs:2", - getenv("efi_com_mmio")); - env_setenv("hw.uart.console", EV_VOLATILE, buf, NULL, - NULL); - } #endif #endif } diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 20cbd238c32..e8f9c29594f 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -728,15 +728,6 @@ setenv_int(const char *key, int val) setenv(key, buf, 1); } -static void -setenv_addr(const char *key, uint64_t addr) -{ - char buf[30]; - - snprintf(buf, sizeof(buf), "0x%llx", addr); - setenv(key, buf, 1); -} - static void * acpi_map_sdt(vm_offset_t addr) { @@ -941,7 +932,6 @@ parse_uefi_con_out(void) EFI_DEVICE_PATH *node; ACPI_HID_DEVICE_PATH *acpi; UART_DEVICE_PATH *uart; - VENDOR_DEVICE_PATH *hw; bool pci_pending; /* @@ -1010,14 +1000,6 @@ parse_uefi_con_out(void) * so only match it if it's last. */ pci_pending = true; - } else if (DevicePathType(node) == HARDWARE_DEVICE_PATH && - DevicePathSubType(node) == HW_VENDOR_DP) { - hw = (void *)node; - - if (DevicePathNodeLength(&hw->Header) == - sizeof(*hw) + sizeof(uint64_t)) { - setenv_addr("efi_com_mmio", *(uint64_t *)(hw + 1)); - } } node = NextDevicePathNode(node); }