I searched the forum for HAL. Couldn't find any relevant thread, so starting a new one.
What things are usu included in a HAL?
i have brainstormed a few points as follows.
Code: Select all
/*the values in [ ] mean the code maturity level 0-9, relative to the rest of the entries*/
[ ] HAL
+[ ] Spinlocks or semaphores or monitors..... decide. or support all. All kinds of synchronization routines.
+[ ] IRQL management
+[ ] Display [BootVid]
++[ ] Display ownership
++[ ] get and set display parameters
++[ ] display strings, something like printf
+[ ] Internal Heap Memory management : malloc, calloc, free, realloc etc.
+[ ] Paging
++[ ] allocate Virtual address space, the kernel maps this VASpace to a process. So the kernel does the mapping between VASID and PID, or PID may be set same as VASID
++[ ] Allocate a page in a virtual address space, mapping at given virtual address.
++[ ] Freeing the page ie. unmapping from given VAS
++[ ] Access permissions : setting and getting
+[0] Port IO routines
+[ ] Standard library
+[ ] String operations
+[ ] Searching and Sorting
+[ ] FPU operations
+[ ] If absent, emulate. but, I don't think there are new machines without one.
+[ ] Resource Management
++[ ] Request/Report resource usage
++[ ] free allocated resources
+[ ] Performance Counters : calibration, read, reset. These include TSC, interrupts /sec, IO reads/writes per second etc
+[ ] abstraction for interrupts : mapping hardware specific interrupts to generic interrupt classes
++[ ] Software virtual interrupts : invoking, start, end, queuing, enabling, disabling, getvect, setvect etc
+[ ] basic devices : these are the devices which are taken for granted
++[ ] DMA
+++[ ] Read DMA counter
+++[ ] start /schedule DMA transfer
++[ ] timer management
+++[ ] Set resolution, get resolution
+++[ ] Beep
+++[ ] Delay, uDelay
++[ ] RTC
+++[ ] get and set time, date
+[ ] Processor management
++[ ] Starting
++[ ] stalling
++[ ] Caches
++[ ] querying state, errors etc
+[ ] Context switching
++[ ] Processor Context base class
++[ ] Switching routines
++[ ] switching with and without virtual address space switching ie. threads in same and different processes
+[ ] Environment variables
+[ ] Profiling [OPTIONAL]
+[ ] Debugging support [OPTIONAL]
++[ ] Debug Interrupt management
++[ ] Reading, demangling and managing symbols. now the symtab sections should not be stripped off
++[ ] Debugging over serial port????
{Something bit off-topic:
I have been following the forum for almost a year now. What i've noticed that what most of us have been doing or have done till now are just HALs, things that can run as primitive kernels and not even traces of processes, synchros, networking, nice n big applications. IMHO, what many of us have ben building till now are not kernels, but HALs. No offence. Thats not my intension.
}