Changeset View
Changeset View
Standalone View
Standalone View
head/stand/efi/loader/main.c
Show First 20 Lines • Show All 733 Lines • ▼ Show 20 Lines | parse_uefi_con_out(void) | ||||
if (rv != EFI_SUCCESS) { | if (rv != EFI_SUCCESS) { | ||||
/* If we don't have any ConOut default to serial */ | /* If we don't have any ConOut default to serial */ | ||||
how = RB_SERIAL; | how = RB_SERIAL; | ||||
goto out; | goto out; | ||||
} | } | ||||
ep = buf + sz; | ep = buf + sz; | ||||
node = (EFI_DEVICE_PATH *)buf; | node = (EFI_DEVICE_PATH *)buf; | ||||
while ((char *)node < ep) { | while ((char *)node < ep) { | ||||
if (IsDevicePathEndType(node)) { | |||||
if (pci_pending && vid_seen == 0) | |||||
vid_seen = ++seen; | |||||
} | |||||
pci_pending = false; | pci_pending = false; | ||||
if (DevicePathType(node) == ACPI_DEVICE_PATH && | if (DevicePathType(node) == ACPI_DEVICE_PATH && | ||||
(DevicePathSubType(node) == ACPI_DP || | (DevicePathSubType(node) == ACPI_DP || | ||||
DevicePathSubType(node) == ACPI_EXTENDED_DP)) { | DevicePathSubType(node) == ACPI_EXTENDED_DP)) { | ||||
/* Check for Serial node */ | /* Check for Serial node */ | ||||
acpi = (void *)node; | acpi = (void *)node; | ||||
if (EISA_ID_TO_NUM(acpi->HID) == 0x501) { | if (EISA_ID_TO_NUM(acpi->HID) == 0x501) { | ||||
setenv_int("efi_8250_uid", acpi->UID); | setenv_int("efi_8250_uid", acpi->UID); | ||||
Show All 17 Lines | if (DevicePathType(node) == ACPI_DEVICE_PATH && | ||||
* have to cope with: | * have to cope with: | ||||
* PciRoot(0x0)/Pci(0x1f,0x0)/Serial(0x1) | * PciRoot(0x0)/Pci(0x1f,0x0)/Serial(0x1) | ||||
* so only match it if it's last. | * so only match it if it's last. | ||||
*/ | */ | ||||
pci_pending = true; | pci_pending = true; | ||||
} | } | ||||
node = NextDevicePathNode(node); | node = NextDevicePathNode(node); | ||||
} | } | ||||
if (pci_pending && vid_seen == 0) | |||||
vid_seen = ++seen; | |||||
/* | /* | ||||
* Truth table for RB_MULTIPLE | RB_SERIAL | * Truth table for RB_MULTIPLE | RB_SERIAL | ||||
* Value Result | * Value Result | ||||
* 0 Use only video console | * 0 Use only video console | ||||
* RB_SERIAL Use only serial console | * RB_SERIAL Use only serial console | ||||
* RB_MULTIPLE Use both video and serial console | * RB_MULTIPLE Use both video and serial console | ||||
* (but video is primary so gets rc messages) | * (but video is primary so gets rc messages) | ||||
▲ Show 20 Lines • Show All 810 Lines • Show Last 20 Lines |