Skip to content

Commit

Permalink
Merge branch 'master' into strscan_memcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
GutPuncher committed Mar 11, 2024
2 parents 1b7f2bb + d77e526 commit 86d994c
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 8 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,19 @@ jobs:
sudo udevadm trigger --name-match=kvm
- name: Run ISOs Build Script
timeout-minutes: 10
if: ${{ success() }}
run: |
cd build
./build-iso.sh --headless
cd ..
- name: ISO Check
if: ${{ success() && hashFiles('./build/*.iso') == '' }}
run: |
echo "ISOs not built!"
exit 1
- name: Releasing Latest ISOs
if: ${{ success() && github.event_name == 'push'}}
uses: "GutPuncher/action-automatic-releases@latest"
Expand Down
8 changes: 7 additions & 1 deletion src/Home/Net/Drivers/PCNet.ZC
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,13 @@ I64 PCNetPacketReceive(U8 **packet_buffer_out, U16 *packet_length_out)
NetDebug("PCNET RECEIVE PACKET: de_index incremented = 0x%0X", pcnet.current_rx_de_index);

*packet_buffer_out = pcnet.rx_buffer_addr_phys + de_index * ETHERNET_FRAME_SIZE;
*packet_length_out = packet_length;

// ASTRPRCV causes 802.3 packets to be stripped and FCS to be checked
U16 ethertype = (*packet_buffer_out)[ETHERNET_ETHERTYPE_OFFSET + 1] | (*packet_buffer_out)[ETHERNET_ETHERTYPE_OFFSET] << 8;
if (ethertype < ETHERNET_v2_MTU)
*packet_length_out = ethertype;
else
*packet_length_out = packet_length - FCS_LENGTH; // ethertype ii TODO: Validate FCS

return de_index;
}
Expand Down
7 changes: 3 additions & 4 deletions src/Home/Net/Protocols/Ethernet.ZC
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ U0 EthernetGlobalsInit()

U0 EthernetFrameParse(CEthernetFrame *frame_out, U8 *frame, U16 length)
{
// length is assumed to NOT include the FCS.

// Shrine says MemCopy has a high overhead.
// Almost tempted to say that means that a lot
// of the current system should be done with
Expand All @@ -45,10 +47,7 @@ U0 EthernetFrameParse(CEthernetFrame *frame_out, U8 *frame, U16 length)

frame_out->data = frame + ETHERNET_DATA_OFFSET;

if (frame_out->ethertype <= ETHERNET_v2_MTU) // check if the field is a length or an ethertype
frame_out->length = frame_out->ethertype;
else
frame_out->length = length - ETHERNET_MAC_HEADER_LENGTH - FCS_LENGTH;
frame_out->length = length - ETHERNET_MAC_HEADER_LENGTH;
}

U0 EthernetFrameFinish(I64 de_index)
Expand Down
10 changes: 10 additions & 0 deletions src/HomeKeyPlugIns.ZC
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ Bool MyPutKey(I64 ch, I64 sc)
}
return TRUE;

case SC_F12:
if (!(sc & SCF_SHIFT))
{
if (sc & SCF_KEY_DESC)
KeyDescSet("Cmd /SysLogToggle");
else
SysLogToggle;
}
return TRUE;

case SC_DELETE:
if (sc & SCF_SHIFT)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Kernel/Display.ZC
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ See also $LK,"GrUpdateScreen",A="MN:GrUpdateScreen"$().
}
else if (ch == '\n')
{
RawPutChar(CH_SPACE);
while (text.raw_col % text.cols)
do
RawPutChar(CH_SPACE);
while (text.raw_col % text.cols);
}
else if (Bt(char_bmp_displayable, ch))
{
Expand Down
8 changes: 8 additions & 0 deletions src/Kernel/Job.ZC
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,14 @@ I64 Sys(U8 *format, ...)
return res;
}

U0 SysLogToggle()
{
if (Bt(&sys_task->display_flags, DISPLAYf_SHOW))
LBtr(&sys_task->display_flags, DISPLAYf_SHOW);
else
LBts(&sys_task->display_flags, DISPLAYf_SHOW);
}

U0 SysLog(U8 *format, ...)
{//Display text in sys_task.
U8 *buf = StrPrintJoin(NULL, format, argc, argv);
Expand Down
2 changes: 1 addition & 1 deletion src/Kernel/KGlobals.ZC
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ U8 *rev_bits_table; //Table with U8 bits reversed
CDate local_time_offset;
F64 *pow10_I64,
sys_os_version = 2.03;
U64 sys_os_version_sub = 113;
U64 sys_os_version_sub = 116;
U8 *sys_os_version_str;
U8 *sys_os_version_full;
U8 *sys_os_version_nice;
Expand Down
1 change: 1 addition & 0 deletions src/Kernel/KernelC.HH
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ public extern I64 Scale2Mem(I64 min, I64 max, I64 limit=2*1024*1024*1024);
public extern U0 SysErr( U8 *format, ...);
public extern U0 SysWarn(U8 *format, ...);
public extern U0 SysLog( U8 *format, ...);
public extern U0 SysLogToggle();
public extern I64 ExeCmdLine(CCompCtrl *cc);
public extern U0 JobDel(CJob *tmpc);
public extern I64 JobsHandler(I64 run_flags, CTask *task=NULL);
Expand Down

0 comments on commit 86d994c

Please sign in to comment.