Re: Issuing BIOS interrupts in Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Firstly, thanks for the directions.

   uClinux is now part of the distribution kernel it is intended for
systems without an MMU. But basically uClinux means linux without
   paging PAGE_OFFSET = 0;

I could not find IA32 / x86 compatibility explicitly mentioned on the
uClinux site. Can uClinux work only on embedded (which ACTUALLY do not
have MMU), or can it also work on x86 (which has MMU, but I'm ok with
the idea of doing away with it)?


   On some processors some faults must be handled in real mode.

   Switching from protected mode to real mode and back may not be all
that hard. But doing something while in real mode could be extremely hard.
   You can not use any Linux resource that assumes protected mode -
that means pretty much everything.

:-( ... That is sad.

   Basically you would have to get a hunk of memory you can access in
Real Mode, switch to real mode do your task switch back and copy the
results from your memory.
   While you were in real mode, interrupts would probably have to be
disabled.

Ok. Basically my purpose is to write a minimal disk driver (that will
be independent of the disk hardware) using BIOS interrups. So if I
want to copy a sector from disk to memory, here is how I should
proceed:

1) Get hold of a memory chunk that is "usable" in real mode ( <1 mb
physical memory).
2) switch to real mode.
3) Issue BIOS interrupt (13h) that will copy the desired sector to this memory.
4) Switch back to protected mode.
5) Now copy data from this memory to the actual "usable" memory (any
memory accessible to the kernel)

Does the above seem ok?

Thanks,

Rajat


   The x86 also has something called virtual x86 mode which might be
more useful. I do not remember all the details, but I think you could
create a linux process, that executed in virtual x86 mode,
   that would execute concurrently with virtual x386 processes. That
said Linux has no builtin facilities to work with virtual x86 processes.
>

Thanks ... I will check it out.

Rajat

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux