Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147712462
D34329.1784152994.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34329.1784152994.diff
View Options
Index: stand/efi/loader/bootinfo.c
===================================================================
--- stand/efi/loader/bootinfo.c
+++ stand/efi/loader/bootinfo.c
@@ -119,6 +119,14 @@
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
}
Index: stand/efi/loader/main.c
===================================================================
--- stand/efi/loader/main.c
+++ stand/efi/loader/main.c
@@ -736,6 +736,15 @@
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);
+}
+
/*
* Parse ConOut (the list of consoles active) and see if we can find a
* serial port and/or a video port. It would be nice to also walk the
@@ -752,6 +761,7 @@
EFI_DEVICE_PATH *node;
ACPI_HID_DEVICE_PATH *acpi;
UART_DEVICE_PATH *uart;
+ VENDOR_DEVICE_PATH *hw;
bool pci_pending;
how = 0;
@@ -801,6 +811,14 @@
* 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);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 15, 10:03 PM (12 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29148117
Default Alt Text
D34329.1784152994.diff (1 KB)
Attached To
Mode
D34329: stand: add EFI support for mmio serial consoles
Attached
Detach File
Event Timeline
Log In to Comment