Commit 8409a5b4 authored by Ian Seyler's avatar Ian Seyler

API update

parent 779451b1
......@@ -21,6 +21,7 @@ b_system equ 0x0000000000100048 ; Call a system function. IN: RCX = Function, R
; Index for b_config calls
timecounter equ 0
smp_get_id equ 1
networkcallback_get equ 3
networkcallback_set equ 4
clockcallback_get equ 5
......@@ -34,14 +35,18 @@ drive_id equ 0x50
; Index for b_system calls
smp_get_id equ 1
smp_lock equ 2
smp_unlock equ 3
debug_dump_mem equ 4
debug_dump_rax equ 5
get_argc equ 6
get_argv equ 7
delay equ 6
ethernet_status equ 7
mem_get_free equ 8
smp_numcores equ 9
smp_set equ 10
reset equ 256
; =============================================================================
; EOF
......@@ -27,6 +27,7 @@ void b_system(unsigned long function, void *var1, void *var2);
// Index for b_config calls
#define TIMECOUNTER 0
#define SMP_GET_ID 1
#define NETWORKCALLBACK_GET 3
#define NETWORKCALLBACK_SET 4
#define CLOCKCALLBACK_GET 5
......@@ -39,7 +40,6 @@ void b_system(unsigned long function, void *var1, void *var2);
#define DRIVE_ID 0x50
// Index for b_system calls
#define SMP_GET_ID 1
#define SMP_LOCK 2
#define SMP_UNLOCK 3
#define DEBUG_DUMP_MEM 4
......@@ -48,6 +48,7 @@ void b_system(unsigned long function, void *var1, void *var2);
#define ETHERNET_STATUS 7
#define MEM_GET_FREE 8
#define SMP_NUMCORES 9
#define SMP_SET 10
#define RESET 256
#endif
......
......@@ -16,6 +16,8 @@
b_config:
cmp rcx, 0
je b_config_timecounter
cmp rcx, 1
je b_config_smp_get_id
cmp rcx, 3
je b_config_networkcallback_get
cmp rcx, 4
......@@ -44,6 +46,10 @@ b_config_timecounter:
mov rax, [os_ClockCounter] ; Grab the timer counter value. It increments 8 times a second
ret
b_config_smp_get_id:
call b_smp_get_id
ret
b_config_networkcallback_get:
mov rax, [os_NetworkCallback]
ret
......
......@@ -16,8 +16,6 @@
b_system:
; cmp rcx, X
; je b_system_
cmp rcx, 1
je b_system_smp_get_id
cmp rcx, 2
je b_system_smp_lock
cmp rcx, 3
......@@ -40,10 +38,6 @@ b_system:
je b_system_reset
ret
b_system_smp_get_id:
call b_smp_get_id
ret
b_system_smp_lock:
call b_smp_lock
ret
......
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