aros:aros.git
8 years agoKrnSetCPUEntry implemented. The cores are initialized by Exec and are x86_64-smp
Michal Schulz [Mon, 26 Aug 2013 21:50:17 +0000 (23:50 +0200)]
KrnSetCPUEntry implemented. The cores are initialized by Exec and are
entering endless sleep now. tls expanded a little but can as well go
back to previousl state in few commits.

8 years agofixes in CPU core initialization - only CPU0 (bootstrap CPU) routes
Michal Schulz [Mon, 26 Aug 2013 20:25:08 +0000 (22:25 +0200)]
fixes in CPU core initialization - only CPU0 (bootstrap CPU) routes
XTPIC interrupts to lAPIC. All other CPUs are ignoring LINT0 and LINT1.
AROS boots into Wanderer again :)

8 years ago1. core_ProtKernelArea takes another parameter - caching
Michal Schulz [Mon, 26 Aug 2013 20:23:36 +0000 (22:23 +0200)]
1. core_ProtKernelArea takes another parameter - caching
   caching = 0 - cache enabled, WB
   caching = 1 - cache enabled, WT
   caching = 3 - cache disabled, UC

2. If any of protection attributes is different than 0 or 1 (or larger
than 3 in case of caching), the flag will remain unchanged.

3. MMU pages are given the UC attribute - they should stay in RAM and
not pollute CPU caches

4. localAPIC base is set to non-cached (UC), as it should be.

8 years agobump up the maximum allowable alloc size in TLSF form 4GB to 128GB on
Michal Schulz [Sun, 25 Aug 2013 20:31:29 +0000 (22:31 +0200)]
bump up the maximum allowable alloc size in TLSF form 4GB to 128GB on
64-bit systems

8 years agoQUICK HACK TO PROVIDE A CUSTOM x86_64-pc VERSION OF kernel_memory.c. NEVER EVER BACKP...
Michal Schulz [Sun, 25 Aug 2013 19:46:53 +0000 (21:46 +0200)]
QUICK HACK TO PROVIDE A CUSTOM x86_64-pc VERSION OF kernel_memory.c. NEVER EVER BACKPORT TO AROS TREE!

8 years agoSupport more than 4GB of RAM. The handling of MMU page tables still sucks on x86_64...
Michal Schulz [Sun, 25 Aug 2013 19:07:30 +0000 (21:07 +0200)]
Support more than 4GB of RAM. The handling of MMU page tables still sucks on x86_64 though.

8 years agoExperimental version : handle >4G of RAM in C:Avail
Michal Schulz [Sun, 25 Aug 2013 16:37:13 +0000 (18:37 +0200)]
Experimental version : handle >4G of RAM in C:Avail

8 years agoDon't use ULONG type to measure available memory. It fails with >4G of
Michal Schulz [Sun, 25 Aug 2013 16:31:08 +0000 (18:31 +0200)]
Don't use ULONG type to measure available memory. It fails with >4G of
RAM

8 years agoa patch from my local collection which builds entire x86_64-pc
Michal Schulz [Sun, 25 Aug 2013 09:31:14 +0000 (11:31 +0200)]
a patch from my local collection which builds entire x86_64-pc
environment using -mcmodel=large. This way, both code and data of any
binary (including kernel, libraries and software) may be loaded anywhere
into 64bit address space. Required as soon as AROS supports more than
4GB of RAM

8 years agobuild kernel_memory.c for all-pc targets. removed by mistake...
Michal Schulz [Sun, 25 Aug 2013 08:48:23 +0000 (10:48 +0200)]
build kernel_memory.c for all-pc targets. removed by mistake...

8 years agoadd IPI support
Michal Schulz [Sun, 25 Aug 2013 08:45:26 +0000 (10:45 +0200)]
add IPI support

8 years agoInitialize IDT and leave supervisor mode before idling the cores
Michal Schulz [Sun, 25 Aug 2013 08:44:43 +0000 (10:44 +0200)]
Initialize IDT and leave supervisor mode before idling the cores

8 years agosimple spinlock implementation
Michal Schulz [Sun, 25 Aug 2013 08:44:10 +0000 (10:44 +0200)]
simple spinlock implementation

8 years agoHacky backport of my old code - add IPI interrupt handler and initialize
Michal Schulz [Sat, 24 Aug 2013 21:58:43 +0000 (23:58 +0200)]
Hacky backport of my old code - add IPI interrupt handler and initialize
IDT on each cpu core

8 years agoBuild fixes... (AROS types instead of stdint.h)
Michal Schulz [Sat, 24 Aug 2013 21:04:32 +0000 (23:04 +0200)]
Build fixes... (AROS types instead of stdint.h)

8 years agoBackport from my private branch - extended memory allocators support
Michal Schulz [Sat, 24 Aug 2013 20:56:52 +0000 (22:56 +0200)]
Backport from my private branch - extended memory allocators support
aligned memory allocations. And so does TLSF...

8 years agoIn media change detector send a timeout signal to bus task only, when
Michal Schulz [Sat, 24 Aug 2013 20:23:30 +0000 (22:23 +0200)]
In media change detector send a timeout signal to bus task only, when
bus->ab_Task != NULL. This fixes a crash on boot with QEMU and
VirtualBox...

8 years agoCreate the table of per-cpu data slots during SMP initialization
Michal Schulz [Sat, 24 Aug 2013 13:03:54 +0000 (15:03 +0200)]
Create the table of per-cpu data slots during SMP initialization

8 years agocheck that platform data exists before returning CPU number
Michal Schulz [Sat, 24 Aug 2013 11:48:48 +0000 (13:48 +0200)]
check that platform data exists before returning CPU number

8 years agoAROS_WORSTALIGN is 16 bytes on x86_64 architecture. This is the
Michal Schulz [Sat, 24 Aug 2013 11:35:02 +0000 (13:35 +0200)]
AROS_WORSTALIGN is 16 bytes on x86_64 architecture. This is the
requirement of the fxsave instruction

8 years agoGetCPUStorage and SetCPUStorage properly implemented
Michal Schulz [Sat, 24 Aug 2013 11:13:27 +0000 (13:13 +0200)]
GetCPUStorage and SetCPUStorage properly implemented

8 years agosmall fix-ups and changes. TLS types are BYTE, LONG and QUAD now.
Michal Schulz [Sat, 24 Aug 2013 11:12:49 +0000 (13:12 +0200)]
small fix-ups and changes. TLS types are BYTE, LONG and QUAD now.

8 years agoStore KernelBase in TLS
Michal Schulz [Sat, 24 Aug 2013 11:12:10 +0000 (13:12 +0200)]
Store KernelBase in TLS

8 years agosmall typo fixed
Michal Schulz [Sat, 24 Aug 2013 10:51:43 +0000 (12:51 +0200)]
small typo fixed

8 years agobe silent
Michal Schulz [Fri, 23 Aug 2013 22:15:46 +0000 (00:15 +0200)]
be silent

8 years agoUse TLSF memory management
Michal Schulz [Fri, 23 Aug 2013 20:54:38 +0000 (22:54 +0200)]
Use TLSF memory management

8 years agoSetCPUStorage/GetCPUStorage implemented using per-cpu TLS area
Michal Schulz [Thu, 22 Aug 2013 18:29:09 +0000 (20:29 +0200)]
SetCPUStorage/GetCPUStorage implemented using per-cpu TLS area

8 years agoSMP: Make 'THISCPU' a private convenience macro for kernel.resource and exec.library
Jason S. McMullan [Thu, 22 Aug 2013 17:50:58 +0000 (13:50 -0400)]
SMP: Make 'THISCPU' a private convenience macro for kernel.resource and exec.library

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agomy local change - ubuntu does not have gets anymore, so without this fix
Michal Schulz [Thu, 22 Aug 2013 16:50:35 +0000 (18:50 +0200)]
my local change - ubuntu does not have gets anymore, so without this fix
building GRUB will always fail...

8 years agoSysBase does not have to contain AttnResched. THISCPU has it always
Michal Schulz [Thu, 22 Aug 2013 16:36:38 +0000 (18:36 +0200)]
SysBase does not have to contain AttnResched. THISCPU has it always

8 years agokernel.resource: Fix glaringly obvious typo
Jason S. McMullan [Thu, 22 Aug 2013 01:58:11 +0000 (21:58 -0400)]
kernel.resource: Fix glaringly obvious typo

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoIgnore "Builds" directory
Michal Schulz [Wed, 21 Aug 2013 13:52:41 +0000 (15:52 +0200)]
Ignore "Builds" directory

Conflicts:
.gitignore

8 years agoignore Eclipse settings files
Michal Schulz [Thu, 22 Aug 2013 06:24:16 +0000 (08:24 +0200)]
ignore Eclipse settings files

8 years agokernel-exec-pc target needs proto/kernel.h. So, include dependency for kernel.resource
Michal Schulz [Thu, 22 Aug 2013 06:23:10 +0000 (08:23 +0200)]
kernel-exec-pc target needs proto/kernel.h. So, include dependency for kernel.resource

8 years agoenable SMP for pc-x86_64 target
Michal Schulz [Wed, 21 Aug 2013 19:06:08 +0000 (21:06 +0200)]
enable SMP for pc-x86_64 target

8 years agoMerge branch 'x86_64-smp' of gitorious.org:aros/aros into x86_64-smp
Michal Schulz [Wed, 21 Aug 2013 19:00:01 +0000 (21:00 +0200)]
Merge branch 'x86_64-smp' of gitorious.org:aros/aros into x86_64-smp

Conflicts:
AROS/rom/kernel/kernel_init.c
AROS/rom/kernel/scheduling.c
AROS/rom/kernel/setcpuentry.c
AROS/rom/kernel/setcpustorage.c

8 years agoIgnore "Builds" directory
Michal Schulz [Wed, 21 Aug 2013 13:52:41 +0000 (15:52 +0200)]
Ignore "Builds" directory

8 years agoexec.library: Fix missing header for uniprocessor builds
Jason S. McMullan [Wed, 21 Aug 2013 13:56:59 +0000 (09:56 -0400)]
exec.library: Fix missing header for uniprocessor builds

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agokernel.resource: Fix some SMP stub compilation issues
Jason S. McMullan [Wed, 21 Aug 2013 13:56:42 +0000 (09:56 -0400)]
kernel.resource: Fix some SMP stub compilation issues

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoconfigure: Move aros_smp definition to the correct location
Jason S. McMullan [Wed, 21 Aug 2013 13:55:50 +0000 (09:55 -0400)]
configure: Move aros_smp definition to the correct location

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Use default KrnGetCPUCount() implementation
Jason S. McMullan [Wed, 21 Aug 2013 04:30:36 +0000 (00:30 -0400)]
arch/all-unix: Use default KrnGetCPUCount() implementation

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Use a global TaskReady/TaskWait list
Jason S. McMullan [Wed, 21 Aug 2013 04:18:37 +0000 (00:18 -0400)]
exec.library: Use a global TaskReady/TaskWait list

Nice side effect - the first ready processor will self-assign
the CPU affinity of a Ready task.

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Add some paranoia to RemTask()
Jason S. McMullan [Wed, 21 Aug 2013 04:08:53 +0000 (00:08 -0400)]
exec.library: Add some paranoia to RemTask()

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: No need to 'save and restore' TDNestCnt
Jason S. McMullan [Wed, 21 Aug 2013 03:58:31 +0000 (23:58 -0400)]
exec.library: No need to 'save and restore' TDNestCnt

Switch and Dispatch already take care of that for us.

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Move 'Quantum' back to SysBase
Jason S. McMullan [Wed, 21 Aug 2013 03:54:30 +0000 (23:54 -0400)]
exec.library: Move 'Quantum' back to SysBase

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Remove unneeded 'storage' variable
Jason S. McMullan [Wed, 21 Aug 2013 03:49:22 +0000 (23:49 -0400)]
arch/all-unix: Remove unneeded 'storage' variable

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Remove custom getcpucount
Jason S. McMullan [Wed, 21 Aug 2013 03:47:38 +0000 (23:47 -0400)]
arch/all-unix: Remove custom getcpucount

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Fix implementation of KrnCause() for SMP
Jason S. McMullan [Wed, 21 Aug 2013 03:43:14 +0000 (23:43 -0400)]
arch/all-unix: Fix implementation of KrnCause() for SMP

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Don't use SC_ENABLE/SC_DISABLE macros on SMP
Jason S. McMullan [Wed, 21 Aug 2013 03:41:34 +0000 (23:41 -0400)]
arch/all-unix: Don't use SC_ENABLE/SC_DISABLE macros on SMP

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agokernel.resource: KrnGetCPUCount() - reasonable default implementation
Jason S. McMullan [Wed, 21 Aug 2013 03:19:05 +0000 (23:19 -0400)]
kernel.resource: KrnGetCPUCount() - reasonable default implementation

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agogdbinit: Fixes for hosted
Jason S. McMullan [Sun, 18 Aug 2013 02:07:38 +0000 (22:07 -0400)]
gdbinit: Fixes for hosted

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Add counting semaphore primitive
Jason S. McMullan [Wed, 21 Aug 2013 03:15:07 +0000 (23:15 -0400)]
arch/all-unix: Add counting semaphore primitive

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Disable interrupts *after* all tasks have halted
Jason S. McMullan [Fri, 16 Aug 2013 04:13:17 +0000 (00:13 -0400)]
arch/all-unix: Disable interrupts *after* all tasks have halted

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Better obey pthread rules for cond variables
Jason S. McMullan [Fri, 16 Aug 2013 04:12:27 +0000 (00:12 -0400)]
arch/all-unix: Better obey pthread rules for cond variables

cond_wait and cond_signal/broadcast cannot be used in the
same mutex lock block.

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Add a few paranoia NULLs to remtask
Jason S. McMullan [Fri, 16 Aug 2013 04:10:02 +0000 (00:10 -0400)]
exec.library: Add a few paranoia NULLs to remtask

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Remove (very obsolete) check for FreeMem(FindTask(NULL))
Jason S. McMullan [Fri, 16 Aug 2013 04:09:25 +0000 (00:09 -0400)]
exec.library: Remove (very obsolete) check for FreeMem(FindTask(NULL))

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Fix Forbid() breaking in cpu_Dispatch()
Jason S. McMullan [Fri, 16 Aug 2013 04:04:31 +0000 (00:04 -0400)]
arch/all-unix: Fix Forbid() breaking in cpu_Dispatch()

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Simplify Cli/Sti behaviour
Jason S. McMullan [Thu, 15 Aug 2013 03:44:51 +0000 (23:44 -0400)]
arch/all-unix: Simplify Cli/Sti behaviour

The KrnSchedule() mechanism tasks care of stopping processes - all
we really need is CPU0 to ignore SIGALRM/SIGIO interrupts.

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Implement new KrnSchedule() API
Jason S. McMullan [Thu, 15 Aug 2013 03:43:43 +0000 (23:43 -0400)]
arch/all-unix: Implement new KrnSchedule() API

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Fix KrnSupervisor() being stuck
Jason S. McMullan [Thu, 15 Aug 2013 03:41:32 +0000 (23:41 -0400)]
arch/all-unix: Fix KrnSupervisor() being stuck

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: NewAddTask() wasn't properly coping with ThisTask == NULL
Jason S. McMullan [Thu, 15 Aug 2013 03:41:03 +0000 (23:41 -0400)]
exec.library: NewAddTask() wasn't properly coping with ThisTask == NULL

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Use new KrnSchedule() API
Jason S. McMullan [Thu, 15 Aug 2013 03:40:33 +0000 (23:40 -0400)]
exec.library: Use new KrnSchedule() API

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agokernel.resource: Add some minor paranoia into the scheduler for SMP
Jason S. McMullan [Thu, 15 Aug 2013 03:38:30 +0000 (23:38 -0400)]
kernel.resource: Add some minor paranoia into the scheduler for SMP

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agokernel.resource: Change KrnSchedule() interface (again)
Jason S. McMullan [Thu, 15 Aug 2013 03:38:00 +0000 (23:38 -0400)]
kernel.resource: Change KrnSchedule() interface (again)

The intent is that SysBase->TDNestCnt is simply a cached
copy of the kernel's internal forbid counter, and all
management of that (locked) internal counter is through
the kernel.resource API

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Move 'HAVE_SWAPCONTEXT' into exec_platform.h
Jason S. McMullan [Thu, 15 Aug 2013 03:34:23 +0000 (23:34 -0400)]
arch/all-unix: Move 'HAVE_SWAPCONTEXT' into exec_platform.h

Discovered that having it in mmakefile caused items after
IntExecBase->PlatformData to move around, since the define
was not in the regular rom/exec build

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Leave ExecBase the same size, whether SMP or not
Jason S. McMullan [Fri, 16 Aug 2013 03:53:30 +0000 (23:53 -0400)]
exec.library: Leave ExecBase the same size, whether SMP or not

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoGive a warning (it should be crash!!!!) when TDNestCnt wraps...
Michal Schulz [Wed, 14 Aug 2013 20:57:29 +0000 (22:57 +0200)]
Give a warning (it should be crash!!!!) when TDNestCnt wraps...

8 years agouse old method of selecting CPU. Temporary fix
Michal Schulz [Wed, 14 Aug 2013 20:33:53 +0000 (22:33 +0200)]
use old method of selecting CPU. Temporary fix

8 years agobe less verbose
Michal Schulz [Wed, 14 Aug 2013 20:33:23 +0000 (22:33 +0200)]
be less verbose

8 years agooops, forgot one condition in permit
Michal Schulz [Wed, 14 Aug 2013 20:21:54 +0000 (22:21 +0200)]
oops, forgot one condition in permit

8 years agoKrnScheduling takes an BYTE parameter and then behaves accordingly:
Michal Schulz [Wed, 14 Aug 2013 20:13:42 +0000 (22:13 +0200)]
KrnScheduling takes an BYTE parameter and then behaves accordingly:
parameter > 0 <-- TDNestCnt++, then stop multitasking and stop all other cores if SysBase->TDNestCnt >= 0
parameter < 0 <-- TDNestCnt--, then enable multitasking and enable all other cores if SysBase->TDNestCnt < 0
parameter = 0 <-- don't change TDNestCnt, just test it and stop or enable multitasking

8 years agoInclude CPU number in debug output
Michal Schulz [Wed, 14 Aug 2013 18:52:07 +0000 (20:52 +0200)]
Include CPU number in debug output

8 years ago"empty" or "free" cpu is a cpu without ready and without waiting tasks. If any of...
Michal Schulz [Wed, 14 Aug 2013 18:50:58 +0000 (20:50 +0200)]
"empty" or "free" cpu is a cpu without ready and without waiting tasks. If any of these is not the case, simple picking of CPU cannot be done

8 years agoarch/all-unix: Work in progress, attempt to use pthread conditional variables for...
Jason S. McMullan [Wed, 14 Aug 2013 04:22:05 +0000 (00:22 -0400)]
arch/all-unix: Work in progress, attempt to use pthread conditional variables for Forbid/Permit

Not yet functional.

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Use pthread thread-specific storage for CPU Number and Storage
Jason S. McMullan [Wed, 14 Aug 2013 04:20:28 +0000 (00:20 -0400)]
arch/all-unix: Use pthread thread-specific storage for CPU Number and Storage

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Remove unneeded Enable() in SMP init
Jason S. McMullan [Wed, 14 Aug 2013 04:19:03 +0000 (00:19 -0400)]
exec.library: Remove unneeded Enable() in SMP init

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Use KrnSchedule() hook
Jason S. McMullan [Wed, 14 Aug 2013 04:18:40 +0000 (00:18 -0400)]
exec.library: Use KrnSchedule() hook

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agokernel.resource: Add KrnSchedule() hook
Jason S. McMullan [Wed, 14 Aug 2013 04:18:19 +0000 (00:18 -0400)]
kernel.resource: Add KrnSchedule() hook

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Fix issue where FreeMem()'d tasks were still referenced
Jason S. McMullan [Wed, 14 Aug 2013 04:17:50 +0000 (00:17 -0400)]
exec.library: Fix issue where FreeMem()'d tasks were still referenced

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agowhen picking up semi-random CPU, actually assign the task to it. Until now iteration...
Michal Schulz [Tue, 13 Aug 2013 19:32:38 +0000 (21:32 +0200)]
when picking up semi-random CPU, actually assign the task to it. Until now iteration through cpus was done, but assignment missed...

8 years agofixed typo
Michal Schulz [Tue, 13 Aug 2013 17:45:02 +0000 (19:45 +0200)]
fixed typo

8 years agoDon't use ThisTask from SysBase. Call FindTask(NULL) instead.
Michal Schulz [Tue, 13 Aug 2013 17:31:54 +0000 (19:31 +0200)]
Don't use ThisTask from SysBase. Call FindTask(NULL) instead.

8 years agoarch/all-unix: SMP fix - add pthread_cond_broadcast, remove malloc/alloc
Jason S. McMullan [Tue, 13 Aug 2013 00:57:53 +0000 (20:57 -0400)]
arch/all-unix: SMP fix - add pthread_cond_broadcast, remove malloc/alloc

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoarch/all-unix: Use pthreads to implement SMP
Jason S. McMullan [Mon, 12 Aug 2013 04:30:52 +0000 (00:30 -0400)]
arch/all-unix: Use pthreads to implement SMP

usage:

AROSBootstrap --cpus N

If N > 1, then you will be running in SMP mode.

The 'CPU0' thread handles all external signals,
SIGUSR1, and SIGUSR2.

All other threads use SIGURG for 'irq' style signals, and
SIGSYS for 'syscall' style signals.

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoSMP: Infrastructure for AROS SMP support
Jason S. McMullan [Sun, 11 Aug 2013 23:21:12 +0000 (19:21 -0400)]
SMP: Infrastructure for AROS SMP support

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoAROSTCP: Use Exec/ScanTasks()
Jason S. McMullan [Sat, 10 Aug 2013 15:59:49 +0000 (11:59 -0400)]
AROSTCP: Use Exec/ScanTasks()

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoC:TaskList - use Exec/ScanTasks()
Jason S. McMullan [Sat, 10 Aug 2013 15:58:35 +0000 (11:58 -0400)]
C:TaskList - use Exec/ScanTasks()

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoC:StackSnoop: Use Exec/ScanTasks()
Jason S. McMullan [Sat, 10 Aug 2013 15:58:12 +0000 (11:58 -0400)]
C:StackSnoop: Use Exec/ScanTasks()

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agobootstrap: Add KRN_MaxCPUs SMP parameter
Jason S. McMullan [Sat, 10 Aug 2013 15:57:31 +0000 (11:57 -0400)]
bootstrap: Add KRN_MaxCPUs SMP parameter

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoSMP: Don't use SysBase->ThisTask outside of kernel.library & exec.library
Jason S. McMullan [Fri, 9 Aug 2013 19:40:20 +0000 (15:40 -0400)]
SMP: Don't use SysBase->ThisTask outside of kernel.library & exec.library

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Add ScanTasksA()
Jason S. McMullan [Sat, 10 Aug 2013 14:17:42 +0000 (10:17 -0400)]
exec.library: Add ScanTasksA()

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoSMP: Don't use SysBase->ThisTask outside of kernel.library & exec.library
Jason S. McMullan [Fri, 9 Aug 2013 20:46:55 +0000 (16:46 -0400)]
SMP: Don't use SysBase->ThisTask outside of kernel.library & exec.library

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agodiskimage.device: On ABIv1, all Nodes are AROS_FLAVOUR_BINCOMPAT style
jmcmullan [Wed, 21 Aug 2013 13:59:21 +0000 (13:59 +0000)]
diskimage.device: On ABIv1, all Nodes are AROS_FLAVOUR_BINCOMPAT style

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
git-svn-id: https://svn.aros.org/svn/aros/trunk@47832 fb15a70f-31f2-0310-bbcc-cdcc74a49acc

8 years agoarosc.library: Compiler delint
jmcmullan [Wed, 21 Aug 2013 13:59:15 +0000 (13:59 +0000)]
arosc.library: Compiler delint

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
git-svn-id: https://svn.aros.org/svn/aros/trunk@47831 fb15a70f-31f2-0310-bbcc-cdcc74a49acc

8 years agoata.device: 64-bit cleanliness compiler delint
jmcmullan [Wed, 21 Aug 2013 13:59:10 +0000 (13:59 +0000)]
ata.device: 64-bit cleanliness compiler delint

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
git-svn-id: https://svn.aros.org/svn/aros/trunk@47830 fb15a70f-31f2-0310-bbcc-cdcc74a49acc

8 years agoIgnore "Builds" directory
Michal Schulz [Wed, 21 Aug 2013 13:52:41 +0000 (15:52 +0200)]
Ignore "Builds" directory

8 years agoarch/all-unix: Use default KrnGetCPUCount() implementation
Jason S. McMullan [Wed, 21 Aug 2013 04:30:36 +0000 (00:30 -0400)]
arch/all-unix: Use default KrnGetCPUCount() implementation

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Use a global TaskReady/TaskWait list
Jason S. McMullan [Wed, 21 Aug 2013 04:18:37 +0000 (00:18 -0400)]
exec.library: Use a global TaskReady/TaskWait list

Nice side effect - the first ready processor will self-assign
the CPU affinity of a Ready task.

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: Add some paranoia to RemTask()
Jason S. McMullan [Wed, 21 Aug 2013 04:08:53 +0000 (00:08 -0400)]
exec.library: Add some paranoia to RemTask()

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
8 years agoexec.library: No need to 'save and restore' TDNestCnt
Jason S. McMullan [Wed, 21 Aug 2013 03:58:31 +0000 (23:58 -0400)]
exec.library: No need to 'save and restore' TDNestCnt

Switch and Dispatch already take care of that for us.

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>