smp: enable smp
This is a very large patch. Don't feel like splitting it up. Change locking discipline for rbtrees. Most changes are this. Fix stack init logic for application processors, and start them up. Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
33d6f72cfe
commit
3e5abada9b
17 changed files with 123 additions and 52 deletions
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef _COMMON_H_
|
||||
#define _COMMON_H_
|
||||
|
||||
#define KSTACK_SIZE 0x4000
|
||||
#define P_STACK_SIZE 0x10000
|
||||
|
||||
#include <limine/limine.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ extern struct limine_rsdp_response *kern_rsdp_res;
|
|||
extern struct limine_module_response *module_res;
|
||||
extern struct limine_framebuffer_response *fb_res;
|
||||
extern struct limine_tsc_frequency_response *tsc_res;
|
||||
extern struct limine_mp_response *mp_res;
|
||||
|
||||
void requests_init();
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,16 @@ rbnode_t *rbt_successor(rbnode_t *node);
|
|||
u64 rbt_next_key(rbtree_t *tree);
|
||||
rbnode_t *rbt_minimum(rbnode_t *node);
|
||||
|
||||
static inline void rbt_lock(rbtree_t *tree)
|
||||
{
|
||||
spinlock_acquire(&tree->lock);
|
||||
}
|
||||
|
||||
static inline void rbt_unlock(rbtree_t *tree)
|
||||
{
|
||||
spinlock_release(&tree->lock);
|
||||
}
|
||||
|
||||
void rbt_init();
|
||||
|
||||
#endif /* _rbtree_tH_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue