1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2025-04-21 12:27:27 +03:00

make things work

This commit is contained in:
Bas Wijnen
2009-12-27 00:12:35 +01:00
parent d97f1a4ff2
commit fdfaf07c51
12 changed files with 917 additions and 915 deletions

View File

@@ -260,11 +260,15 @@ void kMemory_arch_unmap (kMemory *mem, kPage *page, unsigned address):
free_page (t, p)
kPage *kMemory_arch_get_mapping (kMemory *mem, unsigned address, bool *readonly):
if address >= 0x80000000:
if address >= 0x80000000 || !mem->arch.directory:
return NULL
unsigned *table = mem->arch.directory[address >> 21]
if !table:
return NULL
unsigned idx = (address >> 12) & ((1 << 9) - 1)
arch_page *page = (arch_page *)table[idx + 0x200]
if !page:
return NULL
if readonly:
*readonly = !(table[idx] & 4)
return page->page

View File

@@ -116,6 +116,9 @@ static void init_threads ():
first_alarm = NULL
kReceiver *init_receiver = NULL
for unsigned i = 0; i < NUM_THREADS; ++i:
dbg_log ("Starting thread ")
dbg_log_num (i, 2)
dbg_log ("\n")
kMemory *mem = top_memory.alloc_memory ()
assert (mem)
kThread *thread = mem->alloc_thread (NUM_SLOTS)

View File

@@ -18,7 +18,7 @@
load = 0x80000000
ARCH_CXXFLAGS = -DNUM_THREADS=6
ARCH_CPPFLAGS = -I. -Imips -Imips/nanonote -Wa,-mips32 -DNANONOTE #-DUSE_SERIAL
ARCH_CPPFLAGS = -I. -Imips -Imips/nanonote -Wa,-mips32 -DNANONOTE -DUSE_SERIAL
CROSS = mipsel-linux-gnu-
OBJDUMP = $(CROSS)objdump
junk = mdebug.abi32 reginfo comment pdr
@@ -56,7 +56,7 @@ mips/init.o: TARGET_FLAGS = -I/usr/include
$(addsuffix .elf,$(boot_threads)): TARGET_FLAGS = -I.
$(addsuffix .elf,$(boot_threads)): LDFLAGS = -EL
$(addprefix boot-programs/,$(addsuffix .cc,$(boot_threads))): devices.hh keys.hh
lcd.elf: boot-programs/charset.data
boot-programs/lcd.o: boot-programs/charset.data
boot-programs/charset.data: boot-programs/charset
$< > $@