diff options
author | Nao Pross <naopross@thearcway.org> | 2017-09-10 17:36:08 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2017-09-10 17:36:08 +0200 |
commit | e6a3feccab8c555013960e5b730582f24ab55477 (patch) | |
tree | 505a8843ab3dfdf89bbac07f3e3277b0157db519 /sw/z80/kernel/include | |
parent | new documentation with no styling (diff) | |
download | z80uPC-e6a3feccab8c555013960e5b730582f24ab55477.tar.gz z80uPC-e6a3feccab8c555013960e5b730582f24ab55477.zip |
partial implementation for ctc drivers and memory management
Diffstat (limited to '')
-rw-r--r-- | sw/z80/kernel/include/drivers/ctc.h | 6 | ||||
-rw-r--r-- | sw/z80/kernel/include/fs/fs.h | 2 | ||||
-rw-r--r-- | sw/z80/kernel/include/memory.h | 9 | ||||
-rw-r--r-- | sw/z80/kernel/include/types.h | 7 |
4 files changed, 14 insertions, 10 deletions
diff --git a/sw/z80/kernel/include/drivers/ctc.h b/sw/z80/kernel/include/drivers/ctc.h new file mode 100644 index 0000000..488e02b --- /dev/null +++ b/sw/z80/kernel/include/drivers/ctc.h @@ -0,0 +1,6 @@ +#ifndef __CTC_H__ +#define __CTC_H__ + +void ctc_control() + +#endif /* __CTC_H__ */
\ No newline at end of file diff --git a/sw/z80/kernel/include/fs/fs.h b/sw/z80/kernel/include/fs/fs.h index 2a0e9d4..81c86b7 100644 --- a/sw/z80/kernel/include/fs/fs.h +++ b/sw/z80/kernel/include/fs/fs.h @@ -53,7 +53,7 @@ struct fs_inode time_t ctime; // creation time /* data storage informations */ - uint24_t size; + uint16_t size; uint16_t blocks[FS_BLOCKS_N]; } diff --git a/sw/z80/kernel/include/memory.h b/sw/z80/kernel/include/memory.h index 60fc98a..67c4b88 100644 --- a/sw/z80/kernel/include/memory.h +++ b/sw/z80/kernel/include/memory.h @@ -6,6 +6,7 @@ /* maximum number of pages on the system */ #define PAGES_MAX_COUNT 32 +#define PAGE_SIZE 1000 /* in our system there are only 16 pages since only 64KB can be addressed * to optimize the memory management in ROM and RAM only pages from this set @@ -31,17 +32,19 @@ #define ADDR_PAGE_14 0xE000 #define ADDR_PAGE_15 0xF000 +#define ADDR_PAGE_FIRST ADDR_PAGE_8 +#define ADDR_PAGE_LAST ADDR_PAGE_15 + struct page { pid_t pid; // process owner of the page (0 if free) uint16_t addr; // physical address }; -extern struct page pages_table[PAGES_MAX_COUNT]; - int mmu_write_table(void); +int page_new(void); int page_map(int page, int pid, uint16_t addr); int page_unmap(int page); -#endif // __MEMORY_H__
\ No newline at end of file +#endif // __MEMORY_H__ diff --git a/sw/z80/kernel/include/types.h b/sw/z80/kernel/include/types.h index b822144..7f38abb 100644 --- a/sw/z80/kernel/include/types.h +++ b/sw/z80/kernel/include/types.h @@ -10,15 +10,10 @@ #define int8_t char #define uint8_t unsigned char #define int16_t int -#define uint16_t unsigned long int +#define uint16_t unsigned int #define size_t uint16_t #define pid_t uint8_t - #define ino_t uint16_t -typedef struct { - uint data : 24; -} uint24_t; - #endif |