Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 8 Nov 2015 12:13:37 +0700
From: Рысь <lynx@...xlynx.tk>
To: musl@...ts.openwall.com
Subject: Re: sys/io.h lacks inb_p and outb_p on x86

On Sat, 7 Nov 2015 23:50:45 -0500
Rich Felker <dalias@...c.org> wrote:

> On Sun, Nov 08, 2015 at 11:26:55AM +0700, Рысь wrote:
> > x86 arch lacks inb_p and outb_p inline functions. This is required
> > for memtest86+.
> > 
> > I don't know how properly make an assembly here, so when making
> > memtest I copied sys/io.h into local directory, and copied these
> > functions from uClibc.
> > 
> > I attach modified header for reference (they should go into
> > bits/io.h).
> 
> Any idea what these are intended to do? Are they documented anywhere?
> 
> Rich

I can't say much, but looking into memtest code I see they're used only
for beeping a PC speaker.

Comment in io.h include file of memtest says:

 * This file contains the definitions for the x86 IO instructions
 * inb/inw/inl/outb/outw/outl and the "string versions" of the same
 * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing"
 * versions of the single-IO instructions (inb_p/inw_p/..).

However memtest builds with assumption they're present in sys/io.h from
host and io.h included with memtest does not define inb_p/outb_p in any
way.

I probably will go with uClibc defines, or just nop memtest beeper.

-- 
http://lynxlynx.tk/
Power electronics made simple
Unix and simple KISS C code

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.