Skip to contentSkip to conversation

x86, efi: precedence error in setup_efi_pci()

PATCH In review Dan Carpenter 6 participants 8 messages Dec 7, 2012 – Jan 29, 2013 5 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, efi: precedence error in setup_efi_pci()

Negate has higher precedence than bitwise AND so the condition is always false.

arch/x86/boot/compressed/eboot.c +1 -1
index b1942e2..18e329c 100644
@@ -302,7 +302,7 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
 		if (status != EFI_SUCCESS)
 			continue;
 
-		if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)
+		if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM))
 			continue;
 
 		if (!pci->romimage || !pci->romsize)

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 11 lines · Dan Carpenter

Negate has higher precedence than bitwise AND so the condition is always false.

arch/x86/boot/compressed/eboot.c +0 -0
index b1942e2..18e329c 100644

arch/x86/boot/compressed/eboot.c static efi_status_t setup_efi_pci(struct boot_params *params) · line 308

Quoted 8 lines
arch/x86/boot/compressed/eboot.c +1 -1
@@ -302,7 +302,7 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
  		if (status != EFI_SUCCESS)
  			continue;
 
-		if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)
+		if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM))
  			continue;
 
  		if (!pci->romimage || !pci->romsize)

What is the baseline for this patch?

-hpa

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 14 lines · H. Peter Anvin
Quoted 13 lines · Dan Carpenter

Negate has higher precedence than bitwise AND so the condition is always false.

arch/x86/boot/compressed/eboot.c +0 -0
index b1942e2..18e329c 100644
@@ -302,7 +302,7 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
 		if (status != EFI_SUCCESS)
 			continue;
 
Quoted 9 lines

arch/x86/boot/compressed/eboot.c static efi_status_t setup_efi_pci(struct boot_params *params) · line 308

Quoted 6 lines
arch/x86/boot/compressed/eboot.c +1 -1
-		if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)
+		if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM))
 			continue;
 
 		if (!pci->romimage || !pci->romsize)

What is the baseline for this patch?

Sorry, this is a linux-next bug. Introduced in:

commit dd5fc854de5fd37adfcef8a366cd21a55aa01d3d

Author: Matthew Garrett <[email protected]>
Date:   Wed Dec 5 14:33:26 2012 -0700

EFI: Stash ROMs if they're not in the PCI BAR

regards,
dan carpenter

#5 lore raw
Quoted 25 lines · Dan Carpenter
Quoted 14 lines · H. Peter Anvin
Quoted 13 lines · Dan Carpenter

Negate has higher precedence than bitwise AND so the condition is always false.

arch/x86/boot/compressed/eboot.c +0 -0
index b1942e2..18e329c 100644
@@ -302,7 +302,7 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
 		if (status != EFI_SUCCESS)
 			continue;
 
Quoted 9 lines

arch/x86/boot/compressed/eboot.c static efi_status_t setup_efi_pci(struct boot_params *params) · line 308

Quoted 6 lines
arch/x86/boot/compressed/eboot.c +1 -1
-		if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)
+		if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM))
 			continue;
 
 		if (!pci->romimage || !pci->romsize)

What is the baseline for this patch?

Quoted 7 lines

Sorry, this is a linux-next bug. Introduced in:

commit dd5fc854de5fd37adfcef8a366cd21a55aa01d3d

Author: Matthew Garrett <[email protected]>
Date:   Wed Dec 5 14:33:26 2012 -0700

EFI: Stash ROMs if they're not in the PCI BAR

Thanks Dan, I've picked this up.

#6 lore raw
In reply to Dan Carpenter

arch/x86/boot/compressed/eboot.c static efi_status_t setup_efi_pci(struct boot_params *params) · line 305

Quoted 8 lines · Dan Carpenter

Negate has higher precedence than bitwise AND so the condition is always false.

index b1942e2..18e329c 100644

arch/x86/boot/compressed/eboot.c +1 -1
-		if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)
+		if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM))

Hi,

This patch breaks the detection of ATI VBIOS for me on a MacBook Pro 8,2.

Regards,

Vitaly

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

(Cc'ing some folks so this doesn't get lost completely)

Quoted 20 lines · Vitaly Budovski

arch/x86/boot/compressed/eboot.c static efi_status_t setup_efi_pci(struct boot_params *params) · line 305

Quoted 8 lines · Dan Carpenter

Negate has higher precedence than bitwise AND so the condition is always false.

index b1942e2..18e329c 100644

arch/x86/boot/compressed/eboot.c +1 -1
-		if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)
+		if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM))

Hi,

This patch breaks the detection of ATI VBIOS for me on a MacBook Pro 8,2.

Regards,

Vitaly

Signature · 1 line
Matt Fleming, Intel Open Source Technology Center

A message that is not in the archive (sent off-list or not yet received): 1359457448.8282.77.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org

#10 lore raw
Quoted 2 lines · Matt Fleming

(Cc'ing some folks so this doesn't get lost completely)

I thought this got pushed to Linus already? Did I get confused and forget or something?

-hpa

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw
Quoted 6 lines · H. Peter Anvin
Quoted 2 lines · Matt Fleming

(Cc'ing some folks so this doesn't get lost completely)

I thought this got pushed to Linus already? Did I get confused and forget or something?

You didn't forget anything - it was pushed to Linus. I was quoting Vitaly's bug report because there were no Cc's on his email,

Quoted 8 lines

Hi,

This patch breaks the detection of ATI VBIOS for me on a MacBook Pro 8,2.

Regards,

Vitaly

Signature · 1 line
Matt Fleming, Intel Open Source Technology Center