All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gururaj Ananthateerta <gururaj@cup.hp.com>
Cc: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] Call to IODC hangs.!!!!
Date: Mon, 18 Mar 2002 21:40:39 -0800	[thread overview]
Message-ID: <3C96CF57.CA169520@cup.hp.com> (raw)
In-Reply-To: 20020316132221.A2179@parcelfarce.linux.theplanet.co.uk


I am using the following code to write a page to the swap space
using the iodc calls.

The IODC call for writing a boot device in blocks is
ENTRY_IO  with a subfunction BOOT_BLK_DEV_WRITE  = 17.

The call never returns.
Is there anythin I need to do more...


-------------------------------PARTITION TABLE Start -----------------
This is the partition of my disk.

Disk /dev/sda: 67 heads, 62 sectors, 1009 cylinders
Units = sectors of 1 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1            62     33231     16585   f0  Linux/PA-RISC boot
/dev/sda2         33232    531711    249240   82  Linux swap
/dev/sda3        531712   1030191    249240   83  Linux
/dev/sda4       1030192   4191385   1580597   83  Linux
-------------------------------------------PARTITION TABLE End-----------------

-------------------------CALL to Firmware.c-----------------------------
I am calling a pdc_iodc_bootout() as below.

err = pdc_iodc_bootout((unsigned long)17014784, dump_page_buf,
                                1, &count);

17014784  is the start of the swap space.
                     I got this number by doing this.
Start sector of the swap partition * 512
33232 * 512 = 17014784


-------------------------------------------------------------END calling
-------------


---------------------------------------Call to
IODC------------------------------
This is the call to IODC

int
pdc_iodc_bootout(unsigned devaddr, char *memaddr, unsigned size,
                 unsigned *count)
{
    int r;

    static int __attribute__((aligned(8)))   iodc_retbuf[32];
    static char __attribute__((aligned(64))) iodc_dbuf[4096];
    memcpy(iodc_dbuf, memaddr, size);

    if(!(PAGE0->mem_boot.iodc_io)) {
        return -1;
    }

    r = real32_call(PAGE0->mem_boot.iodc_io,
                    (unsigned long)PAGE0->mem_boot.hpa,
ENTRY_IO_BLK_BOOTOUT,
                    PAGE0->mem_boot.spa, __pa(PAGE0->mem_boot.dp.layers),
                    __pa(iodc_retbuf), devaddr, __pa(iodc_dbuf), size,
size);
    memcpy(count, iodc_retbuf, sizeof(*count));

    if (r == 3) /* EOF */
    {
        printk("pdc_iodc_bootin:EOF\n");
        return 0;                       /* count = 0 at EOF */
    }
    else if (r >= 0)
    {
        convert_to_wide(pdc_result);
        return pdc_result[0];           /* count */
    }
    return r;                           /* r < 0; error */
}

      parent reply	other threads:[~2002-03-19  5:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-14  6:54 [parisc-linux] TOC on B180L joel.soete
2002-03-14  7:29 ` Grant Grundler
2002-03-15 18:40 ` [parisc-linux] 0.93 installations on N-Class., Gururaj Ananthateerta
2002-03-15 19:00   ` Matthew Wilcox
2002-03-16  6:28     ` [parisc-linux] code to handle disk partitions Gururaj Ananthateerta
2002-03-16 13:22       ` Matthew Wilcox
2002-03-18 23:31         ` [parisc-linux] ftp Client Gururaj Ananthateerta
2002-03-19 13:27           ` Matthew Wilcox
2002-03-19  5:40         ` Gururaj Ananthateerta [this message]

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=3C96CF57.CA169520@cup.hp.com \
    --to=gururaj@cup.hp.com \
    --cc=parisc-linux@lists.parisc-linux.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.