From: "Хихин Руслан" <hihin@rambler.ru>
To: community@lists.altlinux.org
Subject: Re: [Comm] подскажите пожалуйста аналоги фунцций ioperm() iopl() для не x86 архитектуры.
Date: Thu, 14 Sep 2006 11:29:28 +0400
Message-ID: <200609141129.29623@ruslandh> (raw)
In-Reply-To: <200609141106.40744.embedded@nm.ru>
[-- Attachment #1: Type: text/plain, Size: 2062 bytes --]
Здравствуйте gosha
В сообщении от 14 сентября 2006 11:06 gosha написал(a):
> подскажите пожалуйста аналоги фунцций ioperm() iopl() для не x86
> архитектуры.
>
>
>
> как я понял данные ф- ии существуют только в x86 архитекурутре
>
> http://www.linuxdoc.ru/manpages/man2/ioperm.2.html
>
>
>
> Т.е. проверил -под i686 ф-ии работают ok.
>
> /*******************************************************************
>**************************/
>
> #include <stdio.h>
>
> #include <string.h>
>
> #include <time.h>
>
> #include <sys/io.h>
>
>
>
> static unsigned long pcibus_conf_reg = 0xbfc40040;
>
> /*******************************************************************
>**************************/
>
> int main(int argc, char *argv[])
>
> {char *p;
>
> int i, a;
>
> const char *_ENOTSUP = {" - unsupported command."};
>
> iopl(3);
>
> if (ioperm(pcibus_conf_reg, 4, 1)) {perror("- iopermission
> error"); exit(1);}
>
> for(i=1; i < argc; i++)
>
> {if(strchr(argv[i],'-')!=NULL){ continue;}
>
> if(strstr(argv[i],"en")!=NULL) {*((unsigned
> long*)elins64cmp_bus_err_reg)= 0x800; printf(" - pci addres
> cohereccy mode on.\r\n");continue;}
>
> if(strstr(argv[i],"dis")!=NULL){*((unsigned
> long*)elins64cmp_bus_err_reg)= 0x000; printf(" - pci data cohereccy
> mode on.\r\n");continue;}
>
> puts(_ENOTSUP);
>
> }
>
> return 1;
>
> }
>
> /*******************************************************************
>**************************/
>
> Пересобрал ту же тестовую маленькую прогу на MIPS - не компилируется
>
> - iopl() undefined reference
>
> - ioperm() undefined referenc.
А там порты-то есть к которым вы достучаться пытаетесь?
--
А ещё говорят так (fortune):
Уж лучше быть в безвестности
Учителем словесности,
Чем, обретя известность,
Уродовать словесность!
-- Ефим Самоварщиков
________________________________________________________________________
С уважением Хихин Руслан (hihin@rambler.ru)
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-09-14 7:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-14 7:06 ` gosha
2006-09-14 7:29 ` Хихин Руслан [this message]
2006-09-14 7:47 ` [Comm] аналог утилиты debug(msdos) под linux, gdb & Ларошфуко gosha
2006-09-14 7:55 ` Eugene Ostapets
2006-09-14 20:21 ` Yura Kalinichenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200609141129.29623@ruslandh \
--to=hihin@rambler.ru \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git