Ejemplo n.º 1
0
 def post_alloc(self, pools):
     self.segment.paddr = self.attrs.phys_addr
     if self.attrs.direct and self.attrs.has_phys_addr():
         # Tell the segment's zone (if it has one) to grab the
         # corresponding window.
         pools.mark_direct_zone(self.attrs.virtpool,
                                self.attrs.abs_name(),
                                self.attrs.phys_addr,
                                self.attrs.size,
                                pools)
Ejemplo n.º 2
0
    def post_alloc(self, pools):
        if self.attrs.direct and self.attrs.has_phys_addr():
            # For direct allocation, assign the physical address to
            # the virtual address and then mark the virtual range as
            # used.  All possible direct virtual addresses will have
            # been moved into the 'direct' virtpool (which isn't
            # used), so address classes should not occur.
            pools.mark_virtual(self.attrs.abs_name(),
                               self.attrs.phys_addr,
                               self.attrs.size)
            # Tell the memsection's zone (if it has one) to grab the
            # corresponding window.
            pools.mark_direct_zone(self.attrs.virtpool,
                                   self.attrs.abs_name(),
                                   self.attrs.phys_addr,
                                   self.attrs.size,
                                   pools)
            self.attrs.virt_addr = self.attrs.phys_addr

        if self.segment:
            self.segment.paddr = self.attrs.phys_addr
            self.segment.vaddr = self.attrs.virt_addr
            self.segment.sections[0].address = self.attrs.virt_addr