Support XiZi_AIoT
This commit is contained in:
44
Ubiquitous/XiZi_AIoT/softkernel/include/kalloc.h
Normal file
44
Ubiquitous/XiZi_AIoT/softkernel/include/kalloc.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2020 AIIT XUOS Lab
|
||||
* XiUOS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
* http://license.coscl.org.cn/MulanPSL2
|
||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
* See the Mulan PSL v2 for more details.
|
||||
*/
|
||||
/**
|
||||
* @file kalloc.c
|
||||
* @brief kalloc, kfree kind of memory allocation support
|
||||
* @version 3.0
|
||||
* @author AIIT XUOS Lab
|
||||
* @date 2023.08.25
|
||||
*/
|
||||
|
||||
/*************************************************
|
||||
File name: kalloc.c
|
||||
Description: kalloc, kfree kind of memory allocation support
|
||||
Others:
|
||||
History:
|
||||
1. Date: 2023-08-28
|
||||
Author: AIIT XUOS Lab
|
||||
Modification:
|
||||
1. first version
|
||||
*************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "pagetable.h"
|
||||
|
||||
bool module_phymem_init();
|
||||
char* kalloc(uint32_t size);
|
||||
bool kfree(char* vaddr);
|
||||
|
||||
char* raw_alloc(uint32_t size);
|
||||
bool raw_free(char* paddr);
|
||||
|
||||
void show_phymem_info();
|
||||
|
||||
extern struct KBuddy user_phy_freemem_buddy;
|
||||
extern struct KBuddy kern_virtmem_buddy;
|
||||
Reference in New Issue
Block a user