Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e99bc2db1 | ||
|
|
096db148d0 | ||
|
|
663bfbb0e4 | ||
|
|
aadc59f831 | ||
|
|
5d7aacc28f | ||
|
|
4810617922 | ||
|
|
666a011a9f | ||
|
|
a6e81bf5d3 |
No files matched your search
@@ -17,7 +17,6 @@ steps:
|
|||||||
|
|
||||||
- name: compile
|
- name: compile
|
||||||
image: t3hn3rd/asuro-build:latest
|
image: t3hn3rd/asuro-build:latest
|
||||||
pull: always
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-image
|
- build-image
|
||||||
commands:
|
commands:
|
||||||
|
|||||||
@@ -20,7 +20,3 @@ wasuro
|
|||||||
src/core/core.version.pas
|
src/core/core.version.pas
|
||||||
site/*
|
site/*
|
||||||
!site/.gitkeep
|
!site/.gitkeep
|
||||||
/src/boot/dangling_units.inc
|
|
||||||
/lib/dangling/
|
|
||||||
.moderne
|
|
||||||
CLAUDE.md
|
|
||||||
+3
-3
@@ -1,5 +1,4 @@
|
|||||||
ARG RECIPES_IMAGE=t3hn3rd/moderne-asuro-recipes:0.1.1@sha256:eaf54188053511dad9c620a8fb98b0f50c41770cd49a0b3d71a0538386522011
|
FROM ubuntu:latest
|
||||||
FROM ${RECIPES_IMAGE}
|
|
||||||
|
|
||||||
VOLUME ["/code"]
|
VOLUME ["/code"]
|
||||||
|
|
||||||
@@ -8,7 +7,7 @@ RUN dpkg --add-architecture i386
|
|||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
curl dos2unix wget git make nasm binutils xorriso grub-pc-bin gcc gcc-multilib \
|
curl dos2unix wget git make nasm binutils xorriso grub-pc-bin gcc gcc-multilib \
|
||||||
python3 python3-pip python3-pil && \
|
python3 python3-pip python3-pil && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
apt-get clean my room
|
||||||
|
|
||||||
RUN pip3 install --no-cache-dir --break-system-packages "mkdocs>=1.6,<2" mkdocs-material
|
RUN pip3 install --no-cache-dir --break-system-packages "mkdocs>=1.6,<2" mkdocs-material
|
||||||
|
|
||||||
@@ -21,5 +20,6 @@ RUN curl -sL https://sourceforge.net/projects/freepascal/files/Linux/$FPC_VERSIO
|
|||||||
ADD https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver /usr/bin/semver
|
ADD https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver /usr/bin/semver
|
||||||
RUN chmod +x /usr/bin/semver
|
RUN chmod +x /usr/bin/semver
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
|
RUN find . -type f -print0 | xargs -0 dos2unix
|
||||||
ENTRYPOINT ["/bin/bash", "-c"]
|
ENTRYPOINT ["/bin/bash", "-c"]
|
||||||
CMD ["find toolchain -name '*.sh' -exec dos2unix {} + 2>/dev/null; find toolchain -name '*.sh' -exec chmod +x {} +; bash toolchain/compile.sh"]
|
CMD ["find toolchain -name '*.sh' -exec dos2unix {} + 2>/dev/null; find toolchain -name '*.sh' -exec chmod +x {} +; bash toolchain/compile.sh"]
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
**/.git
|
|
||||||
**/.gradle
|
|
||||||
**/build
|
|
||||||
**/.moderne
|
|
||||||
wasuro
|
|
||||||
site
|
|
||||||
lib
|
|
||||||
release
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
# Automatic boot-unit inclusion
|
|
||||||
|
|
||||||
Run the usual `docker compose build builder` and `docker compose run builder`
|
|
||||||
from Asuro. Only this repository is required. Compose and Drone use the same
|
|
||||||
Dockerfile and repository build context, producing `t3hn3rd/asuro-build:latest`.
|
|
||||||
The Dockerfile inherits the published `t3hn3rd/moderne-asuro-recipes:0.1.1` image,
|
|
||||||
pinned by digest. It already includes Java, Moderne CLI, the Pascal LST generator,
|
|
||||||
and the registered recipe. The Asuro layer installs FPC and the kernel build tools.
|
|
||||||
|
|
||||||
To upgrade tooling, publish the upstream images first and update `RECIPES_IMAGE`
|
|
||||||
in the Dockerfile to the new tag and digest. Local tooling image testing can use
|
|
||||||
`docker compose build --build-arg RECIPES_IMAGE=<local-tag> builder`.
|
|
||||||
|
|
||||||
`ASURO_ARCH` selects the source architecture, defaulting to `x86`. For example:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
export ASURO_ARCH=x86
|
|
||||||
docker compose run --rm builder
|
|
||||||
```
|
|
||||||
|
|
||||||
Compose forwards this variable to the builder; Drone inherits it from its compile
|
|
||||||
environment. Only `src/arch/$ASURO_ARCH` is added to FPC's unit search paths.
|
|
||||||
Other architecture folders are excluded from LST generation and from the recipe's
|
|
||||||
dependency graph and results. Common units outside `src/arch` remain eligible.
|
|
||||||
The selected architecture folder must exist. This source selection does not
|
|
||||||
change the existing i386 compiler target, assembly stub, or linker settings;
|
|
||||||
an x86_64 port still needs those platform-specific changes.
|
|
||||||
|
|
||||||
`compile_dangling.sh` runs after Wasuro synchronization and before FPC. It copies
|
|
||||||
only `src/` and `compat/` into an isolated temporary analysis repository, generates
|
|
||||||
LSTs with rewrite-pascal, runs the standalone Moderne recipe, exports its
|
|
||||||
datatable, and writes `src/boot/dangling_units.inc`. Wasuro is not parsed.
|
|
||||||
Datatable conversion is provided by the standalone project's Java exporter.
|
|
||||||
Parse errors, recipe failures, and malformed datatables stop the build. The
|
|
||||||
generated include is ignored by Git and removed before each generation attempt.
|
|
||||||
|
|
||||||
Use `{$DEFINE NOT_DANGLING}` near a unit declaration to exclude an experimental
|
|
||||||
or legacy unit from automatic inclusion. It can still be referenced normally.
|
|
||||||
This is a file-level marker; conditional definitions are not evaluated. The
|
|
||||||
analysis follows both interface and implementation uses, without expanding
|
|
||||||
includes or evaluating conditional compilation.
|
|
||||||
|
|
||||||
Moderne runs through its CLI normally; any license or tenant configuration
|
|
||||||
required by your CLI installation must be provided to the container separately.
|
|
||||||
No host credentials are copied into the image.
|
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
services:
|
services:
|
||||||
builder:
|
builder:
|
||||||
image: t3hn3rd/asuro-build:latest
|
|
||||||
build: .
|
build: .
|
||||||
environment:
|
|
||||||
ASURO_ARCH: ${ASURO_ARCH:-x86}
|
|
||||||
volumes:
|
volumes:
|
||||||
- .:/code
|
- .:/code
|
||||||
@@ -283,7 +283,6 @@ nav:
|
|||||||
- Version Generation: toolchain/compile_vergen.md
|
- Version Generation: toolchain/compile_vergen.md
|
||||||
- LVGL Compilation: toolchain/compile_lvgl.md
|
- LVGL Compilation: toolchain/compile_lvgl.md
|
||||||
- Wasuro Pull: toolchain/compile_wasuro.md
|
- Wasuro Pull: toolchain/compile_wasuro.md
|
||||||
- Automatic Boot Units: toolchain/dangling_units.md
|
|
||||||
- Source List: toolchain/compile_sourcelist.md
|
- Source List: toolchain/compile_sourcelist.md
|
||||||
- Source Compilation: toolchain/compile_sources.md
|
- Source Compilation: toolchain/compile_sources.md
|
||||||
- Checksum: toolchain/compile_checksum.md
|
- Checksum: toolchain/compile_checksum.md
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ We welcome everyone to give building/breaking/fixing/shooting Asuro a go, feel f
|
|||||||
4. Install Git for Windows.
|
4. Install Git for Windows.
|
||||||
5. Install VSCode & the listed plugins.
|
5. Install VSCode & the listed plugins.
|
||||||
6. Install VirtualBox (v7+).
|
6. Install VirtualBox (v7+).
|
||||||
7. Clone this repository. The builder inherits the published Moderne/Pascal
|
7. Clone this repository.
|
||||||
tooling image; see [boot-unit generation](doc/toolchain/dangling_units.md).
|
|
||||||
8. Run the following command in the root of the repo to build the docker image:
|
8. Run the following command in the root of the repo to build the docker image:
|
||||||
```powershell
|
```powershell
|
||||||
docker compose build builder
|
docker compose build builder
|
||||||
|
|||||||
+334
-9
File diff suppressed because it is too large.
Load diff
@@ -195,6 +195,7 @@ procedure do_refresh_load(state: PFileBrowserState); forward;
|
|||||||
procedure do_refresh_build(state: PFileBrowserState); forward;
|
procedure do_refresh_build(state: PFileBrowserState); forward;
|
||||||
procedure schedule_refresh(state: PFileBrowserState); forward;
|
procedure schedule_refresh(state: PFileBrowserState); forward;
|
||||||
procedure fb_refresh_poll_cb(tmr: Plv_timer); cdecl; forward;
|
procedure fb_refresh_poll_cb(tmr: Plv_timer); cdecl; forward;
|
||||||
|
function fb_error_name(err : TError) : pchar; forward;
|
||||||
procedure fb_collect_cb(key: pchar; data: void; ud: void); forward;
|
procedure fb_collect_cb(key: pchar; data: void; ud: void); forward;
|
||||||
procedure do_refresh(state: PFileBrowserState); forward;
|
procedure do_refresh(state: PFileBrowserState); forward;
|
||||||
procedure navigate_to(state: PFileBrowserState; newDir: pchar); forward;
|
procedure navigate_to(state: PFileBrowserState; newDir: pchar); forward;
|
||||||
@@ -582,6 +583,51 @@ begin
|
|||||||
puint32(@state^.refresh_pending)^ := 1;
|
puint32(@state^.refresh_pending)^ := 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function fb_error_name(err : TError) : pchar;
|
||||||
|
begin
|
||||||
|
case err of
|
||||||
|
eNone: fb_error_name := 'eNone';
|
||||||
|
eUnknown: fb_error_name := 'eUnknown';
|
||||||
|
eNotSupported: fb_error_name := 'eNotSupported';
|
||||||
|
eOutOfMemory: fb_error_name := 'eOutOfMemory';
|
||||||
|
eInvalidArgument: fb_error_name := 'eInvalidArgument';
|
||||||
|
eFileInUse: fb_error_name := 'eFileInUse';
|
||||||
|
eFileDoesNotExist: fb_error_name := 'eFileDoesNotExist';
|
||||||
|
eInvalidFileName: fb_error_name := 'eInvalidFileName';
|
||||||
|
eInvalidFileExtension: fb_error_name := 'eInvalidFileExtension';
|
||||||
|
eFilenameTooLong: fb_error_name := 'eFilenameTooLong';
|
||||||
|
eDirectoryDoesNotExist: fb_error_name := 'eDirectoryDoesNotExist';
|
||||||
|
eDirectoryAlreadyExists: fb_error_name := 'eDirectoryAlreadyExists';
|
||||||
|
eDirectoryNotEmpty: fb_error_name := 'eDirectoryNotEmpty';
|
||||||
|
eDirectoryFull: fb_error_name := 'eDirectoryFull';
|
||||||
|
eNotADirectory: fb_error_name := 'eNotADirectory';
|
||||||
|
eWriteOnly: fb_error_name := 'eWriteOnly';
|
||||||
|
eReadOnly: fb_error_name := 'eReadOnly';
|
||||||
|
ePermissionDenied: fb_error_name := 'ePermissionDenied';
|
||||||
|
eInvalidPath: fb_error_name := 'eInvalidPath';
|
||||||
|
eTooManyOpenFiles: fb_error_name := 'eTooManyOpenFiles';
|
||||||
|
eInvalidHandle: fb_error_name := 'eInvalidHandle';
|
||||||
|
eFileNotLoaded: fb_error_name := 'eFileNotLoaded';
|
||||||
|
eAlreadyExists: fb_error_name := 'eAlreadyExists';
|
||||||
|
eDiskFull: fb_error_name := 'eDiskFull';
|
||||||
|
eIOError: fb_error_name := 'eIOError';
|
||||||
|
eIOTimeout: fb_error_name := 'eIOTimeout';
|
||||||
|
eIOCancelled: fb_error_name := 'eIOCancelled';
|
||||||
|
eDeviceNotReady: fb_error_name := 'eDeviceNotReady';
|
||||||
|
eDeviceRemoved: fb_error_name := 'eDeviceRemoved';
|
||||||
|
eDeviceNotFound: fb_error_name := 'eDeviceNotFound';
|
||||||
|
eQueueFull: fb_error_name := 'eQueueFull';
|
||||||
|
eNoFreeSlot: fb_error_name := 'eNoFreeSlot';
|
||||||
|
eCorruptFilesystem: fb_error_name := 'eCorruptFilesystem';
|
||||||
|
eBadSector: fb_error_name := 'eBadSector';
|
||||||
|
eAlreadyMounted: fb_error_name := 'eAlreadyMounted';
|
||||||
|
eNotMounted: fb_error_name := 'eNotMounted';
|
||||||
|
eUnsupportedFilesystem: fb_error_name := 'eUnsupportedFilesystem';
|
||||||
|
eInvalidPartitionTable: fb_error_name := 'eInvalidPartitionTable';
|
||||||
|
eVolumeNotFound: fb_error_name := 'eVolumeNotFound';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ fb_refresh_poll_cb — 50ms LVGL poll timer; when rd_ready=1, build UI }
|
{ fb_refresh_poll_cb — 50ms LVGL poll timer; when rd_ready=1, build UI }
|
||||||
procedure fb_refresh_poll_cb(tmr: Plv_timer); cdecl;
|
procedure fb_refresh_poll_cb(tmr: Plv_timer); cdecl;
|
||||||
var
|
var
|
||||||
@@ -604,9 +650,12 @@ begin
|
|||||||
case state^.wop_kind of
|
case state^.wop_kind of
|
||||||
1: lv_msgbox_add_text(mbox, 'Could not create folder.');
|
1: lv_msgbox_add_text(mbox, 'Could not create folder.');
|
||||||
2: lv_msgbox_add_text(mbox, 'Could not rename item.');
|
2: lv_msgbox_add_text(mbox, 'Could not rename item.');
|
||||||
|
3: lv_msgbox_add_text(mbox, 'Could not create file.');
|
||||||
|
4: lv_msgbox_add_text(mbox, 'Could not delete item.');
|
||||||
else
|
else
|
||||||
lv_msgbox_add_text(mbox, 'Operation failed.');
|
lv_msgbox_add_text(mbox, 'Operation failed.');
|
||||||
end;
|
end;
|
||||||
|
lv_msgbox_add_text(mbox, fb_error_name(state^.wop_result));
|
||||||
ok_b := lv_msgbox_add_footer_button(mbox, 'OK');
|
ok_b := lv_msgbox_add_footer_button(mbox, 'OK');
|
||||||
lv_obj_add_event_cb(ok_b, @fb_mbox_close_cb, LV_EVENT_CLICKED, mbox);
|
lv_obj_add_event_cb(ok_b, @fb_mbox_close_cb, LV_EVENT_CLICKED, mbox);
|
||||||
end;
|
end;
|
||||||
@@ -619,8 +668,8 @@ begin
|
|||||||
kfree(void(state^.wop_path2));
|
kfree(void(state^.wop_path2));
|
||||||
state^.wop_path2 := nil;
|
state^.wop_path2 := nil;
|
||||||
end;
|
end;
|
||||||
{ For rename, clear selection }
|
{ For rename/delete, clear selection }
|
||||||
if state^.wop_kind = 2 then
|
if (state^.wop_kind = 2) or (state^.wop_kind = 4) then
|
||||||
clear_selection(state);
|
clear_selection(state);
|
||||||
schedule_refresh(state);
|
schedule_refresh(state);
|
||||||
end;
|
end;
|
||||||
@@ -1591,15 +1640,16 @@ begin
|
|||||||
@fb_delete_done, state);
|
@fb_delete_done, state);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Async completion callback — runs in ISR/worker context, defer to LVGL }
|
{ Async completion callback — runs outside the LVGL thread, so only set flags. }
|
||||||
procedure fb_delete_done(error: TError; userdata: pointer);
|
procedure fb_delete_done(error: TError; userdata: pointer);
|
||||||
var
|
var
|
||||||
state: PFileBrowserState;
|
state: PFileBrowserState;
|
||||||
begin
|
begin
|
||||||
state := PFileBrowserState(userdata);
|
state := PFileBrowserState(userdata);
|
||||||
if state = nil then exit;
|
if state = nil then exit;
|
||||||
state^.op_err := error;
|
state^.wop_kind := 4;
|
||||||
lv_timer_create(@fb_delete_done_timer, 1, state);
|
state^.wop_result := error;
|
||||||
|
puint32(@state^.wop_done)^ := 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Deferred UI update after delete }
|
{ Deferred UI update after delete }
|
||||||
@@ -1860,15 +1910,20 @@ begin
|
|||||||
if (error = eNone) and (nfctx^.handle <> 0) then begin
|
if (error = eNone) and (nfctx^.handle <> 0) then begin
|
||||||
{ WriteFileAsync needs a non-nil buffer; Length=0 so it is never read }
|
{ WriteFileAsync needs a non-nil buffer; Length=0 so it is never read }
|
||||||
driver.storage.vfs.WriteFileAsync(nfctx^.handle, 0,
|
driver.storage.vfs.WriteFileAsync(nfctx^.handle, 0,
|
||||||
puint8(@nfctx^.err), 0, @fb_newfile_written, nfctx);
|
puint8(@nfctx^.err), 0, nil, @fb_newfile_written, nfctx);
|
||||||
end else begin
|
end else begin
|
||||||
if nfctx^.handle <> 0 then
|
if nfctx^.handle <> 0 then
|
||||||
driver.storage.vfs.CloseFile(nfctx^.handle);
|
driver.storage.vfs.CloseFile(nfctx^.handle);
|
||||||
lv_timer_create(@fb_newfile_done_timer, 1, nfctx);
|
if nfctx^.state <> nil then begin
|
||||||
|
nfctx^.state^.wop_kind := 3;
|
||||||
|
nfctx^.state^.wop_result := nfctx^.err;
|
||||||
|
puint32(@nfctx^.state^.wop_done)^ := 1;
|
||||||
|
end;
|
||||||
|
kfree(void(nfctx));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Async step 2: write complete — close handle and schedule UI refresh }
|
{ Async step 2: write complete — close handle and defer UI work via poll flags }
|
||||||
procedure fb_newfile_written(error: TError; userdata: pointer);
|
procedure fb_newfile_written(error: TError; userdata: pointer);
|
||||||
var
|
var
|
||||||
nfctx : PNewFileCtx;
|
nfctx : PNewFileCtx;
|
||||||
@@ -1878,7 +1933,12 @@ begin
|
|||||||
if error <> eNone then nfctx^.err := error;
|
if error <> eNone then nfctx^.err := error;
|
||||||
if nfctx^.handle <> 0 then
|
if nfctx^.handle <> 0 then
|
||||||
driver.storage.vfs.CloseFile(nfctx^.handle);
|
driver.storage.vfs.CloseFile(nfctx^.handle);
|
||||||
lv_timer_create(@fb_newfile_done_timer, 1, nfctx);
|
if nfctx^.state <> nil then begin
|
||||||
|
nfctx^.state^.wop_kind := 3;
|
||||||
|
nfctx^.state^.wop_result := nfctx^.err;
|
||||||
|
puint32(@nfctx^.state^.wop_done)^ := 1;
|
||||||
|
end;
|
||||||
|
kfree(void(nfctx));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure fb_newfile_done_timer(tmr: Plv_timer); cdecl;
|
procedure fb_newfile_done_timer(tmr: Plv_timer); cdecl;
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
+2
-1
@@ -26,7 +26,7 @@ uses
|
|||||||
boot.mgr,
|
boot.mgr,
|
||||||
debug.tracer, io.stdio, proc.mgr,
|
debug.tracer, io.stdio, proc.mgr,
|
||||||
//progs
|
//progs
|
||||||
app.base64, app.md5sum, app.dhclient, app.vbeinfo, app.testcmd, app.ping, app.meminfo, app.setres,
|
app.base64, app.md5sum, app.dhclient, app.vbeinfo, app.testcmd, app.ping, app.meminfo, app.setres, app.iotest,
|
||||||
//drivers
|
//drivers
|
||||||
driver.storage.ctl.ram, driver.mgr,
|
driver.storage.ctl.ram, driver.mgr,
|
||||||
//network
|
//network
|
||||||
@@ -92,6 +92,7 @@ begin
|
|||||||
app.bsod.init();
|
app.bsod.init();
|
||||||
app.vterminal.init;
|
app.vterminal.init;
|
||||||
app.filebrowser.init();
|
app.filebrowser.init();
|
||||||
|
app.iotest.init();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Initialization
|
Initialization
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ function inl(port : uint16) : uint32;
|
|||||||
procedure io_wait;
|
procedure io_wait;
|
||||||
|
|
||||||
procedure __SSE_128_memcpy(source : uint32; dest : uint32);
|
procedure __SSE_128_memcpy(source : uint32; dest : uint32);
|
||||||
|
procedure __REP_MOVSB_memcpy(source : uint32; dest : uint32; size : uint32);
|
||||||
|
|
||||||
procedure halt_and_catch_fire();
|
procedure halt_and_catch_fire();
|
||||||
procedure halt_and_dont_catch_fire();
|
procedure halt_and_dont_catch_fire();
|
||||||
@@ -113,6 +114,19 @@ asm
|
|||||||
MOVAPS [EAX], XMM1
|
MOVAPS [EAX], XMM1
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure __REP_MOVSB_memcpy(source : uint32; dest : uint32; size : uint32); assembler;
|
||||||
|
asm
|
||||||
|
push esi
|
||||||
|
push edi
|
||||||
|
cld
|
||||||
|
mov esi, source
|
||||||
|
mov edi, dest
|
||||||
|
mov ecx, size
|
||||||
|
rep movsb
|
||||||
|
pop edi
|
||||||
|
pop esi
|
||||||
|
end;
|
||||||
|
|
||||||
function getESP : uint32;
|
function getESP : uint32;
|
||||||
var
|
var
|
||||||
tmp: uint32;
|
tmp: uint32;
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
}
|
}
|
||||||
unit arch.x86.isr.tmr1;
|
unit arch.x86.isr.tmr1;
|
||||||
|
|
||||||
{$DEFINE NOT_DANGLING} { Unused legacy timer ISR; not part of the kernel boot sequence. }
|
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
}
|
}
|
||||||
unit arch.x86.proc.loader;
|
unit arch.x86.proc.loader;
|
||||||
|
|
||||||
{$DEFINE NOT_DANGLING} { Unimplemented process-loader stub. }
|
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
implementation;
|
implementation;
|
||||||
|
|||||||
+101
-3
@@ -71,9 +71,107 @@ procedure run;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
io.syslog, boot.splash
|
io.syslog, boot.splash,
|
||||||
{$INCLUDE dangling_units.inc}
|
|
||||||
;
|
// Silo units that must be included here to compile
|
||||||
|
driver.storage.boot,
|
||||||
|
test,
|
||||||
|
core,
|
||||||
|
app.wasm,
|
||||||
|
driver.storage.ctl.ahci,
|
||||||
|
core.enc.base64,
|
||||||
|
core.panic,
|
||||||
|
driver.video.bga,
|
||||||
|
arch.x86.bda,
|
||||||
|
arch.x86.panic,
|
||||||
|
core.ds.cfifo,
|
||||||
|
core.ds.cfifols,
|
||||||
|
core.ds.circ,
|
||||||
|
core.gfx.color,
|
||||||
|
arch.x86.proc.sched,
|
||||||
|
arch.x86.cpu,
|
||||||
|
driver.video.desktop,
|
||||||
|
driver.video.doublebuffer,
|
||||||
|
driver.mgr,
|
||||||
|
driver.net.dev.e1000,
|
||||||
|
driver.bus.usb.ehci,
|
||||||
|
driver.storage.fs.fat32,
|
||||||
|
arch.x86.fault,
|
||||||
|
core.ds.fifo,
|
||||||
|
driver.storage.fs.mgr,
|
||||||
|
driver.storage.fs.flatfs,
|
||||||
|
core.gfx.fonts,
|
||||||
|
arch.x86.gdt,
|
||||||
|
driver.video.gpu,
|
||||||
|
svc.gfxd,
|
||||||
|
core.ds.hashmap,
|
||||||
|
arch.x86.idt,
|
||||||
|
arch.x86.isr.ioapic,
|
||||||
|
arch.x86.irq,
|
||||||
|
driver.storage.fs.iso9660,
|
||||||
|
arch.x86.isr,
|
||||||
|
arch.x86.isr.mgr,
|
||||||
|
driver.hid.keyboard,
|
||||||
|
core.ds.lifo,
|
||||||
|
core.ds.lists,
|
||||||
|
memory.heap,
|
||||||
|
driver.video.lvgl,
|
||||||
|
core.ds.maxh,
|
||||||
|
core.enc.md5,
|
||||||
|
core.ds.minh,
|
||||||
|
driver.hid.mouse,
|
||||||
|
arch.x86.multiboot,
|
||||||
|
driver.net,
|
||||||
|
driver.bus.usb.ohci,
|
||||||
|
app.partcmd,
|
||||||
|
driver.bus.pci,
|
||||||
|
arch.x86.memory.physical,
|
||||||
|
core.ds.prio,
|
||||||
|
proc.mgr,
|
||||||
|
app.mgr,
|
||||||
|
driver.hid.ps2.keyboard,
|
||||||
|
driver.hid.ps2.mouse,
|
||||||
|
core.rand,
|
||||||
|
driver.timer.rtc,
|
||||||
|
driver.io.serial,
|
||||||
|
io.stdio,
|
||||||
|
driver.storage.mgr,
|
||||||
|
driver.storage.test,
|
||||||
|
core.strings,
|
||||||
|
driver.exp.testdriver,
|
||||||
|
proc.testprocs,
|
||||||
|
arch.x86.isr.tmr0,
|
||||||
|
debug.tracer,
|
||||||
|
driver.bus.usb.uhci,
|
||||||
|
app.uidebug,
|
||||||
|
driver.bus.usb,
|
||||||
|
driver.hid.usb.keyboard,
|
||||||
|
driver.hid.usb.mouse,
|
||||||
|
driver.storage.ctl.usb,
|
||||||
|
driver.bus.usb.core,
|
||||||
|
svc.usbd,
|
||||||
|
driver.bus.usb.hub,
|
||||||
|
driver.bus.usb.types,
|
||||||
|
core.util,
|
||||||
|
arch.x86.util,
|
||||||
|
arch.x86.v86,
|
||||||
|
driver.video.vesa,
|
||||||
|
driver.storage.vfs,
|
||||||
|
driver.video,
|
||||||
|
arch.x86.memory.virtual,
|
||||||
|
core.enc.fnv1a,
|
||||||
|
core.enc.djb2,
|
||||||
|
core.ds.bloom,
|
||||||
|
app.volcmd,
|
||||||
|
driver.storage.vol.mgr,
|
||||||
|
app.vterminal,
|
||||||
|
wasm,
|
||||||
|
wasm.vm.io,
|
||||||
|
wasm.test,
|
||||||
|
wasm.test.framework,
|
||||||
|
driver.video.windows,
|
||||||
|
driver.bus.usb.xhci,
|
||||||
|
core.fmt.json;
|
||||||
|
|
||||||
type
|
type
|
||||||
{ Resolved execution order — indices into Entries[] }
|
{ Resolved execution order — indices into Entries[] }
|
||||||
|
|||||||
+28
-9
@@ -42,6 +42,26 @@ function HexCharToDecimal(hex : char) : uint8;
|
|||||||
function abs(x : sint32) : uint32;
|
function abs(x : sint32) : uint32;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
{$ifdef CPU386}
|
||||||
|
uses
|
||||||
|
arch.x86.util;
|
||||||
|
|
||||||
|
const
|
||||||
|
MEMCPY_X86_SMALL_COPY_THRESHOLD = 16;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
procedure scalar_memcpy(source : uint32; dest : uint32; size : uint32);
|
||||||
|
var
|
||||||
|
src, dst : puint8;
|
||||||
|
i : uint32;
|
||||||
|
begin
|
||||||
|
if size = 0 then exit;
|
||||||
|
for i := 0 to size - 1 do begin
|
||||||
|
src := puint8(source + i);
|
||||||
|
dst := puint8(dest + i);
|
||||||
|
dst^ := src^;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function abs(x : sint32) : uint32;
|
function abs(x : sint32) : uint32;
|
||||||
var
|
var
|
||||||
@@ -123,17 +143,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure memcpy(source : uint32; dest : uint32; size : uint32);
|
procedure memcpy(source : uint32; dest : uint32; size : uint32);
|
||||||
var
|
|
||||||
src, dst : puint8;
|
|
||||||
i : uint32;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if size = 0 then exit;
|
if size = 0 then exit;
|
||||||
for i:=0 to size-1 do begin
|
{$ifdef CPU386}
|
||||||
src:= puint8(source + i);
|
if size < MEMCPY_X86_SMALL_COPY_THRESHOLD then
|
||||||
dst:= puint8(dest + i);
|
scalar_memcpy(source, dest, size)
|
||||||
dst^:= src^;
|
else
|
||||||
end;
|
arch.x86.util.__REP_MOVSB_memcpy(source, dest, size);
|
||||||
|
{$else}
|
||||||
|
scalar_memcpy(source, dest, size);
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function getWord(i : uint32; hi : boolean) : uint16;
|
function getWord(i : uint32; hi : boolean) : uint16;
|
||||||
|
|||||||
@@ -247,7 +247,8 @@ begin
|
|||||||
if (status AND $01) <> 0 then begin
|
if (status AND $01) <> 0 then begin
|
||||||
io.syslog.log('driver.bus.usb Core', 'Device detected on port ');
|
io.syslog.log('driver.bus.usb Core', 'Device detected on port ');
|
||||||
io.syslog.writeintln(port);
|
io.syslog.writeintln(port);
|
||||||
{ Root-port speed is resolved by enumerate_device after reset. }
|
{ Determine speed from status bits - HC specific,
|
||||||
|
default to full-speed for now }
|
||||||
speed := USB_SPEED_FULL;
|
speed := USB_SPEED_FULL;
|
||||||
enumerate_device(hc, port, speed, nil, port);
|
enumerate_device(hc, port, speed, nil, port);
|
||||||
end;
|
end;
|
||||||
@@ -655,10 +656,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Speed is valid after reset. Hub children retain the hub-reported speed. }
|
|
||||||
if (parentHub = nil) and (hc^.fnPortSpeed <> nil) then
|
|
||||||
speed := hc^.fnPortSpeed(hc, port);
|
|
||||||
|
|
||||||
{ Step 2: Create device at address 0 }
|
{ Step 2: Create device at address 0 }
|
||||||
dev := PUSBDevice(kalloc(sizeof(TUSBDevice)));
|
dev := PUSBDevice(kalloc(sizeof(TUSBDevice)));
|
||||||
dev^.Address := 0;
|
dev^.Address := 0;
|
||||||
|
|||||||
@@ -783,13 +783,6 @@ end;
|
|||||||
|
|
||||||
{ ========================= Port Reset ========================= }
|
{ ========================= Port Reset ========================= }
|
||||||
|
|
||||||
function ehci_port_speed(hc : PUSBHCDriver; port : uint8) : uint8;
|
|
||||||
begin
|
|
||||||
{ Successful EHCI root resets retain only high-speed devices;
|
|
||||||
full/low-speed devices are handed to a companion controller. }
|
|
||||||
ehci_port_speed := USB_SPEED_HIGH;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function ehci_port_reset(hc : PUSBHCDriver; port : uint8) : boolean;
|
function ehci_port_reset(hc : PUSBHCDriver; port : uint8) : boolean;
|
||||||
var
|
var
|
||||||
priv : PEHCI_PrivData;
|
priv : PEHCI_PrivData;
|
||||||
@@ -1565,7 +1558,6 @@ begin
|
|||||||
hc.fnPoll := TUSBHCPoll(@ehci_poll);
|
hc.fnPoll := TUSBHCPoll(@ehci_poll);
|
||||||
hc.fnPortReset := TUSBHCPortReset(@ehci_port_reset);
|
hc.fnPortReset := TUSBHCPortReset(@ehci_port_reset);
|
||||||
hc.fnPortStatus := TUSBHCPortStatus(@ehci_port_status);
|
hc.fnPortStatus := TUSBHCPortStatus(@ehci_port_status);
|
||||||
hc.fnPortSpeed := TUSBHCPortSpeed(@ehci_port_speed);
|
|
||||||
|
|
||||||
{ Reset the controller }
|
{ Reset the controller }
|
||||||
if not ehci_reset(@hc) then begin
|
if not ehci_reset(@hc) then begin
|
||||||
|
|||||||
Loaded 20 of 55 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user