[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #58438] setpci write mask value is wrongly ignored
From: |
Larry Carver |
Subject: |
[bug #58438] setpci write mask value is wrongly ignored |
Date: |
Sun, 24 May 2020 07:30:19 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?58438>
Summary: setpci write mask value is wrongly ignored
Project: GNU GRUB
Submitted by: lcarver
Submitted on: Sun 24 May 2020 11:30:17 AM UTC
Category: None
Severity: Major
Priority: 5 - Normal
Item Group: Software Error
Status: None
Privacy: Public
Assigned to: None
Originator Name: Larry Carver
Originator Email: address@hidden
Open/Closed: Open
Release:
Release: Git master
Discussion Lock: Any
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Details:
Problem -- Write mask value given to setpci is ignored.
Example --
grub> setpci -s b6:0.0 70.L
Register 70 of b6:00.0 is 27
grub> setpci -s b6:0.0 70.L=0:1
grub> setpci -s b6:0.0 70.L
Register 70 of b6:00.0 is 0
Reason -- I think the following assignment is wrong, and should be removed.
Please see the following line 315, following
the assignment to write_mask and the error check.
The code is re-assigning the value to be 0xffffffff.
At
https://github.com/coreos/grub/blob/master/grub-core/commands/setpci.c#L315
write_mask = 0;
if (*ptr == '=')
{
ptr++;
regwrite = grub_strtoul (ptr, (char **) &ptr, 16);
if (grub_errno)
return grub_errno;
write_mask = 0xffffffff;
if (*ptr == ':')
{
ptr++;
write_mask = grub_strtoul (ptr, (char **) &ptr, 16);
if (grub_errno)
return grub_errno;
write_mask = 0xffffffff; /* <-- Why is this here ?? */
}
regwrite &= write_mask;
}
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58438>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #58438] setpci write mask value is wrongly ignored,
Larry Carver <=