lkml.org 
[lkml]   [2021]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] x86/i8259: Work around buggy legacy PIC
Date
From: Thomas Gleixner
> Sent: 14 May 2021 14:02
>
> David,
>
> On Thu, May 13 2021 at 10:36, David Laight wrote:
>
> >> -----Original Message-----
> >> From: Maximilian Luz <luzmaximilian@gmail.com>
>
> can you please fix your mail client and spare us the useless header
> duplication in the reply?

I have to delete them by hand - must have forgotten, I can't fix outlook :-)

> > It is also worth noting that the probe code is spectacularly crap.
> > It writes 0xff and then checks that 0xff is read back.
> > Almost anything (including a failed PCIe read to the ISA bridge)
> > will return 0xff and make the test pass.
>
> unsigned char probe_val = ~(1 << PIC_CASCADE_IR);
>
> outb(probe_val, PIC_MASTER_IMR);
> new_val = inb(PIC_MASTER_IMR);
>
> How is that writing 0xFF?

Sorry I misread the code and diagnostic output.

In any case writing a value and expecting the same value back
isn't exactly a high-quality probe.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

\
 
 \ /
  Last update: 2021-05-14 15:14    [W:0.062 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site