Commit cd6e20a1 authored by Charles Jacobsen's avatar Charles Jacobsen Committed by Vikram Narayanan
Browse files

test-v2: Fix cptr cache configuration bug.

The cptr cache was too big. Shrunk it a bit to the size
we were using before.
parent e34ca44e
......@@ -53,6 +53,12 @@ ARCH=x86
LCD_BUILD_DIR_REL=build
LCD_BUILD_DIR=$(LCD_DOMAINS_TOP_SRC_DIR)/$(LCD_BUILD_DIR_REL)
# ------------------------------------------------------------
# CSPACE configuration
LCD_CSPACE_DEPTH_BITS=2 # depth = 4
LCD_CSPACE_CNODE_TABLE_BITS=3 # cnode tables have 8 slots
# ------------------------------------------------------------
# all targets
......@@ -97,7 +103,9 @@ $(MICROKERNEL_BUILD_DIR)/libcap.build/Makefile: libcap/configure | \
--disable-global-cap-types \
--with-kernel-headers=$(LCD_DOMAINS_TOP_SRC_DIR)/.. \
--disable-kernel-module \
--prefix=$(MICROKERNEL_BUILD_DIR)/libcap.install
--prefix=$(MICROKERNEL_BUILD_DIR)/libcap.install \
CSPACE_DEPTH_BITS=$(LCD_CSPACE_DEPTH_BITS) \
CSPACE_CNODE_TABLE_BITS=$(LCD_CSPACE_CNODE_TABLE_BITS)
$(MICROKERNEL_BUILD_DIR)/Kbuild: scripts/Kbuild.microkernel | \
$(MICROKERNEL_BUILD_DIRS)
......@@ -154,7 +162,9 @@ $(LIBLCD_BUILD_DIR)/libcap.build/Makefile: libcap/configure | \
PLATFORM=kernel --disable-test-build \
--disable-kernel-module \
--with-kernel-headers=$(LCD_DOMAINS_TOP_SRC_DIR)/.. \
--prefix=$(LIBLCD_BUILD_DIR)/libcap.install
--prefix=$(LIBLCD_BUILD_DIR)/libcap.install \
CSPACE_DEPTH_BITS=$(LCD_CSPACE_DEPTH_BITS) \
CSPACE_CNODE_TABLE_BITS=$(LCD_CSPACE_CNODE_TABLE_BITS)
$(LIBLCD_BUILD_DIR)/Kbuild: scripts/Kbuild.liblcd | \
$(LIBLCD_BUILD_DIRS)
......
......@@ -161,12 +161,13 @@
/* Component Sizes. */
#define LCD_UTCB_SIZE PAGE_SIZE /* ........................... 4 KBs */
#define LCD_BOOTSTRAP_PAGES_SIZE (2 * PAGE_SIZE) /* .......... 8 KBs */
#define LCD_BOOTSTRAP_PAGE_TABLES_SIZE (2 * PAGE_SIZE) /* .... 8 KBs */
#define LCD_STACK_SIZE (2 * PAGE_SIZE) /* .................... 8 KBs */
#define LCD_UTCB_SIZE PAGE_SIZE /* ........................... 4 KBs */
#define LCD_BOOTSTRAP_PAGES_SIZE (1 * PAGE_SIZE) /* .......... 4 KBs */
#define LCD_BOOTSTRAP_PAGE_TABLES_SIZE (2 * PAGE_SIZE) /* .... 8 KBs */
#define LCD_STACK_SIZE (2 * PAGE_SIZE) /* .................... 8 KBs */
static inline void
__attribute__((used)) /* required so that this func is processed */
__lcd_build_checks__(void)
{
/*
......
......@@ -141,37 +141,44 @@ static int __init lcd_init(void)
LCD_ERR("failed to init ipc subsystem");
goto fail3;
}
ret = __lcd_mem_itree_init();
if (ret) {
LCD_ERR("failed to init global mem itree");
goto fail4;
}
ret = __lcd_mem_init();
if (ret) {
LCD_ERR("failed to init memory subsystem");
goto fail4;
goto fail5;
}
ret = __lcd_run_init();
if (ret) {
LCD_ERR("failed to init run loop subsystem");
goto fail5;
goto fail6;
}
ret = __lcd_console_init();
if (ret) {
LCD_ERR("failed to init console subsystem");
goto fail6;
goto fail7;
}
ret = misc_register(&lcd_dev);
if (ret) {
LCD_ERR("misc device register failed, ret = %d", ret);
goto fail7;
goto fail8;
}
LCD_MSG("lcd microkernel initialized");
return 0;
fail7:
fail8:
__lcd_console_exit();
fail6:
fail7:
__lcd_run_exit();
fail5:
fail6:
__lcd_mem_exit();
fail5:
__lcd_mem_itree_exit();
fail4:
__lcd_ipc_exit();
fail3:
......@@ -192,6 +199,7 @@ static void __exit lcd_exit(void)
__lcd_console_exit();
__lcd_run_exit();
__lcd_mem_exit();
__lcd_mem_itree_exit();
__lcd_ipc_exit();
__lcd_exit_cap_types();
cap_fini();
......
#! /bin/bash
sudo insmod microkernel/lcd_domains.ko
\ No newline at end of file
sudo dmesg -c > /dev/null
sudo insmod build/microkernel_build/lcd_domains.ko
#! /bin/bash
sudo rmmod microkernel/lcd_domains.ko
\ No newline at end of file
sudo rmmod build/microkernel_build/lcd_domains.ko
#! /bin/bash -e
sudo dmesg -c > /dev/null
sudo insmod test-mods/$@/lcd_test_mod_$@_boot.ko
sudo rmmod test-mods/$@/lcd_test_mod_$@_boot.ko
\ No newline at end of file
sudo insmod build/test_mods/$@/boot/lcd_test_mod_$@_boot.ko
sudo rmmod build/test_mods/$@/boot/lcd_test_mod_$@_boot.ko
obj-m += lcd_test_mod_liblcd_tests_boot.o
obj-m += lcd_test_mod_liblcd_test_boot.o
lcd_test_mod_liblcd_tests_boot-y += boot.o
lcd_test_mod_liblcd_test_boot-y += boot.o
ccflags-y += $(NON_ISOLATED_CC_FLAGS)
obj-m += lcd_test_mod_liblcd_tests_lcd.o
obj-m += lcd_test_mod_liblcd_test_lcd.o
lcd_test_mod_liblcd_tests_lcd-y += lcd.o
lcd_test_mod_liblcd_test_lcd-y += lcd.o
lcd_test_mod_liblcd_tests_lcd-y += $(LIBLCD)
lcd_test_mod_liblcd_test_lcd-y += $(LIBLCD)
ccflags-y += $(ISOLATED_CC_FLAGS)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment