提交 6aac3a2c 编写于 作者: G Goldfish64

OcAcpiLib: Check for invalid reset register width

上级 57f4824a
......@@ -1137,7 +1137,8 @@ AcpiFadtEnableReset (
} else if ((Context->Fadt->Flags & EFI_ACPI_6_2_RESET_REG_SUP) == 0
|| (Context->Fadt->Flags & EFI_ACPI_6_2_SLP_BUTTON) == 0
|| (Context->Fadt->Flags & EFI_ACPI_6_2_PWR_BUTTON) != 0
|| Context->Fadt->ResetReg.Address == 0) {
|| Context->Fadt->ResetReg.Address == 0
|| Context->Fadt->ResetReg.RegisterBitWidth != 8) {
Fadt = Context->Fadt;
} else {
return EFI_SUCCESS;
......@@ -1150,7 +1151,7 @@ AcpiFadtEnableReset (
Fadt->Flags |= EFI_ACPI_6_2_SLP_BUTTON | EFI_ACPI_6_2_RESET_REG_SUP;
Fadt->Flags &= ~EFI_ACPI_6_2_PWR_BUTTON;
if (Fadt->ResetReg.Address == 0) {
if (Fadt->ResetReg.Address == 0 || Fadt->ResetReg.RegisterBitWidth != 8) {
//
// Resetting through port 0xCF9 is universal on Intel and AMD.
// But may not be the case on some laptops, which use 0xB2.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册