Commit Graph

493 Commits

Author SHA1 Message Date
Doczom
4f072de650 update
git-svn-id: svn://kolibrios.org@9224 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-10-23 17:11:57 +00:00
Doczom
4f59e32470 fix bug in my fix bug
git-svn-id: svn://kolibrios.org@9223 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-10-23 16:05:08 +00:00
Doczom
bb36197cd2 fix bug http://bugs.kolibrios.org/view.php?id=145 in sf 4
git-svn-id: svn://kolibrios.org@9222 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-10-23 15:53:35 +00:00
83176ac8ef kernel: Fix window redraw after 1px move.
If
 - window A is above window B, and
 - window A has been moved,
then window B receives a redraw event.

But if that move was 1px right or down, window B didn't receive an event
because of off-by-one error. Now it's fixed.

git-svn-id: svn://kolibrios.org@9221 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-10-18 16:23:18 +00:00
954246b1b7 Merge kolibri-ahci into trunk
git-svn-id: svn://kolibrios.org@9183 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-09-09 11:38:38 +00:00
b6f769987c kernel: Check for base+len overflow in is_region_userspace
git-svn-id: svn://kolibrios.org@9045 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-07-09 09:22:44 +00:00
Magomed Kostoev (mkostoevr)
a7ae55240b [asmxygen] Test doxygen generation on is_region_userspace() function
git-svn-id: svn://kolibrios.org@8962 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-06-29 09:37:40 +00:00
0f675e4534 [KERNEL] use constants instead of hardcoded values, other small fixes
git-svn-id: svn://kolibrios.org@8876 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-06-19 08:41:09 +00:00
2359531a17 [KERNEL] #3 Preparing to merge legacy TASKDATA into APPDATA:
- get rid of CURRENT_TASK
- to APPDATA added new fields which will be used instead of TASKDATA's
- other small fixes

git-svn-id: svn://kolibrios.org@8869 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-06-17 09:41:16 +00:00
d4bf03befc [KERNEL] #2 Preparing to merge legacy TASKDATA into APPDATA:
- rename event_mask in APPDATA to occured_events, cause TASKDATA already has event_mask and they have different meaning and usage
- small fixes

git-svn-id: svn://kolibrios.org@8867 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-06-16 13:57:17 +00:00
9cdec89085 [KERNEL] Preparing to merge legacy TASKDATA into APPDATA:
- now doesnt use TASK_COUNT, now uses [thread_count] global instead of it
- update come copyrights

git-svn-id: svn://kolibrios.org@8866 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-06-16 10:04:10 +00:00
f3f40df401 [KERNEL] Refactoring:
- optimize struct zeroing in sys32.inc 
- set_app_param: delete setting completely unused APPDATA.event_filter (also make this field reserved)
- update some copyringhs
- other small fixes

git-svn-id: svn://kolibrios.org@8858 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-06-15 16:24:33 +00:00
Doczom
c080568a52 fixed vulnerability (kernel memory rewrite) in sysfn 4
git-svn-id: svn://kolibrios.org@8715 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-05-09 14:17:55 +00:00
Doczom
5376120685 fixed vulnerability (reading kernel memory from userspace) in sysfn 7, 15.5 and 65
git-svn-id: svn://kolibrios.org@8714 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-05-09 14:02:32 +00:00
Doczom
da3163d11b fixed vulnerability (reading kernel memory from userspace) in sysfn 47
git-svn-id: svn://kolibrios.org@8713 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-05-09 13:27:00 +00:00
c7a8498e42 fixed vulnerability (reading kernel memory from userspace) in sysfn25
git-svn-id: svn://kolibrios.org@8675 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-04-22 19:59:52 +00:00
d82e0a30b4 fixed vulnerabilities in sysfn 18.11 and 36, now user applications cannot corrupt kernel memory via invalid buffer address
git-svn-id: svn://kolibrios.org@8598 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-02-21 09:59:47 +00:00
906e6d8dce is_region_userspace: removed extra condition which caused incorrect behavior of boxlib menu in hexedit and rtfread (cuz it uses address 0 i didnt know:D )
git-svn-id: svn://kolibrios.org@8493 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-12-29 13:45:08 +00:00
7b4bf97ec8 is_region_userspace: refactoring and fix
git-svn-id: svn://kolibrios.org@8329 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-12-05 19:56:25 +00:00
673259b909 kernel: Protect OS threads from terminating by sf18.2.
git-svn-id: svn://kolibrios.org@8270 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-28 12:57:10 +00:00
af4695e15c fix return value from .addr_error in sysfn 26.2 , 9
git-svn-id: svn://kolibrios.org@8249 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-24 14:20:23 +00:00
2a0073bdfb fix prior
git-svn-id: svn://kolibrios.org@8248 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-24 13:27:11 +00:00
4e919c4eb5 SysFn 18.13 security fix: now apps cannot destroy kernel memory via passing illegal address in ecx
Update docs on SysFn 18.13

git-svn-id: svn://kolibrios.org@8247 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-24 12:49:42 +00:00
5d4528238c SysFn 9 security fix: now apps cannot destroy kernel memory via passing illegal address in ebx
Update docs on SysFn 9

git-svn-id: svn://kolibrios.org@8246 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-23 18:52:56 +00:00
efa84a263d fix is_region_userspace (worked incorrectly for e.g 0xFFFFFFFF)
git-svn-id: svn://kolibrios.org@8216 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-17 20:00:28 +00:00
c2b9713bb9 Fix r8139: delay_ms was 10x slower when using HPET.
git-svn-id: svn://kolibrios.org@8176 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-11 22:28:04 +00:00
9508cfa2b7 added is_region_userspace, fix sysfn 26.2 address security checks
git-svn-id: svn://kolibrios.org@8160 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-07 16:42:34 +00:00
160a8c789a SysFn 26.2 security fix: now apps cannot destroy kernel memory via passing illegal address to this sysfn
git-svn-id: svn://kolibrios.org@8158 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-06 23:15:44 +00:00
dd55ceaa16 kernel: Make delay_ms use HPET when available.
I got a laptop that has timer on channel 1 of PIT that doesn't tick.

git-svn-id: svn://kolibrios.org@8139 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-05 19:53:54 +00:00
1919b8efdc fix r8111: Map acpi_apic_base page before access.
git-svn-id: svn://kolibrios.org@8119 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-10-27 19:32:57 +00:00
a9121a0da9 kernel: Split acpi.inc and hpet.inc from init.inc.
Also, replace some hardcoded constants with macros.

git-svn-id: svn://kolibrios.org@8111 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-10-21 14:23:51 +00:00
aaf1ac4439 Assert sizeof.APPDATA=256, use it instead of hardcoded 256 value.
git-svn-id: svn://kolibrios.org@8093 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-10-12 02:54:44 +00:00
ab9b1ebb4a uefi4kos: Read config and kernel files from the disk.
* Now there is a config file with boot options, example included.
* Config, kernel and ramdisk are loaded from the disk, not compiled in.
* DEVICES.DAT file is also optionally loaded from the disk.
* Also, move the loader to /kernel/trunk/bootloader/uefi4kos.

git-svn-id: svn://kolibrios.org@8092 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-10-06 03:32:57 +00:00
f5e0f96e84 Add extended_primary_loader to autobuild.
* Build fat1x, fat32, cdfs, after_win loaders.
* Set use_lba=1 by default in fat32 loader.
* Build kolibri.raw: flash / hdd image.
* Add example config.ini file.
* Add an option (config file and screen) to not load ramdisk image.
* Add an option (config file only) to set /sys path.

Now you can boot without a ramdisk from a storage that is supported
by the kernel itself, i.e. without loadable drivers. Thus you can not
load the system without a ramdisk from SATA/AHCI and USB drives.

git-svn-id: svn://kolibrios.org@8091 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-10-04 16:53:59 +00:00
bf38c73d0a kernel: don't use ramdisk if asked.
The blue screen is not aware of this option.

git-svn-id: svn://kolibrios.org@8089 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-10-02 13:05:10 +00:00
5e4de2dfd1 Initialize APPDATA.{fd,bk}_ev fields for kernel threads.
This prevents crash in event.inc:RemoveEventTo because of
zero pointer dereference.

git-svn-id: svn://kolibrios.org@8087 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-10-02 12:30:11 +00:00
d48c9cc35c Fix random boot issue: 'Failed to start first app'
Access to BOOT.dev variable was sometimes done with obsolete
offset from non-flat-kernel ages. If you are unlucky, the ramdisk
is not loaded and launcher app is not started.

git-svn-id: svn://kolibrios.org@8086 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-10-02 12:26:08 +00:00
hidnplayr
9ab5b699d5 Improved readability, no semantic changes.
git-svn-id: svn://kolibrios.org@7965 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-05-21 13:55:36 +00:00
cbceb320e8 kernel: Support more than one I/O APIC and 24 interrupts.
git-svn-id: svn://kolibrios.org@7733 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-03-02 04:25:30 +00:00
8973200440 Fix compilation with extended_primary_loader.
git-svn-id: svn://kolibrios.org@7598 a494cfbc-eb01-0410-851d-a64ba20cac60
2019-03-11 21:33:33 +00:00
db8eddbd53 Enable xsave/xrstor, attempt 2.
git-svn-id: svn://kolibrios.org@7276 a494cfbc-eb01-0410-851d-a64ba20cac60
2018-05-13 00:16:10 +00:00
CleverMouse
43e84d7672 fix FPU after r7124 for other CPU configurations
git-svn-id: svn://kolibrios.org@7165 a494cfbc-eb01-0410-851d-a64ba20cac60
2018-02-19 16:35:45 +00:00
0e02132b9f Replace 'equ' macros with '=' ones.
They appear in symbols file.
They don't require parentheses.
They are shorter.

git-svn-id: svn://kolibrios.org@7136 a494cfbc-eb01-0410-851d-a64ba20cac60
2017-12-20 01:07:10 +00:00
368d42ffae Update BOOT_DATA structure and use it instead of all the BOOT_* vars.
git-svn-id: svn://kolibrios.org@7132 a494cfbc-eb01-0410-851d-a64ba20cac60
2017-12-17 02:12:53 +00:00
f208e0e454 Split bootbios.asm and kernel.asm.
* Move bios-related part of kernel.asm before B32 label to
  bootbios.asm file;
* Move bx_from_load, boot_dev and kernel_restart_bootblock variables
  to BOOT_* 0x9000 block;
* Update Tupfile.lua, Makefile, build.bat, build.sh accordingly;
* Now bios and uefi loaders can jump to very first byte of the kernel.

git-svn-id: svn://kolibrios.org@7129 a494cfbc-eb01-0410-851d-a64ba20cac60
2017-12-16 20:21:10 +00:00
9e6b9b61f7 Use xsave/xrestor if available, enable AVX* instructions.
git-svn-id: svn://kolibrios.org@7124 a494cfbc-eb01-0410-851d-a64ba20cac60
2017-12-05 05:24:21 +00:00
09684c0db9 Synchronize memmap.inc and const.inc, replace hardcoded numbers with macros.
git-svn-id: svn://kolibrios.org@7122 a494cfbc-eb01-0410-851d-a64ba20cac60
2017-11-29 22:03:58 +00:00
16d9a4a4bc Remove VRR code, mostly commented out anyway.
git-svn-id: svn://kolibrios.org@7121 a494cfbc-eb01-0410-851d-a64ba20cac60
2017-11-29 00:15:25 +00:00
dbe9918dc6 Return capacity and bytes per sector of bios disks
This patch makes bd_querymedia return valid Capacity and SectorSize
values. Bios disks detection code saves the values to extended
BiosDiskData structure, bd_querymedia copies them to DISKMEDIAINFO.


git-svn-id: svn://kolibrios.org@6843 a494cfbc-eb01-0410-851d-a64ba20cac60
2017-01-21 00:14:05 +00:00
a7cb2f3691 Set CR0.AM bit
Allow applications to get Alignment Check exception


git-svn-id: svn://kolibrios.org@6817 a494cfbc-eb01-0410-851d-a64ba20cac60
2016-12-26 23:29:27 +00:00