Re: Issuing BIOS interrupts in Linux

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

 



Nilesh Agrawal wrote:
>> Okay ... NOW we are talking. Any idea / links / references on where
>> should I start looking for? How tough / practical is it to switch from
>> protected mode to real mode and back? Is it possible at all (in
>> linux)?
>
> Paging only works in protected mode. And once paging is turned off,
> all the kernel code is unusable because it is linked at PAGE_OFFSET +
> something. ( 3GB + )
>
> Disabling paging itself is not easy, let alone going to real mode
> (where only 64KB memory is available ) and coming back.
    on an x86 real mode has access to 1MB of memory. Not 64K.
    Frequently this is quoted a 640K because the upper part of the real
mode address space may contain graphics adapters, and roms.

    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;

    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.
    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.

    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.
>
>
> Nilesh
>
>


-- 
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       dhlii@xxxxxxxxxx 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.

"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein


--
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