Changeset 677a6d5 in mainline for genarch


Ignore:
Timestamp:
2006-01-08T16:24:32Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f275cb3
Parents:
59adc2b
Message:

Memory management work.
Pass address space identifier to functions in page_operations to support single global page hash table.

Location:
genarch/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • genarch/src/acpi/acpi.c

    r59adc2b r677a6d5  
    3030#include <genarch/acpi/madt.h>
    3131#include <arch/bios/bios.h>
    32 
     32#include <mm/asid.h>
    3333#include <mm/page.h>
    3434#include <print.h>
     
    8080static void map_sdt(struct acpi_sdt_header *sdt)
    8181{
    82         page_mapping_insert((__address) sdt, (__address) sdt, PAGE_NOT_CACHEABLE, 0);
     82        page_mapping_insert((__address) sdt, ASID_KERNEL, (__address) sdt, PAGE_NOT_CACHEABLE, 0);
    8383        map_structure((__address) sdt, sdt->length);
    8484}
  • genarch/src/mm/page_ht.c

    r59adc2b r677a6d5  
    3030#include <mm/page.h>
    3131#include <mm/frame.h>
     32#include <arch/mm/asid.h>
    3233#include <arch/types.h>
    3334#include <typedefs.h>
    3435#include <arch/asm.h>
    3536
    36 static void ht_mapping_insert(__address page, __address frame, int flags, __address root);
    37 static pte_t *ht_mapping_find(__address page, __address root);
     37static void ht_mapping_insert(__address page, asid_t asid, __address frame, int flags, __address root);
     38static pte_t *ht_mapping_find(__address page, asid_t asid, __address root);
    3839
    3940page_operations_t page_ht_operations = {
     
    4849 *
    4950 * @param page Virtual address of the page to be mapped.
     51 * @param asid Address space to which page belongs.
    5052 * @param frame Physical address of memory frame to which the mapping is done.
    5153 * @param flags Flags to be used for mapping.
    5254 * @param root Explicit PTL0 address.
    5355 */
    54 void ht_mapping_insert(__address page, __address frame, int flags, __address root)
     56void ht_mapping_insert(__address page,  asid_t asid, __address frame, int flags, __address root)
    5557{
    5658}
     
    6163 *
    6264 * @param page Virtual page.
     65 * @param asid Address space to wich page belongs.
    6366 * @param root PTL0 address if non-zero.
    6467 *
    6568 * @return NULL if there is no such mapping; entry from PTL3 describing the mapping otherwise.
    6669 */
    67 pte_t *ht_mapping_find(__address page, __address root)
     70pte_t *ht_mapping_find(__address page, asid_t asid, __address root)
    6871{
    6972        return NULL;
  • genarch/src/mm/page_pt.c

    r59adc2b r677a6d5  
    3131#include <mm/frame.h>
    3232#include <arch/mm/page.h>
     33#include <arch/mm/asid.h>
    3334#include <arch/types.h>
    3435#include <typedefs.h>
     
    3637#include <memstr.h>
    3738
    38 static void pt_mapping_insert(__address page, __address frame, int flags, __address root);
    39 static pte_t *pt_mapping_find(__address page, __address root);
     39static void pt_mapping_insert(__address page, asid_t asid, __address frame, int flags, __address root);
     40static pte_t *pt_mapping_find(__address page, asid_t asid, __address root);
    4041
    4142page_operations_t page_pt_operations = {
     
    5051 *
    5152 * @param page Virtual address of the page to be mapped.
     53 * @param asid Ignored.
    5254 * @param frame Physical address of memory frame to which the mapping is done.
    5355 * @param flags Flags to be used for mapping.
    5456 * @param root Explicit PTL0 address.
    5557 */
    56 void pt_mapping_insert(__address page, __address frame, int flags, __address root)
     58void pt_mapping_insert(__address page, asid_t asid, __address frame, int flags, __address root)
    5759{
    5860        pte_t *ptl0, *ptl1, *ptl2, *ptl3;
     
    9799 *
    98100 * @param page Virtual page.
     101 * @param asid Ignored.
    99102 * @param root PTL0 address if non-zero.
    100103 *
    101104 * @return NULL if there is no such mapping; entry from PTL3 describing the mapping otherwise.
    102105 */
    103 pte_t *pt_mapping_find(__address page, __address root)
     106pte_t *pt_mapping_find(__address page, asid_t asid, __address root)
    104107{
    105108        pte_t *ptl0, *ptl1, *ptl2, *ptl3;
Note: See TracChangeset for help on using the changeset viewer.