Chameleon

Chameleon Commit Details

Date:2015-03-10 06:55:49 (9 years 1 month ago)
Author:ErmaC
Commit:2602
Parents: 2601
Message:Fix bug in malloc_init, use bios for enableA20() (Merge from Zenith432 branch)
Changes:
M/trunk/i386/boot2/boot.c
M/trunk/i386/libsaio/misc.c
M/trunk/CHANGES
M/trunk/i386/libsa/zalloc.c
M/trunk/i386/libsaio/saio_internal.h
M/trunk/i386/libsaio/biosfn.c

File differences

trunk/i386/libsaio/biosfn.c
10421042
10431043
10441044
1045
1046
1047
1048
1049
1050
1051
bios(&bb);
}
void enableA20(void)
{
bzero(&bb, sizeof bb); // Note: may be called before BSS section is initialized
bb.intno = 0x15;
bb.eax.rr = 0x2401;
bios(&bb);
}
trunk/i386/libsaio/misc.c
4646
4747
4848
49
4950
5051
5152
......
7071
7172
7273
73
74
7475
7576
7677
......
107108
108109
109110
111
110112
111113
112114
#include "libsaio.h"
#if UNUSED
/*
* keyboard controller (8042) I/O port addresses
*/
//==========================================================================
// Enable A20 gate to be able to access memory above 1MB
static inline void flushKeyboardInputBuffer();
static inline void flushKeyboardInputBuffer()
{
unsigned char ret;
/* wait until done */
flushKeyboardInputBuffer();
}
#endif /* UNUSED */
//==========================================================================
// Return the platform name for this hardware.
trunk/i386/libsaio/saio_internal.h
7272
7373
7474
75
7576
7677
7778
......
137138
138139
139140
140
141141
142142
143143
extern unsigned long getExtendedMemorySize();
extern unsigned long getConventionalMemorySize();
extern void sleep(int n);
extern void enableA20(void);
/* bootstruct.c */
extern void initKernBootStruct(void);
long AllocateMemoryRange(char *rangeName, long start, long length, long type);
/* misc.c */
extern void enableA20(void);
extern int checkForSupportedHardware();
extern int isLaptop();
extern void getPlatformName(char *nameBuf);
trunk/i386/boot2/boot.c
420420
421421
422422
423
424423
425424
425
426426
427427
428428
// own things, and then calls common_boot.
void boot(int biosdev)
{
initialize_runtime();
// Enable A20 gate before accessing memory above 1Mb.
enableA20();
initialize_runtime();
common_boot(biosdev);
}
trunk/i386/libsa/zalloc.c
7575
7676
7777
78
78
7979
8080
8181
zalloc_base = start ? start : (char *)ZALLOC_ADDR;
totalNodes = nodes ? nodes : ZALLOC_NODES;
zalloced = (zmem *) zalloc_base;
zavailable = (zmem *) zalloc_base + sizeof(zmem) * totalNodes;
zavailable = (zmem *) (zalloc_base + sizeof(zmem) * totalNodes);
zavailable[0].start = (char *)zavailable + sizeof(zmem) * totalNodes;
if (size == 0)
trunk/CHANGES
1
2
13
24
35
- Zenith432 : Fix bug in malloc_init, use bios for enableA20()
- meklort : Slightly improve decive selection name - add os version.
- Zenith432 : Interrupt Management
- Bungo : Added ability to auto-select last booted partition as the boot volume.
- Bungo : Added MacOSVerCurrent and MacOSVer2Int function to use instead of macros.

Archive Download the corresponding diff file

Revision: 2602