Skip to content

Commit f8e1ba3

Browse files
committed
Enable 32-Byte Memory Alignment
1 parent 80158e7 commit f8e1ba3

7 files changed

Lines changed: 13 additions & 14 deletions

File tree

arch/m68k-all/include/aros/cpu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define AROS_PTRALIGN 2 /* Alignment for PTR */
2424
#define AROS_IPTRALIGN 2 /* Alignment for IPTR */
2525
#define AROS_DOUBLEALIGN 2 /* Alignment for double */
26-
#define AROS_WORSTALIGN 4 /* Worst case alignment */
26+
#define AROS_WORSTALIGN 32 /* Worst case alignment - ApolloOS = 32 Bytes */
2727

2828
#define AROS_SLOWSTACKFORMAT 1
2929

arch/m68k-amiga/boot/romlog.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Idx Name Size VMA LMA File off Algn
2-
0 .rom 0007a270 00f80000 00f80000 00082000 2**2
3-
1 .ext 0007e89e 00e00000 00e00000 00002000 2**2
2+
0 .rom 00078d28 00f80000 00f80000 0007c000 2**2
3+
1 .ext 0007824a 00e00000 00e00000 00002000 2**2

arch/m68k-amiga/devs/sagasd/sagasd_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ static void SAGASD_IOTask(struct Library *SysBase)
938938

939939
if (io)
940940
{
941-
debug("io_Command received: %d", io->io_Command);
941+
//debug("io_Command received: %d", io->io_Command);
942942

943943
io->io_Error = SAGASD_PerformIO(io);
944944
io->io_Message.mn_Node.ln_Type=NT_MESSAGE;

arch/m68k-amiga/devs/sagasd/sdcmd.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -858,12 +858,11 @@ BOOL sdcmd_sw_detect_full(struct sdcmd *sd)
858858

859859
exit:
860860

861-
speed = SDCMD_CLKDIV_FAST;
862-
861+
//speed = SDCMD_CLKDIV_FAST;
863862
// Try setting the card into high speed mode. It's possible to check first, but just trying to set is enough?
864863
// First nibble is Function Group 1 - Access mode / Bus Speed mode; the only thing that applies to us in SPI mode.
865864

866-
sdcmd_send(sd, SDCMD_SWITCH_FUNCTION, 0x80fffff1);
865+
/*sdcmd_send(sd, SDCMD_SWITCH_FUNCTION, 0x80fffff1);
867866
r1 = sdcmd_r1a(sd);
868867
debug("r1=0x%lx", r1);
869868
if (!r1)
@@ -876,12 +875,12 @@ BOOL sdcmd_sw_detect_full(struct sdcmd *sd)
876875
877876
f1_sel = bits(&cmd6[63], 376, 4);
878877
879-
/* Out of all of the above, just check f1_sel to see if it is what we set it to.*/
878+
// Out of all of the above, just check f1_sel to see if it is what we set it to
880879
if (f1_sel == 1) speed = SDCMD_CLKDIV_FASTER;
881-
}
880+
} */
882881

883882
/* Switch to high speed mode */
884-
sdcmd_clkdiv(sd, speed);
883+
sdcmd_clkdiv(sd, SDCMD_CLKDIV_FASTER);
885884

886885
sdcmd_select(sd, FALSE);
887886

compiler/include/aros/cpu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#define AROS_PTRALIGN 8 /* Alignment for PTR */
5151
#define AROS_IPTRALIGN 8 /* Alignment for IPTR */
5252
#define AROS_DOUBLEALIGN 8 /* Alignment for double */
53-
#define AROS_WORSTALIGN 16 /* Worst case alignment */
53+
#define AROS_WORSTALIGN 32 /* Worst case alignment */
5454
#define AROS_STACKALIGN 16 /* Clean stack alignment */
5555
#elif defined __arm__
5656
# if defined __thumb2__

compiler/include/exec/memory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define EXEC_MEMORY_H
33

44
/*
5-
Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5+
Copyright 1995-2012, The AROS Development Team. All rights reserved.
66
$Id$
77
88
Desc: Memory handling
@@ -30,7 +30,7 @@ struct MemChunk
3030
};
3131

3232
/* Total size of struct MemChunk, including padding */
33-
#define MEMCHUNK_TOTAL (AROS_WORSTALIGN > sizeof(struct MemChunk) ? AROS_WORSTALIGN : sizeof(struct MemChunk))
33+
#define MEMCHUNK_TOTAL 32 //[WD] ApolloOS is set to 32 Byte Memory Boundary from Core 11350+ | (AROS_WORSTALIGN > sizeof(struct MemChunk) ? AROS_WORSTALIGN : sizeof(struct MemChunk))
3434
/* Total size of struct MemHeader, including padding */
3535
#define MEMHEADER_TOTAL (AROS_ROUNDUP2(sizeof(struct MemHeader), MEMCHUNK_TOTAL))
3636

rom/filesys/fat/fat_fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define DEBUG_DIRENTRY 0
2424
#define DEBUG_FILE 0
2525
#define DEBUG_DUMP 0
26-
#define DEBUG_LOCK 1
26+
#define DEBUG_LOCK 0
2727
#define DEBUG_NAMES 0
2828
#define DEBUG_NOTIFY 0
2929
#define DEBUG_OPS 0

0 commit comments

Comments
 (0)