• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How does /dev/mem work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does /dev/mem work?


  • Subject: Re: How does /dev/mem work?
  • From: mm w <email@hidden>
  • Date: Sun, 8 Mar 2009 18:06:58 -0700

kmem allowed you to access to the vm address of the current process
that the kernel was aware of; both mechanisms were designed to access
to the system or a IO address space, it was a part of greater
mechanism and at this time many other APIs were mem/kmem dependent,
it's more than a choice, it's an heritage, many stuff from the
userspace to the kernelspace have been rewritten, it's like when you
repair your house you don't put everything in mess, you start side by
side.

anyway, this question is more a question of history than a choice at this time

>what is the alternative to /dev/mem on newer kernels?

nothing it has been supplemented by many stuff

The first rule about kmem is: you don't talk about kmem.
The second rule about kmem...

:)

Cheers!


On Sun, Mar 8, 2009 at 4:30 PM, Hajime Inoue <email@hidden> wrote:
> Thanks for the reply, Mike.
>
> After looking at ppc code, it appears that you ALWAYS get garbage
> from /dev/mem under i386 in xnu-517.12.7, and you get garbage under
> ppc unless certain flags are set.
>
> Does anyone know why sending garbage was chosen as the implementation?
>
> Also, what is the alternative to /dev/mem on newer kernels?  The pmap_*
> interface would seem to be the proper thing to use, but am I right in
> that it is not exported to KEXTs?
>
> -Jim
>
> -----Original Message-----
> From: Michael Smith [mailto:email@hidden]
> Sent: Monday, March 02, 2009 11:49 PM
> To: Hajime Inoue
> Cc: email@hidden
> Subject: Re: How does /dev/mem work?
>
>
> On Mar 2, 2009, at 2:17 PM, Hajime Inoue wrote:
>
>> I'm trying to understand the /dev/mem code in older versions of
>> Darwin.  I'm new to xnu so I may simply not know some of the well
>> known assumptions.
>
> I don't believe that the code you're looking at works.
>
> As a general rule, you don't get to play with /dev/mem under Darwin.
>
>  = Mike
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-kernel mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>



--
-mmw
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >RE: How does /dev/mem work? (From: Hajime Inoue <email@hidden>)

  • Prev by Date: RE: How does /dev/mem work?
  • Next by Date: Re: How does /dev/mem work?
  • Previous by thread: RE: How does /dev/mem work?
  • Next by thread: Re: How does /dev/mem work?
  • Index(es):
    • Date
    • Thread